mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 10:24:07 +00:00
7120d9aef5f64c21b1af256cc171f12775a472e2
This PR adds eta reduction to the sym discrimination tree lookup functions (`getMatch`, `getMatchWithExtra`, `getMatchLoop`). Without this, expressions like `StateM Nat` that unfold to eta-expanded forms `(fun α => StateT Nat Id α)` fail to match discrimination tree entries for the eta-reduced form `(StateT Nat Id)`. Also optimizes `etaReduce` with an early exit for non-lambda expressions and removes a redundant `n == 0` check. Includes a test verifying that `P (StateM Nat)` matches a disc tree entry for `P (StateT Nat Id)`. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This is the repository for Lean 4.
About
- Quickstart
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean
- Documentation Overview
- Language Reference
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
Installation
See Install Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.
Languages
Lean
94.3%
C++
4.1%
Python
0.6%
Shell
0.4%
CMake
0.3%