Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
@kha This modification saved 150k object allocations on my machine. BTW, the function ``` def command_parser.run (commands : list command_parser) (p : command_parser) : parser_t command_parser_config id syntax := λ cfg, (p.run cfg).run_parsec $ λ _, any_of $ commands.map (λ p, p.run cfg) ``` is also affected by the problem I described at Zulip. It is another example where eager eta-expansion is bad. Every time we call it, we will create approx. 20 closures and 20 cons memory cells. We have at least 600 commands in core.lean. So, just the `map` nested there will generate 24k memory allocations. Moreover, the problem will get worse as we add more commands. |
||
|---|---|---|
| .github | ||
| bin | ||
| doc | ||
| gen | ||
| images | ||
| lean4-mode | ||
| library | ||
| script | ||
| src | ||
| tests | ||
| .appveyor.yml | ||
| .clang-format | ||
| .codecov.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| LICENSE | ||
| README.md | ||
| License | Windows | Linux / macOS | Test Coverage | Chat |
|---|---|---|---|---|
![]() |
About
- Homepage
- Theorem Proving in Lean
- Core library
- Change Log
- FAQ
- For HoTT mode, please use Lean2.
Installation
Stable and nightly binary releases of Lean are available on the homepage. For building Lean from source, see the build instructions.
Miscellaneous
- Building Doxygen Documentation:
doxygen src/Doxyfile - Coding Style
- Library Style Conventions
- Git Commit Conventions
- Automatic Builds
- Syntax Highlight Lean Code in LaTeX
- Exporting, and reference type-checkers
