fix: interaction between `simp` and `backward.whnf.reducibleClassField` This PR fixes a bug where `simp` made no progress on class projection reductions when `backward.whnf.reducibleClassField` is `true`. The issue was in `reduceProjFn?`: for class projections applied to constructor instances (`Class.projFn (Class.mk ...)`), the code called `reduceProjCont? (← unfoldDefinitionAny? e)`. The helper `reduceProjCont?` expects the unfolded result to have a `.proj` head so it can apply `reduceProj?`. However, when `reducibleClassField` is enabled, `unfoldDefault` in WHNF.lean already reduces the `.proj` node during unfolding. The fully-reduced result no longer has a `.proj` head, so `reduceProjCont?` discards it and returns `none`. The fix uses `unfoldDefinitionAny?` directly, bypassing `reduceProjCont?`. The dsimp traversal revisits the result (via `.visit`) and handles any remaining `.proj` nodes naturally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This is the repository for Lean 4.
See Install Lean.
Please read our Contribution Guidelines first.
See Building Lean.