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
@[stacks 00HK] isTrivialRelation_of_sum_smul_eq_zero [Flat R M] {ι : Type*} [Fintype ι] {f : ι → R} {x : ι → M} (h : ∑ i, f i • x i = 0) : IsTrivialRelation f x := (Fintype.equivFin ι).symm.isTrivialRelation_comp.mp <| iff_forall_isTrivialRelation.mp ‹_› <| by simpa only [← (Fintype.equivFin ι).symm.sum_comp] using h
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
isTrivialRelation_of_sum_smul_eq_zero
**Equational criterion for flatness**, forward direction. If $M$ is flat, then every relation $\sum_i f_i x_i = 0$ in $M$ is trivial.
@[stacks 00HK] of_forall_isTrivialRelation (hfx : ∀ {l : ℕ} {f : Fin l → R} {x : Fin l → M}, ∑ i, f i • x i = 0 → IsTrivialRelation f x) : Flat R M := iff_forall_isTrivialRelation.mpr hfx
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
of_forall_isTrivialRelation
**Equational criterion for flatness**, backward direction. If every relation $\sum_i f_i x_i = 0$ in $M$ is trivial, then $M$ is flat.
@[stacks 058D "(1) ↔ (2)"] iff_forall_exists_factorization : Flat R M ↔ ∀ {l : ℕ} {f : Fin l →₀ R} {x : (Fin l →₀ R) →ₗ[R] M}, x f = 0 → ∃ (k : ℕ) (a : (Fin l →₀ R) →ₗ[R] (Fin k →₀ R)) (y : (Fin k →₀ R) →ₗ[R] M), x = y ∘ₗ a ∧ a f = 0 := (tfae_equational_criterion R M).out 0 4
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
iff_forall_exists_factorization
**Equational criterion for flatness**, alternate form. A module $M$ is flat if and only if for all finite free modules $R^l$, all $f \in R^l$, and all linear maps $x \colon R^l \to M$ such that $x(f) = 0$, there exist a finite free module $R^k$ and linear maps $a \colon R^l \to R^k$ and $y \colon R^k \to M$ such that $x = y \circ a$ and $a(f) = 0$.
@[stacks 058D "(2) → (1)"] of_forall_exists_factorization (h : ∀ {l : ℕ} {f : Fin l →₀ R} {x : (Fin l →₀ R) →ₗ[R] M}, x f = 0 → ∃ (k : ℕ) (a : (Fin l →₀ R) →ₗ[R] (Fin k →₀ R)) (y : (Fin k →₀ R) →ₗ[R] M), x = y ∘ₗ a ∧ a f = 0) : Flat R M := iff_forall_exists_factorization.mpr h
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
of_forall_exists_factorization
**Equational criterion for flatness**, backward direction, alternate form. Let $M$ be a module over a commutative ring $R$. Suppose that for all finite free modules $R^l$, all $f \in R^l$, and all linear maps $x \colon R^l \to M$ such that $x(f) = 0$, there exist a finite free module $R^k$ and linear maps $a \colon R^l \to R^k$ and $y \colon R^k \to M$ such that $x = y \circ a$ and $a(f) = 0$. Then $M$ is flat.
@[stacks 058D "(1) → (2)"] exists_factorization_of_apply_eq_zero_of_free [Flat R M] {N : Type*} [AddCommGroup N] [Module R N] [Free R N] [Module.Finite R N] {f : N} {x : N →ₗ[R] M} (h : x f = 0) : ∃ (k : ℕ) (a : N →ₗ[R] (Fin k →₀ R)) (y : (Fin k →₀ R) →ₗ[R] M), x = y ∘ₗ a ∧ a f = 0 := have e := ((Module.Free.chooseBasis R N).reindex (Fintype.equivFin _)).repr.symm have ⟨k, a, y, hya, haf⟩ := iff_forall_exists_factorization.mp ‹Flat R M› (f := e.symm f) (x := x ∘ₗ e) (by simpa using h) ⟨k, a ∘ₗ e.symm, y, by rwa [← comp_assoc, LinearEquiv.eq_comp_toLinearMap_symm], haf⟩
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
exists_factorization_of_apply_eq_zero_of_free
**Equational criterion for flatness**, forward direction, second alternate form. Let $M$ be a flat module over a commutative ring $R$. Let $N$ be a finite free module over $R$, let $f \in N$, and let $x \colon N \to M$ be a linear map such that $x(f) = 0$. Then there exist a finite free module $R^k$ and linear maps $a \colon N \to R^k$ and $y \colon R^k \to M$ such that $x = y \circ a$ and $a(f) = 0$.
private exists_factorization_of_comp_eq_zero_of_free_aux [Flat R M] {K : Type*} {n : ℕ} [AddCommGroup K] [Module R K] [Module.Finite R K] {f : K →ₗ[R] Fin n →₀ R} {x : (Fin n →₀ R) →ₗ[R] M} (h : x ∘ₗ f = 0) : ∃ (k : ℕ) (a : (Fin n →₀ R) →ₗ[R] (Fin k →₀ R)) (y : (Fin k →₀ R) →ₗ[R] M), x = y ∘ₗ a ∧ a ∘ₗ f = 0 := by have (K' : Submodule R K) (hK' : K'.FG) : ∃ (k : ℕ) (a : (Fin n →₀ R) →ₗ[R] (Fin k →₀ R)) (y : (Fin k →₀ R) →ₗ[R] M), x = y ∘ₗ a ∧ K' ≤ LinearMap.ker (a ∘ₗ f) := by revert n apply Submodule.fg_induction (N := K') (hN := hK') · intro k n f x hfx have : x (f k) = 0 := by simpa using LinearMap.congr_fun hfx k simpa using exists_factorization_of_apply_eq_zero_of_free this · intro K₁ K₂ ih₁ ih₂ n f x hfx obtain ⟨k₁, a₁, y₁, rfl, ha₁⟩ := ih₁ hfx have : y₁ ∘ₗ (a₁ ∘ₗ f) = 0 := by rw [← comp_assoc, hfx] obtain ⟨k₂, a₂, y₂, rfl, ha₂⟩ := ih₂ this use k₂, a₂ ∘ₗ a₁, y₂ simp_rw [comp_assoc] exact ⟨trivial, sup_le (ha₁.trans (ker_le_ker_comp _ _)) ha₂⟩ convert this ⊤ Finite.fg_top simp only [top_le_iff, ker_eq_top]
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
exists_factorization_of_comp_eq_zero_of_free_aux
null
@[stacks 058D "(1) → (4)"] exists_factorization_of_comp_eq_zero_of_free [Flat R M] {K N : Type*} [AddCommGroup K] [Module R K] [Module.Finite R K] [AddCommGroup N] [Module R N] [Free R N] [Module.Finite R N] {f : K →ₗ[R] N} {x : N →ₗ[R] M} (h : x ∘ₗ f = 0) : ∃ (k : ℕ) (a : N →ₗ[R] (Fin k →₀ R)) (y : (Fin k →₀ R) →ₗ[R] M), x = y ∘ₗ a ∧ a ∘ₗ f = 0 := have e := ((Module.Free.chooseBasis R N).reindex (Fintype.equivFin _)).repr.symm have ⟨k, a, y, hya, haf⟩ := exists_factorization_of_comp_eq_zero_of_free_aux (f := e.symm ∘ₗ f) (x := x ∘ₗ e.toLinearMap) (by ext; simpa [comp_assoc] using congr($h _)) ⟨k, a ∘ₗ e.symm, y, by rwa [← comp_assoc, LinearEquiv.eq_comp_toLinearMap_symm], by rwa [comp_assoc]⟩
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
exists_factorization_of_comp_eq_zero_of_free
Let $M$ be a flat module. Let $K$ and $N$ be finite $R$-modules with $N$ free, and let $f \colon K \to N$ and $x \colon N \to M$ be linear maps such that $x \circ f = 0$. Then there exist a finite free module $R^k$ and linear maps $a \colon N \to R^k$ and $y \colon R^k \to M$ such that $x = y \circ a$ and $a \circ f = 0$.
@[stacks 058E "only if"] exists_factorization_of_isFinitelyPresented [Flat R M] {P : Type*} [AddCommGroup P] [Module R P] [FinitePresentation R P] (h₁ : P →ₗ[R] M) : ∃ (k : ℕ) (h₂ : P →ₗ[R] (Fin k →₀ R)) (h₃ : (Fin k →₀ R) →ₗ[R] M), h₁ = h₃ ∘ₗ h₂ := by have ⟨_, K, ϕ, hK⟩ := FinitePresentation.exists_fin R P haveI : Module.Finite R K := Module.Finite.iff_fg.mpr hK have : (h₁ ∘ₗ ϕ.symm ∘ₗ K.mkQ) ∘ₗ K.subtype = 0 := by simp_rw [comp_assoc, (LinearMap.exact_subtype_mkQ K).linearMap_comp_eq_zero, comp_zero] obtain ⟨k, a, y, hay, ha⟩ := exists_factorization_of_comp_eq_zero_of_free this use k, (K.liftQ a (by rwa [← range_le_ker_iff, Submodule.range_subtype] at ha)) ∘ₗ ϕ, y apply (cancel_right ϕ.symm.surjective).mp apply (cancel_right K.mkQ_surjective).mp simpa [comp_assoc] @[stacks 00NX "(1) → (2)"]
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
exists_factorization_of_isFinitelyPresented
Every homomorphism from a finitely presented module to a flat module factors through a finite free module.
projective_of_finitePresentation [Flat R M] [FinitePresentation R M] : Projective R M := have ⟨_, f, g, eq⟩ := exists_factorization_of_isFinitelyPresented (.id (R := R) (M := M)) .of_split f g eq.symm
theorem
RingTheory
[ "Mathlib.Algebra.Module.FinitePresentation", "Mathlib.LinearAlgebra.TensorProduct.Vanishing", "Mathlib.RingTheory.Flat.Tensor" ]
Mathlib/RingTheory/Flat/EquationalCriterion.lean
projective_of_finitePresentation
null
IsLocalization.flat : Module.Flat R S := by refine Module.Flat.iff_lTensor_injectiveₛ.mpr fun P _ _ N ↦ ?_ have h := ((range N.subtype).isLocalizedModule S p (TensorProduct.mk R S P 1)).isBaseChange _ S let e := (LinearEquiv.ofInjective _ Subtype.val_injective).lTensor S ≪≫ₗ h.equiv.restrictScalars R have : N.subtype.lTensor S = Submodule.subtype _ ∘ₗ e.toLinearMap := by ext; change _ = (h.equiv _).1; simp [h.equiv_tmul, TensorProduct.smul_tmul'] simpa [this] using e.injective
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
IsLocalization.flat
null
Localization.flat : Module.Flat R (Localization p) := IsLocalization.flat _ p
instance
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
Localization.flat
null
flat_iff_of_isLocalization : Flat S M ↔ Flat R M := have := isLocalizedModule_id p M S have := IsLocalization.flat S p ⟨fun _ ↦ .trans R S M, fun _ ↦ .of_isLocalizedModule S p .id⟩ variable (Mₚ : ∀ (P : Ideal S) [P.IsMaximal], Type*) [∀ (P : Ideal S) [P.IsMaximal], AddCommMonoid (Mₚ P)] [∀ (P : Ideal S) [P.IsMaximal], Module R (Mₚ P)] [∀ (P : Ideal S) [P.IsMaximal], Module S (Mₚ P)] [∀ (P : Ideal S) [P.IsMaximal], IsScalarTower R S (Mₚ P)] (f : ∀ (P : Ideal S) [P.IsMaximal], M →ₗ[S] Mₚ P) [∀ (P : Ideal S) [P.IsMaximal], IsLocalizedModule.AtPrime P (f P)] include f in
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
flat_iff_of_isLocalization
null
flat_of_isLocalized_maximal (H : ∀ (P : Ideal S) [P.IsMaximal], Flat R (Mₚ P)) : Module.Flat R M := by simp_rw [Flat.iff_lTensor_injectiveₛ] at H ⊢ simp_rw [← AlgebraTensorModule.coe_lTensor (A := S)] refine fun _ _ _ N ↦ injective_of_isLocalized_maximal _ (fun P ↦ AlgebraTensorModule.rTensor R _ (f P)) _ (fun P ↦ AlgebraTensorModule.rTensor R _ (f P)) _ fun P hP ↦ ?_ simpa [IsLocalizedModule.map_lTensor] using H P N
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
flat_of_isLocalized_maximal
null
flat_of_localized_maximal (h : ∀ (P : Ideal R) [P.IsMaximal], Flat R (LocalizedModule P.primeCompl M)) : Flat R M := flat_of_isLocalized_maximal _ _ _ (fun _ _ ↦ mkLinearMap _ _) h variable (s : Set S) (spn : Ideal.span s = ⊤) (Mₛ : ∀ _ : s, Type*) [∀ r : s, AddCommMonoid (Mₛ r)] [∀ r : s, Module R (Mₛ r)] [∀ r : s, Module S (Mₛ r)] [∀ r : s, IsScalarTower R S (Mₛ r)] (g : ∀ r : s, M →ₗ[S] Mₛ r) [∀ r : s, IsLocalizedModule.Away r.1 (g r)] include spn include g in
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
flat_of_localized_maximal
null
flat_of_isLocalized_span (H : ∀ r : s, Module.Flat R (Mₛ r)) : Module.Flat R M := by simp_rw [Flat.iff_lTensor_injectiveₛ] at H ⊢ simp_rw [← AlgebraTensorModule.coe_lTensor (A := S)] refine fun _ _ _ N ↦ injective_of_isLocalized_span s spn _ (fun r ↦ AlgebraTensorModule.rTensor R _ (g r)) _ (fun r ↦ AlgebraTensorModule.rTensor R _ (g r)) _ fun r ↦ ?_ simpa [IsLocalizedModule.map_lTensor] using H r N
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
flat_of_isLocalized_span
null
flat_of_localized_span (h : ∀ r : s, Flat S (LocalizedModule.Away r.1 M)) : Flat S M := flat_of_isLocalized_span _ _ _ spn _ (fun _ ↦ mkLinearMap _ _) h
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
flat_of_localized_span
null
IsSMulRegular.of_isLocalizedModule {K : Type*} [AddCommMonoid K] [Module R K] (f : K →ₗ[R] M) [IsLocalizedModule p f] {x : R} (reg : IsSMulRegular K x) : IsSMulRegular M (algebraMap R S x) := have : Module.Flat R S := IsLocalization.flat S p reg.of_flat_of_isBaseChange (IsLocalizedModule.isBaseChange p S f) include p in
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
IsSMulRegular.of_isLocalizedModule
null
IsSMulRegular.of_isLocalization {x : R} (reg : IsSMulRegular R x) : IsSMulRegular S (algebraMap R S x) := reg.of_isLocalizedModule S p (Algebra.linearMap R S)
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Exactness" ]
Mathlib/RingTheory/Flat/Localization.lean
IsSMulRegular.of_isLocalization
null
trans [Flat R S] [Flat S M] : Flat R M := by rw [Flat.iff_lTensor_injectiveₛ] introv rw [← coe_lTensor (A := S), ← EquivLike.injective_comp (cancelBaseChange R S S _ _), ← LinearEquiv.coe_coe, ← LinearMap.coe_comp, lTensor_comp_cancelBaseChange, LinearMap.coe_comp, LinearEquiv.coe_coe, EquivLike.comp_injective] iterate 2 apply Flat.lTensor_preserves_injective_linearMap exact Subtype.val_injective
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Basic", "Mathlib.RingTheory.IsTensorProduct", "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Localization.BaseChange", "Mathlib.Algebra.Module.LocalizedModule.Basic" ]
Mathlib/RingTheory/Flat/Stability.lean
trans
If `S` is a flat `R`-algebra, then any flat `S`-Module is also `R`-flat.
baseChange [Flat R M] : Flat S (S ⊗[R] M) := inferInstance
instance
RingTheory
[ "Mathlib.RingTheory.Flat.Basic", "Mathlib.RingTheory.IsTensorProduct", "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Localization.BaseChange", "Mathlib.Algebra.Module.LocalizedModule.Basic" ]
Mathlib/RingTheory/Flat/Stability.lean
baseChange
If `M` is a flat `R`-module and `S` is any `R`-algebra, `S ⊗[R] M` is `S`-flat.
isBaseChange [Flat R M] (N : Type t) [AddCommMonoid N] [Module R N] [Module S N] [IsScalarTower R S N] {f : M →ₗ[R] N} (h : IsBaseChange S f) : Flat S N := of_linearEquiv (IsBaseChange.equiv h).symm
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Basic", "Mathlib.RingTheory.IsTensorProduct", "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Localization.BaseChange", "Mathlib.Algebra.Module.LocalizedModule.Basic" ]
Mathlib/RingTheory/Flat/Stability.lean
isBaseChange
A base change of a flat module is flat.
localizedModule [Flat R M] (S : Submonoid R) : Flat (Localization S) (LocalizedModule S M) := by apply Flat.isBaseChange (R := R) (S := Localization S) (f := LocalizedModule.mkLinearMap S M) rw [← isLocalizedModule_iff_isBaseChange S] exact localizedModuleIsLocalizedModule S
instance
RingTheory
[ "Mathlib.RingTheory.Flat.Basic", "Mathlib.RingTheory.IsTensorProduct", "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Localization.BaseChange", "Mathlib.Algebra.Module.LocalizedModule.Basic" ]
Mathlib/RingTheory/Flat/Stability.lean
localizedModule
null
of_isLocalizedModule [Flat R M] (S : Submonoid R) [IsLocalization S Rp] (f : M →ₗ[R] Mp) [h : IsLocalizedModule S f] : Flat Rp Mp := by fapply Flat.isBaseChange (R := R) (M := M) (S := Rp) (N := Mp) exact (isLocalizedModule_iff_isBaseChange S Rp f).mp h
theorem
RingTheory
[ "Mathlib.RingTheory.Flat.Basic", "Mathlib.RingTheory.IsTensorProduct", "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Localization.BaseChange", "Mathlib.Algebra.Module.LocalizedModule.Basic" ]
Mathlib/RingTheory/Flat/Stability.lean
of_isLocalizedModule
null
injective_characterModule_iff_rTensor_preserves_injective_linearMap : Module.Injective R (CharacterModule M) ↔ ∀ ⦃N N' : Type v⦄ [AddCommGroup N] [AddCommGroup N'] [Module R N] [Module R N'] (f : N →ₗ[R] N'), Function.Injective f → Function.Injective (f.rTensor M) := by simp_rw [injective_iff, rTensor_injective_iff_lcomp_surjective, Surjective, DFunLike.ext_iff]; rfl
lemma
RingTheory
[ "Mathlib.Algebra.Module.CharacterModule", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/RingTheory/Flat/Tensor.lean
injective_characterModule_iff_rTensor_preserves_injective_linearMap
Define the character module of `M` to be `M →+ ℚ ⧸ ℤ`. The character module of `M` is an injective module if and only if `f ⊗ 𝟙 M` is injective for any linear map `f` in the same universe as `M`.
iff_characterModule_injective [Small.{v} R] : Flat R M ↔ Module.Injective R (CharacterModule M) := by rw [injective_characterModule_iff_rTensor_preserves_injective_linearMap, iff_rTensor_preserves_injective_linearMap']
theorem
RingTheory
[ "Mathlib.Algebra.Module.CharacterModule", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/RingTheory/Flat/Tensor.lean
iff_characterModule_injective
`CharacterModule M` is an injective module iff `M` is flat. See [Lambek_1964] for a self-contained proof.
iff_characterModule_baer : Flat R M ↔ Baer R (CharacterModule M) := by rw [equiv_iff (N := ULift.{u} M) ULift.moduleEquiv.symm, iff_characterModule_injective, ← Baer.iff_injective, Baer.congr (CharacterModule.congr ULift.moduleEquiv)]
theorem
RingTheory
[ "Mathlib.Algebra.Module.CharacterModule", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/RingTheory/Flat/Tensor.lean
iff_characterModule_baer
`CharacterModule M` is Baer iff `M` is flat.
iff_rTensor_injective' : Flat R M ↔ ∀ I : Ideal R, Function.Injective (rTensor M I.subtype) := by simp_rw [iff_characterModule_baer, Baer, rTensor_injective_iff_lcomp_surjective, Surjective, DFunLike.ext_iff, Subtype.forall] rfl
theorem
RingTheory
[ "Mathlib.Algebra.Module.CharacterModule", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/RingTheory/Flat/Tensor.lean
iff_rTensor_injective'
An `R`-module `M` is flat iff for all ideals `I` of `R`, the tensor product of the inclusion `I → R` and the identity `M → M` is injective. See `iff_rTensor_injective` to restrict to finitely generated ideals `I`.
iff_lTensor_injective' : Flat R M ↔ ∀ (I : Ideal R), Function.Injective (lTensor M I.subtype) := by simpa [← comm_comp_rTensor_comp_comm_eq] using iff_rTensor_injective'
theorem
RingTheory
[ "Mathlib.Algebra.Module.CharacterModule", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/RingTheory/Flat/Tensor.lean
iff_lTensor_injective'
The `lTensor`-variant of `iff_rTensor_injective'`. .
iff_rTensor_injective : Flat R M ↔ ∀ ⦃I : Ideal R⦄, I.FG → Function.Injective (I.subtype.rTensor M) := by refine iff_rTensor_injective'.trans ⟨fun h I _ ↦ h I, fun h I ↦ (injective_iff_map_eq_zero _).mpr fun x hx ↦ ?_⟩ obtain ⟨J, hfg, hle, y, rfl⟩ := Submodule.exists_fg_le_eq_rTensor_inclusion x rw [← rTensor_comp_apply] at hx rw [(injective_iff_map_eq_zero _).mp (h hfg) y hx, map_zero]
lemma
RingTheory
[ "Mathlib.Algebra.Module.CharacterModule", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/RingTheory/Flat/Tensor.lean
iff_rTensor_injective
A module `M` over a ring `R` is flat iff for all finitely generated ideals `I` of `R`, the tensor product of the inclusion `I → R` and the identity `M → M` is injective. See `iff_rTensor_injective'` to extend to all ideals `I`.
iff_lTensor_injective : Flat R M ↔ ∀ ⦃I : Ideal R⦄, I.FG → Function.Injective (I.subtype.lTensor M) := by simpa [← comm_comp_rTensor_comp_comm_eq] using iff_rTensor_injective
theorem
RingTheory
[ "Mathlib.Algebra.Module.CharacterModule", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/RingTheory/Flat/Tensor.lean
iff_lTensor_injective
The `lTensor`-variant of `iff_rTensor_injective`.
iff_lift_lsmul_comp_subtype_injective : Flat R M ↔ ∀ ⦃I : Ideal R⦄, I.FG → Function.Injective (TensorProduct.lift ((lsmul R M).comp I.subtype)) := by simp [iff_rTensor_injective, ← lid_comp_rTensor]
lemma
RingTheory
[ "Mathlib.Algebra.Module.CharacterModule", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/RingTheory/Flat/Tensor.lean
iff_lift_lsmul_comp_subtype_injective
An `R`-module `M` is flat if for all finitely generated ideals `I` of `R`, the canonical map `I ⊗ M →ₗ M` is injective.
isSMulRegular_of_isRegular {r : R} (hr : IsRegular r) [Flat R M] : IsSMulRegular M r := by have h := Flat.rTensor_preserves_injective_linearMap (M := M) (toSpanSingleton R R r) <| hr.right have h2 : (fun (x : M) ↦ r • x) = ((TensorProduct.lid R M) ∘ₗ (rTensor M (toSpanSingleton R R r)) ∘ₗ (TensorProduct.lid R M).symm) := by ext; simp rw [IsSMulRegular, h2] simp [h, LinearEquiv.injective]
lemma
RingTheory
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.RingTheory.DedekindDomain.Dvr", "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.Flat.Tensor", "Mathlib.RingTheory.Ideal.IsPrincipal" ]
Mathlib/RingTheory/Flat/TorsionFree.lean
isSMulRegular_of_isRegular
Scalar multiplication `m ↦ r • m` by a regular `r` is injective on a flat module.
isSMulRegular_of_nonZeroDivisors {r : R} (hr : r ∈ R⁰) [Flat R M] : IsSMulRegular M r := by apply isSMulRegular_of_isRegular exact le_nonZeroDivisors_iff_isRegular.mp (le_refl R⁰) ⟨r, hr⟩
lemma
RingTheory
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.RingTheory.DedekindDomain.Dvr", "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.Flat.Tensor", "Mathlib.RingTheory.Ideal.IsPrincipal" ]
Mathlib/RingTheory/Flat/TorsionFree.lean
isSMulRegular_of_nonZeroDivisors
Scalar multiplication `m ↦ r • m` by a nonzerodivisor `r` is injective on a flat module.
torsion_eq_bot [Flat R M] : torsion R M = ⊥ := by rw [eq_bot_iff] rintro m ⟨⟨r, hr⟩, h⟩ exact isSMulRegular_of_nonZeroDivisors hr (by simpa using h)
theorem
RingTheory
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.RingTheory.DedekindDomain.Dvr", "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.Flat.Tensor", "Mathlib.RingTheory.Ideal.IsPrincipal" ]
Mathlib/RingTheory/Flat/TorsionFree.lean
torsion_eq_bot
Flat modules have no torsion.
@[stacks 0539 "Generalized valuation ring to Bezout domain"] flat_iff_torsion_eq_bot_of_isBezout [IsBezout R] [IsDomain R] : Flat R M ↔ torsion R M = ⊥ := by refine ⟨fun _ ↦ torsion_eq_bot, ?_⟩ intro htors rw [iff_lift_lsmul_comp_subtype_injective] rintro I hFG obtain (rfl | h) := eq_or_ne I ⊥ · rintro x y - apply Subsingleton.elim · -- If I ≠ 0 then I ≅ R because R is Bezout and I is finitely generated have hprinc : I.IsPrincipal := IsBezout.isPrincipal_of_FG I hFG have : IsPrincipal.generator I ≠ 0 := by rwa [ne_eq, ← IsPrincipal.eq_bot_iff_generator_eq_zero] apply Function.Injective.of_comp_right _ (LinearEquiv.rTensor M (Ideal.isoBaseOfIsPrincipal h)).surjective rw [← LinearEquiv.coe_toLinearMap, ← LinearMap.coe_comp, LinearEquiv.coe_rTensor, rTensor, lift_comp_map, LinearMap.compl₂_id, LinearMap.comp_assoc, Ideal.subtype_isoBaseOfIsPrincipal_eq_mul, LinearMap.lift_lsmul_mul_eq_lsmul_lift_lsmul, LinearMap.coe_comp] rw [← Submodule.noZeroSMulDivisors_iff_torsion_eq_bot] at htors refine Function.Injective.comp (LinearMap.lsmul_injective this) ?_ rw [← Equiv.injective_comp (TensorProduct.lid R M).symm.toEquiv] convert Function.injective_id ext simp
theorem
RingTheory
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.RingTheory.DedekindDomain.Dvr", "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.Flat.Tensor", "Mathlib.RingTheory.Ideal.IsPrincipal" ]
Mathlib/RingTheory/Flat/TorsionFree.lean
flat_iff_torsion_eq_bot_of_isBezout
If `R` is Bezout then an `R`-module is flat iff it has no torsion.
flat_iff_torsion_eq_bot_of_valuationRing_localization_isMaximal [IsDomain R] (h : ∀ (P : Ideal R), [P.IsMaximal] → ValuationRing (Localization P.primeCompl)) : Flat R M ↔ torsion R M = ⊥ := by refine ⟨fun _ ↦ Flat.torsion_eq_bot, fun h ↦ ?_⟩ apply flat_of_localized_maximal intro P hP rw [← Submodule.noZeroSMulDivisors_iff_torsion_eq_bot] at h rw [← flat_iff_of_isLocalization (Localization P.primeCompl) P.primeCompl, Flat.flat_iff_torsion_eq_bot_of_isBezout, ← Submodule.noZeroSMulDivisors_iff_torsion_eq_bot] infer_instance
theorem
RingTheory
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.RingTheory.DedekindDomain.Dvr", "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.Flat.Tensor", "Mathlib.RingTheory.Ideal.IsPrincipal" ]
Mathlib/RingTheory/Flat/TorsionFree.lean
flat_iff_torsion_eq_bot_of_valuationRing_localization_isMaximal
If every localization of `R` at a maximal ideal is a valuation ring then an `R`-module is flat iff it has no torsion.
@[stacks 0AUW "(1)"] _root_.IsDedekindDomain.flat_iff_torsion_eq_bot [IsDedekindDomain R] : Flat R M ↔ torsion R M = ⊥ := by apply flat_iff_torsion_eq_bot_of_valuationRing_localization_isMaximal exact fun P ↦ inferInstance
theorem
RingTheory
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.RingTheory.DedekindDomain.Dvr", "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.Flat.Tensor", "Mathlib.RingTheory.Ideal.IsPrincipal" ]
Mathlib/RingTheory/Flat/TorsionFree.lean
_root_.IsDedekindDomain.flat_iff_torsion_eq_bot
If `R` is a Dedekind domain then an `R`-module is flat iff it has no torsion.
IsFractional (I : Submodule R P) := ∃ a ∈ S, ∀ b ∈ I, IsInteger R (a • b) variable (P)
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
IsFractional
A submodule `I` is a fractional ideal if `a I ⊆ R` for some `a ≠ 0`.
FractionalIdeal := { I : Submodule R P // IsFractional S I }
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
FractionalIdeal
The fractional ideals of a domain `R` are ideals of `R` divided by some `a ∈ R`. More precisely, let `P` be a localization of `R` at some submonoid `S`, then a fractional ideal `I ⊆ P` is an `R`-submodule of `P`, such that there is a nonzero `a : R` with `a I ⊆ R`.
@[coe] coeToSubmodule (I : FractionalIdeal S P) : Submodule R P := I.val
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeToSubmodule
Map a fractional ideal `I` to a submodule by forgetting that `∃ a, a I ⊆ R`. This implements the coercion `FractionalIdeal S P → Submodule R P`.
noncomputable den (I : FractionalIdeal S P) : S := ⟨I.2.choose, I.2.choose_spec.1⟩
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
den
Map a fractional ideal `I` to a submodule by forgetting that `∃ a, a I ⊆ R`. This coercion is typically called `coeToSubmodule` in lemma names (or `coe` when the coercion is clear from the context), not to be confused with `IsLocalization.coeSubmodule : Ideal R → Submodule R P` (which we use to define `coe : Ideal R → FractionalIdeal S P`). -/ instance : CoeOut (FractionalIdeal S P) (Submodule R P) := ⟨coeToSubmodule⟩ protected theorem isFractional (I : FractionalIdeal S P) : IsFractional S (I : Submodule R P) := I.prop /-- An element of `S` such that `I.den • I = I.num`, see `FractionalIdeal.num` and `FractionalIdeal.den_mul_self_eq_num`.
noncomputable num (I : FractionalIdeal S P) : Ideal R := (I.den • (I : Submodule R P)).comap (Algebra.linearMap R P)
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
num
An ideal of `R` such that `I.den • I = I.num`, see `FractionalIdeal.den` and `FractionalIdeal.den_mul_self_eq_num`.
den_mul_self_eq_num (I : FractionalIdeal S P) : I.den • (I : Submodule R P) = Submodule.map (Algebra.linearMap R P) I.num := by rw [den, num, Submodule.map_comap_eq] refine (inf_of_le_right ?_).symm rintro _ ⟨a, ha, rfl⟩ exact I.2.choose_spec.2 a ha
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
den_mul_self_eq_num
null
noncomputable equivNum [Nontrivial P] [NoZeroSMulDivisors R P] {I : FractionalIdeal S P} (h_nz : (I.den : R) ≠ 0) : I ≃ₗ[R] I.num := by refine LinearEquiv.trans (LinearEquiv.ofBijective ((DistribMulAction.toLinearMap R P I.den).restrict fun _ hx ↦ ?_) ⟨fun _ _ hxy ↦ ?_, fun ⟨y, hy⟩ ↦ ?_⟩) (Submodule.equivMapOfInjective (Algebra.linearMap R P) (FaithfulSMul.algebraMap_injective R P) (num I)).symm · rw [← den_mul_self_eq_num] exact Submodule.smul_mem_pointwise_smul _ _ _ hx · simp_rw [LinearMap.restrict_apply, DistribMulAction.toLinearMap_apply, Subtype.mk.injEq] at hxy rwa [Submonoid.smul_def, Submonoid.smul_def, smul_right_inj h_nz, SetCoe.ext_iff] at hxy · rw [← den_mul_self_eq_num] at hy obtain ⟨x, hx, hxy⟩ := hy exact ⟨⟨x, hx⟩, by simp_rw [LinearMap.restrict_apply, Subtype.ext_iff, ← hxy]; rfl⟩
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
equivNum
The linear equivalence between the fractional ideal `I` and the integral ideal `I.num` defined by mapping `x` to `den I • x`.
@[simp] mem_coe {I : FractionalIdeal S P} {x : P} : x ∈ (I : Submodule R P) ↔ x ∈ I := Iff.rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
mem_coe
null
coe_ext {I J : FractionalIdeal S P} : (I : Submodule R P) = (J : Submodule R P) → I = J := Subtype.ext
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_ext
Partially-applied version of `FractionalIdeal.ext`.
coe_ext_iff {I J : FractionalIdeal S P} : I = J ↔ (I : Submodule R P) = (J : Submodule R P) := Subtype.ext_iff @[ext]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_ext_iff
Partially-applied version of `FractionalIdeal.ext_iff`.
ext {I J : FractionalIdeal S P} : (∀ x, x ∈ I ↔ x ∈ J) → I = J := SetLike.ext @[simp] theorem equivNum_apply [Nontrivial P] [NoZeroSMulDivisors R P] {I : FractionalIdeal S P} (h_nz : (I.den : R) ≠ 0) (x : I) : algebraMap R P (equivNum h_nz x) = I.den • x := by change Algebra.linearMap R P _ = _ rw [equivNum, LinearEquiv.trans_apply, LinearEquiv.ofBijective_apply, LinearMap.restrict_apply, Submodule.map_equivMapOfInjective_symm_apply, Subtype.coe_mk, DistribMulAction.toLinearMap_apply]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
ext
null
protected copy (p : FractionalIdeal S P) (s : Set P) (hs : s = ↑p) : FractionalIdeal S P := ⟨Submodule.copy p s hs, by convert p.isFractional ext simp only [hs] rfl⟩ @[simp]
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
copy
Copy of a `FractionalIdeal` with a new underlying set equal to the old one. Useful to fix definitional equalities.
coe_copy (p : FractionalIdeal S P) (s : Set P) (hs : s = ↑p) : ↑(p.copy s hs) = s := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_copy
null
coe_eq (p : FractionalIdeal S P) (s : Set P) (hs : s = ↑p) : p.copy s hs = p := SetLike.coe_injective hs
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_eq
null
zero_mem (I : FractionalIdeal S P) : 0 ∈ I := I.coeToSubmodule.zero_mem @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
zero_mem
null
val_eq_coe (I : FractionalIdeal S P) : I.val = I := rfl @[simp, norm_cast]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
val_eq_coe
null
coe_mk (I : Submodule R P) (hI : IsFractional S I) : coeToSubmodule ⟨I, hI⟩ = I := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_mk
null
coeToSet_coeToSubmodule (I : FractionalIdeal S P) : ((I : Submodule R P) : Set P) = I := rfl /-! Transfer instances from `Submodule R P` to `FractionalIdeal S P`. -/
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeToSet_coeToSubmodule
null
coeToSubmodule_injective : Function.Injective (fun (I : FractionalIdeal S P) ↦ (I : Submodule R P)) := Subtype.coe_injective
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeToSubmodule_injective
null
coeToSubmodule_inj {I J : FractionalIdeal S P} : (I : Submodule R P) = J ↔ I = J := coeToSubmodule_injective.eq_iff
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeToSubmodule_inj
null
isFractional_of_le_one (I : Submodule R P) (h : I ≤ 1) : IsFractional S I := by use 1, S.one_mem intro b hb rw [one_smul] obtain ⟨b', b'_mem, rfl⟩ := mem_one.mp (h hb) exact Set.mem_range_self b'
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
isFractional_of_le_one
null
isFractional_of_le {I : Submodule R P} {J : FractionalIdeal S P} (hIJ : I ≤ J) : IsFractional S I := by obtain ⟨a, a_mem, ha⟩ := J.isFractional use a, a_mem intro b b_mem exact ha b (hIJ b_mem)
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
isFractional_of_le
null
@[coe] coeIdeal (I : Ideal R) : FractionalIdeal S P := ⟨coeSubmodule P I, isFractional_of_le_one _ <| by simpa using coeSubmodule_mono P (le_top : I ≤ ⊤)⟩
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeIdeal
Map an ideal `I` to a fractional ideal by forgetting `I` is integral. This is the function that implements the coercion `Ideal R → FractionalIdeal S P`.
coe_one_eq_coeSubmodule_top : ↑(1 : FractionalIdeal S P) = coeSubmodule P (⊤ : Ideal R) := rfl @[simp, norm_cast]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_one_eq_coeSubmodule_top
Map an ideal `I` to a fractional ideal by forgetting `I` is integral. This is a bundled version of `IsLocalization.coeSubmodule : Ideal R → Submodule R P`, which is not to be confused with the `coe : FractionalIdeal S P → Submodule R P`, also called `coeToSubmodule` in theorem names. This map is available as a ring hom, called `FractionalIdeal.coeIdealHom`. -/ instance : CoeTC (Ideal R) (FractionalIdeal S P) := ⟨fun I => coeIdeal I⟩ @[simp, norm_cast] theorem coe_coeIdeal (I : Ideal R) : ((I : FractionalIdeal S P) : Submodule R P) = coeSubmodule P I := rfl variable (S) @[simp] theorem mem_coeIdeal {x : P} {I : Ideal R} : x ∈ (I : FractionalIdeal S P) ↔ ∃ x', x' ∈ I ∧ algebraMap R P x' = x := mem_coeSubmodule _ _ @[simp] -- Ensure `simp` is confluent for `x ∈ ((I : Ideal R) : FractionalIdeal S P)`. theorem mem_coeSubmodule {x : P} {I : Ideal R} : x ∈ coeSubmodule P I ↔ ∃ x', x' ∈ I ∧ algebraMap R P x' = x := Iff.rfl theorem mem_coeIdeal_of_mem {x : R} {I : Ideal R} (hx : x ∈ I) : algebraMap R P x ∈ (I : FractionalIdeal S P) := (mem_coeIdeal S).mpr ⟨x, hx, rfl⟩ theorem coeIdeal_le_coeIdeal' [IsLocalization S P] (h : S ≤ nonZeroDivisors R) {I J : Ideal R} : (I : FractionalIdeal S P) ≤ J ↔ I ≤ J := coeSubmodule_le_coeSubmodule h @[simp] theorem coeIdeal_le_coeIdeal (K : Type*) [CommRing K] [Algebra R K] [IsFractionRing R K] {I J : Ideal R} : (I : FractionalIdeal R⁰ K) ≤ J ↔ I ≤ J := IsFractionRing.coeSubmodule_le_coeSubmodule instance : Zero (FractionalIdeal S P) := ⟨(0 : Ideal R)⟩ @[simp] theorem mem_zero_iff {x : P} : x ∈ (0 : FractionalIdeal S P) ↔ x = 0 := ⟨fun ⟨x', x'_mem_zero, x'_eq_x⟩ => by have x'_eq_zero : x' = 0 := x'_mem_zero simp [x'_eq_x.symm, x'_eq_zero], fun hx => ⟨0, rfl, by simp [hx]⟩⟩ variable {S} @[simp, norm_cast] theorem coe_zero : ↑(0 : FractionalIdeal S P) = (⊥ : Submodule R P) := Submodule.ext fun _ => mem_zero_iff S @[simp, norm_cast] theorem coeIdeal_bot : ((⊥ : Ideal R) : FractionalIdeal S P) = 0 := rfl section variable [loc : IsLocalization S P] variable (P) in -- Cannot be @[simp] because `S` cannot be inferred by `simp`. theorem exists_mem_algebraMap_eq {x : R} {I : Ideal R} (h : S ≤ nonZeroDivisors R) : (∃ x', x' ∈ I ∧ algebraMap R P x' = algebraMap R P x) ↔ x ∈ I := ⟨fun ⟨_, hx', Eq⟩ => IsLocalization.injective _ h Eq ▸ hx', fun h => ⟨x, h, rfl⟩⟩ theorem coeIdeal_injective' (h : S ≤ nonZeroDivisors R) : Function.Injective (fun (I : Ideal R) ↦ (I : FractionalIdeal S P)) := fun _ _ h' => ((coeIdeal_le_coeIdeal' S h).mp h'.le).antisymm ((coeIdeal_le_coeIdeal' S h).mp h'.ge) theorem coeIdeal_inj' (h : S ≤ nonZeroDivisors R) {I J : Ideal R} : (I : FractionalIdeal S P) = J ↔ I = J := (coeIdeal_injective' h).eq_iff -- Not `@[simp]` because `coeIdeal_eq_zero` (in `Operations.lean`) will prove this. theorem coeIdeal_eq_zero' {I : Ideal R} (h : S ≤ nonZeroDivisors R) : (I : FractionalIdeal S P) = 0 ↔ I = (⊥ : Ideal R) := coeIdeal_inj' h theorem coeIdeal_ne_zero' {I : Ideal R} (h : S ≤ nonZeroDivisors R) : (I : FractionalIdeal S P) ≠ 0 ↔ I ≠ (⊥ : Ideal R) := not_iff_not.mpr <| coeIdeal_eq_zero' h end theorem coeToSubmodule_eq_bot {I : FractionalIdeal S P} : (I : Submodule R P) = ⊥ ↔ I = 0 := ⟨fun h => coeToSubmodule_injective (by simp [h]), fun h => by simp [h]⟩ theorem coeToSubmodule_ne_bot {I : FractionalIdeal S P} : ↑I ≠ (⊥ : Submodule R P) ↔ I ≠ 0 := not_iff_not.mpr coeToSubmodule_eq_bot instance : Inhabited (FractionalIdeal S P) := ⟨0⟩ instance : One (FractionalIdeal S P) := ⟨(⊤ : Ideal R)⟩ theorem zero_of_num_eq_bot [NoZeroSMulDivisors R P] (hS : 0 ∉ S) {I : FractionalIdeal S P} (hI : I.num = ⊥) : I = 0 := by rw [← coeToSubmodule_eq_bot, eq_bot_iff] intro x hx suffices (den I : R) • x = 0 from (smul_eq_zero.mp this).resolve_left (ne_of_mem_of_not_mem (SetLike.coe_mem _) hS) have h_eq : I.den • (I : Submodule R P) = ⊥ := by rw [den_mul_self_eq_num, hI, Submodule.map_bot] exact (Submodule.eq_bot_iff _).mp h_eq (den I • x) ⟨x, hx, rfl⟩ theorem num_zero_eq (h_inj : Function.Injective (algebraMap R P)) : num (0 : FractionalIdeal S P) = 0 := by simpa [num, LinearMap.ker_eq_bot] using h_inj variable (S) @[simp, norm_cast] theorem coeIdeal_top : ((⊤ : Ideal R) : FractionalIdeal S P) = 1 := rfl theorem mem_one_iff {x : P} : x ∈ (1 : FractionalIdeal S P) ↔ ∃ x' : R, algebraMap R P x' = x := Iff.intro (fun ⟨x', _, h⟩ => ⟨x', h⟩) fun ⟨x', h⟩ => ⟨x', ⟨⟩, h⟩ theorem coe_mem_one (x : R) : algebraMap R P x ∈ (1 : FractionalIdeal S P) := (mem_one_iff S).mpr ⟨x, rfl⟩ theorem one_mem_one : (1 : P) ∈ (1 : FractionalIdeal S P) := (mem_one_iff S).mpr ⟨1, RingHom.map_one _⟩ variable {S} /-- `(1 : FractionalIdeal S P)` is defined as the R-submodule `f(R) ≤ P`. However, this is not definitionally equal to `1 : Submodule R P`, which is proved in the actual `simp` lemma `coe_one`.
coe_one : (↑(1 : FractionalIdeal S P) : Submodule R P) = 1 := by rw [coe_one_eq_coeSubmodule_top, coeSubmodule_top]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_one
null
@[simp] coe_le_coe {I J : FractionalIdeal S P} : (I : Submodule R P) ≤ (J : Submodule R P) ↔ I ≤ J := Iff.rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_le_coe
null
zero_le (I : FractionalIdeal S P) : 0 ≤ I := by intro x hx convert zero_mem I rw [(mem_zero_iff _).mp hx]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
zero_le
null
orderBot : OrderBot (FractionalIdeal S P) where bot := 0 bot_le := zero_le @[simp]
instance
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
orderBot
null
bot_eq_zero : (⊥ : FractionalIdeal S P) = 0 := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
bot_eq_zero
null
le_zero_iff {I : FractionalIdeal S P} : I ≤ 0 ↔ I = 0 := le_bot_iff
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
le_zero_iff
null
eq_zero_iff {I : FractionalIdeal S P} : I = 0 ↔ ∀ x ∈ I, x = (0 : P) := ⟨fun h x hx => by simpa [h, mem_zero_iff] using hx, fun h => le_bot_iff.mp fun x hx => (mem_zero_iff S).mpr (h x hx)⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
eq_zero_iff
null
_root_.IsFractional.sup {I J : Submodule R P} : IsFractional S I → IsFractional S J → IsFractional S (I ⊔ J) | ⟨aI, haI, hI⟩, ⟨aJ, haJ, hJ⟩ => ⟨aI * aJ, S.mul_mem haI haJ, fun b hb => by rcases mem_sup.mp hb with ⟨bI, hbI, bJ, hbJ, rfl⟩ rw [smul_add] apply isInteger_add · rw [mul_smul, smul_comm] exact isInteger_smul (hI bI hbI) · rw [mul_smul] exact isInteger_smul (hJ bJ hbJ)⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
_root_.IsFractional.sup
null
_root_.IsFractional.inf_right {I : Submodule R P} : IsFractional S I → ∀ J, IsFractional S (I ⊓ J) | ⟨aI, haI, hI⟩, J => ⟨aI, haI, fun b hb => by rcases mem_inf.mp hb with ⟨hbI, _⟩ exact hI b hbI⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
_root_.IsFractional.inf_right
null
@[simp, norm_cast] coe_inf (I J : FractionalIdeal S P) : ↑(I ⊓ J) = (I ⊓ J : Submodule R P) := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_inf
null
@[norm_cast] coe_sup (I J : FractionalIdeal S P) : ↑(I ⊔ J) = (I ⊔ J : Submodule R P) := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_sup
null
lattice : Lattice (FractionalIdeal S P) := Function.Injective.lattice _ Subtype.coe_injective coe_sup coe_inf
instance
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
lattice
null
@[simp] sup_eq_add (I J : FractionalIdeal S P) : I ⊔ J = I + J := rfl @[simp, norm_cast]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
sup_eq_add
null
coe_add (I J : FractionalIdeal S P) : (↑(I + J) : Submodule R P) = I + J := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_add
null
mem_add (I J : FractionalIdeal S P) (x : P) : x ∈ I + J ↔ ∃ i ∈ I, ∃ j ∈ J, i + j = x := by rw [← mem_coe, coe_add, Submodule.add_eq_sup]; exact Submodule.mem_sup @[simp, norm_cast]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
mem_add
null
coeIdeal_inf [FaithfulSMul R P] (I J : Ideal R) : (↑(I ⊓ J) : FractionalIdeal S P) = ↑I ⊓ ↑J := by apply coeToSubmodule_injective exact Submodule.map_inf (Algebra.linearMap R P) (FaithfulSMul.algebraMap_injective R P) @[simp, norm_cast]
lemma
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeIdeal_inf
null
coeIdeal_sup (I J : Ideal R) : ↑(I ⊔ J) = (I + J : FractionalIdeal S P) := coeToSubmodule_injective <| coeSubmodule_sup _ _ _
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeIdeal_sup
null
_root_.IsFractional.nsmul {I : Submodule R P} : ∀ n : ℕ, IsFractional S I → IsFractional S (n • I : Submodule R P) | 0, _ => by rw [zero_smul] convert ((0 : Ideal R) : FractionalIdeal S P).isFractional simp | n + 1, h => by rw [succ_nsmul] exact (IsFractional.nsmul n h).sup h
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
_root_.IsFractional.nsmul
null
@[norm_cast] coe_nsmul (n : ℕ) (I : FractionalIdeal S P) : (↑(n • I) : Submodule R P) = n • (I : Submodule R P) := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coe_nsmul
null
_root_.IsFractional.mul {I J : Submodule R P} : IsFractional S I → IsFractional S J → IsFractional S (I * J : Submodule R P) | ⟨aI, haI, hI⟩, ⟨aJ, haJ, hJ⟩ => ⟨aI * aJ, S.mul_mem haI haJ, fun b hb => by refine Submodule.mul_induction_on hb ?_ ?_ · intro m hm n hn obtain ⟨n', hn'⟩ := hJ n hn rw [mul_smul, mul_comm m, ← smul_mul_assoc, ← hn', ← Algebra.smul_def] apply hI exact Submodule.smul_mem _ _ hm · intro x y hx hy rw [smul_add] apply isInteger_add hx hy⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
_root_.IsFractional.mul
null
_root_.IsFractional.pow {I : Submodule R P} (h : IsFractional S I) : ∀ n : ℕ, IsFractional S (I ^ n : Submodule R P) | 0 => isFractional_of_le_one _ (pow_zero _).le | n + 1 => (pow_succ I n).symm ▸ (IsFractional.pow h n).mul h
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
_root_.IsFractional.pow
null
@[simps] coeSubmoduleHom : FractionalIdeal S P →+* Submodule R P where toFun := coeToSubmodule map_one' := coe_one map_mul' := coe_mul map_zero' := coe_zero (S := S) map_add' := coe_add variable {S P}
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeSubmoduleHom
`FractionalIdeal.mul` is the product of two fractional ideals, used to define the `Mul` instance. This is only an auxiliary definition: the preferred way of writing `I.mul J` is `I * J`. Elaborated terms involving `FractionalIdeal` tend to grow quite large, so by making definitions irreducible, we hope to avoid deep unfolds. -/ irreducible_def mul (lemma := mul_def') (I J : FractionalIdeal S P) : FractionalIdeal S P := ⟨I * J, I.isFractional.mul J.isFractional⟩ -- local attribute [semireducible] mul instance : Mul (FractionalIdeal S P) := ⟨fun I J => mul I J⟩ @[simp] theorem mul_eq_mul (I J : FractionalIdeal S P) : mul I J = I * J := rfl theorem mul_def (I J : FractionalIdeal S P) : I * J = ⟨I * J, I.isFractional.mul J.isFractional⟩ := by simp only [← mul_eq_mul, mul_def'] @[simp, norm_cast] theorem coe_mul (I J : FractionalIdeal S P) : (↑(I * J) : Submodule R P) = I * J := by simp only [mul_def, coe_mk] @[simp, norm_cast] theorem coeIdeal_mul (I J : Ideal R) : (↑(I * J) : FractionalIdeal S P) = I * J := by simp only [mul_def] exact coeToSubmodule_injective (coeSubmodule_mul _ _ _) theorem mul_left_mono (I : FractionalIdeal S P) : Monotone (I * ·) := by intro J J' h simp only [mul_def] exact mul_le.mpr fun x hx y hy => mul_mem_mul hx (h hy) theorem mul_right_mono (I : FractionalIdeal S P) : Monotone fun J => J * I := by intro J J' h simp only [mul_def] exact mul_le.mpr fun x hx y hy => mul_mem_mul (h hx) hy theorem mul_mem_mul {I J : FractionalIdeal S P} {i j : P} (hi : i ∈ I) (hj : j ∈ J) : i * j ∈ I * J := by simp only [mul_def] exact Submodule.mul_mem_mul hi hj theorem mul_le {I J K : FractionalIdeal S P} : I * J ≤ K ↔ ∀ i ∈ I, ∀ j ∈ J, i * j ∈ K := by simp only [mul_def] exact Submodule.mul_le instance : Pow (FractionalIdeal S P) ℕ := ⟨fun I n => ⟨(I : Submodule R P) ^ n, I.isFractional.pow n⟩⟩ @[simp, norm_cast] theorem coe_pow (I : FractionalIdeal S P) (n : ℕ) : ↑(I ^ n) = (I : Submodule R P) ^ n := rfl @[elab_as_elim] protected theorem mul_induction_on {I J : FractionalIdeal S P} {C : P → Prop} {r : P} (hr : r ∈ I * J) (hm : ∀ i ∈ I, ∀ j ∈ J, C (i * j)) (ha : ∀ x y, C x → C y → C (x + y)) : C r := by simp only [mul_def] at hr exact Submodule.mul_induction_on hr hm ha instance : NatCast (FractionalIdeal S P) := ⟨Nat.unaryCast⟩ theorem coe_natCast (n : ℕ) : ((n : FractionalIdeal S P) : Submodule R P) = n := show ((n.unaryCast : FractionalIdeal S P) : Submodule R P) = n by induction n <;> simp [*, Nat.unaryCast] instance commSemiring : CommSemiring (FractionalIdeal S P) := Function.Injective.commSemiring _ Subtype.coe_injective coe_zero coe_one coe_add coe_mul (fun _ _ => coe_nsmul _ _) coe_pow coe_natCast instance : CanonicallyOrderedAdd (FractionalIdeal S P) where exists_add_of_le h := ⟨_, (sup_eq_right.mpr h).symm⟩ le_add_self _ _ := le_sup_right le_self_add _ _ := le_sup_left instance : IsOrderedRing (FractionalIdeal S P) := CanonicallyOrderedAdd.toIsOrderedRing end Semiring variable (S P) /-- `FractionalIdeal.coeToSubmodule` as a bundled `RingHom`.
le_self_mul_self {I : FractionalIdeal S P} (hI : 1 ≤ I) : I ≤ I * I := by convert mul_left_mono I hI exact (mul_one I).symm
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
le_self_mul_self
null
mul_self_le_self {I : FractionalIdeal S P} (hI : I ≤ 1) : I * I ≤ I := by convert mul_left_mono I hI exact (mul_one I).symm
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
mul_self_le_self
null
coeIdeal_le_one {I : Ideal R} : (I : FractionalIdeal S P) ≤ 1 := fun _ hx => let ⟨y, _, hy⟩ := (mem_coeIdeal S).mp hx (mem_one_iff S).mpr ⟨y, hy⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeIdeal_le_one
null
le_one_iff_exists_coeIdeal {J : FractionalIdeal S P} : J ≤ (1 : FractionalIdeal S P) ↔ ∃ I : Ideal R, ↑I = J := by constructor · intro hJ refine ⟨⟨⟨⟨{ x : R | algebraMap R P x ∈ J }, ?_⟩, ?_⟩, ?_⟩, ?_⟩ · intro a b ha hb rw [mem_setOf, RingHom.map_add] exact J.val.add_mem ha hb · rw [mem_setOf, RingHom.map_zero] exact J.zero_mem · intro c x hx rw [smul_eq_mul, mem_setOf, RingHom.map_mul, ← Algebra.smul_def] exact J.val.smul_mem c hx · ext x constructor · rintro ⟨y, hy, eq_y⟩ rwa [← eq_y] · intro hx obtain ⟨y, rfl⟩ := (mem_one_iff S).mp (hJ hx) exact mem_setOf.mpr ⟨y, hx, rfl⟩ · rintro ⟨I, hI⟩ rw [← hI] apply coeIdeal_le_one @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
le_one_iff_exists_coeIdeal
null
one_le {I : FractionalIdeal S P} : 1 ≤ I ↔ (1 : P) ∈ I := by rw [← coe_le_coe, coe_one, Submodule.one_le, mem_coe] variable (S P)
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
one_le
null
@[simps] coeIdealHom : Ideal R →+* FractionalIdeal S P where toFun := coeIdeal map_add' := coeIdeal_sup map_mul' := coeIdeal_mul map_one' := by rw [Ideal.one_eq_top, coeIdeal_top] map_zero' := coeIdeal_bot
def
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeIdealHom
`coeIdealHom (S : Submonoid R) P` is `(↑) : Ideal R → FractionalIdeal S P` as a ring hom
coeIdeal_pow (I : Ideal R) (n : ℕ) : ↑(I ^ n) = (I : FractionalIdeal S P) ^ n := (coeIdealHom S P).map_pow _ n
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeIdeal_pow
null
coeIdeal_finprod [IsLocalization S P] {α : Sort*} {f : α → Ideal R} (hS : S ≤ nonZeroDivisors R) : ((∏ᶠ a : α, f a : Ideal R) : FractionalIdeal S P) = ∏ᶠ a : α, (f a : FractionalIdeal S P) := MonoidHom.map_finprod_of_injective (coeIdealHom S P).toMonoidHom (coeIdeal_injective' hS) f
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
coeIdeal_finprod
null
fg_of_isNoetherianRing [hR : IsNoetherianRing R] (hS : S ≤ R⁰) (I : FractionalIdeal S P) : FG I.coeToSubmodule := by have := hR.noetherian I.num rw [← fg_top] at this ⊢ exact fg_of_linearEquiv (I.equivNum <| coe_ne_zero ⟨(I.den : R), hS (SetLike.coe_mem I.den)⟩) this
lemma
RingTheory
[ "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.Localization.Submodule" ]
Mathlib/RingTheory/FractionalIdeal/Basic.lean
fg_of_isNoetherianRing
The fractional ideals of a Noetherian ring are finitely generated.
extended (I : FractionalIdeal M K) : FractionalIdeal N L where val := span B <| (IsLocalization.map (S := K) L f hf) '' I property := by have ⟨a, ha, frac⟩ := I.isFractional refine ⟨f a, hf ha, fun b hb ↦ ?_⟩ refine span_induction (fun x hx ↦ ?_) ⟨0, by simp⟩ (fun x y _ _ hx hy ↦ smul_add (f a) x y ▸ isInteger_add hx hy) (fun b c _ hc ↦ ?_) hb · rcases hx with ⟨k, kI, rfl⟩ obtain ⟨c, hc⟩ := frac k kI exact ⟨f c, by simp [← IsLocalization.map_smul, ← hc]⟩ · rw [← smul_assoc, smul_eq_mul, mul_comm (f a), ← smul_eq_mul, smul_assoc] exact isInteger_smul hc local notation "map_f" => (IsLocalization.map (S := K) L f hf)
def
RingTheory
[ "Mathlib.RingTheory.FractionalIdeal.Basic" ]
Mathlib/RingTheory/FractionalIdeal/Extended.lean
extended
Given commutative rings `A` and `B` with respective localizations `IsLocalization M K` and `IsLocalization N L`, and a ring homomorphism `f : A →+* B` satisfying `M ≤ Submonoid.comap f N`, a fractional ideal `I` of `A` can be extended along `f` to a fractional ideal of `B`.
mem_extended_iff (x : L) : x ∈ I.extended L hf ↔ x ∈ span B (map_f '' I) := by constructor <;> { intro hx; simpa } @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.FractionalIdeal.Basic" ]
Mathlib/RingTheory/FractionalIdeal/Extended.lean
mem_extended_iff
null
coe_extended_eq_span : I.extended L hf = span B (map_f '' I) := by ext; simp [mem_coe, mem_extended_iff] @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.FractionalIdeal.Basic" ]
Mathlib/RingTheory/FractionalIdeal/Extended.lean
coe_extended_eq_span
null
extended_zero : extended L hf (0 : FractionalIdeal M K) = 0 := have : ((0 : FractionalIdeal M K) : Set K) = {0} := by ext; simp coeToSubmodule_injective (by simp [this]) @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.FractionalIdeal.Basic" ]
Mathlib/RingTheory/FractionalIdeal/Extended.lean
extended_zero
null
extended_one : extended L hf (1 : FractionalIdeal M K) = 1 := by refine coeToSubmodule_injective <| Submodule.ext fun x ↦ ⟨fun hx ↦ span_induction ?_ (zero_mem _) (fun y z _ _ hy hz ↦ add_mem hy hz) (fun b y _ hy ↦ smul_mem _ b hy) hx, ?_⟩ · rintro ⟨b, _, rfl⟩ rw [Algebra.linearMap_apply, Algebra.algebraMap_eq_smul_one] exact smul_mem _ _ <| subset_span ⟨1, by simp [one_mem_one]⟩ · rintro _ ⟨_, ⟨a, ha, rfl⟩, rfl⟩ exact ⟨f a, ha, by rw [Algebra.linearMap_apply, Algebra.linearMap_apply, map_eq]⟩
theorem
RingTheory
[ "Mathlib.RingTheory.FractionalIdeal.Basic" ]
Mathlib/RingTheory/FractionalIdeal/Extended.lean
extended_one
null
extended_add : (I + J).extended L hf = (I.extended L hf) + (J.extended L hf) := by apply coeToSubmodule_injective simp only [coe_extended_eq_span, coe_add, Submodule.add_eq_sup, ← span_union, ← Set.image_union] apply Submodule.span_eq_span · rintro _ ⟨y, hy, rfl⟩ obtain ⟨i, hi, j, hj, rfl⟩ := (mem_add I J y).mp <| SetLike.mem_coe.mp hy rw [RingHom.map_add] exact add_mem (Submodule.subset_span ⟨i, Set.mem_union_left _ hi, by simp⟩) (Submodule.subset_span ⟨j, Set.mem_union_right _ hj, by simp⟩) · rintro _ ⟨y, hy, rfl⟩ suffices y ∈ I + J from SetLike.mem_coe.mpr <| Submodule.subset_span ⟨y, by simp [this]⟩ exact hy.elim (fun h ↦ (mem_add I J y).mpr ⟨y, h, 0, zero_mem J, add_zero y⟩) (fun h ↦ (mem_add I J y).mpr ⟨0, zero_mem I, y, h, zero_add y⟩)
theorem
RingTheory
[ "Mathlib.RingTheory.FractionalIdeal.Basic" ]
Mathlib/RingTheory/FractionalIdeal/Extended.lean
extended_add
null
extended_mul : (I * J).extended L hf = (I.extended L hf) * (J.extended L hf) := by apply coeToSubmodule_injective simp only [coe_extended_eq_span, coe_mul, span_mul_span] refine Submodule.span_eq_span (fun _ h ↦ ?_) (fun _ h ↦ ?_) · rcases h with ⟨x, hx, rfl⟩ replace hx : x ∈ (I : Submodule A K) * (J : Submodule A K) := coe_mul I J ▸ hx rw [Submodule.mul_eq_span_mul_set] at hx refine span_induction (fun y hy ↦ ?_) (by simp) (fun y z _ _ hy hz ↦ ?_) (fun a y _ hy ↦ ?_) hx · rcases Set.mem_mul.mp hy with ⟨i, hi, j, hj, rfl⟩ exact subset_span <| Set.mem_mul.mpr ⟨map_f i, ⟨i, hi, by simp⟩, map_f j, ⟨j, hj, by simp⟩, by simp⟩ · exact map_add map_f y z ▸ Submodule.add_mem _ hy hz · rw [Algebra.smul_def, map_mul, map_eq, ← Algebra.smul_def] exact smul_mem _ (f a) hy · rcases Set.mem_mul.mp h with ⟨y, ⟨i, hi, rfl⟩, z, ⟨j, hj, rfl⟩, rfl⟩ exact Submodule.subset_span ⟨i * j, mul_mem_mul hi hj, by simp⟩
theorem
RingTheory
[ "Mathlib.RingTheory.FractionalIdeal.Basic" ]
Mathlib/RingTheory/FractionalIdeal/Extended.lean
extended_mul
null
@[simps] extendedHom : FractionalIdeal M K →+* FractionalIdeal N L where toFun := extended L hf map_one' := extended_one L hf map_zero' := extended_zero L hf map_mul' := extended_mul L hf map_add' := extended_add L hf
def
RingTheory
[ "Mathlib.RingTheory.FractionalIdeal.Basic" ]
Mathlib/RingTheory/FractionalIdeal/Extended.lean
extendedHom
The ring homomorphism version of `FractionalIdeal.extended`.