Open winstonyin opened 1 year ago
I'll look into that tonight :)
Looks like to_additive
always has problems if a class extends 2+ other classes. The relevant TODO is this here:
Unfortunately I don't know how to fix this just now, maybe somebody else does.
That todo is not quite the right one. It is for translating constructors, like AddMonoidHomClass.mk
. However, this is not actually necessary: the implementation will do fine without these translations.
@digama0: Am I correct that the environment does not contain information about which structures a given structure extends
? What is the best way forward? The @[ancestor]
hack from Lean 3? Make a Core PR that records this information?
When I removed the ancestor
attribute from mathport, my understanding was that this information either already exists or would be stored by lean to avoid the need for duplicating the information. (That said I haven't looked at it in detail and a core PR may be needed.)
I created a RFC for a core PR at leanprover/lean4#1881
This has come up again in #3171; it would be great to revisit it.
See PR #659, in
Algebra.Hom.Group
, around theoremMonoidHom.coe_coe
. If the quickfixis removed, the
to_additive
tactic seems to be looking forAddMonoidHomClass.toOneHomClass
, when it should look forAddMonoidHomClass.toZeroHomClass
. It has no trouble translatingOneHomClass
toZeroHomClass
, but has trouble withtoOneHomClass
.