https://github.com/dwrensha/animate-lean-proofs
tool for turning Lean proofs into Blender animations
https://github.com/dwrensha/animate-lean-proofs
lean4
Last synced: over 1 year ago
JSON representation
tool for turning Lean proofs into Blender animations
- Host: GitHub
- URL: https://github.com/dwrensha/animate-lean-proofs
- Owner: dwrensha
- License: apache-2.0
- Created: 2024-03-06T18:59:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-08T18:33:14.000Z (over 1 year ago)
- Last Synced: 2025-01-25T14:42:10.509Z (over 1 year ago)
- Topics: lean4
- Language: Lean
- Homepage: https://youtu.be/KuxFWwwlEtc
- Size: 1.88 MB
- Stars: 53
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Animate Lean Proofs
This is a tool that accepts as input any Lean 4 theorem,
and produces as output a Blender animation showing
the steps of the proof smoothly evolving in sequence.

[This video](https://youtu.be/KuxFWwwlEtc) provides some more background
and shows some examples.
[
](http://youtu.be/KuxFWwwlEtc)
## more examples
| | |
| ----- | ---- |
| [IMO 2024 Problem 2](https://youtu.be/5IARsdn78xE) | [
](https://youtu.be/5IARsdn78xE)|
| [IMO 1987 Problem 4](https://youtu.be/gi8ZTjRO-xI) | [
](https://youtu.be/gi8ZTjRO-xI)|
## setup
1. Install [Blender](https://www.blender.org/).
I've been using v4.0.2, but any recentish version should work.
2. Install Pygments:
```shell
$ pip install pygments
```
## running
```shell
$ lake exe cache get
$ lake exe Animate Input/NNG.lean NNG.mul_pow > /tmp/mul_pow.json
$ blender --python animate_proof.py -- /tmp/mul_pow.json
```