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(RingTheory/Ideal/Quotient): define transtition map between ring or module quotient by powers of ideal #21900

Closed
wants to merge 25 commits into from

Conversation

Thmoas-Guan
Copy link
Collaborator

Define transtition map between ring or module quotient by powers of ideal, both for developing API for IsAdicComplete

Co-authored-by: @jjdishere [email protected]


Open in Gitpod

Copy link

github-actions bot commented Feb 15, 2025

PR summary 7ef91e6a7f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
53 files Mathlib.NumberTheory.BernoulliPolynomials Mathlib.NumberTheory.Bernoulli Mathlib.NumberTheory.Cyclotomic.Discriminant Mathlib.NumberTheory.Cyclotomic.PID Mathlib.NumberTheory.Cyclotomic.Rat Mathlib.NumberTheory.Cyclotomic.Three Mathlib.NumberTheory.FLT.Three Mathlib.NumberTheory.LSeries.HurwitzZetaValues Mathlib.NumberTheory.NumberField.AdeleRing Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody Mathlib.NumberTheory.NumberField.CanonicalEmbedding.FundamentalCone Mathlib.NumberTheory.NumberField.ClassNumber Mathlib.NumberTheory.NumberField.Discriminant.Basic Mathlib.NumberTheory.NumberField.EquivReindex Mathlib.NumberTheory.NumberField.FinitePlaces Mathlib.NumberTheory.NumberField.FractionalIdeal Mathlib.NumberTheory.NumberField.House Mathlib.NumberTheory.NumberField.ProductFormula Mathlib.NumberTheory.NumberField.Units.DirichletTheorem Mathlib.NumberTheory.NumberField.Units.Regulator Mathlib.NumberTheory.Padics.Hensel Mathlib.NumberTheory.Padics.MahlerBasis Mathlib.NumberTheory.Padics.PadicIntegers Mathlib.NumberTheory.Padics.ProperSpace Mathlib.NumberTheory.Padics.RingHoms Mathlib.NumberTheory.ZetaValues Mathlib.RingTheory.AdicCompletion.Algebra Mathlib.RingTheory.AdicCompletion.AsTensorProduct Mathlib.RingTheory.AdicCompletion.Basic Mathlib.RingTheory.AdicCompletion.Exactness Mathlib.RingTheory.AdicCompletion.Functoriality Mathlib.RingTheory.AdicCompletion.Noetherian Mathlib.RingTheory.DedekindDomain.Different Mathlib.RingTheory.DedekindDomain.Dvr Mathlib.RingTheory.DedekindDomain.PID Mathlib.RingTheory.DiscreteValuationRing.Basic Mathlib.RingTheory.DiscreteValuationRing.TFAE Mathlib.RingTheory.FractionalIdeal.Norm Mathlib.RingTheory.Henselian Mathlib.RingTheory.Ideal.Norm.AbsNorm Mathlib.RingTheory.Ideal.Norm.RelNorm Mathlib.RingTheory.LaurentSeries Mathlib.RingTheory.Perfectoid.Untilt Mathlib.RingTheory.PowerSeries.Derivative Mathlib.RingTheory.PowerSeries.Inverse Mathlib.RingTheory.Trace.Quotient Mathlib.RingTheory.WittVector.Compare Mathlib.RingTheory.WittVector.Complete Mathlib.RingTheory.WittVector.DiscreteValuationRing Mathlib.RingTheory.WittVector.FrobeniusFractionField Mathlib.RingTheory.WittVector.Isocrystal Mathlib.Topology.Algebra.Valued.LocallyCompact
1
Mathlib.RingTheory.Ideal.Quotient.PowTransition (new file) 1057

Declarations diff

+ Ideal.Quotient.factor_ker
+ factor
+ factor_comp_mk
+ factor_eq
+ factor_mk
+ mapQ_eq_factor
+ pow_smul_top_le
++ factorPow
++ factorPowSucc
++ factor_comp
++ factor_comp_apply
++ factor_surjective
- transitionMap_comp
- transitionMap_comp_apply
- transitionMap_eq
- transitionMap_mk

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

@github-actions github-actions bot added the t-algebra Algebra (groups, rings, fields, etc) label Feb 15, 2025
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.

I've nothing against this, but I am worried that people start proving stuff about your map instead of the more general factor. Can you explain a little why you think this is really needed? Instead of, for example, working with an abbrev or something.

@Thmoas-Guan
Copy link
Collaborator Author

I've nothing against this, but I am worried that people start proving stuff about your map instead of the more general factor. Can you explain a little why you think this is really needed? Instead of, for example, working with an abbrev or something.

For me I doesn't need it that urgently, the only cost of using the module version is a bit longer and more ugly proof. The real reason may need @jjdishere to answer.
Also there is an problem remaining: the version of mapQPow he proposed is only the special case for AdicCompletion.transitionMap for adjcent integer and the current version is the exact same, we may need some more discussion.

@Thmoas-Guan
Copy link
Collaborator Author

The result of the discussion is we decide to separate AdicCompletion.transitionMap out of AdicCompletion.Basic to this file, and leave the AdicCompletion.transitionMap and the ones for adjcent onns as abbreviations. What do you think?

Copy link
Member

@erdOne erdOne left a comment

Choose a reason for hiding this comment

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

I think all these lemmas are about Ideal.factor and not specific to this.
Can you please add the missing lemmas to Ideal.factor so that all lemmas about factorPow are one-lemma term proofs? And then I would hope we don't need this anymore.

For the module side maybe an analogous Submodule.factor could be added? But it looks like every thing should work for general mapQ. OTOH I ^ n • ⊤ <= I ^ m • ⊤ might be a nice lemma to have.

Comment on lines 55 to 58
abbrev mapQPow {m n : ℕ} (le : m ≤ n) :
M ⧸ (I ^ n • ⊤ : Submodule R M) →ₗ[R] M ⧸ (I ^ m • ⊤ : Submodule R M) :=
liftQ (I ^ n • ⊤ : Submodule R M) (mkQ (I ^ m • ⊤ : Submodule R M))
((ker_mkQ (I ^ m • ⊤ : Submodule R M)).symm ▸ (smul_mono_left (pow_le_pow_right le)))
Copy link
Member

Choose a reason for hiding this comment

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

We should use Submodule.mapQ here.

Copy link
Collaborator Author

@Thmoas-Guan Thmoas-Guan Feb 16, 2025

Choose a reason for hiding this comment

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

Although I only copied this from AdicCompletion.TransitionMap , I have only one small question : what is the advantage of mapQ?

Copy link
Member

Choose a reason for hiding this comment

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

It gets rid of (ker_mkQ (I ^ m • ⊤ : Submodule R M)).symm ▸ and has the possibility of a more tailored api.

Copy link
Collaborator Author

@Thmoas-Guan Thmoas-Guan Feb 17, 2025

Choose a reason for hiding this comment

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

I think the can't be get rid of, like this

mapQ _ _ LinearMap.id (comap_id (I ^ n • ⊤ : Submodule R M) ▸
      smul_mono_left (pow_le_pow_right n.le_succ))

Copy link
Member

Choose a reason for hiding this comment

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

comap_id is refl though. Does it not work if you remove it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry, it worked, my fault.

Copy link
Collaborator Author

@Thmoas-Guan Thmoas-Guan Feb 17, 2025

Choose a reason for hiding this comment

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

I have anothor small question here, why Ideal.Quotient.factor need the two Ideals to be explicit? The le condition already gave the two? So in Submodule.factor how should I set the variables?

Copy link
Member

Choose a reason for hiding this comment

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

There two possibilities:

  • it is just a mistake
  • it helps Lean with unification

You can try to modify Ideal.Quotient.factor and see if you need (I := ...) somewhere. If not I am happy to change to implicit variables.

Copy link
Collaborator Author

@Thmoas-Guan Thmoas-Guan Feb 17, 2025

Choose a reason for hiding this comment

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

I've opened #22022, I think we don't need (I := ...) anywhere.
However Quot.factor have these two variable explicit, I don't know if we need to unify.

@Thmoas-Guan
Copy link
Collaborator Author

Thmoas-Guan commented Feb 16, 2025

I think all these lemmas are about Ideal.factor and not specific to this. Can you please add the missing lemmas to Ideal.factor so that all lemmas about factorPow are one-lemma term proofs? And then I would hope we don't need this anymore.

For the module side maybe an analogous Submodule.factor could be added? But it looks like every thing should work for general mapQ. OTOH I ^ n • ⊤ <= I ^ m • ⊤ might be a nice lemma to have.

I agree that most of these simp lemmas are only the missing things in Ideal.factor. However I think that Submodule.factor should exist. After this we can wrap the special case AdicCompletion.TransitionMap and AdicCompletion.TransitionMapSucc along with the corresponding ring version into abbrev, what is your opinion @jjdishere ?

@jjdishere
Copy link
Collaborator

I think all these lemmas are about Ideal.factor and not specific to this. Can you please add the missing lemmas to Ideal.factor so that all lemmas about factorPow are one-lemma term proofs? And then I would hope we don't need this anymore.
For the module side maybe an analogous Submodule.factor could be added? But it looks like every thing should work for general mapQ. OTOH I ^ n • ⊤ <= I ^ m • ⊤ might be a nice lemma to have.

I agree that most of these simp lemmas are only the missing things in Ideal.factor. However I think that Submodule.factor should exist. After this we can wrap the special case AdicCompletion.TransitionMap and AdicCompletion.TransitionMapSucc along with the corresponding ring version into abbrev, what is your opinion @jjdishere ?

I agree. And I also support the idea of "one-lemma term proofs". Without suitable lemmas, these holes need several terms combined with to solve. If we allow these to be separate lemmas, life is much easier.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 18, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 18, 2025
@riccardobrasca
Copy link
Member

LGTM, thanks. One last thing: can you a comment around factor (maybe in the docstring) explaining that in the very common case of M^n and M^m there is a dedicated API? Thanks!

bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 20, 2025

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

and fix naming
@Thmoas-Guan
Copy link
Collaborator Author

Thmoas-Guan commented Feb 20, 2025

dedicated

There are some name fix, can you have another look @riccardobrasca ? Thanks.

@riccardobrasca
Copy link
Member

LGTM, thanks!

@Thmoas-Guan
Copy link
Collaborator Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Feb 20, 2025
…or module quotient by powers of ideal (#21900)

Define transtition map between ring or module quotient by powers of ideal, both for developing API for IsAdicComplete

Co-authored-by: @jjdishere [email protected]



Co-authored-by: jjdishere <[email protected]>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 20, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(RingTheory/Ideal/Quotient): define transtition map between ring or module quotient by powers of ideal [Merged by Bors] - feat(RingTheory/Ideal/Quotient): define transtition map between ring or module quotient by powers of ideal Feb 20, 2025
@mathlib-bors mathlib-bors bot closed this Feb 20, 2025
@mathlib-bors mathlib-bors bot deleted the transition-map-for-adic-complete-ring branch February 20, 2025 18:07
Julian added a commit that referenced this pull request Feb 21, 2025
* origin/master: (823 commits)
  chore(Computability): fix naming of lemmas about Sum.inl, Sum.inr, Sum.casesOn (#22156)
  feat: `Fintype Ordering` (#22154)
  chore: more renamings to fit the naming convention (#22148)
  feat(CategoryTheory): any monomorphism in a Grothendieck abelian category is a transfinite composition of pushouts of monomorphisms in a small family (#22157)
  chore: rename `{Continuous., continuous_}sum_map` to `sumMap` (#22155)
  chore: remove initial space followed by `-/` (#22158)
  chore: make arg in HeightOneSpectrum.valuation explicit (#22139)
  feat(Data/List): `List.maximum` is monotone (#22091)
  chore(Combinatorics/SimpleGraph): extract WalkDecomp from Walk (#21981)
  feat: if a monoid M acts, then so does (s : S) with [SubmonoidClass S M] (#21123)
  chore: backport changes to `getElem` lemmas (#22146)
  feat(CategoryTheory): generating monomorphisms in Grothendieck abelian categories (#22150)
  feat: rename variables to fit doc (#22143)
  feat(CategoryTheory): IsDetecting.isIso_iff_of_mono (#22135)
  feat(CategoryTheory): truncations of transfinite compositions (#22149)
  chore: simplify a proof (#22134)
  feat(CategoryTheory): monomorphisms are stable under coproducts in Grothendieck abelian categories (#22133)
  feat(Order): Set.Ici.isSuccLimit_coe (#22103)
  chore(Analysis/Convex/Normed): split into smaller files (#22015)
  feat(Algebra/Algebra/Lie): max nilpotent ideal <= radical (#22140)
  refactor(LinearIndependent): refactor to use LinearIndepOn (#21886)
  chore: rename some more `Foo.sum_elim` -> `sumElim` (#22130)
  chore: rename Injective.sum_elim and friends (#22129)
  chore: fix naming oversight from #22070 (#22128)
  chore: fix spelling mistakes (#22136)
  feat(RingTheory/Ideal/Quotient): define transtition map between ring or module quotient by powers of ideal (#21900)
  fix: initialize_simps_projections print warning when projection data already exists (#20339)
  chore: rename ContMDiff.sum_{elim,map} (#22131)
  feat(CategoryTheory): characterization of injective objects in terms of lifting properties (#22104)
  chore(Lean,Tactic): un-indent some doc-strings (#22118)
  feat(Algebra/MvPolynomial): add `comp` versions of rename lemmas (#21259)
  chose: add deprecation (#22124)
  feat(CategoryTheory/Abelian/GrothendieckCategory): computing colimits in Subobject (#22123)
  feat(CategoryTheory/Subobject): hasCardinalLT_of_mono (#22122)
  feat: add `DenseRange.piMap` (#22114)
  feat(Algebra/Algebra/Lie): define the maximal nilpotent ideal of Lie algebras (#22061)
  chore(Data/Finset): don't import algebra when defining `Finset.card` (#21866)
  feat: a function on a discrete space is smooth (#22113)
  feat: commutative group objects in additive categories (#21521)
  style(Geometry/Manifold): remove superfluous indentation in doc-strings (#22117)
  chore: rename PushNeg.lean to Push.lean (#22108)
  feat: add Is{Open,Closed}Embedding.sum_elim (#22070)
  feat(RingTheory/Perfectoid): define the untilt map and generalize pretilt (#21563)
  feature(Topology/Algebra/Module/WeakBilin): Linear map from F into the topological dual of E with the weak topology (#21078)
  feat(CategoryTheory/Abelian): the exact sequence attached to a pushout square (#22110)
  chore(ChartedSpace.lean): group constructions together (#22107)
  feat(CategoryTheory/MorphismProperty): more basic API (#22099)
  chore(Data/Fintype): split `Fintype/Card.lean` (#21840)
  chore(SetTheory/Cardinal/Cofinality): make `IsStrongLimit` into a structure (#21971)
  feat(Combinatorics/SimpleGraph): Add a theorem about cliques in induced subgraphs (#20705)
  ...
Julian added a commit that referenced this pull request Feb 22, 2025
* polynomial-sequences: (558 commits)
  Correct the TODO to mention IsCancelAdd which does exist.
  Talk about strict monotonicity instead, thanks @pechersky.
  Mention the TODO on li generalization to semirings.
  One more dedent.
  Same injectivity twiddling for basis.
  nontiviality to simplify this proof, and some dedenting.
  Hopefully more correct injectivity lemmas matching the naming convention.
  Fix the empty docstring.
  Update Mathlib/Algebra/Polynomial/Sequence.lean
  Fix the variable naming.
  Apply suggestions from code review
  chore(Computability): fix naming of lemmas about Sum.inl, Sum.inr, Sum.casesOn (#22156)
  feat: `Fintype Ordering` (#22154)
  chore: more renamings to fit the naming convention (#22148)
  feat(CategoryTheory): any monomorphism in a Grothendieck abelian category is a transfinite composition of pushouts of monomorphisms in a small family (#22157)
  chore: rename `{Continuous., continuous_}sum_map` to `sumMap` (#22155)
  chore: remove initial space followed by `-/` (#22158)
  chore: make arg in HeightOneSpectrum.valuation explicit (#22139)
  feat(Data/List): `List.maximum` is monotone (#22091)
  chore(Combinatorics/SimpleGraph): extract WalkDecomp from Walk (#21981)
  feat: if a monoid M acts, then so does (s : S) with [SubmonoidClass S M] (#21123)
  chore: backport changes to `getElem` lemmas (#22146)
  feat(CategoryTheory): generating monomorphisms in Grothendieck abelian categories (#22150)
  feat: rename variables to fit doc (#22143)
  feat(CategoryTheory): IsDetecting.isIso_iff_of_mono (#22135)
  feat(CategoryTheory): truncations of transfinite compositions (#22149)
  chore: simplify a proof (#22134)
  feat(CategoryTheory): monomorphisms are stable under coproducts in Grothendieck abelian categories (#22133)
  feat(Order): Set.Ici.isSuccLimit_coe (#22103)
  chore(Analysis/Convex/Normed): split into smaller files (#22015)
  feat(Algebra/Algebra/Lie): max nilpotent ideal <= radical (#22140)
  refactor(LinearIndependent): refactor to use LinearIndepOn (#21886)
  chore: rename some more `Foo.sum_elim` -> `sumElim` (#22130)
  chore: rename Injective.sum_elim and friends (#22129)
  chore: fix naming oversight from #22070 (#22128)
  chore: fix spelling mistakes (#22136)
  feat(RingTheory/Ideal/Quotient): define transtition map between ring or module quotient by powers of ideal (#21900)
  fix: initialize_simps_projections print warning when projection data already exists (#20339)
  chore: rename ContMDiff.sum_{elim,map} (#22131)
  feat(CategoryTheory): characterization of injective objects in terms of lifting properties (#22104)
  chore(Lean,Tactic): un-indent some doc-strings (#22118)
  feat(Algebra/MvPolynomial): add `comp` versions of rename lemmas (#21259)
  chose: add deprecation (#22124)
  feat(CategoryTheory/Abelian/GrothendieckCategory): computing colimits in Subobject (#22123)
  feat(CategoryTheory/Subobject): hasCardinalLT_of_mono (#22122)
  feat: add `DenseRange.piMap` (#22114)
  feat(Algebra/Algebra/Lie): define the maximal nilpotent ideal of Lie algebras (#22061)
  chore(Data/Finset): don't import algebra when defining `Finset.card` (#21866)
  feat: a function on a discrete space is smooth (#22113)
  feat: commutative group objects in additive categories (#21521)
  ...
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.

6 participants