-
Notifications
You must be signed in to change notification settings - Fork 297
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] - refactor(ring_theory/ideal/*, ring_theory/jacobson): use comm_semiring
instead of comm_ring
for ideals
#5954
Conversation
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Eric, thank you very much for your suggested improvements! |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
comm_semiring
instead of comm_ring
for idealscomm_semiring
instead of comm_ring
for ideals
Co-authored-by: Xavier Xarles <56635243+XavierXarles@users.noreply.github.com>
Co-authored-by: Xavier Xarles <56635243+XavierXarles@users.noreply.github.com>
Xavier, thank you for your improvements! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some very minor formatting nitpicks.
I haven't seen any objections, so feel free to merge.
bors d+
✌️ adomani can now approve this pull request. To approve and merge a pull request, simply reply with |
@@ -84,16 +78,6 @@ theorem eq_top_iff_one : I = ⊤ ↔ (1:α) ∈ I := | |||
theorem ne_top_iff_one : I ≠ ⊤ ↔ (1:α) ∉ I := | |||
not_congr I.eq_top_iff_one | |||
|
|||
lemma exists_mem_ne_zero_iff_ne_bot : (∃ p ∈ I, p ≠ (0 : α)) ↔ I ≠ ⊥ := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a glance, I'm surprised this isn't true for semirings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eric, you are right: below is a proof (the first one that I found) of the "same" result for a submodule of R
, when R
is a semiring
.
However, at the moment, ideal
is only defined for a comm_semiring
. In fact, I think that what you suggest should be a separate PR, in case it is not already there.
More generally, we should have a "theory" of cyclic modules, i.e. modules generated by a single element, where this result would fit nicely, replacing 1 : R
by a generating element of the module.
lemma submodule.ne_top_iff_one {R : Type*} [semiring R]
(J : submodule R R): J ≠ ⊤ ↔ (1:R) ∉ J :=
not_congr ⟨λ a, submodule.eq_top_iff'.mp a 1, λ hx, submodule.ext
(λ x, ⟨λ _, submodule.mem_top, λ xj, by { rw [← mul_one x], exact submodule.smul_mem J x hx }⟩)⟩
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
bors r+ |
Thanks Bryan, I just told Bors to merge! Eric, you have a point with the |
…ng` instead of `comm_ring` for ideals (#5954) This is the second pass at refactoring the definition of `ideal`. I have changed a `comm_ring` assumption to a `comm_semiring` assumption on many of the lemmas in `ring_theory/ideal/basic`. Most implied changes were very simple, with the usual exception of `jacobson`. I also moved out of `jacobson` the lemmas that were left-over from the previous refactor in this sequence. Besides changing such assumptions on other files, many of the lemmas in `ring_theory/ideal/basic` still using `comm_ring` and without explicit subtractions, deal with quotients.
Pull request successfully merged into master. Build succeeded: |
comm_semiring
instead of comm_ring
for idealscomm_semiring
instead of comm_ring
for ideals
…ng` instead of `comm_ring` for ideals (#5954) This is the second pass at refactoring the definition of `ideal`. I have changed a `comm_ring` assumption to a `comm_semiring` assumption on many of the lemmas in `ring_theory/ideal/basic`. Most implied changes were very simple, with the usual exception of `jacobson`. I also moved out of `jacobson` the lemmas that were left-over from the previous refactor in this sequence. Besides changing such assumptions on other files, many of the lemmas in `ring_theory/ideal/basic` still using `comm_ring` and without explicit subtractions, deal with quotients.
This is the second pass at refactoring the definition of
ideal
. I have changed acomm_ring
assumption to acomm_semiring
assumption on many of the lemmas inring_theory/ideal/basic
. Most implied changes were very simple, with the usual exception ofjacobson
.I also moved out of
jacobson
the lemmas that were left-over from the previous refactor in this sequence.Besides changing such assumptions on other files, many of the lemmas in
ring_theory/ideal/basic
still usingcomm_ring
and without explicit subtractions, deal with quotients.