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] - chore(group_theory): some new convenience lemmas #7555

Closed
wants to merge 5 commits into from

Conversation

PatrickMassot
Copy link
Member

@PatrickMassot PatrickMassot commented May 9, 2021

from LTE


This does not decrease the mess with group_theory/coset vs group_theory/quotient_group and various implicit or explicit parameters, it's only adding more API on top of the mess. In particular I added ad hoc reformulations for additive groups in order to avoid the x + -y curse of to_additive.

I also changed slightly an old lemma since preimages are more convenient to use than direct images.

Open in Gitpod

@PatrickMassot PatrickMassot added the awaiting-review The author would like community review of the PR label May 9, 2021
Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

I'm not really convinced that the mk'_eq_mk'_... lemmas here are a good idea. Why duplicate every lemma about coe when the user can just write rw coe_mk', the_rest_of_the_proof_using_coe?

PatrickMassot and others added 2 commits May 9, 2021 12:35
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@PatrickMassot
Copy link
Member Author

I tried using only coe earlier but it was painful. I'll try again because I don't have time to waste on this discussion.

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Thanks for pruning those lemmas, the rest looks good to me (modulo a whitespace nit you can ignore).

This lemma might be worth adding just below inv_mem_iff in subgroup.lean too:

@[to_additive] lemma div_mem_comm_iff {a b : G} : a / b ∈ H ↔ b / a ∈ H :=
by rw [←H.inv_mem_iff, div_eq_mul_inv, div_eq_mul_inv, mul_inv_rev, inv_inv]

which gives you the additive add_subgroup.sub_mem_comm_iff : a - b ∈ H ↔ b - a ∈ H which it sounds like would make switching between the variations you had before easier.

src/group_theory/subgroup.lean Outdated Show resolved Hide resolved
@eric-wieser
Copy link
Member

bors d+

@bors
Copy link

bors bot commented May 9, 2021

✌️ PatrickMassot 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 May 9, 2021
PatrickMassot and others added 2 commits May 9, 2021 13:52
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@PatrickMassot
Copy link
Member Author

bors merge

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label May 9, 2021
bors bot pushed a commit that referenced this pull request May 9, 2021
@bors
Copy link

bors bot commented May 9, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(group_theory): some new convenience lemmas [Merged by Bors] - chore(group_theory): some new convenience lemmas May 9, 2021
@bors bors bot closed this May 9, 2021
@bors bors bot deleted the quotient_group branch May 9, 2021 15:50
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. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants