Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This adds `lean.h.bc`, a LLVM bitcode file of the Lean runtime that is to be inlined. This is programatically generated. 1. This differs from the previous `libleanrt.ll`, since it produces an LLVM bitcode file, versus a textual IR file. The bitcode file is faster to parse and build an in-memory LLVM module from. 2. We build `lean.h.bc` by adding it as a target to `shell`, which ensures that it is always built. 3. We eschew the need for: ```cpp ``` which causes breakage in the build, since changing the meaning of `static` messes with definitions in the C++ headers. Instead, we build `lean.h.bc` by copying everything in `src/include/lean/lean.h`, renaming `inline` to `__attribute__(alwaysinline)` [which forces LLVM to generate `alwaysinline` annotations], then running the `-O3` pass pipeline to get reasonably optimised IR, and will be perfectly inlined when linked into the generated LLVM code by `src/Lean/Compiler/IR/EmitLLVM.lean`. Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch> |
||
|---|---|---|
| .github | ||
| .vscode | ||
| doc | ||
| images | ||
| nix | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .ignore | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| LICENSES | ||
| README.md | ||
| RELEASES.md | ||
| shell.nix | ||
This is the repository for Lean 4, which is currently being released as milestone releases towards a first stable release. Lean 3 is still the latest stable release.
About
- Quickstart
- Walkthrough installation video
- Quick tour video
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean first chapter is available!
- Manual
- Release notes starting at v4.0.0-m3
- Examples
- FAQ
Installation
See Setting Up Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.