Skip to content

[Merged by Bors] - feat(RingTheory): invertible modules and Picard group#25337

Closed
alreadydone wants to merge 12 commits intomasterfrom
PicardGroup
Closed

[Merged by Bors] - feat(RingTheory): invertible modules and Picard group#25337
alreadydone wants to merge 12 commits intomasterfrom
PicardGroup

Conversation

@alreadydone
Copy link
Copy Markdown
Contributor


Open in Gitpod

@alreadydone alreadydone requested a review from kckennylau May 31, 2025 20:57
@alreadydone alreadydone added t-algebra Algebra (groups, rings, fields, etc) awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels May 31, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 31, 2025

PR summary 595c2c615b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.RingTheory.PicardGroup (new file) 1995

Declarations diff

+ AsModule
+ CommRing.Pic
+ Invertible
+ _root_.Units.submodule_invertible
+ bijective_curry
+ bijective_of_surjective
+ congr
+ embAlgebra
+ embAlgebra_injective
+ ext_iff
+ finrank_eq_one
+ free_iff_linearEquiv
+ instance (L) [AddCommMonoid L] [Module R L] [Module A L] [IsScalarTower R A L]
+ instance (M : (Skeleton <| ModuleCat.{u} R)ˣ) : Module.Invertible R M
+ instance : CoeSort (Pic R) (Type u) := ⟨AsModule⟩
+ instance : CommGroup (Pic R) := (equivShrink _).symm.commGroup
+ instance : FaithfulSMul R M
+ instance : Module.Finite R M := (finite_projective R M).1
+ instance : Module.Invertible A (A ⊗[R] M)
+ instance : Module.Invertible R (Dual R M) := .left (linearEquiv R M)
+ instance : Module.Invertible R (Finite.repr R M) := .congr (Finite.reprEquiv R M).symm
+ instance : Module.Invertible R R := .left (TensorProduct.lid R R)
+ instance : Projective R M := (finite_projective R M).2
+ instance : Small.{u} (Skeleton <| ModuleCat.{u} R)ˣ
+ instance [IsLocalRing R] : Subsingleton (Pic R)
+ instance [Module.Invertible R N] : Module.Invertible R (M ⊗[R] N)
+ instance [Subsingleton (Pic R)] : Free R M
+ inv_eq_dual
+ kerRepr
+ lTensor_bijective_iff
+ lTensor_injective_iff
+ lTensor_surjective_iff
+ left
+ leftCancelEquiv
+ leftCancelEquiv_comp_lTensor_comp_symm
+ linearEquiv
+ linearEquivDual
+ mk
+ mk.linearEquiv
+ mk_dual
+ mk_eq_iff
+ mk_eq_mk_iff
+ mk_eq_one
+ mk_eq_one_iff
+ mk_eq_self
+ mk_self
+ mk_tensor
+ mul_eq_tensor
+ projective_of_isUnit
+ projective_unit
+ rTensorEquiv
+ rTensorInv
+ rTensorInv_injective
+ rTensorInv_leftInverse
+ rTensor_bijective_iff
+ rTensor_injective_iff
+ rTensor_surjective_iff
+ rank_eq_one
+ repr
+ reprEquiv
+ right
+ rightCancelEquiv
+ rightCancelEquiv_comp_rTensor_comp_symm
+ subsingleton_iff
+ tensorEquivMul
+ tensorInvEquiv
+ toModuleEnd_bijective
+ toSubmodule
+ unitsToPic

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/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).

@alreadydone alreadydone force-pushed the PicardGroup branch 7 times, most recently from 9f641b2 to a4b406d Compare June 1, 2025 00:00
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 1, 2025
Copy link
Copy Markdown
Collaborator

@kckennylau kckennylau left a comment

Choose a reason for hiding this comment

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

Thanks for the great work! 🎉

rw [LinearEquiv.coe_trans, LinearEquiv.eq_comp_toLinearMap_symm]; ext; rfl
rw [this]; apply LinearEquiv.bijective

protected theorem left : Module.Invertible R M := .right (TensorProduct.comm R N M ≪≫ₗ e)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should left be called right? I don't know if the mathlib convention might clash with the math convention

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why should it be called right? This theorem states the left factor in M ⊗[R] N ≃ₗ[R] R is invertible.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Because I interpret the math statement as saying that M is invertible if it has a right inverse 😆

- All unique factorization domains have trivial Picard group.

- Establish other characterizations of invertible modules, e.g. they are modules that
becomes free of rank one when localized at every prime ideal.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
becomes free of rank one when localized at every prime ideal.
become free of rank one when localized at any prime ideal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"any" doesn't feel right to me. "at all prime ideals" is an alternative.

@kckennylau
Copy link
Copy Markdown
Collaborator

LGTM! I would be very happy to be able to use Pic in Mathlib4!

@grunweg grunweg added t-ring-theory Ring theory and removed t-algebra Algebra (groups, rings, fields, etc) labels Aug 5, 2025
Copy link
Copy Markdown
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.

This can probably be improved a bit, but I think it's easier to have it and work on lit later, thanks!

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 13, 2025

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

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Aug 13, 2025
Comment on lines +244 to +247
/- TODO: generalize ≤ to arbitrary invertible modules over any commutative semiring by considering
the localization at a prime, once we show inverible modules over local semirings are free.
It is not clear whether ≥ holds in general but it holds for domains. -/
theorem finrank_eq_one [StrongRankCondition R] [Free R M] : finrank R M = 1 := by
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we define the rank of a module to be the maximum or minimum of local ranks, then every invertible module (not necessarily free) has rank 1. But in mathlib ranks are defined in terms of size of linearly independent sets, and I'm not sure whether one of the directions holds in full generality (my AIs fail to give a counterexample so far).

Copy link
Copy Markdown
Contributor Author

@alreadydone alreadydone Aug 14, 2025

Choose a reason for hiding this comment

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

The TODO comment isn't completely substantiated as I don't know whether local comm. semirings satisfy the strong rank condition, so the wording has been changed. If there's no further comments I'll merge in one day.

@alreadydone
Copy link
Copy Markdown
Contributor Author

Thanks 🎉
bors r+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 15, 2025

Build failed (retrying...):

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 15, 2025

Canceled.

@alreadydone
Copy link
Copy Markdown
Contributor Author

bors r+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 16, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(RingTheory): invertible modules and Picard group [Merged by Bors] - feat(RingTheory): invertible modules and Picard group Aug 16, 2025
@mathlib-bors mathlib-bors bot closed this Aug 16, 2025
@mathlib-bors mathlib-bors bot deleted the PicardGroup branch August 16, 2025 08:33
Julian added a commit to Aaron1011/mathlib4 that referenced this pull request Aug 16, 2025
* origin/master: (508 commits)
  feat(Logic/Basic): forall_and_index (leanprover-community#27737)
  feat(Algebra/intNorm): `x` divides `intNorm x` (leanprover-community#28021)
  feat(RingTheory/MvPolynomial/MonomialOrder): some lemmas about degree (leanprover-community#26000)
  chore: more elementary Motzkin polynomial proof (leanprover-community#28482)
  feat: e-seminormed monoid (leanprover-community#27385)
  feat(RingTheory): ` (⊥ : Ideal R) ^ n = ⊥` (leanprover-community#28171)
  fix(LinearAlgebra/Dimension/ErdosKaplansky): authorship (leanprover-community#28513)
  chore: golf entire `X_pow_eq_monomial` (leanprover-community#28504)
  feat(RingTheory): invertible modules and Picard group (leanprover-community#25337)
  chore: use delta `deriving` for leanprover-community#380 (leanprover-community#28498)
  feat: add bilinear maps for vector/matrix products (leanprover-community#28130)
  feat(Counterexamples): topologists' sine curve (leanprover-community#25833)
  feat(Analysis/Convex): doubly stochastic matrices have operator norm at most one (leanprover-community#28453)
  chore(Topology/Compactification): deprecate duplicate `ultrafilter_pure_injective` (leanprover-community#28436)
  feat: add `@[simp]` to `Multiset.cons_le_cons` and `Finset.insert_subset_insert` (leanprover-community#28285)
  feat: make `ring` work for semifields (leanprover-community#28494)
  feat: filtering lists and bounded quantifiers are primitive recursive (leanprover-community#26295)
  chore(Analysis/Analytic): split `Analytic.Basic` (leanprover-community#26270)
  refactor: tidy `mulVec` and `vecMul` lemmas about `•` (leanprover-community#28450)
  feat(Order/WellFounded): Acc and infinite descending chain (leanprover-community#28120)
  feat(NumberTheory/Padics): {Int,Rat}.padicValuation (leanprover-community#27667)
  chore(*): address a few timeout-related porting notes (leanprover-community#28483)
  feat(Algebra): toAlgebra_algebraMap (leanprover-community#28238)
  feat(Shrink): `IsCancelMul` instance (leanprover-community#28407)
  chore(Geometry): golf entire `chart_eq'` and `orthogonalProjection_orthogonalProjection` (leanprover-community#28485)
  feat: shifted geometric series and a `ProbabilityMeasure` version of `measure_iUnion_le` (leanprover-community#28087)
  chore(LinearAlgebra/PiTensorProduct): `rw` away use of `erw` in `lifts_zero` (leanprover-community#27554)
  feat(RingTheory): faithfully flat ring maps (leanprover-community#24530)
  chore(Geometry/RingedSpace): remove use of `erw` in `stalkSpecializes_stalkMap` (leanprover-community#27656)
  chore: add the Brownian motion project to downstream_repos.yml (leanprover-community#28459)
  feat(CategoryTheory/Sites/SheafOfTypes): composition of a sheaf with uliftFunctor is still a sheaf (leanprover-community#27816)
  feat(Valuation/DiscreteValuationRel): val relations with compatible valuations to Zm0 are IsDiscrete (leanprover-community#27213)
  chore(*): process a bunch of `aesop`-related porting notes (leanprover-community#28402)
  feat(CategoryTheory): abstract argument for the stability under transfinite compositions (leanprover-community#26030)
  chore: bump toolchain to v4.23.0-rc2 (leanprover-community#28454)
  chore(FieldTheory/Finite): fermat's little theorem in Nat form (leanprover-community#27962)
  feat(Combinatorics/SimpleGraph/Paths): add theorem `SimpleGraph.Walk.IsPath.concat` (leanprover-community#27582)
  feat(Slope): slope_pos_iff_of_le and related lemmas (leanprover-community#28039)
  feat: tactic analysis framework (leanprover-community#26683)
  chore(Data/EReal): deprecate `add_pos_of_nonneg_of_pos` and `add_ne_top_iff_of_ne_bot` (duplicates) (leanprover-community#28424)
  feat(MathlibTest/FieldSimp): add a few more tests (leanprover-community#28413)
  chore(RingTheory/HahnSeries): deprecate duplicate `orderTop_add_orderTop_le_orderTop_mul` (leanprover-community#28231)
  chore(AlgebraicGeometry/IdealSheaf): deprecate duplicate `AlgebraicGeometry.Scheme.IdealSheafData.Scheme.zeroLocus_radical` (leanprover-community#28202)
  feat(Algebra/Order): ArchimedeanClass ball (leanprover-community#27885)
  chore(Geometry/RingedSpace): remove use of `erw` in `isUnit_of_isUnit_germ` (leanprover-community#27660)
  feat(SkewMonoidAlgebra): coeff_mul lemmas (leanprover-community#27255)
  chore(LinearAlgebra): golf entire `isUnit_det` (leanprover-community#28438)
  chore(FieldTheory/IntermediateField): golf entire `coe_sum` and `coe_prod` (leanprover-community#28431)
  feat: separate linter error message for empty doc-strings (leanprover-community#27895)
  feat(RingTheory/PowerSeries/Binomial): add basic lemmas, golf (leanprover-community#27497)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants