Pantograph/examples/README.md

34 lines
941 B
Markdown
Raw Normal View History

2024-07-01 12:18:00 -07:00
# Examples
2024-09-09 19:28:35 -07:00
For a quick introduction of the API, fire up Jupyter and open `all.ipynb`. (Did
you remember to `poetry install`?)
2024-07-01 12:18:00 -07:00
``` sh
poetry run jupyter notebook
```
2024-05-17 20:45:29 -07:00
This example showcases how to bind library dependencies and execute the `Aesop`
tactic in Lean. First build the example project:
``` sh
pushd Example
lake build
popd
```
2024-05-31 17:09:12 -07:00
This would generate compiled `.olean` files. Then run one of the examples from the
2024-05-17 20:56:01 -07:00
project root:
2024-05-17 20:45:29 -07:00
``` sh
2024-05-17 20:56:01 -07:00
poetry run examples/aesop.py
2024-10-03 01:32:43 -07:00
poetry run examples/sketch.py
2024-05-31 17:09:12 -07:00
poetry run examples/data.py
2024-05-17 20:45:29 -07:00
```
Warning: If you make modifications to any Lean files, you must re-run `lake
build`! Moreover, the version of the Lean used in the example folder (including
dependencies in `lakefile.lean` and `lean-toolchain`) **must match exactly**
with the version in `src/`!
2024-05-31 17:09:12 -07:00
2024-10-03 01:32:43 -07:00
* `aesop.py`: Example of how to use the `aesop` tactic
* `data.py`: Example of loading training data
* `sketch.py`: Example of loading a sketch