Skip to content
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(algebra/*/basic): add trivial lemmas #13416

Closed
wants to merge 3 commits into from

Conversation

ericrbg
Copy link
Collaborator

@ericrbg ericrbg commented Apr 13, 2022

These save you from having to fiddle with mul_one when you want to rewrite them the other way, or allow easier commutativity rewrites.


Open in Gitpod

@ericrbg ericrbg added awaiting-CI The author would like to see what CI has to say before doing more work. awaiting-review The author would like community review of the PR labels Apr 13, 2022
src/algebra/ring/basic.lean Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Apr 13, 2022
@@ -855,6 +860,11 @@ protected def function.surjective.non_assoc_ring
{ .. hf.add_comm_group f zero add neg sub nsmul gsmul, .. hf.mul_zero_class f zero mul,
.. hf.distrib f add mul, .. hf.mul_one_class f one mul }

lemma sub_one_mul (a b : α) : (a - 1) * b = a * b - b :=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth having one_sub_mul too

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I go full ham and go for one_add_mul as well? or is that too much

@riccardobrasca
Copy link
Member

Thanks!

bors d+

@bors
Copy link

bors bot commented Apr 19, 2022

✌️ ericrbg can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Apr 19, 2022
@ericrbg
Copy link
Collaborator Author

ericrbg commented Apr 19, 2022

bors r+

bors bot pushed a commit that referenced this pull request Apr 19, 2022
These save you from having to fiddle with `mul_one` when you want to rewrite them the other way, or allow easier commutativity rewrites.



Co-authored-by: Eric Rodriguez <37984851+ericrbg@users.noreply.github.com>
@bors
Copy link

bors bot commented Apr 19, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/*/basic): add trivial lemmas [Merged by Bors] - feat(algebra/*/basic): add trivial lemmas Apr 19, 2022
@bors bors bot closed this Apr 19, 2022
@bors bors bot deleted the ericrbg/basic_lemmas branch April 19, 2022 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants