Leonardo de Moura b81e51512d fix: handle universe level commutativity in sym pattern matching
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>
2026-03-15 00:43:53 +00:00
2026-03-11 18:55:46 +00:00
2026-03-11 21:36:12 +00:00
2022-03-18 15:28:20 +01:00
2026-02-11 01:17:40 +00:00
2026-02-11 01:17:40 +00:00
Description
No description provided
Readme 5 GiB
Languages
Lean 94.3%
C++ 4.1%
Python 0.6%
Shell 0.4%
CMake 0.3%