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 Rhas two syntactically different coercions to functionG → R:FunLike.coeviaAddChar.monoidHomClassAddChar.toFunviaAddChar.hasCoeToFun
AddChar.hasCoeToFunandAddChar.monoidHomClasstogether create a diamond for the typeclass problemFunLike (AddChar G R) _ _This PR fixes both problems by- removing the
HasCoeToFuninstance and the correspondingAddChar.toFun - changing
MonoidHomClass (AddChar G R) (Multiplicative G) RtoFunLike (AddChar G R) G fun _ ↦ R(isn't the whole point ofAddCharto 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.