Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Paul Reichert 98e4b2882f
refactor: migrate to new ranges (#8841)
This PR migrates usages of `Std.Range` to the new polymorphic ranges.

This PR unfortunately increases the transitive imports for
frequently-used parts of `Init` because the ranges now rely on iterators
in order to provide their functionality for types other than `Nat`.
However, iteration over ranges in compiled code is as efficient as
before in the examples I checked. This is because of a special
`IteratorLoop` implementation provided in the PR for this purpose.

There were two issues that were uncovered during migration:

* In `IndPredBelow.lean`, migrating the last remaining range causes
`compilerTest1.lean` to break. I have minimized the issue and came to
the conclusion it's a compiler bug. Therefore, I have not replaced said
old range usage yet (see #9186).
* In `BRecOn.lean`, we are publicly importing the ranges. Making this
import private should theoretically work, but there seems to be a
problem with the module system, causing the build to panic later in
`Init.Data.Grind.Poly` (see #9185).
* In `FuzzyMatching.lean`, inlining fails with the new ranges, which
would have led to significant slowdown. Therefore, I have not migrated
this file either.
2025-07-07 12:41:53 +00:00
.github chore: CI: restore cache in update-stage0 (#9179) 2025-07-03 20:55:14 +00:00
doc chore: update doc/dev/ffi.md after #9088 (#9112) 2025-07-01 01:00:59 +00:00
images
nix
releases_drafts
script chore: improvements to release automation (#9119) 2025-07-01 02:39:10 +00:00
src refactor: migrate to new ranges (#8841) 2025-07-07 12:41:53 +00:00
stage0 feat: local and scoped grind_pattern (#9214) 2025-07-05 20:36:56 -07:00
tests refactor: migrate to new ranges (#8841) 2025-07-07 12:41:53 +00:00
.gitattributes
.gitignore feat: further release automation (#9092) 2025-06-30 05:44:10 +00:00
.gitpod.Dockerfile
.gitpod.yml
.ignore
CMakeLists.txt chore: compile stage 0 against correct version string (#9085) 2025-06-29 20:52:46 +00:00
CMakePresets.json
CODEOWNERS
CONTRIBUTING.md
flake.lock
flake.nix
lean-toolchain
lean.code-workspace
LICENSE
LICENSES
README.md chore: remove old documentation site (#7974) 2025-05-14 14:31:33 +00:00
RELEASES.md

This is the repository for Lean 4.

About

Installation

See Setting Up Lean.

Contributing

Please read our Contribution Guidelines first.

Building from Source

See Building Lean.