Skip to content

[Merged by Bors] - feat(RingTheory/PicardGroup): invertible modules over semirings are locally free#41528

Closed
alreadydone wants to merge 3 commits into
leanprover-community:masterfrom
alreadydone:locally_free_of_invertible
Closed

[Merged by Bors] - feat(RingTheory/PicardGroup): invertible modules over semirings are locally free#41528
alreadydone wants to merge 3 commits into
leanprover-community:masterfrom
alreadydone:locally_free_of_invertible

Conversation

@alreadydone

@alreadydone alreadydone commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Theorem 10.7 in Facets of module theory over semirings (Borger & Jun, https://arxiv.org/abs/2405.18645, Adv Math). Aristotle discovered a simpler proof using Invertible.bijective_of_surjective available in Mathlib. (The task started at 01:37 AM and Aristotle found the proof at 01:46 AM.)

Also generalizes lemmas and adds a new def about local semirings.

Co-authored-by: Aristotle (Harmonic) aristotle-harmonic@harmonic.fun


Open in Gitpod

@alreadydone alreadydone added t-algebra Algebra (groups, rings, fields, etc) t-ring-theory Ring theory LLM-generated PRs with substantial input from LLMs - review accordingly labels Jul 9, 2026
@github-actions github-actions Bot added the tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

PR summary 2346445d2d

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ exists_finset_free_localization
+ exists_of_isUnit_sum
+ instance [IsLocalRing R] : Subsingleton (Pic R) := subsingleton_iffₛ.mpr fun M _ _ _ ↦ by
+ nonunitsAddSubmonoid
- instance (R) [CommRing R] [IsLocalRing R] : Subsingleton (Pic R)

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit 2346445).

  • +3 new declarations
  • −0 removed declarations
+IsLocalRing.exists_of_isUnit_sum
+IsLocalRing.nonunitsAddSubmonoid
+Module.Invertible.exists_finset_free_localization

Decrease in strong tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (strong)
4514 -1 backward.defeqAttrib.useBackward
No changes to weak technical debt.

Current commit 2346445d2d
Reference commit 69b866d83a

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

Comment thread Mathlib/RingTheory/LocalRing/Basic.lean
Comment thread Mathlib/RingTheory/LocalRing/Basic.lean Outdated
Comment thread Mathlib/RingTheory/LocalRing/Basic.lean Outdated
@riccardobrasca

Copy link
Copy Markdown
Member

Thanks!

bors d+

@mathlib-bors mathlib-bors Bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Jul 10, 2026
@mathlib-bors

mathlib-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

✌️ alreadydone can now approve this pull request until 2026-07-24 08:58 UTC (in 2 weeks). To approve and merge, reply with bors r+. More detailed instructions are available here.

⚠️ This delegation only covers changes within Archive/**, Counterexamples/**, docs/**, DownstreamTest/**, Mathlib/**, MathlibTest/**, widget/**, Archive.lean, Counterexamples.lean, docs.lean, Mathlib.lean; an author commit touching anything else will revoke it. Bors also revokes it if a later push changes too many files for it to check the full list — even if it stays within scope.

@riccardobrasca

riccardobrasca commented Jul 10, 2026

Copy link
Copy Markdown
Member

@alreadydone Just take any monoid M with an element x that has a left inverse but no right inverse and consider the monoid algebra over M and coefficients in : this is local for trivial reasons, as for natural numbers a+b=0 implies a=b=0 and a+b=1 implies a=1, b=0 or a=0, b=1. Now the element corresponding to x (in degree 1) has a left inverse but no right inverse.

@riccardobrasca

Copy link
Copy Markdown
Member

Wait, this is exactly essentially already written in mathoverlow! What am I missing?

@alreadydone

alreadydone commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Wait, this is exactly essentially already written in mathoverlow! What am I missing?

Indeed, I think I just forgot the example is a local semiring by mathlib definition, and thought the particular question was still not resolved. Thank you, and I'll update the MO question.

Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
@riccardobrasca

Copy link
Copy Markdown
Member

We can even add the instance IsLocalRing (MonoidAlgebra Nat M) to mathlib, it holds for any monoid!

@alreadydone

Copy link
Copy Markdown
Contributor Author

Thanks 🎉
bors r+

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Jul 10, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 10, 2026
…ocally free (#41528)

Theorem 10.7 in *Facets of module theory over semirings* (Borger & Jun, https://arxiv.org/abs/2405.18645, Adv Math). Aristotle [discovered](https://aristotle.harmonic.fun/dashboard/requests/3e3dc70f-a9aa-4b84-a6fd-a812851c3bfb) a simpler proof using `Invertible.bijective_of_surjective` available in Mathlib. (The task started at 01:37 AM and Aristotle found the proof at 01:46 AM.)

Also generalizes lemmas and adds a new def about local semirings.

Co-authored-by: Aristotle (Harmonic) [aristotle-harmonic@harmonic.fun](mailto:aristotle-harmonic@harmonic.fun)
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Jul 10, 2026
@mathlib-bors

mathlib-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title feat(RingTheory/PicardGroup): invertible modules over semirings are locally free [Merged by Bors] - feat(RingTheory/PicardGroup): invertible modules over semirings are locally free Jul 10, 2026
@mathlib-bors mathlib-bors Bot closed this Jul 10, 2026
@mathlib-bors mathlib-bors Bot removed the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Jul 10, 2026
michaellee94 pushed a commit to michaellee94/mathlib4 that referenced this pull request Jul 11, 2026
…ocally free (leanprover-community#41528)

Theorem 10.7 in *Facets of module theory over semirings* (Borger & Jun, https://arxiv.org/abs/2405.18645, Adv Math). Aristotle [discovered](https://aristotle.harmonic.fun/dashboard/requests/3e3dc70f-a9aa-4b84-a6fd-a812851c3bfb) a simpler proof using `Invertible.bijective_of_surjective` available in Mathlib. (The task started at 01:37 AM and Aristotle found the proof at 01:46 AM.)

Also generalizes lemmas and adds a new def about local semirings.

Co-authored-by: Aristotle (Harmonic) [aristotle-harmonic@harmonic.fun](mailto:aristotle-harmonic@harmonic.fun)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. LLM-generated PRs with substantial input from LLMs - review accordingly ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc) t-ring-theory Ring theory tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants