Closed dselsam closed 3 years ago
This looks like Lean 4 desugars x.num
to rat.num (self := x)
. And Lean 3 uses a different name for the argument.
Apparently it only desugars to self
if the function (in this case rat.num
) is registered as a projection. This is why the error cannot be reproduced without abstraction-breaking code that registers projections.
@gebner What if we just backport the name-change? https://github.com/leanprover-community/lean/blob/master/src/frontends/lean/structure_cmd.cpp#L1248
Backport sounds good to me.
I have not been able to reproduce this without importing mathlib.