Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Sebastian Graf 313abdb49f
fix: if _ : p ... syntax in new do elaborator (#13192)
This PR fixes the handling of anonymous dependent `if` (`if _ : cond
then ... else ...`) inside `do` blocks when using the new do elaborator.

The `_%$tk` binder pattern was incorrectly quoted as `$(⟨tk⟩):hole` in
the generated `dite` syntax, causing "elaboration function for
`termDepIfThenElse` has not been implemented" errors. The fix quotes it
correctly as `_%$tk`.

A test case is added to verify both anonymous (`if _ : ...`) and named
(`if h : ...`) dependent `if` work in do blocks.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 16:58:48 +00:00
.claude chore: CLAUDE.md individual module build instructions (#13189) 2026-03-30 14:30:16 +00:00
.github
.vscode
doc
images
releases_drafts
script
src fix: if _ : p ... syntax in new do elaborator (#13192) 2026-03-30 16:58:48 +00:00
stage0 chore: support jj workspaces in cmake git hash detection (#13190) 2026-03-30 16:32:07 +00:00
tests fix: if _ : p ... syntax in new do elaborator (#13192) 2026-03-30 16:58:48 +00:00
.gitattributes
.gitignore
.gitpod.Dockerfile
.gitpod.yml
.ignore
CMakeLists.txt
CMakePresets.json
CODEOWNERS
CONTRIBUTING.md
flake.lock
flake.nix
lean-toolchain
LICENSE
LICENSES
README.md
RELEASES.md

This is the repository for Lean 4.

About

Installation

See Install Lean.

Contributing

Please read our Contribution Guidelines first.

Building from Source

See Building Lean.