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/*,group_theory/*): instances/lemmas about is_scalar_tower and smul_comm_class #9533

Closed
wants to merge 11 commits into from

Conversation

urkud
Copy link
Member

@urkud urkud commented Oct 4, 2021


Open in Gitpod

@urkud urkud added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. labels Oct 4, 2021
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Comment on lines +49 to +53
@[to_additive]
instance smul_comm_class_both [monoid N] [monoid P] [has_scalar M N] [has_scalar M P]
[smul_comm_class M N N] [smul_comm_class M P P] :
smul_comm_class M (N × P) (N × P) :=
⟨λ c x y, by simp [smul_def, mul_def, mul_smul_comm]⟩
Copy link
Member

Choose a reason for hiding this comment

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

Strictly we should also have the

Suggested change
@[to_additive]
instance smul_comm_class_both [monoid N] [monoid P] [has_scalar M N] [has_scalar M P]
[smul_comm_class M N N] [smul_comm_class M P P] :
smul_comm_class M (N × P) (N × P) :=
⟨λ c x y, by simp [smul_def, mul_def, mul_smul_comm]⟩
@[to_additive]
instance smul_comm_class_both' [monoid N] [monoid P] [has_scalar M N] [has_scalar M P]
[smul_comm_class N M N] [smul_comm_class P M P] :
smul_comm_class (N × P) M (N × P) :=
sorry

version

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer to add instances as we need them.

@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 Oct 9, 2021
@urkud urkud requested a review from eric-wieser October 9, 2021 21:11
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.

bors d+

Two nits, but feel free to merge as is if you don't care about them.

instance _root_.smul_comm_class.opposite_mid {M N} [monoid N] [has_scalar M N]
[is_scalar_tower M N N] :
smul_comm_class M Nᵒᵖ N :=
⟨λ x y z, by { induction y using opposite.op_induction, simp [smul_mul_assoc] }⟩
Copy link
Member

Choose a reason for hiding this comment

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

I suspect this has a much shorter term mode proof, but not worth spending much time on.

lemma is_scalar_tower.of_smul_one_mul {M N} [monoid N] [has_scalar M N]
(h : ∀ (x : M) (y : N), (x • (1 : N)) * y = x • y) :
is_scalar_tower M N N :=
⟨λ x y z, by rw [← h, smul_eq_mul, mul_assoc, h, smul_eq_mul]⟩
Copy link
Member

Choose a reason for hiding this comment

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

If we had a is_scalar_tower.of_smul_mul_assoc then this proof probably becomes shorter.

@bors
Copy link

bors bot commented Oct 10, 2021

✌️ urkud 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 Oct 10, 2021
@urkud
Copy link
Member Author

urkud commented Oct 10, 2021

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 Oct 10, 2021
bors bot pushed a commit that referenced this pull request Oct 10, 2021
…er` and `smul_comm_class` (#9533)




Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors
Copy link

bors bot commented Oct 10, 2021

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Oct 10, 2021
…er` and `smul_comm_class` (#9533)




Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors
Copy link

bors bot commented Oct 10, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/*,group_theory/*): instances/lemmas about is_scalar_tower and smul_comm_class [Merged by Bors] - feat(algebra/*,group_theory/*): instances/lemmas about is_scalar_tower and smul_comm_class Oct 10, 2021
@bors bors bot closed this Oct 10, 2021
@bors bors bot deleted the extra-instances branch October 10, 2021 23:32
@eric-wieser eric-wieser added the hacktoberfest-accepted Without this label hacktoberfest is scared off by bors label Oct 12, 2021
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. hacktoberfest-accepted Without this label hacktoberfest is scared off by bors 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