New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symm attribute error #855
Comments
siddhartha-gadgil
added a commit
that referenced
this issue
Dec 5, 2022
the test was failing for dependent cases eg #855
This has been narrowed, but some expertise is needed to make decisions on correcting this (or simply correcting the code - I gathered there are other issues). Will add details in a WIP PR. |
bors bot
pushed a commit
that referenced
this issue
Dec 6, 2022
Fixes error I made: introducing a test for `symm` and `trans` attributes to check that the lemmas were "genuinely" symm/trans lemmas. However the tests had false positives, e.g. #855 (which has been added to the tests). This short commit removes the tests. They were not present in `mathlib3` anyway and the worst that happens if a lemma is incorrectly labelled is that the `symm` tactic tries and fails with this. As a warning it may be useful to have a test, but it should have no false positives. For now it seems the best approach is to drop the test.
bors bot
pushed a commit
that referenced
this issue
Dec 6, 2022
Fixes error I made: introducing a test for `symm` and `trans` attributes to check that the lemmas were "genuinely" symm/trans lemmas. However the tests had false positives, e.g. #855 (which has been added to the tests). This short commit removes the tests. They were not present in `mathlib3` anyway and the worst that happens if a lemma is incorrectly labelled is that the `symm` tactic tries and fails with this. As a warning it may be useful to have a test, but it should have no false positives. For now it seems the best approach is to drop the test.
It looks like import Mathlib.Algebra.Hom.Group
import Mathlib.Logic.Equiv.Basic
def MulHom.inverse [Mul M] [Mul N] (f : M →ₙ* N) (g : N → M) (h₁ : Function.LeftInverse g f)
(h₂ : Function.RightInverse g f) : N →ₙ* M where
toFun := g
map_mul' x y :=
calc
g (x * y) = g (f (g x) * f (g y)) := by rw [h₂ x, h₂ y]
_ = g (f (g x * g y)) := by rw [f.map_mul]
_ = g x * g y := h₁ _
structure MulEquiv (M N : Type _) [Mul M] [Mul N] extends M ≃ N, M →ₙ* N
infixl:25 " ≃* " => MulEquiv
@[symm]
def foo_symm {M N : Type _} [Mul M] [Mul N] (h : M ≃* N) : N ≃* M :=
{ h.toEquiv.symm with map_mul' := (h.toMulHom.inverse h.toEquiv.symm h.left_inv h.right_inv).map_mul } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code produces an error on the
symm
attribute:It appears that
trans
is similarly having trouble recognising the structure of trans lemmas.The text was updated successfully, but these errors were encountered: