An open API service indexing awesome lists of open source software.

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

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.

![example](./example.gif)

[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
```