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(group_theory/perm/basic): mul_left is a monoid hom #17900

Closed
wants to merge 3 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Dec 11, 2022

equiv.mul_left is a monoid homomorphism.


Match leanprover-community/mathlib4#1348

Open in Gitpod

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR t-algebra Algebra (groups, rings, fields etc) labels Dec 11, 2022
Copy link
Collaborator Author

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Here are a few difficulties I encountered.


import logic.function.iterate
import group_theory.perm.basic
import algebra.group_power.lemmas
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

algebra.hom.iterate and group_theory.perm.basic are neighbor files. It makes more sense to have equiv.perm.coe_pow in group_theory.perm.basic and I have an upcoming PR that will make it refl, so algebra.hom.iterate won't even be needed anymore!

Comment on lines 421 to 448
section add_group
variables [add_group α] (a b : α)

@[simp] lemma add_left_zero : equiv.add_left (0 : α) = 1 := ext zero_add
@[simp] lemma add_right_zero : equiv.add_right (0 : α) = 1 := ext add_zero

@[simp] lemma add_left_add : equiv.add_left (a + b) = equiv.add_left a * equiv.add_left b :=
ext $ add_assoc _ _

@[simp] lemma add_right_add : equiv.add_right (a + b) = equiv.add_right b * equiv.add_right a :=
ext $ λ _, (add_assoc _ _ _).symm

@[simp] lemma add_left_neg : equiv.add_left (-a) = (equiv.add_left a)⁻¹ := equiv.coe_inj.1 rfl
@[simp] lemma add_right_neg : equiv.add_right (-a) = (equiv.add_right a)⁻¹ := equiv.coe_inj.1 rfl

@[simp] lemma add_left_nsmul (n : ℕ) : equiv.add_left (n • a) = equiv.add_left a ^ n :=
map_nsmul (⟨equiv.add_left, add_left_zero, add_left_add⟩ : α →+ additive (perm α)) _ _

@[simp] lemma add_right_nsmul (n : ℕ) : equiv.add_right (n • a) = equiv.add_right a ^ n :=
@add_left_nsmul αᵃᵒᵖ _ _ _

@[simp] lemma add_left_zsmul (n : ℤ) : equiv.add_left (n • a) = equiv.add_left a ^ n :=
map_zsmul (⟨equiv.add_left, add_left_zero, add_left_add⟩ : α →+ additive (perm α)) _ _

@[simp] lemma add_right_zsmul (n : ℤ) : equiv.add_right (n • a) = equiv.add_right a ^ n :=
@add_left_zsmul αᵃᵒᵖ _ _ _

end add_group
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to_additive gave up on me throughout, because perm α is a multiplicative group and to_additive isn't smart enough to insert additive in the right places.

Comment on lines 479 to 481
@[simp, to_additive] lemma mul_right_zpow : ∀ n : ℤ, equiv.mul_right (a ^ n) = equiv.mul_right a ^ n
| (int.of_nat n) := by simp
| (int.neg_succ_of_nat n) := by simp
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unexplicably, not a single proof works for the four of mul_left_pow/mul_right_pow/mul_left_zpow/mul_right_zpow.

@Vierkantor Vierkantor self-assigned this Jan 5, 2023
Copy link
Collaborator

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

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

Please don't forget to open a corresponding mathlib4 PR. LGTM otherwise.

bors d+

src/group_theory/perm/basic.lean Show resolved Hide resolved
@bors
Copy link

bors bot commented Jan 5, 2023

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

@leanprover-community-bot-assistant leanprover-community-bot-assistant 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 Jan 5, 2023
@YaelDillies
Copy link
Collaborator Author

mathlib4 approved, so

bors merge

bors bot pushed a commit that referenced this pull request Jan 6, 2023
`equiv.mul_left` is a monoid homomorphism.
@bors
Copy link

bors bot commented Jan 6, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(group_theory/perm/basic): mul_left is a monoid hom [Merged by Bors] - feat(group_theory/perm/basic): mul_left is a monoid hom Jan 6, 2023
@bors bors bot closed this Jan 6, 2023
@bors bors bot deleted the equiv_mul_left_monoid_hom branch January 6, 2023 16:29
bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Jan 6, 2023
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. t-algebra Algebra (groups, rings, fields etc)
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants