This PR fixes the interaction between `backward.whnf.reducibleClassField` and `isDefEqDelta`'s argument-comparison heuristic. When `backward.whnf.reducibleClassField` is enabled, `unfoldDefault` reduces class field projections past the `.proj` form at `.instances` transparency. This causes `isDefEqDelta` to lose the instance structure that `isDefEqProj` needs to bump transparency for instance-implicit parameters. The fix adds an `.abbrev` branch in `isNonTrivialRegular` that classifies class field projections as nontrivial when the option is enabled, so `tryHeuristic` applies the argument-comparison heuristic (with the correct transparency bump) instead of unfolding. Key insight: all projection functions receive `.abbrev` kernel hints (not `.regular`), regardless of their reducibility status. Structure projections default to `.reducible` status, while class projections default to `.semireducible` status. The old code only handled the `.regular` case and treated everything else (including `.abbrev`) as trivial. Also fixes two minor comment issues in `tryHeuristic`: "non-trivial regular definition" → "non-trivial definition" (since `.abbrev` definitions can now be nontrivial too), and "when `f` is not simple" → "when `f` is simple" (logic inversion in the original comment). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bench | ||
| bench-radar | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lake | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| CMakeLists.txt | ||
| common.sh | ||
| lakefile.toml | ||
| lean-toolchain | ||