bug: dsimp
does not close reflexive equality goals if they are wrapped in metadata
#2514
Closed
1 task done
Prerequisites
Description
dsimp
has a feature where it can close goals that can be solved byEq.refl
if the goal is obviously an equality and the LHS and RHS are defeq (up to reducible transparency). For exampleHowever, sometimes tactics can insert metadata around this equality and then
dsimp
no longer tries to useEq.refl
.One can see the metadata (
noImplicitLambda
) by settingset_option pp.raw true
.(This was reported by Heather Macbeth on Zulip)
Here is another test that demonstrates the issue. Removing the
have
line removes the need for therfl
. Thehave
line can also be replaced byrefine no_implicit_lambda% ?_
to more explicitly introduce metadata.In
Lean.Meta.dsimpGoal
one can see that there istargetNew.eq?
instead oftargetNew.consumeMData.eq?
, which is likely the cause. Other pattern matches in that function refer totargetNew.consumeMData
rather thantargetNew
.Versions
leanprover/lean4:v4.0.0-rc4
The text was updated successfully, but these errors were encountered: