Commit 2023-12-04 12:41 7d9d044e
View on Github →fix(NumberTheory/LegendreSymbol/AddCharacter): Disentangle coercion mess for AddChar
(#8803)
There are two things going on here:
AddChar G R
has two syntactically different coercions to functionG → R
:FunLike.coe
viaAddChar.monoidHomClass
AddChar.toFun
viaAddChar.hasCoeToFun
AddChar.hasCoeToFun
andAddChar.monoidHomClass
together create a diamond for the typeclass problemFunLike (AddChar G R) _ _
This PR fixes both problems by- removing the
HasCoeToFun
instance and the correspondingAddChar.toFun
- changing
MonoidHomClass (AddChar G R) (Multiplicative G) R
toFunLike (AddChar G R) G fun _ ↦ R
(isn't the whole point ofAddChar
to go from an additive group to a multiplicative one anyway?) This PR isn't meant to be perfect. It is a stopgag to an issue that has completely startled progress on LeanAPAP. Once it is fixed, a much more thorough refactor will follow. This breaks a rewrite downstream that now unifies to some defeq but not syntactically equal type. This is more an indication of fragility in the original proof.