feat(Algebra/Category): the category of local algebras with a fixed residue field#37940
feat(Algebra/Category): the category of local algebras with a fixed residue field#37940BryceT233 wants to merge 65 commits intoleanprover-community:masterfrom
Conversation
PR summary 597460a80f
|
| Files | Import difference |
|---|---|
Mathlib.RingTheory.LocalRing.LocalSubring |
1 |
Mathlib.Algebra.Group.Units.ULift (new file) |
140 |
Mathlib.Algebra.Category.LocAlgCat.Defs (new file) |
1360 |
Mathlib.Algebra.Category.LocAlgCat.Basic (new file) |
1978 |
Mathlib.Algebra.Category.LocAlgCat.Cotangent (new file) |
1989 |
Mathlib.Algebra.Category.LocAlgCat.BaseCat (new file) |
1991 |
Declarations diff
+ BaseCat
+ Hom
+ Hom.isLocalHom_toAlgHom
+ Hom.map_maximalIdeal_le
+ Ideal.annihilator_inf_ne_bot
+ IsEssSurj
+ IsEssSurj.comp
+ IsEssSurj.hom_iso
+ IsSmallExtension
+ IsSmallExtension.hom_iso
+ IsSmallExtension.toOfQuot_span_singleton
+ LocAlgCat
+ algebraMap_specialFiber_apply_eq_zero
+ algebraOfQuot
+ baseCotangentMap
+ baseCotangentMap_tmul
+ bijective_mapCotangent_iff
+ bijective_mapCotangent_toOfQuot_iff
+ coe_of
+ comap_algebraMap_maximalIdeal
+ equivCotangent
+ equivCotangent_apply
+ equivCotangent_symm_apply
+ exact_baseCotangentMap_mapCotangent_toSpecialFiber
+ exists_mem_maximalIdeal_toAlgHom_apply_add_eq
+ fullyFaithfulUliftFunctor
+ hom_inv_apply
+ induction_on_isSmallExtension
+ instance (A : BaseCat Λ k) : IsArtinianRing A.obj := A.property
+ instance (f : A ⟶ B) : Nontrivial (A ⧸ RingHom.ker (f.toAlgHom))
+ instance (n : ℕ) [NeZero n] : Nontrivial (A ⧸ maximalIdeal A ^ n) := by
+ instance : (uliftFunctor Λ k).Faithful := (fullyFaithfulUliftFunctor Λ k).faithful
+ instance : (uliftFunctor Λ k).Full := (fullyFaithfulUliftFunctor Λ k).full
+ instance : Category (LocAlgCat.{w} Λ k)
+ instance : CoeSort (LocAlgCat Λ k) (Type w) := ⟨carrier⟩
+ instance : IsScalarTower A k (CotangentSpace A) := .of_algebraMap_smul residue_smul_cotangent
+ instance : IsScalarTower Λ (ResidueField A) (CotangentSpace A) := .of_algebraMap_smul fun r x ↦ by
+ instance : IsScalarTower Λ k (CotangentSpace A) := .of_algebraMap_smul fun r x ↦ by
+ instance [Algebra.IsIntegral Λ k] : IsScalarTower (ResidueField Λ) k (CotangentSpace A)
+ instance [Algebra.IsIntegral Λ k] : IsScalarTower Λ (ResidueField Λ) (CotangentSpace A)
+ instance [Algebra.IsIntegral Λ k] : Module (ResidueField Λ) (CotangentSpace A)
+ instance [IsArtinianRing A] : IsArtinian Λ A
+ instance [IsArtinianRing A] : IsNoetherian Λ A
+ instance [IsArtinianRing A] [IsArtinianRing B] (f : A ⟶ C) (g : B ⟶ C) :
+ instance [IsLocalRing Λ] [Algebra.IsIntegral Λ k] :
+ instance {R : Type*} [CommSemiring R] [IsLocalRing R] : IsLocalRing (ULift R)
+ inv_hom_apply
+ isArtinianRing_ofPullback
+ isEssSurj_iff_isEssSurj_mapOfQuot
+ isEssSurj_toOfQuot_of_le
+ isFiniteLength_of_isArtinianRing
+ isLocalHom_algebraMap
+ isLocalHom_of_isIntegral
+ isLocalHom_pullbackFst
+ isLocalHom_pullbackSnd
+ isLocalRing_algHomPullback
+ isLocalRing_eqLocus
+ isLocalRing_ringHomPullback
+ isScalarTower_algebraOfQuot
+ isScalarTower_ofPullbackResidueAlgebra
+ isScalarTower_ofQuotResidueAlgebra
+ isScalarTower_ofQuotResidueAlgebra'
+ isSmallExtension_of_bijective
+ isSmallExtenstion_iff
+ isUnit_aeval_derivative_of_isSeparable
+ isUnit_down
+ isUnit_eqLocus_mk_iff
+ isUnit_up
+ isoEquivSubtypeAlgEquiv
+ isoMk
+ ker_residue
+ ker_toAlgHom_toOfQuot
+ length_restrictScalars
+ mapCotangent
+ mapCotangent_baseCotangentMap_apply
+ mapCotangent_mapOfQuot_surjective_of_mapCotangent_surjective
+ mapCotangent_toCotangent
+ map_toAlgHom_toOfQuot_maximalIdeal_eq
+ module_cotangentSpace
+ not_isUnit_aeval_of_aeval_eq_zero
+ ofHom
+ ofHom_comp
+ ofHom_id
+ ofHom_toAlgHom_apply
+ ofIso
+ ofPullbackOfIsSeparable
+ ofPullbackResidueAlgebra
+ ofQuotKerIsoOfSurjective
+ ofQuotResidueAlgebra
+ ofhom_toAlgHom
+ pullbackFst_isSmallExtension
+ range_baseCotangentMap
+ residue
+ residueEquiv
+ residueEquiv_residue_apply
+ residueField_smul_cotangent
+ residue_apply
+ residue_comp_coe_ofIso
+ residue_comp_pullbackFst
+ residue_eq_zero_iff
+ residue_ofQuot_mk_apply
+ residue_of_apply
+ residue_smul_cotangent
+ residue_surjective
+ residue_toRingHom
+ smul_cotangent_def
+ surjective_mapCotangent_of_surjective
+ surjective_mapCotangent_of_surjective_mapCotangent_mapSpecialFiber
+ surjective_mapCotangent_toOfQuot
+ surjective_mapCotangent_toSpecialFiber
+ surjective_of_surjective_mapCotangent
+ surjective_residue_comp_pullbackFst_of_isSeparable
+ surjective_toAlgHom_toOfQuot
+ toAlgHom_comp
+ toAlgHom_id
+ toAlgHom_mapOfQuot_apply
+ toAlgHom_ofQuotKerIsoOfSurjective_hom_apply
+ toAlgHom_ofQuotKerIsoOfSurjective_inv_apply
+ toAlgHom_toOfQuot_apply
+ toInfinitesimalNeighborhood_comp_map
+ toInfinitesimalNeighborhood_comp_mapInfinitesimalNeighborhood_toSpecialFiber
+ toOfQuot_comp_ofQuotKerIsoOfSurjective_hom
+ uliftFunctor
++ infinitesimalNeighborhood
++ isUnit_pullback_mk_iff
++ mapCotangent_comp
++ mapCotangent_id
++ mapInfinitesimalNeighborhood
++ mapOfQuot
++ mapSpecialFiber
++ of
++ ofPullback
++ ofQuot
++ pullback
++ specialFiber
++ surjective_pullbackFst_of_surjective
++ surjective_pullbackSnd_of_surjective
++ toInfinitesimalNeighborhood
++ toOfQuot
++ toOfQuot_comp_mapOfQuot
++ toSpecialFiber
++++ pullbackFst
++++ pullbackSnd
++++ pullback_comm_sq
You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.
Increase in tech debt: (relative, absolute) = (1.00, 0.00)
| Current number | Change | Type |
|---|---|---|
| 6217 | 1 | backward.isDefEq.respectTransparency |
| 798 | 1 | backward.privateInPublic |
| 414 | 1 | backward.privateInPublic.warn |
Current commit fde30a4c47
Reference commit 597460a80f
You can run this locally as
./scripts/reporting/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
| simpa using LocAlgCat.pullback_comm_sq f.hom g.hom hg | ||
|
|
||
| @[stacks 06GH "(2)"] | ||
| instance pullbackFst_isSmallExtension (f : A ⟶ C) (g : B ⟶ C) [IsSmallExtension g] : |
| (LocAlgCat.surjective_residue_comp_pullbackFst_of_isSeparable f.hom g.hom), inferInstance⟩ | ||
|
|
||
| @[stacks 06S5] | ||
| theorem isEssSurj_iff_isEssSurj_mapOfQuot (f : A ⟶ B) {I : Ideal A.obj} {J : Ideal B.obj} |
|
|
||
| open Submodule in | ||
| @[elab_as_elim, stacks 06GE] | ||
| theorem induction_on_isSmallExtension (hf : Surjective f.hom.toAlgHom) |
| /-- The base category for deformation theory over `Λ`. This is the full subcategory of | ||
| `LocAlgCat Λ k` consisting of Artinian local `Λ`-algebras with residue field `k`. -/ | ||
| @[stacks 06GC] | ||
| abbrev BaseCat (Λ : Type u) [CommRing Λ] (k : Type v) [Field k] [Algebra Λ k] : Type _ := |
There was a problem hiding this comment.
There is very heavy abbrev use in this file. I look at FGModuleCat for example, it only uses abbrev for FGModuleCat itself and of. Everything else is def.
| set_option backward.privateInPublic true in | ||
| set_option backward.privateInPublic.warn false in |
There was a problem hiding this comment.
Can you explain why these are here?
If you read the documentation of this command, you will see that it explains "This is a backwards compatibility option, intended to help migrating to new Lean releases... Please report an issue if you rely on this option."
There was a problem hiding this comment.
Thanks for the review and comments, I will look into them in detail! For the set_option here, I thought this was because mk is made private in the definition of LocAlgCat, I found this pattern in files under the same Category folder like CommAlgCat.lean. I am not sure why mk is made private though.
| end LocalSubring | ||
|
|
||
|
|
||
| theorem isLocalRing_eqLocus {R S : Type*} [Ring R] [Semiring S] [IsLocalRing R] (f g : R →+* S) : |
There was a problem hiding this comment.
Is this the best place for these? They feel like they are randomly stuck on the end of the file, they're not even in a section
| apply IsLocalHom.map_nonunit at this; right | ||
| simpa [RingHom.isUnit_pullback_mk_iff] using ⟨hs, this⟩ | ||
|
|
||
| theorem isLocalRing_algHomPullback {R S T A : Type*} [CommSemiring R] [Ring S] [Algebra R S] |
There was a problem hiding this comment.
These seem like very strong assumptions. Check if there is a way to generalize this.
| (RingEquiv.quotientBot k) (by ext; rfl) | ||
|
|
||
| variable (R k) in | ||
| lemma isLocalHom_of_isIntegral [Algebra.IsIntegral R k] : IsLocalHom (algebraMap R k) := by |
There was a problem hiding this comment.
Is there is a reason why this is in the ResidueField file? It doesn't seem to rely on anything here. Try #find_home
There was a problem hiding this comment.
Thanks, I removed the use of IsLocalHom instance very recently and this is something that I forgot to remove. edit: this is still needed but probably should be moved to where Algebra.ker_algebraMap_isMaximal_of_isIntegral goes
| open Submodule in | ||
| theorem Ideal.annihilator_inf_ne_bot {R : Type*} [CommSemiring R] {I J : Ideal R} | ||
| (hI : IsNilpotent I) (hJ : J ≠ ⊥) : I.annihilator ⊓ J ≠ ⊥ := by | ||
| rcases hI with ⟨n, hn⟩ |
|
|
||
| namespace RingHom | ||
|
|
||
| theorem isUnit_eqLocus_mk_iff (f g : A →+* C) {r : A} (r_in : r ∈ f.eqLocus g) : |
There was a problem hiding this comment.
I believe this duplicates CommRingCat.pullbackCone f g. Please try to use that instead.
| /-- The universe lift functor for `LocAlgCat` is fully faithful. -/ | ||
| def fullyFaithfulUliftFunctor : (uliftFunctor Λ k).FullyFaithful where | ||
| preimage {A B} f := | ||
| letI : Algebra (ULift.{w'} A) k := ULift.algebra' .. |
There was a problem hiding this comment.
It is usually a bad sign when you have to thread a bunch of letI, haveI throughout your file. Something is messing up your instance resolution.
| open Submodule in | ||
| theorem range_baseCotangentMap [Algebra.IsIntegral Λ k] : | ||
| A.baseCotangentMap.range = (mapCotangent A.toSpecialFiber).ker := ext fun x ↦ by | ||
| rcases (maximalIdeal A).toCotangent_surjective x with ⟨x, rfl⟩ |
| [HenselianRing A (maximalIdeal A)] [HenselianRing B (maximalIdeal B)] | ||
| [Algebra.IsSeparable (ResidueField Λ) k] (f : A ⟶ C) (g : B ⟶ C) : | ||
| Surjective (A.residue.comp (f.toAlgHom.pullbackFst g.toAlgHom)) := by | ||
| obtain ⟨x, hx⟩ := Field.exists_primitive_element (ResidueField Λ) k |
|
|
||
| end ArtinianRing | ||
|
|
||
| lemma exists_mem_maximalIdeal_toAlgHom_apply_add_eq (f : A ⟶ C) (g : B ⟶ C) (a : A) |
There was a problem hiding this comment.
This should be in a section. Should also have a docstring.
| open Polynomial in | ||
| @[stacks 06GH "(3)"] | ||
| theorem surjective_residue_comp_pullbackFst_of_isSeparable [IsLocalRing Λ] [Module.Finite Λ k] | ||
| [HenselianRing A (maximalIdeal A)] [HenselianRing B (maximalIdeal B)] |
|
|
||
| /-- The subalgebra of pairs `(a, b) : A × B` such that `f a = g b`, i.e., | ||
| the pullback of f and g as a subalgebra of A × B. -/ | ||
| abbrev pullback (f : A →ₐ[R] C) (g : B →ₐ[R] C) : Subalgebra R (A × B) := equalizer |
There was a problem hiding this comment.
These do not belong in this file
There was a problem hiding this comment.
Duplicate of AlgHom.equalizer
This is an attempt to design the definitions of base category [Stacks, 06GC] and complete base category in deformation theory. The approach we take is to first introduce a larger category of local algebras with a fixed residue field, then define base category and complete base category to be full subcategories of this larger category via
ObjectProperty.To be specific:
Defs.lean, we defineLocAlgCatandLocAlgCat.Homto be the type of objects and morphisms in the category, and provide a universe lift functor.Basic.lean, we add the basic constructionofQuotandtoOfQuot, which is the quotient of an object inLocAlgCatby a proper Ideal. Then we use them to defineinfinitesimalNeighborhoodandspecialFiberfor an object inLocAlgCat.Cotangent.lean, we introducek-vector space structures onCotangentSpaceof objects inLocAlgCatand prove the exactness of the conormal sequence for the special fiber.BaseCat.lean, we defineBaseCatto be the full subcategory ofLocAlgCatconsisting of Artinian local algebras and introduce the type class of a small extension for morphisms inBaseCat. We show that any surjective morphism inBaseCatcan be factored into a finite composition of small extensions [Stacks, 06GE]This PR is intended to showcase the overall design and architecture, I will split this into smaller PRs once the community reaches a consensus on the design choices.
Module.length#36657pullbackforRingHomandAlgHom#37008