isDefEq
creates type-incorrect terms when applying isDefEqSingleton
rule
#6420
Labels
bug
Something isn't working
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
Given a projection of a metavariable for a one-field structure that's unified with a term of the wrong type, the result is a type-incorrect term assigned to the metavariable.
Context
[Broader context that the issue occurred in. If there was any prior discussion on the Lean Zulip, link it here as well.]
Steps to Reproduce
Consider the following code:
Expected behavior: We should see
unifiable? false
in the output.Actual behavior: Instead this outputs
Versions
Lean 4.16.0-nightly-2024-12-19
Target: x86_64-unknown-linux-gnu
Additional Information
Changing the structure to have more than one field causes the unification to correctly fail.
Reported on Zulip
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: