Repository navigation
We've changed a lot since v1.4. The big themes are importing real JAX and PyTorch programs, control flow included; letting every reduction say in which order it adds; and moving the whole stack to Lean 4.36 and FloatLib 4.1.0.
Lean 4.36 and FloatLib 4.1.0
The library, the guide, the site and the Python bindings now build on Lean 4.36 and Mathlib 4.36, with FloatLib 4.1.0. FloatLib's stronger roundoff now proves a few roundoff analyses we couldn't before, and none of our existing ones got weaker.
Importing JAX and PyTorch
The JAX importer now covers 167 lax primitives and the PyTorch capture 151 core ATen operators. New are complex values, float8 formats, the special functions, more linear algebra and wider dtype coverage. Where JAX or PyTorch differ from their documented behaviour or from IEEE 754, we follow the specification and record the difference.
Control flow
Programs can now carry real control flow: a cond runs only the branch it selects, and scan and while are loops, so a loop's trip count can depend on the inputs. Anything the capture can decide at import is still lowered as before, and we test this against the previous release.
Reduction orders
Every reduction can say in which order it combines its entries, as an explicit tree from FloatLib. The default is the left fold we had before, proved equal to the old definitions. Pairwise and blocked orders, including the order of our CUDA sum, come with error bounds in the depth of the tree. The order travels with the program in the IR, whose wire format is now version 5; version 4 records no longer decode.
Proofs and numerics
igamma, igammac, betainc and zeta are now proved smooth on their domains, so their gradient theorems apply. We also added roundoff coverage for the RL and optimizer functions, a policy KL in the stable form of Amos (2026), a proof that reduce_precision rounds once in every IEEE format, and many smaller fixes.
Cleanup and documentation
We merged repeated proofs, split our largest modules, and expanded the documentation and examples.
Thanks to Vel (@Code4me2) for the fix in PR #40! Excited for this release :)