-
Notifications
You must be signed in to change notification settings - Fork 299
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
[Merged by Bors] - feat(tactic/noncomm_ring): add noncomm_ring tactic #2858
Conversation
@@ -84,7 +84,7 @@ begin | |||
let B := Eb R j i hij.symm, | |||
intros c, | |||
have c' : A.val ⬝ B.val = B.val ⬝ A.val := by { rw [←sub_eq_zero, ←sl_bracket, c.abelian], refl, }, | |||
have : 1 = 0 := by simpa [matrix.mul_val, hij] using (congr_fun (congr_fun c' i) i), | |||
have : (1 : R) = 0 := by simpa [matrix.mul_val, hij] using (congr_fun (congr_fun c' i) i), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unrelated proposed change due to an observation of @kckennylau https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/a.20puzzle
Also adding a few more tests
I think it's easy to make this a fair bit more powerful. Instead of using
just as easily. Similarly, |
I'm happy to just commit some more suggestions direct to this PR, or leave you to do it, as you prefer. |
This will cause some tests to fail for now.
Thank you very much for these suggestions. I have dropped the various lemmas you highlighted. I will have time to return to this late this afternoon but please feel free to add commits / take over this PR as you desire! |
I still trust Scott Morrison that we should prefer to work via gsmul but brief experiments suggest that this is not totally trivial. I am thus reinstating the `mul_two` and `two_mul` so that tests pass, pending further improvements.
As noted in the commit message, I still trust that you are right @semorrison but I thought it would be better to leave this with passing tests. Having experimented with replacing |
I added a few more lemmas |
bors d+ |
✌️ ocfnash can now approve this pull request. To approve and merge a pull request, simply reply with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add import tactic.noncomm_ring
to src/tactic/default.lean
.
Thanks again @semorrison you have made this so much better than it was, and have helped me learn in the process. Glancing over the tests, I think we've got a nice little new tool. |
bors r+ |
Fixes #2727 Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Pull request successfully merged into master. Build succeeded: |
…ity#2858) Fixes leanprover-community#2727 Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Fixes #2727
Co-authored-by: Scott Morrison scott.morrison@gmail.com