mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
b81e51512de8b7b3a0b0edd9ce2440b76d485f2d
This commit fixes a bug where `max u v` and `max v u` fail to match in SymM's pattern matching. The fix has three parts: - Eagerly normalize universe levels in patterns at creation time (`preprocessDeclPattern`, `preprocessExprPattern`, `mkSimprocPatternFromExpr`) - Normalize the target level in `processLevel` before matching - Add `tryApproxMaxMax` to `processLevel` and `isLevelDefEqS` to handle `max` commutativity when one argument matches structurally Also moves `normalizeLevels` from `Grind.Util` to `Sym.Util` to avoid code duplication, since both Sym and Grind need it. 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%