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/algebra/basic algebra/module/basic): add 3 lemmas m • (1 : R) = ↑m #7094

Closed
wants to merge 3 commits into from

Conversation

adomani
Copy link
Collaborator

@adomani adomani commented Apr 7, 2021

Three lemmas asserting m • (1 : R) = ↑m, where m is a natural number, an integer or a rational number.

Zulip:
https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/.60smul_one_eq_coe.60

Co-authored-by: Anne Baanen Vierkantor@users.noreply.github.com


Open in Gitpod

@adomani adomani added the awaiting-review The author would like community review of the PR label Apr 8, 2021
@Vierkantor Vierkantor self-requested a review April 8, 2021 07:38
@Vierkantor
Copy link
Collaborator

Could you add the same results for ℤ (in a ring) and ℚ (in a division ring/field)?

@adomani
Copy link
Collaborator Author

adomani commented Apr 8, 2021

@Vierkantor I had forgotten about your suggestion, but I am also failing to prove the result. Below are the statements that I am trying to prove: let me know if what I am trying to prove is not true!

lemma rat.smul_one_eq_coe {R : Type*} [division_ring R] [semimodule ℚ R] (m : ℚ) :
  m • (1 : R) = ↑m :=
sorry

lemma int.smul_one_eq_coe {R : Type*} [ring R] [semimodule ℤ R] (m : ℤ) :
  m • (1 : R) = ↑m :=
sorry

Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@adomani
Copy link
Collaborator Author

adomani commented Apr 8, 2021

Ah, gsmul! I did not know about the g! Thanks!

@Vierkantor
Copy link
Collaborator

For the other, you're right that it doesn't seem provable: we need to assume an algebra ℚ R instance (otherwise we'll end up dividing by zero). So my suggestion is to put the following somewhere in algebra/algebra/basic.lean:

lemma rat.smul_one_eq_coe {R : Type*} [division_ring R] [algebra ℚ R] (m : ℚ) :
  m • (1 : R) = ↑m :=
by rw [algebra.smul_def, mul_one, ring_hom.eq_rat_cast]

@adomani
Copy link
Collaborator Author

adomani commented Apr 8, 2021

Thanks, Anne! I just pushed your suggestions!

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.

Thank you! I'll let someone else review this as well, since I ended up writing most of the lines :)

@adomani adomani changed the title feat(algebra/module/basic): add lemma m • (1 : R) = ↑m feat(algebra/algebra/basic algebra/module/basic): add lemma m • (1 : R) = ↑m Apr 8, 2021
@adomani adomani changed the title feat(algebra/algebra/basic algebra/module/basic): add lemma m • (1 : R) = ↑m feat(algebra/algebra/basic algebra/module/basic): add 3 lemmas m • (1 : R) = ↑m Apr 8, 2021
@semorrison
Copy link
Collaborator

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Apr 11, 2021
bors bot pushed a commit that referenced this pull request Apr 11, 2021
… : R) = ↑m (#7094)

Three lemmas asserting `m • (1 : R) = ↑m`, where `m` is a natural number, an integer or a rational number.

Zulip:
https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/.60smul_one_eq_coe.60

  Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@bors
Copy link

bors bot commented Apr 11, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/algebra/basic algebra/module/basic): add 3 lemmas m • (1 : R) = ↑m [Merged by Bors] - feat(algebra/algebra/basic algebra/module/basic): add 3 lemmas m • (1 : R) = ↑m Apr 11, 2021
@bors bors bot closed this Apr 11, 2021
@bors bors bot deleted the adomani_smul_one_coe branch April 11, 2021 15:16
bors bot pushed a commit that referenced this pull request Apr 12, 2021
…imp` lemmas (#7166)

The three lemmas in the merged PR #7094 could be simp lemmas.  This PR makes this suggestion.

While I was at it,
* I moved one of the lemmas outside of the `alg_hom` namespace,
* I fixed a typo in a doc string of a tutorial.

Zulip:
https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/trying.20out.20a.20.60simp.60.20lemma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants