Zulip Chat Archive
Stream: mathlib4
Topic: to_additive instance priority
Moritz Doll (Nov 28 2022 at 06:42):
I want to fix my earlier hacky solution of the instance priority in to_additive
, but the file Algebra.Group.OrderSynonym
fails with some very weird messages (see https://github.com/leanprover-community/mathlib4/actions/runs/3562129264/jobs/5983590994 ). I've checked what my code is doing and it sets the correct priority, so I suspect there is yet another bug in to_additive
Moritz Doll (Nov 28 2022 at 06:47):
oh and there seems to be bug in to_additive
that primed names cause issues (@[to_additive OrderDual.SMul']
is not doing anything)
Floris van Doorn (Nov 28 2022 at 09:33):
Floris van Doorn (Nov 28 2022 at 10:58):
This is not a bug in to_additive
, just a few errors with the usage of to_additive
in relation to automatically generated instance
names. I pushed a fix.
Floris van Doorn (Nov 28 2022 at 11:05):
I cannot reproduce your last bug. I think you were not seeing any output from @[to_additive? ...]
since the declaration already exists. Note: after mathlib4#718 @[to_additive? ...]
should always give some output.
Moritz Doll (Nov 28 2022 at 11:52):
thanks for looking into it - should be align the to_additive
version as well?
Moritz Doll (Nov 28 2022 at 11:54):
as for the primed variables: I've printf debugged to_additive
to see whether the instance priority was set correctly and for the primed variables there was no output and hovering over the name in to_additive
also gave nothing
Floris van Doorn (Nov 28 2022 at 13:13):
Moritz Doll said:
thanks for looking into it - should be align the
to_additive
version as well?
I don't know. It's never done, but I expect we indeed do need that as well (which means we're probably missing hundreds of #align
's)
Jireh Loreaux (Nov 28 2022 at 13:14):
I've been aligning all the additive versions. It's definitely necessary if the non-additive version needed aligning.
Yakov Pechersky (Nov 28 2022 at 13:16):
In what instances does one need to align the instance names? In general, most instances do not get referenced by name.
Jireh Loreaux (Nov 28 2022 at 13:19):
I align instances that are manually named as well as parent projections for classes which extend other classes as these are most likely to be referenced by name.
Last updated: Dec 20 2023 at 11:08 UTC