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: Injectivity of monoid localization #9531

Closed
wants to merge 22 commits into from

Conversation

XavierXarles
Copy link
Collaborator

Adds two results on the Localization for CommMonoids: one, describes exactly when the localization map is injective, the
other essentially says that the localization of a cancellative Monoid is cancellative if the localization is injective.


Open in Gitpod

Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
XavierXarles and others added 3 commits January 7, 2024 20:06
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@XavierXarles XavierXarles added awaiting-review The author would like community review of the PR t-algebra Algebra (groups, rings, fields etc) labels Jan 7, 2024
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
XavierXarles and others added 4 commits January 7, 2024 23:16
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Removed a result and modifying according to review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Collaborator

@xroblot xroblot left a comment

Choose a reason for hiding this comment

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

Here and elsewhere you should add spaces

Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
@xroblot
Copy link
Collaborator

xroblot commented Jan 8, 2024

Note that I do not really know how to use the review interface properly and some of the diffs above are not correct.

@XavierXarles
Copy link
Collaborator Author

Here and elsewhere you should add spaces

I hope I added all the appropriate spaces....

Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
Mathlib/GroupTheory/MonoidLocalization.lean Outdated Show resolved Hide resolved
XavierXarles and others added 3 commits January 8, 2024 19:34
Co-authored-by: Xavier Roblot <46200072+xroblot@users.noreply.github.com>
Changed simp to simp_rw
Shorten the calc proof
Spaces

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@YaelDillies YaelDillies changed the title feat (Mathlib/GroupTheory/MonoidLocalization): Some results on the Localization for CommMonoids feat: Injectivity of monoid localization Jan 8, 2024
Change by_contra with intro
Changed cases' with obtain
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Member

@riccardobrasca riccardobrasca left a comment

Choose a reason for hiding this comment

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

Just a final stylistic comment: can you avoid having three intermediate results all called this? Lean seems to be good in understanding which one to use (or maybe it uses the last one, I am not sure), but this looks like a code smell.

Thanks!

bors d+

@mathlib-bors
Copy link

mathlib-bors bot commented Jan 10, 2024

✌️ XavierXarles 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-mathlib4-bot leanprover-community-mathlib4-bot added delegated and removed awaiting-review The author would like community review of the PR labels Jan 10, 2024
@riccardobrasca
Copy link
Member

riccardobrasca commented Jan 10, 2024

I have the impression you really like to make a lot of intermediate statement using have: I've nothing against it in general, but is there a specific reason you don't finish the proof like this?

  -- The hypothesis `h` gives that `f` (so, `g`) is injective, and we can cancel out `b.1`.
  have : b.1 * (y.1 * x.2) =  b.1 * (x.1 * y.2) :=
      (LocalizationMap.toMap_injective_iff fl).mpr h this
  rw [mul_comm, ← IsLeftCancelMulZero.mul_left_cancel_of_ne_zero b1ne0 this, mul_comm]

@riccardobrasca
Copy link
Member

Another stylistic comment: I think rw [a, b, c] is more readable than rw [a,b,c], can you please check the spaces? Thanks!

XavierXarles and others added 2 commits January 10, 2024 13:13
Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
Changed the proof acording to suggerences
lint

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@XavierXarles
Copy link
Collaborator Author

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

bors r+

@XavierXarles XavierXarles requested review from riccardobrasca and removed request for YaelDillies January 10, 2024 16:18
mathlib-bors bot pushed a commit that referenced this pull request Jan 10, 2024
Adds two results on the Localization for CommMonoids: one, describes exactly when the localization map is injective, the 
other essentially says that the localization of a cancellative Monoid is cancellative if the localization is injective. 



Co-authored-by: Xavier Xarles <56635243+XavierXarles@users.noreply.github.com>
@mathlib-bors
Copy link

mathlib-bors bot commented Jan 10, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: Injectivity of monoid localization [Merged by Bors] - feat: Injectivity of monoid localization Jan 10, 2024
@mathlib-bors mathlib-bors bot closed this Jan 10, 2024
@mathlib-bors mathlib-bors bot deleted the LocalizationWithZeroMap branch January 10, 2024 18:00
Comment on lines +1949 to +1950
[IsCancelMulZero M] (h : ∀ ⦃x⦄, x ∈ S → IsRegular x): IsCancelMulZero N := by
have:IsLeftCancelMulZero N:=
Copy link
Contributor

Choose a reason for hiding this comment

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

lacking some spaces here; maybe fix in your next PR

    [IsCancelMulZero M] (h : ∀ ⦃x⦄, x ∈ S → IsRegular x) : IsCancelMulZero N := by
  have : IsLeftCancelMulZero N :=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated t-algebra Algebra (groups, rings, fields etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants