fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
toPresentation_comp : (Q.comp P).toPresentation = Q.toPresentation.comp P.toPresentation := rfl
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
toPresentation_comp
null
toGenerators_comp : (Q.comp P).toGenerators = Q.toGenerators.comp P.toGenerators := rfl
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
toGenerators_comp
null
dimension_comp_eq_dimension_add_dimension [Finite ι] [Finite ι'] [Finite σ] [Finite σ'] : (Q.comp P).dimension = Q.dimension + P.dimension := by simp only [Presentation.dimension] have : Nat.card σ ≤ Nat.card ι := card_relations_le_card_vars_of_isFinite P have : Nat.card σ' ≤ Nat.card ι' := card_relations_le_card_vars_of_isFinite Q simp only [Nat.card_sum] cutsat
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
dimension_comp_eq_dimension_add_dimension
The dimension of the composition of two finite submersive presentations is the sum of the dimensions.
private jacobiMatrix_comp_inl_inr (i : σ') (j : σ) : (Q.comp P).jacobiMatrix (Sum.inl i) (Sum.inr j) = 0 := by classical rw [jacobiMatrix_apply] refine MvPolynomial.pderiv_eq_zero_of_notMem_vars (fun hmem ↦ ?_) apply MvPolynomial.vars_rename at hmem simp at hmem open scoped Classical in
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
jacobiMatrix_comp_inl_inr
null
private jacobiMatrix_comp_₁₂ : (Q.comp P).jacobiMatrix.toBlocks₁₂ = 0 := by ext i j : 1 simp [Matrix.toBlocks₁₂, jacobiMatrix_comp_inl_inr]
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
jacobiMatrix_comp_₁₂
null
private jacobiMatrix_comp_inl_inl (i j : σ') : aeval (Sum.elim X (MvPolynomial.C ∘ P.val)) ((Q.comp P).jacobiMatrix (Sum.inl j) (Sum.inl i)) = Q.jacobiMatrix j i := by rw [jacobiMatrix_apply, jacobiMatrix_apply, comp_map, Sum.elim_inl, ← Q.comp_aeval_relation_inl P.toPresentation] apply aeval_sumElim_pderiv_inl open scoped Classical in
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
jacobiMatrix_comp_inl_inl
null
private jacobiMatrix_comp_₁₁_det : (aeval (Q.comp P).val) (Q.comp P).jacobiMatrix.toBlocks₁₁.det = Q.jacobian := by rw [jacobian_eq_jacobiMatrix_det, AlgHom.map_det (aeval (Q.comp P).val), RingHom.map_det] congr ext i j : 1 simp only [Matrix.map_apply, RingHom.mapMatrix_apply, ← Q.jacobiMatrix_comp_inl_inl P, Q.algebraMap_apply] apply aeval_sumElim
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
jacobiMatrix_comp_₁₁_det
null
private jacobiMatrix_comp_inr_inr (i j : σ) : (Q.comp P).jacobiMatrix (Sum.inr i) (Sum.inr j) = MvPolynomial.rename Sum.inr (P.jacobiMatrix i j) := by rw [jacobiMatrix_apply, jacobiMatrix_apply] simp only [comp_map, Sum.elim_inr] apply pderiv_rename Sum.inr_injective open scoped Classical in
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
jacobiMatrix_comp_inr_inr
null
private jacobiMatrix_comp_₂₂_det : (aeval (Q.comp P).val) (Q.comp P).jacobiMatrix.toBlocks₂₂.det = algebraMap S T P.jacobian := by rw [jacobian_eq_jacobiMatrix_det] rw [AlgHom.map_det (aeval (Q.comp P).val), RingHom.map_det, RingHom.map_det] congr ext i j : 1 simp only [Matrix.toBlocks₂₂, AlgHom.mapMatrix_apply, Matrix.map_apply, Matrix.of_apply, RingHom.mapMatrix_apply, Generators.algebraMap_apply, map_aeval, coe_eval₂Hom] rw [jacobiMatrix_comp_inr_inr, ← IsScalarTower.algebraMap_eq] simp only [aeval, AlgHom.coe_mk, coe_eval₂Hom] generalize P.jacobiMatrix i j = p induction p using MvPolynomial.induction_on with | C a => simp only [algHom_C, algebraMap_eq, eval₂_C] | add p q hp hq => simp [hp, hq] | mul_X p i hp => simp only [map_mul, eval₂_mul, hp] simp [Presentation.toGenerators_comp, toPresentation_comp]
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
jacobiMatrix_comp_₂₂_det
null
@[simp] comp_jacobian_eq_jacobian_smul_jacobian [Finite σ] [Finite σ'] : (Q.comp P).jacobian = P.jacobian • Q.jacobian := by classical cases nonempty_fintype σ' cases nonempty_fintype σ rw [jacobian_eq_jacobiMatrix_det, ← Matrix.fromBlocks_toBlocks ((Q.comp P).jacobiMatrix), jacobiMatrix_comp_₁₂] convert_to (aeval (Q.comp P).val) (Q.comp P).jacobiMatrix.toBlocks₁₁.det * (aeval (Q.comp P).val) (Q.comp P).jacobiMatrix.toBlocks₂₂.det = P.jacobian • Q.jacobian · simp only [Generators.algebraMap_apply, ← map_mul] congr convert Matrix.det_fromBlocks_zero₁₂ (Q.comp P).jacobiMatrix.toBlocks₁₁ (Q.comp P).jacobiMatrix.toBlocks₂₁ (Q.comp P).jacobiMatrix.toBlocks₂₂ · rw [jacobiMatrix_comp_₁₁_det, jacobiMatrix_comp_₂₂_det, mul_comm, Algebra.smul_def]
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
comp_jacobian_eq_jacobian_smul_jacobian
The Jacobian of the composition of presentations is the product of the Jacobians.
noncomputable baseChange : PreSubmersivePresentation T (T ⊗[R] S) ι σ where __ := P.toPresentation.baseChange T map := P.map map_inj := P.map_inj
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
baseChange
If `P` is a pre-submersive presentation of `S` over `R` and `T` is an `R`-algebra, we obtain a natural pre-submersive presentation of `T ⊗[R] S` over `T`.
baseChange_toPresentation : (P.baseChange R).toPresentation = P.toPresentation.baseChange R := rfl
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
baseChange_toPresentation
null
baseChange_ring : (P.baseChange R).Ring = P.Ring := rfl @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
baseChange_ring
null
baseChange_jacobian [Finite σ] : (P.baseChange T).jacobian = 1 ⊗ₜ P.jacobian := by classical cases nonempty_fintype σ simp_rw [jacobian_eq_jacobiMatrix_det] have h : (baseChange T P).jacobiMatrix = (MvPolynomial.map (algebraMap R T)).mapMatrix P.jacobiMatrix := by ext i j : 1 simp only [baseChange, jacobiMatrix_apply, Presentation.baseChange_relation, RingHom.mapMatrix_apply, Matrix.map_apply, Presentation.baseChange_toGenerators, MvPolynomial.pderiv_map] rw [h, ← RingHom.map_det, Generators.algebraMap_apply, aeval_map_algebraMap, P.algebraMap_apply] apply aeval_one_tmul
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
baseChange_jacobian
null
@[simps toPresentation, simps -isSimp map] noncomputable reindex (P : PreSubmersivePresentation R S ι σ) {ι' σ' : Type*} (e : ι' ≃ ι) (f : σ' ≃ σ) : PreSubmersivePresentation R S ι' σ' where __ := P.toPresentation.reindex e f map := e.symm ∘ P.map ∘ f map_inj := by rw [Function.Injective.of_comp_iff e.symm.injective, Function.Injective.of_comp_iff P.map_inj] exact f.injective
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
reindex
Given a pre-submersive presentation `P` and equivalences `ι' ≃ ι` and `σ' ≃ σ`, this is the induced pre-submersive presentation with variables indexed by `ι` and relations indexed by `κ
jacobiMatrix_reindex {ι' σ' : Type*} (e : ι' ≃ ι) (f : σ' ≃ σ) [Fintype σ'] [DecidableEq σ'] [Fintype σ] [DecidableEq σ] : (P.reindex e f).jacobiMatrix = (P.jacobiMatrix.reindex f.symm f.symm).map (MvPolynomial.rename e.symm) := by ext i j : 1 simp [jacobiMatrix_apply, MvPolynomial.pderiv_rename e.symm.injective, reindex, Presentation.reindex] @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
jacobiMatrix_reindex
null
jacobian_reindex (P : PreSubmersivePresentation R S ι σ) {ι' σ' : Type*} (e : ι' ≃ ι) (f : σ' ≃ σ) [Finite σ] [Finite σ'] : (P.reindex e f).jacobian = P.jacobian := by classical cases nonempty_fintype σ cases nonempty_fintype σ' simp_rw [PreSubmersivePresentation.jacobian_eq_jacobiMatrix_det] simp only [reindex_toPresentation, Presentation.reindex_toGenerators, jacobiMatrix_reindex, Matrix.reindex_apply, Equiv.symm_symm, Generators.algebraMap_apply, Generators.reindex_val] simp_rw [← MvPolynomial.aeval_rename, ← AlgHom.mapMatrix_apply, ← Matrix.det_submatrix_equiv_self f, AlgHom.map_det, AlgHom.mapMatrix_apply, Matrix.map_map] simp [← AlgHom.coe_comp, rename_comp_rename, rename_id]
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
jacobian_reindex
null
@[simps! toPresentation] noncomputable naive {v : ι → MvPolynomial σ R} (a : ι → σ) (ha : Function.Injective a) (s : MvPolynomial σ R ⧸ (Ideal.span <| Set.range v) → MvPolynomial σ R := Function.surjInv Ideal.Quotient.mk_surjective) (hs : ∀ x, Ideal.Quotient.mk _ (s x) = x := by apply Function.surjInv_eq) : PreSubmersivePresentation R (MvPolynomial σ R ⧸ (Ideal.span <| Set.range v)) σ ι where __ := Presentation.naive s hs map := a map_inj := ha @[simp] lemma jacobiMatrix_naive [Fintype ι] [DecidableEq ι] (i j : ι) : (naive a ha s hs).jacobiMatrix i j = (v j).pderiv (a i) := jacobiMatrix_apply _ _ _
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
naive
The naive pre-submersive presentation of a quotient `R[Xᵢ] ⧸ (vⱼ)`. If the definitional equality of the section matters, it can be explicitly provided. To construct the associated submersive presentation, use `PreSubmersivePresentation.jacobiMatrix_naive`.
@[nolint checkUnivs] SubmersivePresentation extends PreSubmersivePresentation.{t, w} R S ι σ where jacobian_isUnit : IsUnit toPreSubmersivePresentation.jacobian
structure
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
SubmersivePresentation
A `PreSubmersivePresentation` is submersive if its Jacobian is a unit in `S` and the presentation is finite.
noncomputable ofBijectiveAlgebraMap (h : Function.Bijective (algebraMap R S)) : SubmersivePresentation R S PEmpty.{w + 1} PEmpty.{t + 1} where __ := PreSubmersivePresentation.ofBijectiveAlgebraMap.{t, w} h jacobian_isUnit := by rw [ofBijectiveAlgebraMap_jacobian] exact isUnit_one
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
ofBijectiveAlgebraMap
If `algebraMap R S` is bijective, the empty generators are a submersive presentation with no relations.
noncomputable id : SubmersivePresentation R R PEmpty.{w + 1} PEmpty.{t + 1} := ofBijectiveAlgebraMap Function.bijective_id
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
id
The canonical submersive `R`-presentation of `R` with no generators and no relations.
noncomputable comp : SubmersivePresentation R T (ι' ⊕ ι) (σ' ⊕ σ) where __ := Q.toPreSubmersivePresentation.comp P.toPreSubmersivePresentation jacobian_isUnit := by rw [comp_jacobian_eq_jacobian_smul_jacobian, Algebra.smul_def, IsUnit.mul_iff] exact ⟨RingHom.isUnit_map _ <| P.jacobian_isUnit, Q.jacobian_isUnit⟩
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
comp
Given an `R`-algebra `S` and an `S`-algebra `T` with submersive presentations, this is the canonical submersive presentation of `T` as an `R`-algebra.
noncomputable localizationAway : SubmersivePresentation R S Unit Unit where __ := PreSubmersivePresentation.localizationAway S r jacobian_isUnit := by rw [localizationAway_jacobian] apply IsLocalization.map_units _ (⟨r, 1, by simp⟩ : Submonoid.powers r)
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
localizationAway
If `S` is the localization of `R` at `r`, this is the canonical submersive presentation of `S` as `R`-algebra.
noncomputable baseChange : SubmersivePresentation T (T ⊗[R] S) ι σ where toPreSubmersivePresentation := P.toPreSubmersivePresentation.baseChange T jacobian_isUnit := P.baseChange_jacobian T ▸ P.jacobian_isUnit.map TensorProduct.includeRight
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
baseChange
If `P` is a submersive presentation of `S` over `R` and `T` is an `R`-algebra, we obtain a natural submersive presentation of `T ⊗[R] S` over `T`.
@[simps toPreSubmersivePresentation] noncomputable reindex (P : SubmersivePresentation R S ι σ) {ι' σ' : Type*} [Finite σ'] (e : ι' ≃ ι) (f : σ' ≃ σ) : SubmersivePresentation R S ι' σ' where __ := P.toPreSubmersivePresentation.reindex e f jacobian_isUnit := by simp [P.jacobian_isUnit]
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
reindex
Given a submersive presentation `P` and equivalences `ι' ≃ ι` and `σ' ≃ σ`, this is the induced submersive presentation with variables indexed by `ι'` and relations indexed by `σ'`
noncomputable aevalDifferentialEquiv (P : SubmersivePresentation R S ι σ) : (σ → S) ≃ₗ[S] (σ → S) := haveI : Fintype σ := Fintype.ofFinite σ have : IsUnit (LinearMap.toMatrix (Pi.basisFun S σ) (Pi.basisFun S σ) P.aevalDifferential).det := by convert P.jacobian_isUnit rw [LinearMap.toMatrix_eq_toMatrix', jacobian_eq_jacobiMatrix_det, aevalDifferential_toMatrix'_eq_mapMatrix_jacobiMatrix, P.algebraMap_eq] simp [RingHom.map_det] LinearEquiv.ofIsUnitDet this variable (P : SubmersivePresentation R S ι σ) @[simp]
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
aevalDifferentialEquiv
If `P` is submersive, `PreSubmersivePresentation.aevalDifferential` is an isomorphism.
aevalDifferentialEquiv_apply [Finite σ] (x : σ → S) : P.aevalDifferentialEquiv x = P.aevalDifferential x := rfl
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
aevalDifferentialEquiv_apply
null
noncomputable basisDeriv (P : SubmersivePresentation R S ι σ) : Basis σ S (σ → S) := Basis.map (Pi.basisFun S σ) P.aevalDifferentialEquiv @[simp]
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
basisDeriv
If `P` is a submersive presentation, the partial derivatives of `P.relation i` by `P.map j` form a basis of `σ → S`.
basisDeriv_apply (i j : σ) : P.basisDeriv i j = (aeval P.val) (pderiv (P.map j) (P.relation i)) := by classical simp [basisDeriv]
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
basisDeriv_apply
null
linearIndependent_aeval_val_pderiv_relation : LinearIndependent S (fun i j ↦ (aeval P.val) (pderiv (P.map j) (P.relation i))) := by simp_rw [← SubmersivePresentation.basisDeriv_apply] exact P.basisDeriv.linearIndependent
lemma
RingTheory
[ "Mathlib.Algebra.MvPolynomial.PDeriv", "Mathlib.LinearAlgebra.Determinant", "Mathlib.RingTheory.Extension.Presentation.Basic" ]
Mathlib/RingTheory/Extension/Presentation/Submersive.lean
linearIndependent_aeval_val_pderiv_relation
null
Module.FaithfullyFlat.of_specComap_surjective [Flat A B] (h : Function.Surjective ((algebraMap A B).specComap)) : Module.FaithfullyFlat A B := by refine ⟨fun m hm ↦ ?_⟩ obtain ⟨m', hm'⟩ := h ⟨m, hm.isPrime⟩ have : m = Ideal.comap (algebraMap A B) m'.asIdeal := by rw [← PrimeSpectrum.specComap_asIdeal (algebraMap A B) m', hm'] rw [Ideal.smul_top_eq_map, this] exact (Submodule.restrictScalars_eq_top_iff _ _ _).ne.mpr fun top ↦ m'.isPrime.ne_top <| top_le_iff.mp <| top ▸ Ideal.map_comap_le
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Ideal.Over", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.Spectrum.Prime.RingHom", "Mathlib.RingTheory.TensorProduct.Quotient" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Algebra.lean
Module.FaithfullyFlat.of_specComap_surjective
If `A →+* B` is flat and surjective on prime spectra, `B` is a faithfully flat `A`-algebra.
Module.FaithfullyFlat.of_flat_of_isLocalHom [IsLocalRing A] [IsLocalRing B] [Flat A B] [IsLocalHom (algebraMap A B)] : Module.FaithfullyFlat A B := by refine ⟨fun m hm ↦ ?_⟩ rw [Ideal.smul_top_eq_map, IsLocalRing.eq_maximalIdeal hm] by_contra eqt have : Submodule.restrictScalars A (Ideal.map (algebraMap A B) (IsLocalRing.maximalIdeal A)) ≤ Submodule.restrictScalars A (IsLocalRing.maximalIdeal B) := ((IsLocalRing.local_hom_TFAE (algebraMap A B)).out 0 2).mp ‹_› rw [eqt, top_le_iff, Submodule.restrictScalars_eq_top_iff] at this exact Ideal.IsPrime.ne_top' this variable [Module.FaithfullyFlat A B]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Ideal.Over", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.Spectrum.Prime.RingHom", "Mathlib.RingTheory.TensorProduct.Quotient" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Algebra.lean
Module.FaithfullyFlat.of_flat_of_isLocalHom
If `A` is local and `B` is a local and flat `A`-algebra, then `B` is faithfully flat.
Module.FaithfullyFlat.tensorProduct_mk_injective (M : Type*) [AddCommGroup M] [Module A M] : Function.Injective (TensorProduct.mk A B M 1) := by rw [← Module.FaithfullyFlat.lTensor_injective_iff_injective A B] have : (lTensor B <| TensorProduct.mk A B M 1) = (TensorProduct.leftComm A B B M).symm.comp (TensorProduct.mk A B (B ⊗[A] M) 1) := by apply TensorProduct.ext' intro x y simp rw [this, coe_comp, LinearEquiv.coe_coe, EmbeddingLike.comp_injective] exact Algebra.TensorProduct.mk_one_injective_of_isScalarTower _
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Ideal.Over", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.Spectrum.Prime.RingHom", "Mathlib.RingTheory.TensorProduct.Quotient" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Algebra.lean
Module.FaithfullyFlat.tensorProduct_mk_injective
If `B` is a faithfully flat `A`-module and `M` is any `A`-module, the canonical map `M →ₗ[A] B ⊗[A] M` is injective.
Module.FaithfullyFlat.faithfulSMul : FaithfulSMul A B := by constructor intro a₁ a₂ ha apply Module.FaithfullyFlat.tensorProduct_mk_injective (A := A) (B := B) A simp only [TensorProduct.mk_apply] rw [← mul_one a₁, ← mul_one a₂] simp only [← smul_eq_mul, ← TensorProduct.smul_tmul, ha (1 : B)] open Algebra.TensorProduct in
instance
RingTheory
[ "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Ideal.Over", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.Spectrum.Prime.RingHom", "Mathlib.RingTheory.TensorProduct.Quotient" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Algebra.lean
Module.FaithfullyFlat.faithfulSMul
null
Ideal.comap_map_eq_self_of_faithfullyFlat (I : Ideal A) : (I.map (algebraMap A B)).comap (algebraMap A B) = I := by refine le_antisymm ?_ le_comap_map have inj : Function.Injective ((quotIdealMapEquivTensorQuot B I).symm.toLinearMap.restrictScalars _ ∘ₗ TensorProduct.mk A B (A ⧸ I) 1) := by rw [LinearMap.coe_comp] exact (AlgEquiv.injective _).comp <| Module.FaithfullyFlat.tensorProduct_mk_injective (A ⧸ I) intro x hx rw [Ideal.mem_comap] at hx rw [← Ideal.Quotient.eq_zero_iff_mem] at hx ⊢ apply inj have : ((quotIdealMapEquivTensorQuot B I).symm.toLinearMap.restrictScalars _ ∘ₗ TensorProduct.mk A B (A ⧸ I) 1) x = 0 := by simp [← Algebra.algebraMap_eq_smul_one, hx] simp [this]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Ideal.Over", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.Spectrum.Prime.RingHom", "Mathlib.RingTheory.TensorProduct.Quotient" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Algebra.lean
Ideal.comap_map_eq_self_of_faithfullyFlat
If `B` is a faithfully flat `A`-algebra, the preimage of the pushforward of any ideal `I` is again `I`.
Ideal.comap_surjective_of_faithfullyFlat : Function.Surjective (Ideal.comap (algebraMap A B)) := fun I ↦ ⟨I.map (algebraMap A B), comap_map_eq_self_of_faithfullyFlat I⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Ideal.Over", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.Spectrum.Prime.RingHom", "Mathlib.RingTheory.TensorProduct.Quotient" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Algebra.lean
Ideal.comap_surjective_of_faithfullyFlat
If `B` is a faithfully-flat `A`-algebra, every ideal in `A` is the preimage of some ideal in `B`.
Ideal.exists_isPrime_liesOver_of_faithfullyFlat (p : Ideal A) [p.IsPrime] : ∃ (P : Ideal B), P.IsPrime ∧ P.LiesOver p := by obtain ⟨P, _, hP⟩ := (Ideal.comap_map_eq_self_iff_of_isPrime p).mp <| p.comap_map_eq_self_of_faithfullyFlat (B := B) exact ⟨P, inferInstance, ⟨hP.symm⟩⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Ideal.Over", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.Spectrum.Prime.RingHom", "Mathlib.RingTheory.TensorProduct.Quotient" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Algebra.lean
Ideal.exists_isPrime_liesOver_of_faithfullyFlat
If `B` is faithfully flat over `A`, every prime of `A` comes from a prime of `B`.
PrimeSpectrum.specComap_surjective_of_faithfullyFlat : Function.Surjective (algebraMap A B).specComap := fun I ↦ (PrimeSpectrum.mem_range_comap_iff (algebraMap A B)).mpr I.asIdeal.comap_map_eq_self_of_faithfullyFlat
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Ideal.Over", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.Spectrum.Prime.RingHom", "Mathlib.RingTheory.TensorProduct.Quotient" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Algebra.lean
PrimeSpectrum.specComap_surjective_of_faithfullyFlat
If `B` is a faithfully flat `A`-algebra, the induced map on the prime spectrum is surjective.
@[mk_iff] FaithfullyFlat : Prop extends Module.Flat R M where submodule_ne_top : ∀ ⦃m : Ideal R⦄ (_ : Ideal.IsMaximal m), m • (⊤ : Submodule R M) ≠ ⊤
class
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
FaithfullyFlat
A module `M` over a commutative ring `R` is *faithfully flat* if it is flat and, for all `R`-linear maps `f : N → N'` such that `id ⊗ f = 0`, we have `f = 0`.
self : FaithfullyFlat R R where submodule_ne_top m h r := Ideal.eq_top_iff_one _ |>.not.1 h.ne_top <| by simpa using show 1 ∈ (m • ⊤ : Ideal R) from r.symm ▸ ⟨⟩
instance
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
self
null
iff_flat_and_proper_ideal : FaithfullyFlat R M ↔ (Flat R M ∧ ∀ (I : Ideal R), I ≠ ⊤ → I • (⊤ : Submodule R M) ≠ ⊤) := by rw [faithfullyFlat_iff] refine ⟨fun ⟨flat, h⟩ => ⟨flat, fun I hI r => ?_⟩, fun h => ⟨h.1, fun m hm => h.2 _ hm.ne_top⟩⟩ obtain ⟨m, hm, le⟩ := I.exists_le_maximal hI exact h hm <| eq_top_iff.2 <| show ⊤ ≤ m • ⊤ from r ▸ Submodule.smul_mono le (by simp [r])
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_flat_and_proper_ideal
null
iff_flat_and_ideal_smul_eq_top : FaithfullyFlat R M ↔ (Flat R M ∧ ∀ (I : Ideal R), I • (⊤ : Submodule R M) = ⊤ → I = ⊤) := iff_flat_and_proper_ideal R M |>.trans <| and_congr_right_iff.2 fun _ => iff_of_eq <| forall_congr fun I => eq_iff_iff.2 <| by tauto
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_flat_and_ideal_smul_eq_top
null
rTensor_nontrivial [fl : FaithfullyFlat R M] (N : Type*) [AddCommGroup N] [Module R N] [Nontrivial N] : Nontrivial (N ⊗[R] M) := by obtain ⟨n, hn⟩ := nontrivial_iff_exists_ne (0 : N) |>.1 inferInstance let I := (Submodule.span R {n}).annihilator by_cases I_ne_top : I = ⊤ · rw [Ideal.eq_top_iff_one, Submodule.mem_annihilator_span_singleton, one_smul] at I_ne_top contradiction let inc : R ⧸ I →ₗ[R] N := Submodule.liftQ _ ((LinearMap.lsmul R N).flip n) <| fun r hr => by simpa only [LinearMap.mem_ker, LinearMap.flip_apply, LinearMap.lsmul_apply, Submodule.mem_annihilator_span_singleton, I] using hr have injective_inc : Function.Injective inc := LinearMap.ker_eq_bot.1 <| eq_bot_iff.2 <| by intro r hr induction r using Quotient.inductionOn' with | h r => simpa only [Submodule.Quotient.mk''_eq_mk, Submodule.mem_bot, Submodule.Quotient.mk_eq_zero, Submodule.mem_annihilator_span_singleton, LinearMap.mem_ker, Submodule.liftQ_apply, LinearMap.flip_apply, LinearMap.lsmul_apply, I, inc] using hr have ne_top := iff_flat_and_proper_ideal R M |>.1 fl |>.2 I I_ne_top refine subsingleton_or_nontrivial _ |>.resolve_left fun rid => ?_ exact False.elim <| ne_top <| Submodule.subsingleton_quotient_iff_eq_top.1 <| Function.Injective.comp (g := LinearMap.rTensor M inc) (fl.toFlat.rTensor_preserves_injective_linearMap inc injective_inc) ((quotTensorEquivQuotSMul M I).symm.injective) |>.subsingleton
instance
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
rTensor_nontrivial
null
lTensor_nontrivial [FaithfullyFlat R M] (N : Type*) [AddCommGroup N] [Module R N] [Nontrivial N] : Nontrivial (M ⊗[R] N) := TensorProduct.comm R M N |>.toEquiv.nontrivial
instance
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
lTensor_nontrivial
null
rTensor_reflects_triviality [FaithfullyFlat R M] (N : Type*) [AddCommGroup N] [Module R N] [h : Subsingleton (N ⊗[R] M)] : Subsingleton N := by revert h; change _ → _; contrapose! intro h infer_instance
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
rTensor_reflects_triviality
null
lTensor_reflects_triviality [FaithfullyFlat R M] (N : Type*) [AddCommGroup N] [Module R N] [Subsingleton (M ⊗[R] N)] : Subsingleton N := by haveI : Subsingleton (N ⊗[R] M) := (TensorProduct.comm R N M).toEquiv.injective.subsingleton apply rTensor_reflects_triviality R M attribute [-simp] Ideal.Quotient.mk_eq_mk in
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
lTensor_reflects_triviality
null
iff_flat_and_rTensor_faithful : FaithfullyFlat R M ↔ (Flat R M ∧ ∀ (N : Type max u v) [AddCommGroup N] [Module R N], Nontrivial N → Nontrivial (N ⊗[R] M)) := by refine ⟨fun fl => ⟨inferInstance, rTensor_nontrivial R M⟩, fun ⟨flat, faithful⟩ => ⟨?_⟩⟩ intro m hm rid specialize faithful (ULift (R ⧸ m)) inferInstance haveI : Nontrivial ((R ⧸ m) ⊗[R] M) := (congr (ULift.moduleEquiv : ULift (R ⧸ m) ≃ₗ[R] R ⧸ m) (LinearEquiv.refl R M)).symm.toEquiv.nontrivial have := (quotTensorEquivQuotSMul M m).toEquiv.symm.nontrivial haveI H : Subsingleton (M ⧸ m • (⊤ : Submodule R M)) := by rwa [Submodule.subsingleton_quotient_iff_eq_top] rw [← not_nontrivial_iff_subsingleton] at H contradiction
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_flat_and_rTensor_faithful
null
iff_flat_and_rTensor_reflects_triviality : FaithfullyFlat R M ↔ (Flat R M ∧ ∀ (N : Type max u v) [AddCommGroup N] [Module R N], Subsingleton (N ⊗[R] M) → Subsingleton N) := iff_flat_and_rTensor_faithful R M |>.trans <| and_congr_right_iff.2 fun _ => iff_of_eq <| forall_congr fun N => forall_congr fun _ => forall_congr fun _ => iff_iff_eq.1 <| by simp only [← not_subsingleton_iff_nontrivial]; tauto
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_flat_and_rTensor_reflects_triviality
null
iff_flat_and_lTensor_faithful : FaithfullyFlat R M ↔ (Flat R M ∧ ∀ (N : Type max u v) [AddCommGroup N] [Module R N], Nontrivial N → Nontrivial (M ⊗[R] N)) := iff_flat_and_rTensor_faithful R M |>.trans ⟨fun ⟨flat, faithful⟩ => ⟨flat, fun N _ _ _ => letI := faithful N inferInstance; (TensorProduct.comm R M N).toEquiv.nontrivial⟩, fun ⟨flat, faithful⟩ => ⟨flat, fun N _ _ _ => letI := faithful N inferInstance; (TensorProduct.comm R M N).symm.toEquiv.nontrivial⟩⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_flat_and_lTensor_faithful
null
iff_flat_and_lTensor_reflects_triviality : FaithfullyFlat R M ↔ (Flat R M ∧ ∀ (N : Type max u v) [AddCommGroup N] [Module R N], Subsingleton (M ⊗[R] N) → Subsingleton N) := iff_flat_and_lTensor_faithful R M |>.trans <| and_congr_right_iff.2 fun _ => iff_of_eq <| forall_congr fun N => forall_congr fun _ => forall_congr fun _ => iff_iff_eq.1 <| by simp only [← not_subsingleton_iff_nontrivial]; tauto
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_flat_and_lTensor_reflects_triviality
null
of_linearEquiv {N : Type*} [AddCommGroup N] [Module R N] [FaithfullyFlat R M] (e : N ≃ₗ[R] M) : FaithfullyFlat R N := by rw [iff_flat_and_lTensor_faithful] exact ⟨Flat.of_linearEquiv e, fun P _ _ hP ↦ (TensorProduct.congr e (LinearEquiv.refl R P)).toEquiv.nontrivial⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
of_linearEquiv
If `M` is a faithfully flat `R`-module and `N` is `R`-linearly isomorphic to `M`, then `N` is faithfully flat.
directSum {ι : Type*} [Nonempty ι] (M : ι → Type*) [∀ i, AddCommGroup (M i)] [∀ i, Module R (M i)] [∀ i, FaithfullyFlat R (M i)] : FaithfullyFlat R (⨁ i, M i) := by classical rw [iff_flat_and_lTensor_faithful] refine ⟨inferInstance, fun N _ _ hN ↦ ?_⟩ obtain ⟨i⟩ := ‹Nonempty ι› obtain ⟨x, y, hxy⟩ := Nontrivial.exists_pair_ne (α := M i ⊗[R] N) haveI : Nontrivial (⨁ (i : ι), M i ⊗[R] N) := ⟨DirectSum.of _ i x, DirectSum.of _ i y, fun h ↦ hxy (DirectSum.of_injective i h)⟩ apply (TensorProduct.directSumLeft R M N).toEquiv.nontrivial
instance
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
directSum
A direct sum of faithfully flat `R`-modules is faithfully flat.
finsupp (ι : Type v) [Nonempty ι] : FaithfullyFlat R (ι →₀ R) := by classical exact of_linearEquiv _ _ (finsuppLEquivDirectSum R R ι)
instance
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
finsupp
Free `R`-modules over discrete types are flat.
range_le_ker_of_exact_rTensor [fl : FaithfullyFlat R M] (ex : Function.Exact (l12.rTensor M) (l23.rTensor M)) : LinearMap.range l12 ≤ LinearMap.ker l23 := by rintro _ ⟨n1, rfl⟩ rw [LinearMap.mem_ker] by_contra! hn1 let E : Submodule R N3 := Submodule.span R {l23 (l12 n1)} have hE : Nontrivial E := ⟨0, ⟨⟨l23 (l12 n1), Submodule.mem_span_singleton_self _⟩, Subtype.coe_ne_coe.1 hn1.symm⟩⟩ have eq1 : ∀ (m : M), l23 (l12 n1) ⊗ₜ[R] m = 0 := fun m ↦ ex.apply_apply_eq_zero (n1 ⊗ₜ[R] m) have eq0 : (⊤ : Submodule R (E ⊗[R] M)) = ⊥ := by ext x simp only [Submodule.mem_top, Submodule.mem_bot, true_iff] have mem : x ∈ (⊤ : Submodule R _) := ⟨⟩ rw [← TensorProduct.span_tmul_eq_top, Submodule.mem_span_set] at mem obtain ⟨c, hc, rfl⟩ := mem choose b a hy using hc let r : ⦃a : E ⊗[R] M⦄ → a ∈ ↑c.support → R := fun a ha => Submodule.mem_span_singleton.1 (b ha).2 |>.choose have hr : ∀ ⦃i : E ⊗[R] M⦄ (hi : i ∈ c.support), b hi = r hi • ⟨l23 (l12 n1), Submodule.mem_span_singleton_self _⟩ := fun a ha => Subtype.ext <| Submodule.mem_span_singleton.1 (b ha).2 |>.choose_spec.symm refine Finset.sum_eq_zero fun i hi => show c i • i = 0 from (Module.Flat.rTensor_preserves_injective_linearMap (M := M) E.subtype <| Submodule.injective_subtype E) ?_ rw [← hy hi, hr hi, smul_tmul, map_smul, LinearMap.rTensor_tmul, Submodule.subtype_apply, eq1, smul_zero, map_zero] have : Subsingleton (E ⊗[R] M) := subsingleton_iff_forall_eq 0 |>.2 fun x => show x ∈ (⊥ : Submodule R _) from eq0 ▸ ⟨⟩ exact not_subsingleton_iff_nontrivial.2 inferInstance <| fl.rTensor_reflects_triviality R M E
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
range_le_ker_of_exact_rTensor
Any free, nontrivial `R`-module is flat. -/ instance [Nontrivial M] [Module.Free R M] : FaithfullyFlat R M := of_linearEquiv _ _ (Free.chooseBasis R M).repr section variable {N : Type*} [AddCommGroup N] [Module R N] @[simp] lemma subsingleton_tensorProduct_iff_right [Module.FaithfullyFlat R M] : Subsingleton (M ⊗[R] N) ↔ Subsingleton N := ⟨fun _ ↦ lTensor_reflects_triviality R M N, fun _ ↦ inferInstance⟩ @[simp] lemma subsingleton_tensorProduct_iff_left [Module.FaithfullyFlat R N] : Subsingleton (M ⊗[R] N) ↔ Subsingleton M := ⟨fun _ ↦ rTensor_reflects_triviality R N M, fun _ ↦ inferInstance⟩ @[simp] lemma nontrivial_tensorProduct_iff_right [Module.FaithfullyFlat R M] : Nontrivial (M ⊗[R] N) ↔ Nontrivial N := by simp [← not_iff_not, not_nontrivial_iff_subsingleton] @[simp] lemma nontrivial_tensorProduct_iff_left [Module.FaithfullyFlat R N] : Nontrivial (M ⊗[R] N) ↔ Nontrivial M := by simp [← not_iff_not, not_nontrivial_iff_subsingleton] end section exact /-! ### Faithfully flat modules and exact sequences In this section we prove that an `R`-module `M` is faithfully flat iff tensoring with `M` preserves and reflects exact sequences. Let `N₁ -l₁₂-> N₂ -l₂₃-> N₃` be two linear maps. - We first show that if `N₁ ⊗ M -> N₂ ⊗ M -> N₃ ⊗ M` is exact, then `N₁ -l₁₂-> N₂ -l₂₃-> N₃` is a complex, i.e. `range l₁₂ ≤ ker l₂₃`. This is `range_le_ker_of_exact_rTensor`. - Then in `rTensor_reflects_exact`, we show `ker l₂₃ = range l₁₂` by considering the cohomology `ker l₂₃ ⧸ range l₁₂`. This shows that when `M` is faithfully flat, `- ⊗ M` reflects exact sequences. For details, see comments in the proof. Since `M` is flat, `- ⊗ M` preserves exact sequences. On the other hand, if `- ⊗ M` preserves and reflects exact sequences, then `M` is faithfully flat. - `M` is flat because `- ⊗ M` preserves exact sequences. - We need to show that if `N ⊗ M = 0` then `N = 0`. Consider the sequence `N -0-> N -0-> 0`. After tensoring with `M`, we get `N ⊗ M -0-> N ⊗ M -0-> 0` which is exact because `N ⊗ M = 0`. Since `- ⊗ M` reflects exact sequences, `N = 0`. -/ section arbitrary_universe variable {N1 : Type*} [AddCommGroup N1] [Module R N1] variable {N2 : Type*} [AddCommGroup N2] [Module R N2] variable {N3 : Type*} [AddCommGroup N3] [Module R N3] variable (l12 : N1 →ₗ[R] N2) (l23 : N2 →ₗ[R] N3) /-- If `M` is faithfully flat, then exactness of `N₁ ⊗ M -> N₂ ⊗ M -> N₃ ⊗ M` implies that the composition `N₁ -> N₂ -> N₃` is `0`. Implementation detail, please use `rTensor_reflects_exact` instead.
rTensor_reflects_exact [fl : FaithfullyFlat R M] (ex : Function.Exact (l12.rTensor M) (l23.rTensor M)) : Function.Exact l12 l23 := LinearMap.exact_iff.2 <| by have complex : LinearMap.range l12 ≤ LinearMap.ker l23 := range_le_ker_of_exact_rTensor R M _ _ ex let H := LinearMap.ker l23 ⧸ LinearMap.range (Submodule.inclusion complex) suffices triv_coh : Subsingleton H by rw [Submodule.subsingleton_quotient_iff_eq_top, Submodule.range_inclusion, Submodule.comap_subtype_eq_top] at triv_coh exact le_antisymm triv_coh complex suffices Subsingleton (H ⊗[R] M) from rTensor_reflects_triviality R M H let e : H ⊗[R] M ≃ₗ[R] _ := TensorProduct.quotientTensorEquiv _ _ rw [e.toEquiv.subsingleton_congr, Submodule.subsingleton_quotient_iff_eq_top, LinearMap.range_eq_top] intro x induction x using TensorProduct.induction_on with | zero => exact ⟨0, by simp⟩ | tmul x m => rcases x with ⟨x, (hx : l23 x = 0)⟩ have mem : x ⊗ₜ[R] m ∈ LinearMap.ker (l23.rTensor M) := by simp [hx] rw [LinearMap.exact_iff.1 ex] at mem obtain ⟨y, hy⟩ := mem refine ⟨LinearMap.rTensor M (LinearMap.rangeRestrict _ ∘ₗ LinearMap.rangeRestrict l12) y, Module.Flat.rTensor_preserves_injective_linearMap (LinearMap.ker l23).subtype Subtype.val_injective ?_⟩ simp only [LinearMap.comp_codRestrict, LinearMap.rTensor_tmul, Submodule.coe_subtype, ← hy] rw [← LinearMap.comp_apply, ← LinearMap.rTensor_def, ← LinearMap.rTensor_comp, ← LinearMap.comp_apply, ← LinearMap.rTensor_comp, LinearMap.comp_assoc, LinearMap.subtype_comp_codRestrict, ← LinearMap.comp_assoc, Submodule.subtype_comp_inclusion, LinearMap.subtype_comp_codRestrict] | add x y hx hy => obtain ⟨x, rfl⟩ := hx; obtain ⟨y, rfl⟩ := hy exact ⟨x + y, by simp⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
rTensor_reflects_exact
null
lTensor_reflects_exact [fl : FaithfullyFlat R M] (ex : Function.Exact (l12.lTensor M) (l23.lTensor M)) : Function.Exact l12 l23 := rTensor_reflects_exact R M _ _ <| ex.of_ladder_linearEquiv_of_exact (e₁ := TensorProduct.comm _ _ _) (e₂ := TensorProduct.comm _ _ _) (e₃ := TensorProduct.comm _ _ _) (by ext; rfl) (by ext; rfl) @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
lTensor_reflects_exact
null
rTensor_exact_iff_exact [FaithfullyFlat R M] : Function.Exact (l12.rTensor M) (l23.rTensor M) ↔ Function.Exact l12 l23 := ⟨fun ex ↦ rTensor_reflects_exact R M l12 l23 ex, fun e ↦ Module.Flat.rTensor_exact _ e⟩ @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
rTensor_exact_iff_exact
null
lTensor_exact_iff_exact [FaithfullyFlat R M] : Function.Exact (l12.lTensor M) (l23.lTensor M) ↔ Function.Exact l12 l23 := ⟨fun ex ↦ lTensor_reflects_exact R M l12 l23 ex, fun e ↦ Module.Flat.lTensor_exact _ e⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
lTensor_exact_iff_exact
null
@[simp] lTensor_injective_iff_injective [Module.FaithfullyFlat R M] : Function.Injective (f.lTensor M) ↔ Function.Injective f := by rw [← LinearMap.exact_zero_iff_injective (M ⊗[R] Unit), ← LinearMap.exact_zero_iff_injective Unit] conv_rhs => rw [← lTensor_exact_iff_exact R M] simp @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
lTensor_injective_iff_injective
null
lTensor_surjective_iff_surjective [Module.FaithfullyFlat R M] : Function.Surjective (f.lTensor M) ↔ Function.Surjective f := by rw [← LinearMap.exact_zero_iff_surjective (M ⊗[R] Unit), ← LinearMap.exact_zero_iff_surjective Unit] conv_rhs => rw [← lTensor_exact_iff_exact R M] simp
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
lTensor_surjective_iff_surjective
null
iff_exact_iff_rTensor_exact : FaithfullyFlat R M ↔ (∀ {N1 : Type max u v} [AddCommGroup N1] [Module R N1] {N2 : Type max u v} [AddCommGroup N2] [Module R N2] {N3 : Type max u v} [AddCommGroup N3] [Module R N3] (l12 : N1 →ₗ[R] N2) (l23 : N2 →ₗ[R] N3), Function.Exact l12 l23 ↔ Function.Exact (l12.rTensor M) (l23.rTensor M)) := ⟨fun fl _ _ _ _ _ _ _ _ _ l12 l23 => (rTensor_exact_iff_exact R M l12 l23).symm, fun iff_exact => iff_flat_and_rTensor_reflects_triviality _ _ |>.2 ⟨Flat.iff_rTensor_exact.2 <| fun _ _ _ => iff_exact .. |>.1, fun N _ _ h => subsingleton_iff_forall_eq 0 |>.2 <| fun y => by simpa [eq_comm] using (iff_exact (0 : PUnit →ₗ[R] N) (0 : N →ₗ[R] PUnit) |>.2 fun x => by simpa using Subsingleton.elim _ _) y⟩⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_exact_iff_rTensor_exact
null
iff_exact_iff_lTensor_exact : FaithfullyFlat R M ↔ (∀ {N1 : Type max u v} [AddCommGroup N1] [Module R N1] {N2 : Type max u v} [AddCommGroup N2] [Module R N2] {N3 : Type max u v} [AddCommGroup N3] [Module R N3] (l12 : N1 →ₗ[R] N2) (l23 : N2 →ₗ[R] N3), Function.Exact l12 l23 ↔ Function.Exact (l12.lTensor M) (l23.lTensor M)) := by simp only [iff_exact_iff_rTensor_exact, LinearMap.rTensor_exact_iff_lTensor_exact]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_exact_iff_lTensor_exact
null
zero_iff_lTensor_zero [h : FaithfullyFlat R M] {N : Type*} [AddCommGroup N] [Module R N] {N' : Type*} [AddCommGroup N'] [Module R N'] (f : N →ₗ[R] N') : f = 0 ↔ LinearMap.lTensor M f = 0 := ⟨fun hf => hf.symm ▸ LinearMap.lTensor_zero M, fun hf => by have := lTensor_reflects_exact R M f LinearMap.id (by rw [LinearMap.exact_iff, hf, LinearMap.range_zero, LinearMap.ker_eq_bot] apply Module.Flat.lTensor_preserves_injective_linearMap exact fun _ _ h => h) ext x; simpa using this (f x)⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
zero_iff_lTensor_zero
If `M` is a faithfully flat module, then for all linear maps `f`, the map `id ⊗ f = 0`, if and only if `f = 0`.
zero_iff_rTensor_zero [h: FaithfullyFlat R M] {N : Type*} [AddCommGroup N] [Module R N] {N' : Type*} [AddCommGroup N'] [Module R N'] (f : N →ₗ[R] N') : f = 0 ↔ LinearMap.rTensor M f = 0 := zero_iff_lTensor_zero R M f |>.trans ⟨fun h => by ext n m; exact (TensorProduct.comm R N' M).injective <| (by simpa using congr($h (m ⊗ₜ n))), fun h => by ext m n; exact (TensorProduct.comm R M N').injective <| (by simpa using congr($h (n ⊗ₜ m)))⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
zero_iff_rTensor_zero
If `M` is a faithfully flat module, then for all linear maps `f`, the map `f ⊗ id = 0`, if and only if `f = 0`.
@[simp] one_tmul_eq_zero_iff {A : Type*} [Ring A] [Algebra R A] [FaithfullyFlat R A] (m : M) : (1:A) ⊗ₜ[R] m = 0 ↔ m = 0 := by constructor; swap · rintro rfl; rw [tmul_zero] intro h let f : R →ₗ[R] M := (LinearMap.lsmul R M).flip m suffices f = 0 by simpa [f] using DFunLike.congr_fun this 1 rw [Module.FaithfullyFlat.zero_iff_lTensor_zero R A] ext a apply_fun (a • ·) at h rw [smul_zero, smul_tmul', smul_eq_mul, mul_one] at h simpa [f]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
one_tmul_eq_zero_iff
If `A` is a faithfully flat `R`-algebra, and `m` is a term of an `R`-module `M`, then `1 ⊗ₜ[R] m = 0` if and only if `m = 0`.
iff_zero_iff_lTensor_zero : FaithfullyFlat R M ↔ (Module.Flat R M ∧ (∀ {N : Type max u v} [AddCommGroup N] [Module R N] {N' : Type max u v} [AddCommGroup N'] [Module R N'] (f : N →ₗ[R] N'), f.lTensor M = 0 ↔ f = 0)) := ⟨fun fl => ⟨inferInstance, fun f => zero_iff_lTensor_zero R M f |>.symm⟩, fun ⟨flat, Z⟩ => iff_flat_and_lTensor_reflects_triviality R M |>.2 ⟨flat, fun N _ _ _ => by have := Z (LinearMap.id : N →ₗ[R] N) |>.1 (by ext; exact Subsingleton.elim _ _) rw [subsingleton_iff_forall_eq 0] exact fun y => congr($this y)⟩⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_zero_iff_lTensor_zero
An `R`-module `M` is faithfully flat iff it is flat and for all linear maps `f`, the map `id ⊗ f = 0`, if and only if `f = 0`.
iff_zero_iff_rTensor_zero : FaithfullyFlat R M ↔ (Module.Flat R M ∧ (∀ {N : Type max u v} [AddCommGroup N] [Module R N] {N' : Type max u v} [AddCommGroup N'] [Module R N'] (f : N →ₗ[R] N'), f.rTensor M = 0 ↔ (f = 0))) := ⟨fun fl => ⟨inferInstance, fun f => zero_iff_rTensor_zero R M f |>.symm⟩, fun ⟨flat, Z⟩ => iff_flat_and_rTensor_reflects_triviality R M |>.2 ⟨flat, fun N _ _ _ => by have := Z (LinearMap.id : N →ₗ[R] N) |>.1 (by ext; exact Subsingleton.elim _ _) rw [subsingleton_iff_forall_eq 0] exact fun y => congr($this y)⟩⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
iff_zero_iff_rTensor_zero
An `R`-module `M` is faithfully flat iff it is flat and for all linear maps `f`, the map `id ⊗ f = 0`, if and only if `f = 0`.
trans : FaithfullyFlat R M := by rw [iff_zero_iff_lTensor_zero] refine ⟨Module.Flat.trans R S M, @fun N _ _ N' _ _ f => ⟨fun aux => ?_, fun eq => eq ▸ by simp⟩⟩ rw [zero_iff_lTensor_zero (R:= R) (M := S) f, show f.lTensor S = (AlgebraTensorModule.map (A:= S) LinearMap.id f).restrictScalars R by aesop, show (0 : S ⊗[R] N →ₗ[R] S ⊗[R] N') = (0 : S ⊗[R] N →ₗ[S] S ⊗[R] N').restrictScalars R by rfl, restrictScalars_inj, zero_iff_lTensor_zero (R:= S) (M := M)] ext m n apply_fun AlgebraTensorModule.cancelBaseChange R S S M N' using LinearEquiv.injective _ simpa using congr($aux (m ⊗ₜ[R] n))
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
trans
If `S` is a faithfully flat `R`-algebra, then any faithfully flat `S`-Module is faithfully flat as an `R`-module.
Flat.of_flat_tensorProduct (S : Type*) [CommRing S] [Algebra R S] [Module.FaithfullyFlat R S] [Module.Flat S (S ⊗[R] M)] : Module.Flat R M := by rw [Module.Flat.iff_lTensor_preserves_injective_linearMap] intro N P _ _ _ _ f hf have : Flat R (S ⊗[R] M) := Flat.trans _ S _ rw [← FaithfullyFlat.lTensor_injective_iff_injective R S] have : LinearMap.lTensor S (LinearMap.lTensor M f) = (TensorProduct.assoc _ _ _ _).toLinearMap ∘ₗ LinearMap.lTensor (S ⊗[R] M) f ∘ₗ (TensorProduct.assoc _ _ _ _).symm.toLinearMap := by ext simp simpa [this] using Flat.lTensor_preserves_injective_linearMap f hf
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
Flat.of_flat_tensorProduct
Faithful flatness is preserved by arbitrary base change. -/ instance (S : Type*) [CommRing S] [Algebra R S] [Module.FaithfullyFlat R M] : Module.FaithfullyFlat S (S ⊗[R] M) := by rw [Module.FaithfullyFlat.iff_flat_and_rTensor_reflects_triviality] refine ⟨inferInstance, fun N _ _ hN ↦ ?_⟩ let _ : Module R N := Module.compHom N (algebraMap R S) have : IsScalarTower R S N := IsScalarTower.of_algebraMap_smul fun r ↦ congrFun rfl have := (AlgebraTensorModule.cancelBaseChange R S S N M).symm.subsingleton exact FaithfullyFlat.rTensor_reflects_triviality R M N section IsBaseChange variable {S N : Type*} [CommRing S] [Algebra R S] [FaithfullyFlat R S] [AddCommGroup N] [Module R N] [Module S N] [IsScalarTower R S N] {f : M →ₗ[R] N} theorem _root_.IsBaseChange.map_smul_top_ne_top_iff_of_faithfullyFlat (hf : IsBaseChange S f) (I : Ideal R) : I.map (algebraMap R S) • (⊤ : Submodule S N) ≠ ⊤ ↔ I • (⊤ : Submodule R M) ≠ ⊤ := by simpa only [← Submodule.subsingleton_quotient_iff_eq_top.not] using not_congr <| (tensorQuotEquivQuotSMul N (I.map (algebraMap R S))).symm ≪≫ₗ TensorProduct.comm S N _ ≪≫ₗ hf.tensorEquiv _ ≪≫ₗ AlgebraTensorModule.congr (I.qoutMapEquivTensorQout S) (.refl R M) ≪≫ₗ AlgebraTensorModule.assoc R R S S _ M ≪≫ₗ (TensorProduct.comm R _ M).baseChange R S _ _ ≪≫ₗ (tensorQuotEquivQuotSMul M I).baseChange R S _ _ |>.subsingleton_congr.trans <| subsingleton_tensorProduct_iff_right R S end IsBaseChange end FaithfullyFlat /-- Flat descends along faithfully flat ring maps.
Flat.iff_flat_tensorProduct (S : Type*) [CommRing S] [Algebra R S] [Module.FaithfullyFlat R S] : Module.Flat S (S ⊗[R] M) ↔ Module.Flat R M := ⟨fun _ ↦ .of_flat_tensorProduct R M S, fun _ ↦ inferInstance⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Flat.Stability" ]
Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean
Flat.iff_flat_tensorProduct
null
Ideal.IsHomogeneous : Prop := Submodule.IsHomogeneous I 𝒜
abbrev
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.IsHomogeneous
An `I : Ideal A` is homogeneous if for every `r ∈ I`, all homogeneous components of `r` are in `I`.
Ideal.IsHomogeneous.mem_iff {I} (hI : Ideal.IsHomogeneous 𝒜 I) {x} : x ∈ I ↔ ∀ i, (decompose 𝒜 x i : A) ∈ I := AddSubmonoidClass.IsHomogeneous.mem_iff 𝒜 _ hI
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.IsHomogeneous.mem_iff
null
HomogeneousIdeal := HomogeneousSubmodule 𝒜 𝒜 variable {𝒜}
abbrev
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal
For any `Semiring A`, we collect the homogeneous ideals of `A` into a type.
HomogeneousIdeal.toIdeal (I : HomogeneousIdeal 𝒜) : Ideal A := I.toSubmodule
abbrev
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal.toIdeal
Converting a homogeneous ideal to an ideal.
HomogeneousIdeal.isHomogeneous (I : HomogeneousIdeal 𝒜) : I.toIdeal.IsHomogeneous 𝒜 := I.is_homogeneous'
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal.isHomogeneous
null
HomogeneousIdeal.toIdeal_injective : Function.Injective (HomogeneousIdeal.toIdeal : HomogeneousIdeal 𝒜 → Ideal A) := HomogeneousSubmodule.toSubmodule_injective 𝒜 𝒜
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal.toIdeal_injective
null
HomogeneousIdeal.setLike : SetLike (HomogeneousIdeal 𝒜) A := HomogeneousSubmodule.setLike 𝒜 𝒜 @[ext]
instance
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal.setLike
null
HomogeneousIdeal.ext {I J : HomogeneousIdeal 𝒜} (h : I.toIdeal = J.toIdeal) : I = J := HomogeneousIdeal.toIdeal_injective h
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal.ext
null
HomogeneousIdeal.ext' {I J : HomogeneousIdeal 𝒜} (h : ∀ i, ∀ x ∈ 𝒜 i, x ∈ I ↔ x ∈ J) : I = J := HomogeneousSubmodule.ext' 𝒜 𝒜 h @[simp high]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal.ext'
null
HomogeneousIdeal.mem_iff {I : HomogeneousIdeal 𝒜} {x : A} : x ∈ I.toIdeal ↔ x ∈ I := Iff.rfl
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal.mem_iff
null
Ideal.homogeneousCore' (I : Ideal A) : Ideal A := Ideal.span ((↑) '' (((↑) : Subtype (SetLike.IsHomogeneousElem 𝒜) → A) ⁻¹' I))
def
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.homogeneousCore'
For any `I : Ideal A`, not necessarily homogeneous, `I.homogeneousCore' 𝒜` is the largest homogeneous ideal of `A` contained in `I`, as an ideal.
Ideal.homogeneousCore'_mono : Monotone (Ideal.homogeneousCore' 𝒜) := fun _ _ I_le_J => Ideal.span_mono <| Set.image_mono fun _ => @I_le_J _
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.homogeneousCore'_mono
null
Ideal.homogeneousCore'_le : I.homogeneousCore' 𝒜 ≤ I := Ideal.span_le.2 <| image_preimage_subset _ _
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.homogeneousCore'_le
null
Ideal.isHomogeneous_iff_forall_subset : I.IsHomogeneous 𝒜 ↔ ∀ i, (I : Set A) ⊆ GradedRing.proj 𝒜 i ⁻¹' I := Iff.rfl
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.isHomogeneous_iff_forall_subset
null
Ideal.isHomogeneous_iff_subset_iInter : I.IsHomogeneous 𝒜 ↔ (I : Set A) ⊆ ⋂ i, GradedRing.proj 𝒜 i ⁻¹' ↑I := subset_iInter_iff.symm
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.isHomogeneous_iff_subset_iInter
null
Ideal.mul_homogeneous_element_mem_of_mem {I : Ideal A} (r x : A) (hx₁ : SetLike.IsHomogeneousElem 𝒜 x) (hx₂ : x ∈ I) (j : ι) : GradedRing.proj 𝒜 j (r * x) ∈ I := by classical rw [← DirectSum.sum_support_decompose 𝒜 r, Finset.sum_mul, map_sum] apply Ideal.sum_mem intro k _ obtain ⟨i, hi⟩ := hx₁ have mem₁ : (DirectSum.decompose 𝒜 r k : A) * x ∈ 𝒜 (k + i) := GradedMul.mul_mem (SetLike.coe_mem _) hi rw [GradedRing.proj_apply, DirectSum.decompose_of_mem 𝒜 mem₁, coe_of_apply] split_ifs · exact I.mul_mem_left _ hx₂ · exact I.zero_mem
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.mul_homogeneous_element_mem_of_mem
null
Ideal.homogeneous_span (s : Set A) (h : ∀ x ∈ s, SetLike.IsHomogeneousElem 𝒜 x) : (Ideal.span s).IsHomogeneous 𝒜 := by rintro i r hr rw [Ideal.span, Finsupp.span_eq_range_linearCombination] at hr rw [LinearMap.mem_range] at hr obtain ⟨s, rfl⟩ := hr rw [Finsupp.linearCombination_apply, Finsupp.sum, decompose_sum, DFinsupp.finset_sum_apply, AddSubmonoidClass.coe_finset_sum] refine Ideal.sum_mem _ ?_ rintro z hz1 rw [smul_eq_mul] refine Ideal.mul_homogeneous_element_mem_of_mem 𝒜 (s z) z ?_ ?_ i · rcases z with ⟨z, hz2⟩ apply h _ hz2 · exact Ideal.subset_span z.2
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.homogeneous_span
null
Ideal.homogeneousCore : HomogeneousIdeal 𝒜 := ⟨Ideal.homogeneousCore' 𝒜 I, Ideal.homogeneous_span _ _ fun _ h => by have := Subtype.image_preimage_coe (setOf (SetLike.IsHomogeneousElem 𝒜)) (I : Set A) exact (cast congr(_ ∈ $this) h).1⟩
def
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.homogeneousCore
For any `I : Ideal A`, not necessarily homogeneous, `I.homogeneousCore' 𝒜` is the largest homogeneous ideal of `A` contained in `I`.
Ideal.homogeneousCore_mono : Monotone (Ideal.homogeneousCore 𝒜) := Ideal.homogeneousCore'_mono 𝒜
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.homogeneousCore_mono
null
Ideal.toIdeal_homogeneousCore_le : (I.homogeneousCore 𝒜).toIdeal ≤ I := Ideal.homogeneousCore'_le 𝒜 I variable {𝒜 I}
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.toIdeal_homogeneousCore_le
null
Ideal.mem_homogeneousCore_of_homogeneous_of_mem {x : A} (h : SetLike.IsHomogeneousElem 𝒜 x) (hmem : x ∈ I) : x ∈ I.homogeneousCore 𝒜 := Ideal.subset_span ⟨⟨x, h⟩, hmem, rfl⟩
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.mem_homogeneousCore_of_homogeneous_of_mem
null
Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self (h : I.IsHomogeneous 𝒜) : (I.homogeneousCore 𝒜).toIdeal = I := by apply le_antisymm (I.homogeneousCore'_le 𝒜) _ intro x hx classical rw [← DirectSum.sum_support_decompose 𝒜 x] exact Ideal.sum_mem _ fun j _ => Ideal.subset_span ⟨⟨_, isHomogeneousElem_coe _⟩, h _ hx, rfl⟩ @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self
null
HomogeneousIdeal.toIdeal_homogeneousCore_eq_self (I : HomogeneousIdeal 𝒜) : I.toIdeal.homogeneousCore 𝒜 = I := by ext1 convert Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self I.isHomogeneous variable (𝒜 I)
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
HomogeneousIdeal.toIdeal_homogeneousCore_eq_self
null
Ideal.IsHomogeneous.iff_eq : I.IsHomogeneous 𝒜 ↔ (I.homogeneousCore 𝒜).toIdeal = I := ⟨fun hI => hI.toIdeal_homogeneousCore_eq_self, fun hI => hI ▸ (Ideal.homogeneousCore 𝒜 I).2⟩
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.IsHomogeneous.iff_eq
null
Ideal.IsHomogeneous.iff_exists : I.IsHomogeneous 𝒜 ↔ ∃ S : Set (homogeneousSubmonoid 𝒜), I = Ideal.span ((↑) '' S) := by rw [Ideal.IsHomogeneous.iff_eq, eq_comm] exact ((Set.image_preimage.compose (Submodule.gi _ _).gc).exists_eq_l _).symm
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
Ideal.IsHomogeneous.iff_exists
null
bot : Ideal.IsHomogeneous 𝒜 ⊥ := fun i r hr => by simp only [Ideal.mem_bot] at hr rw [hr, decompose_zero, zero_apply] apply Ideal.zero_mem
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
bot
null
top : Ideal.IsHomogeneous 𝒜 ⊤ := fun i r _ => by simp only [Submodule.mem_top] variable {𝒜}
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
top
null
inf {I J : Ideal A} (HI : I.IsHomogeneous 𝒜) (HJ : J.IsHomogeneous 𝒜) : (I ⊓ J).IsHomogeneous 𝒜 := fun _ _ hr => ⟨HI _ hr.1, HJ _ hr.2⟩
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
inf
null
sup {I J : Ideal A} (HI : I.IsHomogeneous 𝒜) (HJ : J.IsHomogeneous 𝒜) : (I ⊔ J).IsHomogeneous 𝒜 := by rw [iff_exists] at HI HJ ⊢ obtain ⟨⟨s₁, rfl⟩, ⟨s₂, rfl⟩⟩ := HI, HJ refine ⟨s₁ ∪ s₂, ?_⟩ rw [Set.image_union] exact (Submodule.span_union _ _).symm
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
sup
null
protected iSup {κ : Sort*} {f : κ → Ideal A} (h : ∀ i, (f i).IsHomogeneous 𝒜) : (⨆ i, f i).IsHomogeneous 𝒜 := by simp_rw [iff_exists] at h ⊢ choose s hs using h refine ⟨⋃ i, s i, ?_⟩ simp_rw [Set.image_iUnion, Ideal.span_iUnion] congr exact funext hs
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Finsupp.SumProd", "Mathlib.RingTheory.GradedAlgebra.Basic", "Mathlib.RingTheory.Ideal.Basic", "Mathlib.RingTheory.Ideal.BigOperators", "Mathlib.RingTheory.Ideal.Maps", "Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule" ]
Mathlib/RingTheory/GradedAlgebra/Homogeneous/Ideal.lean
iSup
null