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
degBound_succ (k : ℕ) (D : ℕ → ℕ) (n) : degBound k D (n + 1) = numBound k D (n + 1) ^ numBound k D (n + 1) * degBound k D n := by rw [degBound] @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
degBound_succ
null
numBound_succ (k : ℕ) (D : ℕ → ℕ) (n) : numBound k D (n + 1) = numBound k D n * degBound k D n * D n := by rw [numBound] mutual
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
numBound_succ
null
degBound_casesOn_succ (k₀ k : ℕ) (D : ℕ → ℕ) : ∀ n, degBound k₀ (fun t ↦ Nat.casesOn t k D) (n + 1) = (k₀ * k) ^ (k₀ * k) * degBound (k₀ * k) ((k₀ * k) ^ (k₀ * k) • D) n | 0 => by simp | n + 1 => by rw [degBound_succ, numBound_casesOn_succ, degBound_casesOn_succ, numBound_succ, degBound_succ, numBound_succ] ring
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
degBound_casesOn_succ
null
numBound_casesOn_succ (k₀ k : ℕ) (D : ℕ → ℕ) : ∀ n, numBound k₀ (Nat.casesOn · k D) (n + 1) = numBound (k₀ * k) ((k₀ * k) ^ (k₀ * k) • D) n | 0 => by simp | n + 1 => by rw [numBound_succ (n := n + 1), numBound_casesOn_succ k₀ k D n, numBound_succ, degBound_casesOn_succ] dsimp ring
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
numBound_casesOn_succ
null
degBound_le_degBound (hk : k₁ ≤ k₂) : ∀ (n) (_ : ∀ i < n, D₁ i ≤ D₂ i), degBound k₁ D₁ n ≤ degBound k₂ D₂ n | 0, hD => by simp | n + 1, hD => by rw [degBound_succ, degBound_succ] refine Nat.mul_le_mul (Nat.pow_self_mono (numBound_mono hk _ hD)) (degBound_le_degBound hk _ fun i hi ↦ hD _ (hi.trans n.lt_succ_self))
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
degBound_le_degBound
null
numBound_mono (hk : k₁ ≤ k₂) : ∀ n, (∀ i < n, D₁ i ≤ D₂ i) → numBound k₁ D₁ n ≤ numBound k₂ D₂ n | 0, hD => by simpa using hk | n + 1, hD => by rw [numBound_succ, numBound_succ] gcongr · exact numBound_mono hk _ fun i hi ↦ hD _ (hi.trans n.lt_succ_self) · exact degBound_le_degBound hk _ fun i hi ↦ hD _ (hi.trans n.lt_succ_self) · exact hD _ n.lt_succ_self
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
numBound_mono
null
degBound_pos (k : ℕ) (D : ℕ → ℕ) : ∀ n, 0 < degBound k D n | 0 => by simp | n + 1 => by simp [degBound_succ, Nat.pow_self_pos, degBound_pos]
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
degBound_pos
null
chevalley_mvPolynomialC {M : Submodule ℤ R} (hM : 1 ∈ M) (k : ℕ) (d : Multiset (Fin n)) (S : ConstructibleSetData (MvPolynomial (Fin n) R)) (hSn : ∀ C ∈ S, C.n ≤ k) (hS : ∀ C ∈ S, ∀ j, C.g j ∈ coeffsIn _ M ⊓ (degreesLE _ _ d).restrictScalars _) : ∃ T : ConstructibleSetData R, comap MvPolynomial.C '' S.toSet = T.toSet ∧ ∀ C ∈ T, C.n ≤ numBound k (fun i ↦ 1 + (d.map Fin.val).count i) n ∧ ∀ i, C.g i ∈ M ^ (degBound k (fun i ↦ 1 + (d.map Fin.val).count i) n) := by classical induction n generalizing k M with | zero => refine ⟨(S.map (isEmptyRingEquiv _ _).toRingHom), ?_, ?_⟩ · rw [ConstructibleSetData.toSet_map] change _ = (comapEquiv (isEmptyRingEquiv _ _)).symm ⁻¹' _ rw [← OrderIso.image_eq_preimage] rfl · simp only [ConstructibleSetData.map, RingEquiv.toRingHom_eq_coe, Finset.mem_image, comp_apply, BasicConstructibleSetData.map, RingHom.coe_coe, isEmptyRingEquiv_eq_coeff_zero, pow_one, numBound_zero, degBound_zero, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂] exact fun a haS ↦ ⟨hSn a haS, fun i ↦ (hS a haS i).1 0⟩ | succ n IH => ?_ let e : MvPolynomial (Fin (n + 1)) R ≃ₐ[R] (MvPolynomial (Fin n) R)[X] := finSuccEquiv R n let S' := S.map e.toRingHom have hS' : S'.degBound ≤ k * (1 + d.count 0) := by apply Finset.sup_le fun x hxS ↦ ?_ simp only [ConstructibleSetData.map, AlgEquiv.toRingEquiv_eq_coe, RingEquiv.toRingHom_eq_coe, AlgEquiv.toRingEquiv_toRingHom, Finset.mem_image, BasicConstructibleSetData.map, RingHom.coe_coe, S'] at hxS obtain ⟨C, hxS, rfl⟩ := hxS trans ∑ i : Fin C.n, (1 + d.count 0) · gcongr with j hj simp only [e, comp_apply] by_cases hgj : C.g j = 0 · rw [hgj, map_zero] simp rw [degree_finSuccEquiv hgj, WithBot.succ_natCast, add_comm] simp only [Nat.cast_id, add_le_add_iff_left, degreeOf_def] exact Multiset.count_le_of_le _ (hS _ hxS _).2 · simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul] gcongr exact hSn _ hxS let B : Multiset (Fin n) := (d.toFinsupp.comapDomain Fin.succ (Fin.succ_injective _).injOn).toMultiset obtain ⟨T, hT₁, hT₂⟩ := chevalley_polynomialC (R := MvPolynomial (Fin n) R) (coeffsIn _ M ⊓ (degreesLE _ _ B).restrictScalars ℤ) (by simpa [MvPolynomial.coeff_one, apply_ite] using hM) S' (fun x hxS j k ↦ by simp only [ConstructibleSetData.map, AlgEquiv.toRingEquiv_eq_coe, RingEquiv.toRingHom_eq_coe, AlgEquiv.toRingEquiv_toRingHom, Finset.mem_image, ...
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
chevalley_mvPolynomialC
The `C : R → R[X₁, ..., Xₘ]` case of **Chevalley's theorem** with complexity bound.
numBound (k m n : ℕ) (d : Multiset (Fin m)) : ℕ := MvPolynomialC.numBound (k + n) (1 + (d.map Fin.val).count ·) m
def
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
numBound
The bound on the number of polynomials used to describe the constructible set appearing in Chevalley's theorem with complexity bound.
degBound (k m n : ℕ) (d : Multiset (Fin m)) : ℕ := MvPolynomialC.degBound (k + n) (1 + (d.map Fin.val).count ·) m
def
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
degBound
The bound on the degree of the polynomials used to describe the constructible set appearing in Chevalley's theorem with complexity bound.
chevalley_mvPolynomial_mvPolynomial {m n : ℕ} (f : MvPolynomial (Fin n) R →ₐ[R] MvPolynomial (Fin m) R) (k : ℕ) (d : Multiset (Fin m)) (S : ConstructibleSetData (MvPolynomial (Fin m) R)) (hSn : ∀ C ∈ S, C.n ≤ k) (hS : ∀ C ∈ S, ∀ j, (C.g j).degrees ≤ d) (hf : ∀ i, (f (.X i)).degrees ≤ d) : ∃ T : ConstructibleSetData (MvPolynomial (Fin n) R), comap f '' S.toSet = T.toSet ∧ ∀ C ∈ T, C.n ≤ numBound k m n d ∧ ∀ i j, (C.g i).degreeOf j ≤ degBound k m n d := by classical let g : MvPolynomial (Fin m) (MvPolynomial (Fin n) R) →+* MvPolynomial (Fin m) R := eval₂Hom f.toRingHom X have hg : g.comp (algebraMap (MvPolynomial (Fin n) R) _) = f := by ext x : 2 <;> simp [g] let σ : MvPolynomial (Fin m) R →+* MvPolynomial (Fin m) (MvPolynomial (Fin n) R) := map (algebraMap _ _) have hσ : g.comp σ = .id _ := by ext : 2 <;> simp [g, σ] have hσ' (x) : g (σ x) = x := DFunLike.congr_fun hσ x have hg' : Surjective g := LeftInverse.surjective hσ' let S' : ConstructibleSetData (MvPolynomial (Fin m) (MvPolynomial (Fin n) R)) := S.image fun ⟨fk, k, gk⟩ ↦ ⟨σ fk, k + n, fun s ↦ (finSumFinEquiv.symm s).elim (σ ∘ gk) fun i ↦ .C (.X i) - σ (f (.X i))⟩ let s₀ : Set (MvPolynomial (Fin m) (MvPolynomial (Fin n) R)) := .range fun i ↦ .C (.X i) - σ (f (.X i)) have hs : zeroLocus s₀ = Set.range (comap g) := by rw [range_comap_of_surjective _ _ hg', ← zeroLocus_span] congr! 2 have H : Ideal.span s₀ ≤ RingHom.ker g := by simp only [Ideal.span_le, Set.range_subset_iff, SetLike.mem_coe, RingHom.mem_ker, map_sub, hσ', s₀] simp [g] refine H.antisymm fun p hp ↦ ?_ obtain ⟨q₁, q₂, hq₁, rfl⟩ : ∃ q₁ q₂, q₁ ∈ Ideal.span s₀ ∧ p = q₁ + σ q₂ := by clear hp obtain ⟨p, rfl⟩ := (commAlgEquiv _ _ _).surjective p simp_rw [← (commAlgEquiv R (Fin n) (Fin m)).symm.injective.eq_iff, AlgEquiv.symm_apply_apply] induction p using MvPolynomial.induction_on with | C q => exact ⟨0, q, by simp, (commAlgEquiv _ _ _).injective <| by simp [commAlgEquiv_C, σ]⟩ | add p q hp hq => obtain ⟨q₁, q₂, hq₁, rfl⟩ := hp obtain ⟨q₃, q₄, hq₃, rfl⟩ := hq refine ⟨q₁ + q₃, q₂ + q₄, add_mem hq₁ hq₃, by simp only [map_add, add_add_add_comm]⟩ | mul_X p i hp => obtain ⟨q₁, q₂, hq₁, rfl⟩ := hp simp only [← (commAlgEquiv R (Fin n) (Fin m)).injective.eq_iff, map_mul, AlgEquiv.apply_symm_apply, commAlgEquiv_X] refine ⟨q₁ * .C (.X i) + σ q₂ * (.C (.X i) - σ (f (.X i))), q₂ * f (.X i), ?_, ?_⟩ · exact add_mem (Ideal.mul_mem_right _ _ hq₁) ...
lemma
RingTheory
[ "Mathlib.Algebra.Order.SuccPred.WithBot", "Mathlib.Algebra.Polynomial.CoeffMem", "Mathlib.Data.DFinsupp.WellFounded", "Mathlib.RingTheory.Spectrum.Prime.ConstructibleSet", "Mathlib.RingTheory.Spectrum.Prime.Polynomial" ]
Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean
chevalley_mvPolynomial_mvPolynomial
**Chevalley's theorem** with complexity bound. A constructible set of complexity at most `M` in `Spec R[X₁, ..., Xₘ]` gets mapped under `f : R[Y₁, ..., Yₙ] → R[X₁, ..., Xₘ]` to a constructible set of complexity `O_{M, m, n}(1)` in `Spec R[Y₁, ..., Yₙ]`. See the module doc of `Mathlib/RingTheory/Spectrum/Prime/ChevalleyComplexity.lean` for an explanation of this notion of complexity.
@[ext] BasicConstructibleSetData where /-- Given the data of a basic constructible set `s = V(g₁, ..., gₙ) \ V(f)`, return `f`. -/ protected f : R /-- Given the data of a basic constructible set `s = V(g₁, ..., gₙ) \ V(f)`, return `n`. -/ protected n : ℕ /-- Given the data of a basic constructible set `s = V(g₁, ..., gₙ) \ V(f)`, return `g`. -/ protected g : Fin n → R
structure
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
BasicConstructibleSetData
The data of a basic constructible set `s` is a tuple `(f, g₁, ..., gₙ)`
@[simps] noncomputable map (φ : R →+* S) (C : BasicConstructibleSetData R) : BasicConstructibleSetData S where f := φ C.f n := C.n g := φ ∘ C.g @[simp] lemma map_id (C : BasicConstructibleSetData R) : C.map (.id _) = C := by simp [map] @[simp] lemma map_id' : map (.id R) = id := by ext : 1; simp
def
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
map
Given the data of the constructible set `s`, build the data of the constructible set `{I | {x | φ x ∈ I} ∈ s}`.
map_comp (φ : S →+* T) (ψ : R →+* S) (C : BasicConstructibleSetData R) : C.map (φ.comp ψ) = (C.map ψ).map φ := by simp [map, Function.comp_def]
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
map_comp
null
map_comp' (φ : S →+* T) (ψ : R →+* S) : map (φ.comp ψ) = map φ ∘ map ψ := by ext : 1; simp [map_comp]
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
map_comp'
null
toSet (C : BasicConstructibleSetData R) : Set (PrimeSpectrum R) := zeroLocus (Set.range C.g) \ zeroLocus {C.f} @[simp]
def
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
toSet
Given the data of a basic constructible set `s`, namely a tuple `(f, g₁, ..., gₙ)` such that `s = V(g₁, ..., gₙ) \ V(f)`, return `s`.
toSet_map (φ : R →+* S) (C : BasicConstructibleSetData R) : (C.map φ).toSet = comap φ ⁻¹' C.toSet := by simp [toSet, map, ← Set.range_comp]
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
toSet_map
null
ConstructibleSetData := Finset (BasicConstructibleSetData R)
abbrev
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
ConstructibleSetData
The data of a constructible set `s` in the prime spectrum of a ring is finitely many tuples `(f, g₁, ..., gₙ)` such that `s = ⋃ (f, g₁, ..., gₙ), V(g₁, ..., gₙ) \ V(f)`. To obtain `s` from its data, use `PrimeSpectrum.ConstructibleSetData.toSet`.
noncomputable map (φ : R →+* S) (s : ConstructibleSetData R) : ConstructibleSetData S := s.image (.map φ) @[simp]
def
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
map
Given the data of the constructible set `s`, build the data of the constructible set `{I | {x | f x ∈ I} ∈ s}`.
map_id (s : ConstructibleSetData R) : s.map (.id _) = s := by simp [map]
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
map_id
null
map_comp (f : S →+* T) (g : R →+* S) (s : ConstructibleSetData R) : s.map (f.comp g) = (s.map g).map f := by simp [map, image_image, Function.comp_def, BasicConstructibleSetData.map_comp']
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
map_comp
null
toSet (S : ConstructibleSetData R) : Set (PrimeSpectrum R) := ⋃ C ∈ S, C.toSet @[simp]
def
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
toSet
Given the data of a constructible set `s`, namely finitely many tuples `(f, g₁, ..., gₙ)` such that `s = ⋃ (f, g₁, ..., gₙ), V(g₁, ..., gₙ) \ V(f)`, return `s`.
toSet_map (f : R →+* S) (s : ConstructibleSetData R) : (s.map f).toSet = comap f ⁻¹' s.toSet := by unfold toSet map rw [set_biUnion_finset_image] simp
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
toSet_map
null
degBound (S : ConstructibleSetData R[X]) : ℕ := S.sup fun C ↦ ∑ i, (C.g i).degree.succ
def
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
degBound
The degree bound on a constructible set for Chevalley's theorem for the inclusion `R ↪ R[X]`.
isConstructible_toSet (S : ConstructibleSetData R) : IsConstructible S.toSet := by refine .biUnion S.finite_toSet fun _ _ ↦ .sdiff ?_ ?_ · rw [← isConstructible_compl] exact (isRetrocompact_zeroLocus_compl (Set.finite_range _)).isConstructible (isClosed_zeroLocus _).isOpen_compl · rw [← isConstructible_compl] exact (isRetrocompact_zeroLocus_compl (Set.finite_singleton _)).isConstructible (isClosed_zeroLocus _).isOpen_compl
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
isConstructible_toSet
null
exists_constructibleSetData_iff {s : Set (PrimeSpectrum R)} : (∃ S : ConstructibleSetData R, S.toSet = s) ↔ IsConstructible s := by refine ⟨fun ⟨S, H⟩ ↦ H ▸ S.isConstructible_toSet, fun H ↦ ?_⟩ induction s, H using IsConstructible.induction_of_isTopologicalBasis _ (isTopologicalBasis_basic_opens (R := R)) with | isCompact_basis i => exact isCompact_basicOpen _ | sdiff i s hs => have : Finite s := hs refine ⟨{⟨i, Nat.card s, fun i ↦ ((Finite.equivFin s).symm i).1⟩}, ?_⟩ simp only [ConstructibleSetData.toSet, Finset.mem_singleton, BasicConstructibleSetData.toSet, Set.iUnion_iUnion_eq_left, basicOpen_eq_zeroLocus_compl, ← Set.compl_iInter₂, compl_sdiff_compl, ← zeroLocus_iUnion₂, Set.biUnion_of_singleton] congr! 2 ext simp [← (Finite.equivFin s).exists_congr_right, - Nat.card_coe_set_eq] | union s hs t ht Hs Ht => obtain ⟨S, rfl⟩ := Hs obtain ⟨T, rfl⟩ := Ht refine ⟨S ∪ T, ?_⟩ simp only [ConstructibleSetData.toSet, Set.biUnion_union, ← Finset.mem_coe, Finset.coe_union] universe u in @[stacks 00F8 "without the finite presentation part"]
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
exists_constructibleSetData_iff
null
exists_range_eq_of_isConstructible {R : Type u} [CommRing R] {s : Set (PrimeSpectrum R)} (hs : IsConstructible s) : ∃ (S : Type u) (_ : CommRing S) (f : R →+* S), Set.range (comap f) = s := by obtain ⟨s, rfl⟩ := exists_constructibleSetData_iff.mpr hs refine ⟨Π i : s, Localization.Away (Ideal.Quotient.mk (Ideal.span (Set.range i.1.g)) i.1.f), inferInstance, algebraMap _ _, ?_⟩ rw [coe_comap, ← iUnion_range_specComap_comp_evalRingHom, ConstructibleSetData.toSet] simp_rw [← Finset.mem_coe, Set.biUnion_eq_iUnion] congr! with _ _ C let I := Ideal.span (Set.range C.1.g) let f := Ideal.Quotient.mk I C.1.f trans comap (Ideal.Quotient.mk I) '' (Set.range (comap (algebraMap _ (Localization.Away f)))) · rw [← Set.range_comp]; rfl · rw [localization_away_comap_range _ f, ← comap_basicOpen, TopologicalSpace.Opens.coe_comap, Set.image_preimage_eq_inter_range, range_comap_of_surjective _ _ Ideal.Quotient.mk_surjective, BasicConstructibleSetData.toSet, Set.diff_eq_compl_inter, basicOpen_eq_zeroLocus_compl, Ideal.mk_ker, zeroLocus_span] @[stacks 00I0 "(1)"]
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
exists_range_eq_of_isConstructible
null
isClosed_of_stableUnderSpecialization_of_isConstructible {R : Type*} [CommRing R] {s : Set (PrimeSpectrum R)} (hs : StableUnderSpecialization s) (hs' : IsConstructible s) : IsClosed s := by obtain ⟨S, _, f, rfl⟩ := exists_range_eq_of_isConstructible hs' exact isClosed_range_of_stableUnderSpecialization _ hs @[stacks 00I0 "(1)"]
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
isClosed_of_stableUnderSpecialization_of_isConstructible
null
isOpen_of_stableUnderGeneralization_of_isConstructible {R : Type*} [CommRing R] {s : Set (PrimeSpectrum R)} (hs : StableUnderGeneralization s) (hs' : IsConstructible s) : IsOpen s := by rw [← isClosed_compl_iff] exact isClosed_of_stableUnderSpecialization_of_isConstructible hs.compl hs'.compl
lemma
RingTheory
[ "Mathlib.Order.SuccPred.WithBot", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/ConstructibleSet.lean
isOpen_of_stableUnderGeneralization_of_isConstructible
null
@[ext] PrimeSpectrum (R : Type*) [CommSemiring R] where asIdeal : Ideal R isPrime : asIdeal.IsPrime attribute [instance] PrimeSpectrum.isPrime
structure
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime" ]
Mathlib/RingTheory/Spectrum/Prime/Defs.lean
PrimeSpectrum
The prime spectrum of a commutative (semi)ring `R` is the type of all prime ideals of `R`. It is naturally endowed with a topology (the Zariski topology), and a sheaf of commutative rings (see `Mathlib/AlgebraicGeometry/StructureSheaf.lean`). It is a fundamental building block in algebraic geometry.
@[simp] asIdeal_le_asIdeal (x y : PrimeSpectrum R) : x.asIdeal ≤ y.asIdeal ↔ x ≤ y := Iff.rfl @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime" ]
Mathlib/RingTheory/Spectrum/Prime/Defs.lean
asIdeal_le_asIdeal
null
asIdeal_lt_asIdeal (x y : PrimeSpectrum R) : x.asIdeal < y.asIdeal ↔ x < y := Iff.rfl variable (R) in
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime" ]
Mathlib/RingTheory/Spectrum/Prime/Defs.lean
asIdeal_lt_asIdeal
null
@[simps] equivSubtype : PrimeSpectrum R ≃o {I : Ideal R // I.IsPrime} where toFun I := ⟨I.asIdeal, I.2⟩ invFun I := ⟨I, I.2⟩ map_rel_iff' := .rfl
def
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime" ]
Mathlib/RingTheory/Spectrum/Prime/Defs.lean
equivSubtype
The prime spectrum is in bijection with the set of prime ideals.
freeLocus : Set (PrimeSpectrum R) := { p | Module.Free (Localization.AtPrime p.asIdeal) (LocalizedModule p.asIdeal.primeCompl M) } variable {R M}
def
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
freeLocus
The free locus of a module, i.e. the set of primes `p` such that `Mₚ` is free over `Rₚ`.
mem_freeLocus {p} : p ∈ freeLocus R M ↔ Module.Free (Localization.AtPrime p.asIdeal) (LocalizedModule p.asIdeal.primeCompl M) := Iff.rfl attribute [local instance] RingHomInvPair.of_ringEquiv in
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
mem_freeLocus
null
mem_freeLocus_of_isLocalization (p : PrimeSpectrum R) (Rₚ Mₚ) [CommRing Rₚ] [Algebra R Rₚ] [IsLocalization.AtPrime Rₚ p.asIdeal] [AddCommGroup Mₚ] [Module R Mₚ] (f : M →ₗ[R] Mₚ) [IsLocalizedModule p.asIdeal.primeCompl f] [Module Rₚ Mₚ] [IsScalarTower R Rₚ Mₚ] : p ∈ freeLocus R M ↔ Module.Free Rₚ Mₚ := by apply Module.Free.iff_of_ringEquiv (IsLocalization.algEquiv p.asIdeal.primeCompl (Localization.AtPrime p.asIdeal) Rₚ).toRingEquiv refine { __ := IsLocalizedModule.iso p.asIdeal.primeCompl f, map_smul' := ?_ } intro r x obtain ⟨r, s, rfl⟩ := IsLocalization.mk'_surjective p.asIdeal.primeCompl r apply ((Module.End.isUnit_iff _).mp (IsLocalizedModule.map_units f s)).1 simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, LinearEquiv.coe_coe, algebraMap_end_apply, AlgEquiv.toRingEquiv_eq_coe, AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_coe, IsLocalization.algEquiv_apply, IsLocalization.map_id_mk'] simp only [← map_smul, ← smul_assoc, IsLocalization.smul_mk'_self, algebraMap_smul] attribute [local instance] RingHomInvPair.of_ringEquiv in
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
mem_freeLocus_of_isLocalization
null
mem_freeLocus_iff_tensor (p : PrimeSpectrum R) (Rₚ) [CommRing Rₚ] [Algebra R Rₚ] [IsLocalization.AtPrime Rₚ p.asIdeal] : p ∈ freeLocus R M ↔ Module.Free Rₚ (Rₚ ⊗[R] M) := by have := (isLocalizedModule_iff_isBaseChange p.asIdeal.primeCompl _ _).mpr (TensorProduct.isBaseChange R M Rₚ) exact mem_freeLocus_of_isLocalization p Rₚ (f := TensorProduct.mk R Rₚ M 1)
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
mem_freeLocus_iff_tensor
null
freeLocus_congr {M'} [AddCommGroup M'] [Module R M'] (e : M ≃ₗ[R] M') : freeLocus R M = freeLocus R M' := by ext p exact mem_freeLocus_of_isLocalization _ _ _ (LocalizedModule.mkLinearMap p.asIdeal.primeCompl M' ∘ₗ e.toLinearMap) open TensorProduct in
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
freeLocus_congr
null
comap_freeLocus_le {A} [CommRing A] [Algebra R A] : comap (algebraMap R A) ⁻¹' freeLocus R M ≤ freeLocus A (A ⊗[R] M) := by intro p hp let Rₚ := Localization.AtPrime (comap (algebraMap R A) p).asIdeal let Aₚ := Localization.AtPrime p.asIdeal rw [Set.mem_preimage, mem_freeLocus_iff_tensor _ Rₚ] at hp rw [mem_freeLocus_iff_tensor _ Aₚ] letI algebra : Algebra Rₚ Aₚ := (Localization.localRingHom (comap (algebraMap R A) p).asIdeal p.asIdeal (algebraMap R A) rfl).toAlgebra have : IsScalarTower R Rₚ Aₚ := IsScalarTower.of_algebraMap_eq' (by simp [Rₚ, Aₚ, algebra, RingHom.algebraMap_toAlgebra, Localization.localRingHom, ← IsScalarTower.algebraMap_eq]) let e := AlgebraTensorModule.cancelBaseChange R Rₚ Aₚ Aₚ M ≪≫ₗ (AlgebraTensorModule.cancelBaseChange R A Aₚ Aₚ M).symm exact .of_equiv e
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
comap_freeLocus_le
null
freeLocus_localization (S : Submonoid R) : freeLocus (Localization S) (LocalizedModule S M) = comap (algebraMap R _) ⁻¹' freeLocus R M := by ext p simp only [Set.mem_preimage] let p' := p.asIdeal.comap (algebraMap R _) have hp' : S ≤ p'.primeCompl := fun x hx H ↦ p.isPrime.ne_top (Ideal.eq_top_of_isUnit_mem _ H (IsLocalization.map_units _ ⟨x, hx⟩)) let Rₚ := Localization.AtPrime p' let Mₚ := LocalizedModule p'.primeCompl M letI : Algebra (Localization S) Rₚ := IsLocalization.localizationAlgebraOfSubmonoidLe _ _ S p'.primeCompl hp' have : IsScalarTower R (Localization S) Rₚ := IsLocalization.localization_isScalarTower_of_submonoid_le .. have : IsLocalization.AtPrime Rₚ p.asIdeal := by have := IsLocalization.isLocalization_of_submonoid_le (Localization S) Rₚ _ _ hp' apply IsLocalization.isLocalization_of_is_exists_mul_mem _ (Submonoid.map (algebraMap R (Localization S)) p'.primeCompl) · rintro _ ⟨x, hx, rfl⟩; exact hx · rintro ⟨x, hx⟩ obtain ⟨x, s, rfl⟩ := IsLocalization.mk'_surjective S x refine ⟨algebraMap _ _ s.1, x, fun H ↦ hx ?_, by simp⟩ rw [IsLocalization.mk'_eq_mul_mk'_one] exact Ideal.mul_mem_right _ _ H letI : Module (Localization S) Mₚ := Module.compHom Mₚ (algebraMap _ Rₚ) have : IsScalarTower R (Localization S) Mₚ := ⟨fun r r' m ↦ show algebraMap _ Rₚ (r • r') • m = _ by simp [p', Rₚ, Mₚ, Algebra.smul_def, ← IsScalarTower.algebraMap_apply, mul_smul]; rfl⟩ have : IsScalarTower (Localization S) Rₚ Mₚ := ⟨fun r r' m ↦ show _ = algebraMap _ Rₚ r • r' • m by rw [← mul_smul, ← Algebra.smul_def]⟩ let l := (IsLocalizedModule.liftOfLE _ _ hp' (LocalizedModule.mkLinearMap S M) (LocalizedModule.mkLinearMap p'.primeCompl M)).extendScalarsOfIsLocalization S (Localization S) have : IsLocalizedModule p.asIdeal.primeCompl l := by have : IsLocalizedModule p'.primeCompl (l.restrictScalars R) := inferInstanceAs (IsLocalizedModule p'.primeCompl (IsLocalizedModule.liftOfLE _ _ hp' (LocalizedModule.mkLinearMap S M) (LocalizedModule.mkLinearMap p'.primeCompl M))) have : IsLocalizedModule (Algebra.algebraMapSubmonoid (Localization S) p'.primeCompl) l := IsLocalizedModule.of_restrictScalars p'.primeCompl .. apply IsLocalizedModule.of_exists_mul_mem (Algebra.algebraMapSubmonoid (Localization S) p'.primeCompl) · rintro _ ⟨x, hx, rfl⟩; exact hx · rintro ⟨x, hx⟩ obtain ⟨x, s, rfl⟩ := IsLocalization.mk'_surjective S x refine ⟨algebraMap _ _ s.1, x, fun H ↦ hx ?_, by simp⟩ rw [IsLocalization.mk'_eq_mul_mk'_one] exact Ideal.mul_mem_right _ _ H rw [mem_freeLocus_of_isLocalization (R := Localization S) p Rₚ Mₚ l] rfl
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
freeLocus_localization
null
freeLocus_eq_univ_iff [Module.FinitePresentation R M] : freeLocus R M = Set.univ ↔ Module.Projective R M := by simp_rw [Set.eq_univ_iff_forall, mem_freeLocus] exact ⟨fun H ↦ Module.projective_of_localization_maximal fun I hI ↦ have := H ⟨I, hI.isPrime⟩; .of_free, fun H x ↦ Module.free_of_flat_of_isLocalRing⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
freeLocus_eq_univ_iff
null
freeLocus_eq_univ [Module.FinitePresentation R M] [Module.Flat R M] : freeLocus R M = Set.univ := by simp_rw [Set.eq_univ_iff_forall, mem_freeLocus] exact fun x ↦ Module.free_of_flat_of_isLocalRing
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
freeLocus_eq_univ
null
basicOpen_subset_freeLocus_iff [Module.FinitePresentation R M] {f : R} : (basicOpen f : Set (PrimeSpectrum R)) ⊆ freeLocus R M ↔ Module.Projective (Localization.Away f) (LocalizedModule (.powers f) M) := by rw [← freeLocus_eq_univ_iff, freeLocus_localization, Set.preimage_eq_univ_iff, localization_away_comap_range _ f]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
basicOpen_subset_freeLocus_iff
null
isOpen_freeLocus [Module.FinitePresentation R M] : IsOpen (freeLocus R M) := by refine isOpen_iff_forall_mem_open.mpr fun x hx ↦ ?_ have : Module.Free _ _ := hx obtain ⟨r, hr, hr', _⟩ := Module.FinitePresentation.exists_free_localizedModule_powers x.asIdeal.primeCompl (LocalizedModule.mkLinearMap x.asIdeal.primeCompl M) (Localization.AtPrime x.asIdeal) exact ⟨basicOpen r, basicOpen_subset_freeLocus_iff.mpr inferInstance, (basicOpen r).2, hr⟩ variable (M) in
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
isOpen_freeLocus
null
noncomputable rankAtStalk (p : PrimeSpectrum R) : ℕ := Module.finrank (Localization.AtPrime p.asIdeal) (LocalizedModule p.asIdeal.primeCompl M)
def
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk
The rank of `M` at the stalk of `p` is the rank of `Mₚ` as a `Rₚ`-module.
isLocallyConstant_rankAtStalk_freeLocus [Module.FinitePresentation R M] : IsLocallyConstant (fun x : freeLocus R M ↦ rankAtStalk M x.1) := by refine (IsLocallyConstant.iff_exists_open _).mpr fun ⟨x, hx⟩ ↦ ?_ have : Module.Free _ _ := hx obtain ⟨f, hf, hf', hf''⟩ := Module.FinitePresentation.exists_free_localizedModule_powers x.asIdeal.primeCompl (LocalizedModule.mkLinearMap x.asIdeal.primeCompl M) (Localization.AtPrime x.asIdeal) refine ⟨Subtype.val ⁻¹' basicOpen f, (basicOpen f).2.preimage continuous_subtype_val, hf, ?_⟩ rintro ⟨p, hp''⟩ hp let p' := Algebra.algebraMapSubmonoid (Localization (.powers f)) p.asIdeal.primeCompl have hp' : Submonoid.powers f ≤ p.asIdeal.primeCompl := by simpa [Submonoid.powers_le, Ideal.primeCompl] let Rₚ := Localization.AtPrime p.asIdeal let Mₚ := LocalizedModule p.asIdeal.primeCompl M letI : Algebra (Localization.Away f) Rₚ := IsLocalization.localizationAlgebraOfSubmonoidLe _ _ (.powers f) p.asIdeal.primeCompl hp' have : IsScalarTower R (Localization.Away f) Rₚ := IsLocalization.localization_isScalarTower_of_submonoid_le .. letI : Module (Localization.Away f) Mₚ := Module.compHom Mₚ (algebraMap _ Rₚ) have : IsScalarTower R (Localization.Away f) Mₚ := ⟨fun r r' m ↦ show algebraMap _ Rₚ (r • r') • m = _ by simp [Rₚ, Mₚ, Algebra.smul_def, ← IsScalarTower.algebraMap_apply, mul_smul]; rfl⟩ have : IsScalarTower (Localization.Away f) Rₚ Mₚ := ⟨fun r r' m ↦ show _ = algebraMap _ Rₚ r • r' • m by rw [← mul_smul, ← Algebra.smul_def]⟩ let l := (IsLocalizedModule.liftOfLE _ _ hp' (LocalizedModule.mkLinearMap (.powers f) M) (LocalizedModule.mkLinearMap p.asIdeal.primeCompl M)).extendScalarsOfIsLocalization (.powers f) (Localization.Away f) have : IsLocalization p' Rₚ := IsLocalization.isLocalization_of_submonoid_le (Localization.Away f) Rₚ _ _ hp' have : IsLocalizedModule p.asIdeal.primeCompl (l.restrictScalars R) := inferInstanceAs (IsLocalizedModule p.asIdeal.primeCompl ((IsLocalizedModule.liftOfLE _ _ hp' (LocalizedModule.mkLinearMap (.powers f) M) (LocalizedModule.mkLinearMap p.asIdeal.primeCompl M)))) have : IsLocalizedModule (Algebra.algebraMapSubmonoid _ p.asIdeal.primeCompl) l := IsLocalizedModule.of_restrictScalars p.asIdeal.primeCompl .. have := Module.finrank_of_isLocalizedModule_of_free Rₚ p' l simp [Rₚ, rankAtStalk, this, hf'']
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
isLocallyConstant_rankAtStalk_freeLocus
null
isLocallyConstant_rankAtStalk [Module.FinitePresentation R M] [Module.Flat R M] : IsLocallyConstant (rankAtStalk (R := R) M) := by let e : freeLocus R M ≃ₜ PrimeSpectrum R := (Homeomorph.setCongr freeLocus_eq_univ).trans (Homeomorph.Set.univ (PrimeSpectrum R)) convert isLocallyConstant_rankAtStalk_freeLocus.comp_continuous e.symm.continuous @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
isLocallyConstant_rankAtStalk
null
rankAtStalk_eq_zero_of_subsingleton [Subsingleton M] : rankAtStalk (R := R) M = 0 := by ext p exact Module.finrank_zero_of_subsingleton
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_eq_zero_of_subsingleton
null
nontrivial_of_rankAtStalk_pos (h : 0 < rankAtStalk (R := R) M) : Nontrivial M := by by_contra! hn simp at h
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
nontrivial_of_rankAtStalk_pos
null
rankAtStalk_eq_of_equiv {N : Type*} [AddCommGroup N] [Module R N] (e : M ≃ₗ[R] N) : rankAtStalk (R := R) M = rankAtStalk N := by ext p exact IsLocalizedModule.mapEquiv p.asIdeal.primeCompl (LocalizedModule.mkLinearMap p.asIdeal.primeCompl M) (LocalizedModule.mkLinearMap p.asIdeal.primeCompl N) _ e |>.finrank_eq
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_eq_of_equiv
null
@[simp] rankAtStalk_eq_finrank_of_free [Module.Free R M] : rankAtStalk (R := R) M = Module.finrank R M := by ext p simp [rankAtStalk, finrank_of_isLocalizedModule_of_free _ p.asIdeal.primeCompl (LocalizedModule.mkLinearMap p.asIdeal.primeCompl M)]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_eq_finrank_of_free
If `M` is `R`-free, its rank at stalks is constant and agrees with the `R`-rank of `M`.
rankAtStalk_self [Nontrivial R] : rankAtStalk (R := R) R = 1 := by simp open LocalizedModule Localization
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_self
null
rankAtStalk_pi {ι : Type*} [Finite ι] (M : ι → Type*) [∀ i, AddCommGroup (M i)] [∀ i, Module R (M i)] [∀ i, Module.Flat R (M i)] [∀ i, Module.Finite R (M i)] (p : PrimeSpectrum R) : rankAtStalk (Π i, M i) p = ∑ᶠ i, rankAtStalk (M i) p := by cases nonempty_fintype ι let f : (Π i, M i) →ₗ[R] Π i, LocalizedModule p.asIdeal.primeCompl (M i) := .pi (fun i ↦ mkLinearMap p.asIdeal.primeCompl (M i) ∘ₗ LinearMap.proj i) let e : LocalizedModule p.asIdeal.primeCompl (Π i, M i) ≃ₗ[Localization.AtPrime p.asIdeal] Π i, LocalizedModule p.asIdeal.primeCompl (M i) := IsLocalizedModule.linearEquiv p.asIdeal.primeCompl (mkLinearMap _ _) f |>.extendScalarsOfIsLocalization p.asIdeal.primeCompl _ have (i : ι) : Free (Localization.AtPrime p.asIdeal) (LocalizedModule p.asIdeal.primeCompl (M i)) := free_of_flat_of_isLocalRing simp_rw [rankAtStalk, e.finrank_eq, Module.finrank_pi_fintype, finsum_eq_sum_of_fintype]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_pi
The rank of `Π i, M i` at a prime `p` is the sum of the ranks of `M i` at `p`.
rankAtStalk_eq_finrank_tensorProduct (p : PrimeSpectrum R) : rankAtStalk M p = finrank (Localization.AtPrime p.asIdeal) (Localization.AtPrime p.asIdeal ⊗[R] M) := by let e : LocalizedModule p.asIdeal.primeCompl M ≃ₗ[Localization.AtPrime p.asIdeal] Localization.AtPrime p.asIdeal ⊗[R] M := LocalizedModule.equivTensorProduct p.asIdeal.primeCompl M rw [rankAtStalk, e.finrank_eq] variable [Flat R M] [Module.Finite R M] attribute [local instance] free_of_flat_of_isLocalRing
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_eq_finrank_tensorProduct
null
rankAtStalk_eq_zero_iff_notMem_support (p : PrimeSpectrum R) : rankAtStalk M p = 0 ↔ p ∉ support R M := by rw [notMem_support_iff] refine ⟨fun h ↦ ?_, fun h ↦ Module.finrank_zero_of_subsingleton⟩ apply subsingleton_of_rank_zero (R := Localization.AtPrime p.asIdeal) dsimp [rankAtStalk] at h simp [← finrank_eq_rank, h]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_eq_zero_iff_notMem_support
null
rankAtStalk_pos_iff_mem_support (p : PrimeSpectrum R) : 0 < rankAtStalk M p ↔ p ∈ support R M := Nat.pos_iff_ne_zero.trans (rankAtStalk_eq_zero_iff_notMem_support _).not_left
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_pos_iff_mem_support
null
rankAtStalk_eq_zero_iff_subsingleton : rankAtStalk (R := R) M = 0 ↔ Subsingleton M := by refine ⟨fun h ↦ ?_, fun _ ↦ rankAtStalk_eq_zero_of_subsingleton⟩ simp_rw [← support_eq_empty_iff (R := R), Set.eq_empty_iff_forall_notMem] intro p rw [← rankAtStalk_eq_zero_iff_notMem_support, h, Pi.zero_apply] variable (M) in
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_eq_zero_iff_subsingleton
null
rankAtStalk_prod (N : Type*) [AddCommGroup N] [Module R N] [Module.Flat R N] [Module.Finite R N] : rankAtStalk (R := R) (M × N) = rankAtStalk M + rankAtStalk N := by ext p let e : LocalizedModule p.asIdeal.primeCompl (M × N) ≃ₗ[Localization.AtPrime p.asIdeal] LocalizedModule p.asIdeal.primeCompl M × LocalizedModule p.asIdeal.primeCompl N := IsLocalizedModule.linearEquiv p.asIdeal.primeCompl (mkLinearMap _ _) (.prodMap (mkLinearMap _ M) (mkLinearMap _ N)) |>.extendScalarsOfIsLocalization p.asIdeal.primeCompl _ simp [rankAtStalk, e.finrank_eq]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_prod
The rank of `M × N` at `p` is equal to the sum of the ranks.
rankAtStalk_baseChange {S : Type*} [CommRing S] [Algebra R S] (p : PrimeSpectrum S) : rankAtStalk (S ⊗[R] M) p = rankAtStalk M ((algebraMap R S).specComap p) := by let q : PrimeSpectrum R := (algebraMap R S).specComap p let e : LocalizedModule p.asIdeal.primeCompl (S ⊗[R] M) ≃ₗ[Localization.AtPrime p.asIdeal] Localization.AtPrime p.asIdeal ⊗[Localization.AtPrime q.asIdeal] LocalizedModule q.asIdeal.primeCompl M := LocalizedModule.equivTensorProduct _ _ ≪≫ₗ (AlgebraTensorModule.cancelBaseChange R S _ _ M) ≪≫ₗ (AlgebraTensorModule.cancelBaseChange R _ _ _ M).symm ≪≫ₗ (AlgebraTensorModule.congr (LinearEquiv.refl _ _) (LocalizedModule.equivTensorProduct _ M).symm) rw [rankAtStalk, e.finrank_eq] apply Module.finrank_baseChange
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_baseChange
null
rankAtStalk_tensorProduct (N : Type*) [AddCommGroup N] [Module R N] [Module.Finite R N] [Module.Flat R N] : rankAtStalk (M ⊗[R] N) = rankAtStalk M * rankAtStalk (R := R) N := by ext p let e : Localization.AtPrime p.asIdeal ⊗[R] (M ⊗[R] N) ≃ₗ[Localization.AtPrime p.asIdeal] (Localization.AtPrime p.asIdeal ⊗[R] M) ⊗[Localization.AtPrime p.asIdeal] (Localization.AtPrime p.asIdeal ⊗[R] N) := (AlgebraTensorModule.assoc _ _ _ _ _ _).symm ≪≫ₗ (AlgebraTensorModule.cancelBaseChange _ _ _ _ _).symm rw [rankAtStalk_eq_finrank_tensorProduct, e.finrank_eq, finrank_tensorProduct, ← rankAtStalk_eq_finrank_tensorProduct, ← rankAtStalk_eq_finrank_tensorProduct, Pi.mul_apply]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_tensorProduct
See `rankAtStalk_tensorProduct_of_isScalarTower` for a hetero-basic version.
rankAtStalk_tensorProduct_of_isScalarTower {S : Type*} [CommRing S] [Algebra R S] (N : Type*) [AddCommGroup N] [Module R N] [Module S N] [IsScalarTower R S N] [Module.Finite S N] [Module.Flat S N] (p : PrimeSpectrum S) : rankAtStalk (N ⊗[R] M) p = rankAtStalk N p * rankAtStalk M ((algebraMap R S).specComap p) := by simp [rankAtStalk_eq_of_equiv (AlgebraTensorModule.cancelBaseChange R S S N M).symm, rankAtStalk_tensorProduct, rankAtStalk_baseChange]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_tensorProduct_of_isScalarTower
null
rankAtStalk_eq (p : PrimeSpectrum R) : rankAtStalk M p = finrank p.asIdeal.ResidueField (p.asIdeal.ResidueField ⊗[R] M) := by let k := p.asIdeal.ResidueField let e : k ⊗[Localization.AtPrime p.asIdeal] (Localization.AtPrime p.asIdeal ⊗[R] M) ≃ₗ[k] k ⊗[R] M := AlgebraTensorModule.cancelBaseChange _ _ _ _ _ rw [← e.finrank_eq, finrank_baseChange, rankAtStalk_eq_finrank_tensorProduct]
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Stability", "Mathlib.RingTheory.LocalProperties.Projective", "Mathlib.RingTheory.LocalRing.Module", "Mathlib.RingTheory.Localization.Free", "Mathlib.RingTheory.Localization.LocalizationLocalization", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.Topology.LocallyConstant...
Mathlib/RingTheory/Spectrum/Prime/FreeLocus.lean
rankAtStalk_eq
The rank of a module `M` at a prime `p` is equal to the dimension of `κ(p) ⊗[R] M` as a `κ(p)`-module.
@[stacks 0BR8 "Homeomorphism part"] PrimeSpectrum.isHomeomorph_comap (f : R →+* S) (H : ∀ (x : S), ∃ n > 0, x ^ n ∈ f.range) (hker : RingHom.ker f ≤ nilradical R) : IsHomeomorph (comap f) := by have h1 : Function.Injective (comap f) := by intro q q' hqq' ext x obtain ⟨n, hn, y, hy⟩ := H x rw [← q.2.pow_mem_iff_mem _ hn, ← q'.2.pow_mem_iff_mem _ hn, ← hy] rw [PrimeSpectrum.ext_iff, SetLike.ext_iff] at hqq' apply hqq' have hint : f.kerLift.IsIntegral := fun x ↦ have ⟨n, hn, y, hy⟩ := H x let _ := f.kerLift.toAlgebra IsIntegral.of_pow hn (hy ▸ f.kerLift.isIntegralElem_map (x := ⟦y⟧)) have hbij : Function.Bijective (comap f) := ⟨h1, (comap_quotientMk_bijective_of_le_nilradical hker).2.comp <| hint.specComap_surjective f.kerLift_injective⟩ refine ⟨(comap f).continuous, ?_, h1, hbij.2⟩ rw [isTopologicalBasis_basic_opens.isOpenMap_iff] rintro - ⟨s, rfl⟩ obtain ⟨n, hn, r, hr⟩ := H s have : (comap f) '' (basicOpen s) = basicOpen r := (Set.eq_preimage_iff_image_eq hbij).mp <| by rw [← basicOpen_pow _ n hn, ← hr]; rfl exact this ▸ isOpen_basicOpen
lemma
RingTheory
[ "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.RingTheory.Flat.Basic", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/Homeomorph.lean
PrimeSpectrum.isHomeomorph_comap
If the kernel of `f : R →+* S` consists of nilpotent elements and for every `x : S`, there exists `n > 0` such that `x ^ n` is in the range of `f`, then `Spec f` is a homeomorphism. Note: This does not hold for semirings, because `ℕ →+* ℤ` satisfies these conditions, but `Spec ℕ` has one more point than `Spec ℤ`.
@[stacks 0BRA "Special case for purely inseparable field extensions"] PrimeSpectrum.isHomeomorph_comap_of_isPurelyInseparable [IsPurelyInseparable k K] : IsHomeomorph (comap <| algebraMap R (R ⊗[k] K)) := by let q := ringExpChar k refine isHomeomorph_comap _ (IsPurelyInseparable.exists_pow_mem_range_tensorProduct) ?_ convert bot_le rw [← RingHom.injective_iff_ker_eq_bot] exact Algebra.TensorProduct.includeLeft_injective (S := R) (algebraMap k K).injective
lemma
RingTheory
[ "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.RingTheory.Flat.Basic", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/Homeomorph.lean
PrimeSpectrum.isHomeomorph_comap_of_isPurelyInseparable
Purely inseparable field extensions are universal homeomorphisms.
PrimeSpectrum.isHomeomorph_comap_tensorProductMap_of_isPurelyInseparable [Algebra R K] [Algebra R S] (L : Type*) [Field L] [Algebra R L] [Algebra K L] [IsScalarTower R K L] [IsPurelyInseparable K L] : IsHomeomorph (comap (Algebra.TensorProduct.map (Algebra.ofId K L) (.id R S)).toRingHom) := by let e : (L ⊗[R] S) ≃ₐ[K] L ⊗[K] (K ⊗[R] S) := (Algebra.TensorProduct.cancelBaseChange R K K L S).symm let e2 : L ⊗[K] (K ⊗[R] S) ≃ₐ[K] (K ⊗[R] S) ⊗[K] L := Algebra.TensorProduct.comm .. have heq : Algebra.TensorProduct.map (Algebra.ofId K L) (AlgHom.id R S) = (e.symm.toAlgHom.comp e2.symm.toAlgHom).comp (IsScalarTower.toAlgHom K (K ⊗[R] S) ((K ⊗[R] S) ⊗[K] L)) := by ext; simp [e, e2] rw [heq] simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgHom.comp_toRingHom, AlgEquiv.toAlgHom_toRingHom, IsScalarTower.coe_toAlgHom, comap_comp, ContinuousMap.coe_comp] exact (isHomeomorph_comap_of_isPurelyInseparable K L (K ⊗[R] S)).comp <| (isHomeomorph_comap_of_bijective e2.symm.bijective).comp <| isHomeomorph_comap_of_bijective e.symm.bijective
lemma
RingTheory
[ "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.RingTheory.Flat.Basic", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/Homeomorph.lean
PrimeSpectrum.isHomeomorph_comap_tensorProductMap_of_isPurelyInseparable
If `L` is a purely inseparable extension of `K` over `R` and `S` is an `R`-algebra, the induced map `Spec (L ⊗[R] S) ⟶ Spec (K ⊗[R] S)` is a homeomorphism.
imageOfDf (f : R[X]) : Set (PrimeSpectrum R) := { p : PrimeSpectrum R | ∃ i : ℕ, coeff f i ∉ p.asIdeal }
def
RingTheory
[ "Mathlib.RingTheory.Polynomial.Basic", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/IsOpenComapC.lean
imageOfDf
Given a polynomial `f ∈ R[x]`, `imageOfDf` is the subset of `Spec R` where at least one of the coefficients of `f` does not vanish. Lemma `imageOfDf_eq_comap_C_compl_zeroLocus` proves that `imageOfDf` is the image of `(zeroLocus {f})ᶜ` under the morphism `comap C : Spec R[x] → Spec R`.
isOpen_imageOfDf : IsOpen (imageOfDf f) := by rw [imageOfDf, setOf_exists fun i (x : PrimeSpectrum R) => coeff f i ∉ x.asIdeal] exact isOpen_iUnion fun i => isOpen_basicOpen
theorem
RingTheory
[ "Mathlib.RingTheory.Polynomial.Basic", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/IsOpenComapC.lean
isOpen_imageOfDf
null
comap_C_mem_imageOfDf {I : PrimeSpectrum R[X]} (H : I ∈ (zeroLocus {f} : Set (PrimeSpectrum R[X]))ᶜ) : PrimeSpectrum.comap (Polynomial.C : R →+* R[X]) I ∈ imageOfDf f := exists_C_coeff_notMem (mem_compl_zeroLocus_iff_notMem.mp H)
theorem
RingTheory
[ "Mathlib.RingTheory.Polynomial.Basic", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/IsOpenComapC.lean
comap_C_mem_imageOfDf
If a point of `Spec R[x]` is not contained in the vanishing set of `f`, then its image in `Spec R` is contained in the open set where at least one of the coefficients of `f` is non-zero. This lemma is a reformulation of `exists_C_coeff_notMem`.
imageOfDf_eq_comap_C_compl_zeroLocus : imageOfDf f = PrimeSpectrum.comap (C : R →+* R[X]) '' (zeroLocus {f})ᶜ := by ext x refine ⟨fun hx => ⟨⟨map C x.asIdeal, isPrime_map_C_of_isPrime x.isPrime⟩, ⟨?_, ?_⟩⟩, ?_⟩ · rw [mem_compl_iff, mem_zeroLocus, singleton_subset_iff] obtain ⟨i, hi⟩ := hx exact fun a => hi (mem_map_C_iff.mp a i) · ext x refine ⟨fun h => ?_, fun h => subset_span (mem_image_of_mem C.1 h)⟩ rw [← @coeff_C_zero R x _] exact mem_map_C_iff.mp h 0 · rintro ⟨xli, complement, rfl⟩ exact comap_C_mem_imageOfDf complement
theorem
RingTheory
[ "Mathlib.RingTheory.Polynomial.Basic", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/IsOpenComapC.lean
imageOfDf_eq_comap_C_compl_zeroLocus
The open set `imageOfDf f` coincides with the image of `basicOpen f` under the morphism `C⁺ : Spec R[x] → Spec R`.
@[stacks 00FB "First part"] isOpenMap_comap_C : IsOpenMap (PrimeSpectrum.comap (C : R →+* R[X])) := by rintro U ⟨s, z⟩ rw [← compl_compl U, ← z, ← iUnion_of_singleton_coe s, zeroLocus_iUnion, compl_iInter, image_iUnion] simp_rw [← imageOfDf_eq_comap_C_compl_zeroLocus] exact isOpen_iUnion fun f => isOpen_imageOfDf
theorem
RingTheory
[ "Mathlib.RingTheory.Polynomial.Basic", "Mathlib.RingTheory.Spectrum.Prime.Topology" ]
Mathlib/RingTheory/Spectrum/Prime/IsOpenComapC.lean
isOpenMap_comap_C
The morphism `C⁺ : Spec R[x] → Spec R` is open.
exists_isClosed_singleton_of_isJacobsonRing [IsJacobsonRing R] (s : (Set (PrimeSpectrum R))) (hs : IsOpen s) (hs' : s.Nonempty) : ∃ x ∈ s, IsClosed {x} := by simp_rw [isClosed_singleton_iff_isMaximal] obtain ⟨I, hI'⟩ := (isClosed_iff_zeroLocus_ideal _).mp hs.isClosed_compl simp_rw [← @Set.notMem_compl_iff _ s, hI', mem_zeroLocus] have := hs'.ne_empty contrapose! this simp_rw [not_imp_not] at this rw [← Set.compl_univ, eq_compl_comm, hI', eq_comm, ← zeroLocus_bot, zeroLocus_eq_iff, Ideal.radical_eq_jacobson, Ideal.radical_eq_jacobson] refine le_antisymm (le_sInf ?_) (Ideal.jacobson_mono bot_le) rintro x ⟨-, hx⟩ exact sInf_le ⟨this ⟨x, hx.isPrime⟩ hx, hx⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Jacobson.Ring", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.Topology.JacobsonSpace" ]
Mathlib/RingTheory/Spectrum/Prime/Jacobson.lean
exists_isClosed_singleton_of_isJacobsonRing
null
isJacobsonRing_iff_jacobsonSpace : IsJacobsonRing R ↔ JacobsonSpace (PrimeSpectrum R) := by refine ⟨fun _ ↦ inferInstance, fun H ↦ ⟨fun I hI ↦ le_antisymm ?_ Ideal.le_jacobson⟩⟩ rw [← I.isRadical_jacobson.radical] conv_rhs => rw [← hI.radical] simp_rw [← vanishingIdeal_zeroLocus_eq_radical] apply vanishingIdeal_anti_mono rw [← H.1 (isClosed_zeroLocus I), (isClosed_zeroLocus _).closure_subset_iff] rintro x ⟨hx : I ≤ x.asIdeal, hx'⟩ change jacobson I ≤ x.asIdeal exact sInf_le ⟨hx, (isClosed_singleton_iff_isMaximal _).mp hx'⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Jacobson.Ring", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.Topology.JacobsonSpace" ]
Mathlib/RingTheory/Spectrum/Prime/Jacobson.lean
isJacobsonRing_iff_jacobsonSpace
null
isOpen_singleton_tfae_of_isNoetherian_of_isJacobsonRing [IsNoetherianRing R] [IsJacobsonRing R] (x : PrimeSpectrum R) : List.TFAE [IsOpen {x}, IsClopen {x}, IsClosed {x} ∧ StableUnderGeneralization {x}] := by tfae_have 1 → 2 | h => by obtain ⟨y, rfl : y = x, h'⟩ := exists_isClosed_singleton_of_isJacobsonRing _ h ⟨x, Set.mem_singleton x⟩ exact ⟨h', h⟩ tfae_have 2 → 3 | h => ⟨h.isClosed, h.isOpen.stableUnderGeneralization⟩ tfae_have 3 → 1 | ⟨h₁, h₂⟩ => by rw [isClosed_singleton_iff_isMaximal, ← isMax_iff] at h₁ suffices {x} = (⋃ p ∈ { p : PrimeSpectrum R | IsMin p ∧ p ≠ x }, closure {p})ᶜ by rw [this, isOpen_compl_iff] refine Set.Finite.isClosed_biUnion ?_ (fun _ _ ↦ isClosed_closure) exact (finite_setOf_isMin R).subset fun x h ↦ h.1 ext p simp only [Set.mem_singleton_iff, ne_eq, Set.mem_setOf_eq, Set.compl_iUnion, Set.mem_iInter, Set.mem_compl_iff, and_imp, ← specializes_iff_mem_closure, ← le_iff_specializes, not_imp_not] constructor · rintro rfl _ _ rw [stableUnderGeneralization_singleton, ← isMin_iff] at h₂ exact h₂.eq_of_le · intro hp apply h₁.eq_of_ge obtain ⟨q, hq, hq'⟩ := Ideal.exists_minimalPrimes_le (J := p.asIdeal) bot_le exact (hp ⟨q, hq.1.1⟩ (isMin_iff.mpr hq) hq').ge.trans hq' tfae_finish
lemma
RingTheory
[ "Mathlib.RingTheory.Jacobson.Ring", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.Topology.JacobsonSpace" ]
Mathlib/RingTheory/Spectrum/Prime/Jacobson.lean
isOpen_singleton_tfae_of_isNoetherian_of_isJacobsonRing
If `R` is both Noetherian and Jacobson, then the following are equivalent for `x : Spec R`: 1. `{x}` is open (i.e. `x` is an isolated point) 2. `{x}` is clopen 3. `{x}` is both closed and stable under generalization (i.e. `x` is both a minimal prime and a maximal ideal)
exist_mem_one_of_mem_maximal_ideal [IsLocalRing R] {p₁ p₀ : PrimeSpectrum R} (h₀ : p₀ < p₁) (h₁ : p₁ < closedPoint R) {x : R} (hx : x ∈ 𝔪) : ∃ q : PrimeSpectrum R, x ∈ q.asIdeal ∧ p₀ < q ∧ q.asIdeal < 𝔪 := by by_cases hn : x ∈ p₀.1 · exact ⟨p₁, h₀.le hn, h₀, h₁⟩ let e := p₀.1.primeSpectrumQuotientOrderIsoZeroLocus.symm obtain ⟨q, hq⟩ := (p₀.1 + span {x}).nonempty_minimalPrimes <| sup_le (IsLocalRing.le_maximalIdeal_of_isPrime p₀.1) ((span_singleton_le_iff_mem 𝔪).mpr hx) |>.trans_lt (IsMaximal.isPrime' 𝔪).1.lt_top |>.ne let q : PrimeSpectrum R := ⟨q, hq.1.1⟩ have : q.1.IsPrime := q.2 have hxq : x ∈ q.1 := le_sup_right.trans hq.1.2 (mem_span_singleton_self x) refine ⟨q, hxq, lt_of_le_not_ge (le_sup_left.trans hq.1.2) fun h ↦ hn (h hxq), ?_⟩ refine lt_of_le_of_ne (IsLocalRing.le_maximalIdeal_of_isPrime q.1) fun hqm ↦ ?_ have h : (e ⟨q, le_sup_left.trans hq.1.2⟩).1.height ≤ 1 := map_height_le_one_of_mem_minimalPrimes hq simp_rw [show q = closedPoint R from PrimeSpectrum.ext hqm] at h have hph : (e ⟨p₁, h₀.le⟩).1.height ≤ 0 := Order.lt_one_iff_nonpos.mp (height_le_iff.mp h _ inferInstance (by simpa using h₁)) refine ENat.not_lt_zero (e ⟨p₀, le_refl p₀⟩).1.height (height_le_iff.mp hph _ inferInstance ?_) simpa using h₀
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.KrullsHeightTheorem" ]
Mathlib/RingTheory/Spectrum/Prime/LTSeries.lean
exist_mem_one_of_mem_maximal_ideal
null
exist_mem_one_of_mem_two {p₁ p₀ p₂ : PrimeSpectrum R} (h₀ : p₀ < p₁) (h₁ : p₁ < p₂) {x : R} (hx : x ∈ p₂.asIdeal) : ∃ q : (PrimeSpectrum R), x ∈ q.asIdeal ∧ p₀ < q ∧ q < p₂ := by let e := IsLocalization.AtPrime.primeSpectrumOrderIso (Localization.AtPrime p₂.1) p₂.1 have hm : closedPoint (Localization.AtPrime p₂.1) = e.symm ⟨p₂, le_refl p₂⟩ := (PrimeSpectrum.ext Localization.AtPrime.map_eq_maximalIdeal).symm obtain ⟨q, hxq, h₀, h₁⟩ := @exist_mem_one_of_mem_maximal_ideal (Localization.AtPrime p₂.1) _ _ _ (e.symm ⟨p₁, h₁.le⟩) (e.symm ⟨p₀, (h₀.trans h₁).le⟩) (e.symm.lt_iff_lt.mpr h₀) (by simp [hm, h₁]) (algebraMap R (Localization.AtPrime p₂.1) x) <| by rw [← Localization.AtPrime.map_eq_maximalIdeal] exact mem_map_of_mem (algebraMap R (Localization.AtPrime p₂.1)) hx rw [← e.symm_apply_apply q] at h₀ h₁ hxq have hq : (e q).1 < p₂ := by have h : e.symm (e q) < e.symm ⟨p₂, le_refl p₂⟩ := h₁.trans_eq Localization.AtPrime.map_eq_maximalIdeal.symm rwa [OrderIso.lt_iff_lt, Subtype.mk_lt_mk] at h exact Exists.intro (e q).1 ⟨(p₂.1.under_map_of_isLocalizationAtPrime hq.le).le hxq, e.symm.lt_iff_lt.mp h₀, hq⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.KrullsHeightTheorem" ]
Mathlib/RingTheory/Spectrum/Prime/LTSeries.lean
exist_mem_one_of_mem_two
null
exist_ltSeries_mem_one_of_mem_last (p : LTSeries (PrimeSpectrum R)) {x : R} (hx : x ∈ p.last.asIdeal) : ∃ q : LTSeries (PrimeSpectrum R), x ∈ (q 1).asIdeal ∧ p.length = q.length ∧ p.head = q.head ∧ p.last = q.last := by generalize hp : p.length = n induction n generalizing p with | zero => use RelSeries.singleton _ p.last simp only [RelSeries.singleton_toFun, hx, RelSeries.singleton_length, RelSeries.head, RelSeries.last_singleton, and_true, true_and] rw [show 0 = Fin.last p.length from Fin.zero_eq_mk.mpr hp, RelSeries.last] | succ n hn => ?_ by_cases h0 : n = 0 · use p have h1 : 1 = Fin.last p.length := by rw [Fin.last, hp, h0, zero_add] exact Fin.natCast_eq_mk (Nat.one_lt_succ_succ 0) simpa [h1, hp] using hx obtain ⟨q, hxq, h2, hq⟩ : ∃ q : PrimeSpectrum R, x ∈ q.1 ∧ p ⟨p.length - 2, _⟩ < q ∧ q < p.last := (p ⟨p.length - 1, p.length.sub_lt_succ 1⟩).exist_mem_one_of_mem_two (p.strictMono (Nat.pred_lt (by simpa [hp]))) (p.strictMono (Nat.pred_lt (by simp [hp]))) hx obtain ⟨Q, hx, hQ, hh, hl⟩ := hn (p.eraseLast.eraseLast.snoc q h2) (by simpa using hxq) <| by simpa [hp] using Nat.succ_pred_eq_of_ne_zero h0 have h1 : 1 < Q.length + 1 := Nat.lt_of_sub_ne_zero (hQ.symm.trans_ne h0) have h : 1 = (1 : Fin (Q.length + 1)).castSucc := by simp [Fin.one_eq_mk_of_lt h1] exact ⟨Q.snoc p.last (by simpa [← hl] using hq), by simpa [h], by simpa, by simp [← hh], by simp⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.KrullsHeightTheorem" ]
Mathlib/RingTheory/Spectrum/Prime/LTSeries.lean
exist_ltSeries_mem_one_of_mem_last
Let $R$ be a Noetherian ring, $\mathfrak{p}_0 < \dots < \mathfrak{p}_n$ be a chain of primes, $x \in \mathfrak{p}_n$. Then we can find another chain of primes $\mathfrak{q}_0 < \dots < \mathfrak{q}_n$ such that $x \in \mathfrak{q}_1$, $\mathfrak{p}_0 = \mathfrak{q}_0$ and $\mathfrak{p}_n = \mathfrak{q}_n$.
IsLocalRing.closedPoint_mem_support [IsLocalRing R] [Nontrivial M] : IsLocalRing.closedPoint R ∈ Module.support R M := by obtain ⟨p, hp⟩ := (Module.nonempty_support_iff (R := R)).mpr ‹_› exact Module.mem_support_mono le_top hp
lemma
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.Support" ]
Mathlib/RingTheory/Spectrum/Prime/Module.lean
IsLocalRing.closedPoint_mem_support
null
LocalizedModule.subsingleton_iff_disjoint {f : R} : Subsingleton (LocalizedModule (.powers f) M) ↔ Disjoint ↑(PrimeSpectrum.basicOpen f) (Module.support R M) := by rw [subsingleton_iff_support_subset, PrimeSpectrum.basicOpen_eq_zeroLocus_compl, disjoint_compl_left_iff, Set.le_iff_subset]
lemma
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.Support" ]
Mathlib/RingTheory/Spectrum/Prime/Module.lean
LocalizedModule.subsingleton_iff_disjoint
`M[1/f] = 0` if and only if `D(f) ∩ Supp M = 0`.
Module.stableUnderSpecialization_support : StableUnderSpecialization (Module.support R M) := by intro x y e H rw [mem_support_iff_exists_annihilator] at H ⊢ obtain ⟨m, hm⟩ := H exact ⟨m, hm.trans ((PrimeSpectrum.le_iff_specializes _ _).mpr e)⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.Support" ]
Mathlib/RingTheory/Spectrum/Prime/Module.lean
Module.stableUnderSpecialization_support
null
Module.isClosed_support [Module.Finite R M] : IsClosed (Module.support R M) := by rw [support_eq_zeroLocus] apply PrimeSpectrum.isClosed_zeroLocus
lemma
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.Support" ]
Mathlib/RingTheory/Spectrum/Prime/Module.lean
Module.isClosed_support
null
Module.support_subset_preimage_comap [IsScalarTower R A M] : Module.support A M ⊆ PrimeSpectrum.comap (algebraMap R A) ⁻¹' Module.support R M := by intro x hx simp only [Set.mem_preimage, mem_support_iff', PrimeSpectrum.comap_asIdeal, Ideal.mem_comap, ne_eq, not_imp_not] at hx ⊢ obtain ⟨m, hm⟩ := hx exact ⟨m, fun r e ↦ hm _ (by simpa)⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.Support" ]
Mathlib/RingTheory/Spectrum/Prime/Module.lean
Module.support_subset_preimage_comap
null
_root_.minimalPrimes.finite_of_isNoetherianRing : (minimalPrimes R).Finite := minimalPrimes.equivIrreducibleComponents R |>.set_finite_iff |>.mpr NoetherianSpace.finite_irreducibleComponents
lemma
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.Ideal.Quotient.Noetherian", "Mathlib.RingTheory.Artinian.Module", "Mathlib.Topology.NoetherianSpace" ]
Mathlib/RingTheory/Spectrum/Prime/Noetherian.lean
_root_.minimalPrimes.finite_of_isNoetherianRing
null
finite_setOf_isMin : {x : PrimeSpectrum R | IsMin x}.Finite := by have : Function.Injective (asIdeal (R := R)) := @PrimeSpectrum.ext _ _ refine Set.Finite.of_finite_image (f := asIdeal) ?_ this.injOn simp_rw [isMin_iff] exact (minimalPrimes.finite_of_isNoetherianRing R).subset (Set.image_preimage_subset _ _)
lemma
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.Ideal.Quotient.Noetherian", "Mathlib.RingTheory.Artinian.Module", "Mathlib.Topology.NoetherianSpace" ]
Mathlib/RingTheory/Spectrum/Prime/Noetherian.lean
finite_setOf_isMin
null
_root_.Ideal.finite_minimalPrimes_of_isNoetherianRing (I : Ideal R) : I.minimalPrimes.Finite := by rw [I.minimalPrimes_eq_comap] apply Set.Finite.image apply minimalPrimes.finite_of_isNoetherianRing
lemma
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.Ideal.Quotient.Noetherian", "Mathlib.RingTheory.Artinian.Module", "Mathlib.Topology.NoetherianSpace" ]
Mathlib/RingTheory/Spectrum/Prime/Noetherian.lean
_root_.Ideal.finite_minimalPrimes_of_isNoetherianRing
null
isNilpotent_tensor_residueField_iff [Module.Free R A] [Module.Finite R A] (f : A) (I : Ideal R) [I.IsPrime] : IsNilpotent (algebraMap A (A ⊗[R] I.ResidueField) f) ↔ ∀ i < Module.finrank R A, (Algebra.lmul R A f).charpoly.coeff i ∈ I := by cases subsingleton_or_nontrivial R · have := (algebraMap R (A ⊗[R] I.ResidueField)).codomain_trivial simp [Subsingleton.elim I ⊤, Subsingleton.elim (f ⊗ₜ[R] (1 : I.ResidueField)) 0] have : Module.finrank I.ResidueField (I.ResidueField ⊗[R] A) = Module.finrank R A := by rw [Module.finrank_tensorProduct, Module.finrank_self, one_mul] rw [← IsNilpotent.map_iff (Algebra.TensorProduct.comm R A I.ResidueField).injective] simp only [Algebra.TensorProduct.algebraMap_apply, Algebra.algebraMap_self, RingHom.id_apply, Algebra.coe_lmul_eq_mul, Algebra.TensorProduct.comm_tmul] rw [← IsNilpotent.map_iff (Algebra.lmul_injective (R := I.ResidueField)), LinearMap.isNilpotent_iff_charpoly, ← Algebra.baseChange_lmul, LinearMap.charpoly_baseChange] simp_rw [this, ← ((LinearMap.mul R A) f).charpoly_natDegree] constructor · intro e i hi replace e := congr(($e).coeff i) simpa only [Algebra.coe_lmul_eq_mul, coeff_map, coeff_X_pow, hi.ne, ↓reduceIte, ← RingHom.mem_ker, Ideal.ker_algebraMap_residueField] using e · intro H ext i obtain (hi | hi) := eq_or_ne i ((LinearMap.mul R A) f).charpoly.natDegree · simp only [Algebra.coe_lmul_eq_mul, hi, coeff_map, coeff_X_pow, ↓reduceIte] rw [← Polynomial.leadingCoeff, ((LinearMap.mul R A) f).charpoly_monic, map_one] obtain (hi | hi) := lt_or_gt_of_ne hi · simpa [hi.ne, ← RingHom.mem_ker, Ideal.ker_algebraMap_residueField] using H i hi · simp [hi.ne', coeff_eq_zero_of_natDegree_lt hi]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
isNilpotent_tensor_residueField_iff
If `A` is a finite free `R`-algebra, then `f : A` is nilpotent on `κ(𝔭) ⊗ A` for some prime `𝔭 ◃ R` if and only if every non-leading coefficient of `charpoly(f)` is in `𝔭`.
mem_image_comap_zeroLocus_sdiff (f : A) (s : Set A) (x) : x ∈ comap (algebraMap R A) '' (zeroLocus s \ zeroLocus {f}) ↔ ¬ IsNilpotent (algebraMap A ((A ⧸ Ideal.span s) ⊗[R] x.asIdeal.ResidueField) f) := by constructor · rintro ⟨q, ⟨hqg, hqf⟩, rfl⟩ H simp only [mem_zeroLocus, Set.singleton_subset_iff, SetLike.mem_coe] at hqg hqf have hs : Ideal.span s ≤ RingHom.ker (algebraMap A q.asIdeal.ResidueField) := by rwa [Ideal.span_le, Ideal.ker_algebraMap_residueField] let F : (A ⧸ Ideal.span s) ⊗[R] (q.asIdeal.comap (algebraMap R A)).ResidueField →ₐ[A] q.asIdeal.ResidueField := Algebra.TensorProduct.lift (Ideal.Quotient.liftₐ (Ideal.span s) (Algebra.ofId A _) hs) (Ideal.ResidueField.mapₐ _ _ rfl) fun _ _ ↦ .all _ _ have := H.map F rw [AlgHom.commutes, isNilpotent_iff_eq_zero, ← RingHom.mem_ker, Ideal.ker_algebraMap_residueField] at this exact hqf this · intro H rw [← mem_nilradical, nilradical_eq_sInf, Ideal.mem_sInf] at H simp only [Set.mem_setOf_eq, Algebra.TensorProduct.algebraMap_apply, Ideal.Quotient.algebraMap_eq, not_forall] at H obtain ⟨q, hq, hfq⟩ := H have : ∀ a ∈ s, Ideal.Quotient.mk (Ideal.span s) a ⊗ₜ[R] 1 ∈ q := fun a ha ↦ by simp [Ideal.Quotient.eq_zero_iff_mem.mpr (Ideal.subset_span ha)] refine ⟨comap (algebraMap A _) ⟨q, hq⟩, ⟨by simpa [Set.subset_def], by simpa⟩, ?_⟩ rw [← comap_comp_apply, ← IsScalarTower.algebraMap_eq, ← Algebra.TensorProduct.includeRight.comp_algebraMap, comap_comp_apply, Subsingleton.elim (α := PrimeSpectrum x.asIdeal.ResidueField) (comap _ _) ⊥] ext a exact congr(a ∈ $(Ideal.ker_algebraMap_residueField _))
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
mem_image_comap_zeroLocus_sdiff
Let `A` be an `R`-algebra. `𝔭 : Spec R` is in the image of `Z(I) ∩ D(f) ⊆ Spec S` if and only if `f` is not nilpotent on `κ(𝔭) ⊗ A ⧸ I`.
mem_image_comap_basicOpen (f : A) (x) : x ∈ comap (algebraMap R A) '' basicOpen f ↔ ¬ IsNilpotent (algebraMap A (A ⊗[R] x.asIdeal.ResidueField) f) := by have e : A ⊗[R] x.asIdeal.ResidueField ≃ₐ[A] (A ⧸ (Ideal.span ∅ : Ideal A)) ⊗[R] x.asIdeal.ResidueField := by refine Algebra.TensorProduct.congr ?f AlgEquiv.refl rw [Ideal.span_empty] exact { __ := (RingEquiv.quotientBot A).symm, __ := Algebra.ofId _ _ } rw [← IsNilpotent.map_iff e.injective, AlgEquiv.commutes, ← mem_image_comap_zeroLocus_sdiff f ∅ x, zeroLocus_empty, ← Set.compl_eq_univ_diff, basicOpen_eq_zeroLocus_compl]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
mem_image_comap_basicOpen
Let `A` be an `R`-algebra. `𝔭 : Spec R` is in the image of `D(f) ⊆ Spec S` if and only if `f` is not nilpotent on `κ(𝔭) ⊗ A`.
exists_image_comap_of_finite_of_free (f : A) (s : Set A) [Module.Finite R (A ⧸ Ideal.span s)] [Module.Free R (A ⧸ Ideal.span s)] : ∃ t : Finset R, comap (algebraMap R A) '' (zeroLocus s \ zeroLocus {f}) = (zeroLocus t)ᶜ := by classical use (Finset.range (Module.finrank R (A ⧸ Ideal.span s))).image (Algebra.lmul R (A ⧸ Ideal.span s) (Ideal.Quotient.mk _ f)).charpoly.coeff ext x rw [mem_image_comap_zeroLocus_sdiff, IsScalarTower.algebraMap_apply A (A ⧸ Ideal.span s), isNilpotent_tensor_residueField_iff] simp [Set.subset_def]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
exists_image_comap_of_finite_of_free
Let `A` be an `R`-algebra. If `A ⧸ I` is finite free over `R`, then the image of `Z(I) ∩ D(f) ⊆ Spec S` in `Spec R` is compact open.
mem_image_comap_C_basicOpen (f : R[X]) (x : PrimeSpectrum R) : x ∈ comap C '' basicOpen f ↔ ∃ i, f.coeff i ∉ x.asIdeal := by trans f.map (algebraMap R x.asIdeal.ResidueField) ≠ 0 · refine (mem_image_comap_basicOpen _ _).trans (not_iff_not.mpr ?_) let e : R[X] ⊗[R] x.asIdeal.ResidueField ≃ₐ[R] x.asIdeal.ResidueField[X] := (Algebra.TensorProduct.comm R _ _).trans (polyEquivTensor R x.asIdeal.ResidueField).symm rw [← IsNilpotent.map_iff e.injective, isNilpotent_iff_eq_zero] change (e.toAlgHom.toRingHom).comp (algebraMap _ _) f = 0 ↔ Polynomial.mapRingHom _ f = 0 congr! ext1 · ext; simp [e] · simp [e] · simp [Polynomial.ext_iff]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
mem_image_comap_C_basicOpen
null
image_comap_C_basicOpen (f : R[X]) : comap C '' basicOpen f = (zeroLocus (Set.range f.coeff))ᶜ := by ext p rw [mem_image_comap_C_basicOpen] simp [Set.range_subset_iff]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
image_comap_C_basicOpen
null
isOpenMap_comap_C : IsOpenMap (comap (R := R) C) := by intro U hU obtain ⟨S, hS, rfl⟩ := isTopologicalBasis_basic_opens.open_eq_sUnion hU rw [Set.image_sUnion] apply isOpen_sUnion rintro _ ⟨t, ht, rfl⟩ obtain ⟨r, rfl⟩ := hS ht simp only [image_comap_C_basicOpen] exact (isClosed_zeroLocus _).isOpen_compl
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
isOpenMap_comap_C
null
comap_C_surjective : Function.Surjective (comap (R := R) C) := by intro x refine ⟨comap (evalRingHom 0) x, ?_⟩ rw [← comap_comp_apply, (show (evalRingHom 0).comp C = .id R by ext; simp), comap_id, ContinuousMap.id_apply]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
comap_C_surjective
null
exists_image_comap_of_monic (f g : R[X]) (hg : g.Monic) : ∃ t : Finset R, comap C '' (zeroLocus {g} \ zeroLocus {f}) = (zeroLocus t)ᶜ := by apply (config := { allowSynthFailures := true }) exists_image_comap_of_finite_of_free · exact .of_basis (AdjoinRoot.powerBasis' hg).basis · exact .of_basis (AdjoinRoot.powerBasis' hg).basis
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
exists_image_comap_of_monic
null
isCompact_image_comap_of_monic (f g : R[X]) (hg : g.Monic) : IsCompact (comap C '' (zeroLocus {g} \ zeroLocus {f})) := by obtain ⟨t, ht⟩ := exists_image_comap_of_monic f g hg rw [ht, ← t.toSet.iUnion_of_singleton_coe, zeroLocus_iUnion, Set.compl_iInter] apply isCompact_iUnion exact fun _ ↦ by simpa using isCompact_basicOpen _
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
isCompact_image_comap_of_monic
null
isOpen_image_comap_of_monic (f g : R[X]) (hg : g.Monic) : IsOpen (comap C '' (zeroLocus {g} \ zeroLocus {f})) := by obtain ⟨t, ht⟩ := exists_image_comap_of_monic f g hg rw [ht] exact (isClosed_zeroLocus (R := R) t).isOpen_compl
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
isOpen_image_comap_of_monic
null
mem_image_comap_C_basicOpen (f : MvPolynomial σ R) (x : PrimeSpectrum R) : x ∈ comap (C (σ := σ)) '' basicOpen f ↔ ∃ i, f.coeff i ∉ x.asIdeal := by classical trans f.map (algebraMap R x.asIdeal.ResidueField) ≠ 0 · refine (mem_image_comap_basicOpen _ _).trans (not_iff_not.mpr ?_) let e : MvPolynomial σ R ⊗[R] x.asIdeal.ResidueField ≃ₐ[R] MvPolynomial σ x.asIdeal.ResidueField := scalarRTensorAlgEquiv rw [← IsNilpotent.map_iff e.injective, isNilpotent_iff_eq_zero] change (e.toAlgHom.toRingHom).comp (algebraMap _ _) f = 0 ↔ MvPolynomial.map _ f = 0 congr! ext · simp [scalarRTensorAlgEquiv, e, coeff_map, Algebra.smul_def, apply_ite (f := algebraMap _ _)] · simp [e, scalarRTensorAlgEquiv, coeff_map, coeff_X'] · simp [MvPolynomial.ext_iff, coeff_map]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
mem_image_comap_C_basicOpen
null
image_comap_C_basicOpen (f : MvPolynomial σ R) : comap (C (σ := σ)) '' basicOpen f = (zeroLocus (Set.range f.coeff))ᶜ := by ext p rw [mem_image_comap_C_basicOpen] simp [Set.range_subset_iff]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
image_comap_C_basicOpen
null
isOpenMap_comap_C : IsOpenMap (comap (R := R) (C (σ := σ))) := by intro U hU obtain ⟨S, hS, rfl⟩ := isTopologicalBasis_basic_opens.open_eq_sUnion hU rw [Set.image_sUnion] apply isOpen_sUnion rintro _ ⟨t, ht, rfl⟩ obtain ⟨r, rfl⟩ := hS ht simp only [image_comap_C_basicOpen] exact (isClosed_zeroLocus _).isOpen_compl
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
isOpenMap_comap_C
null
comap_C_surjective : Function.Surjective (comap (R := R) (C (σ := σ))) := by intro x refine ⟨comap (eval₂Hom (.id _) 0) x, ?_⟩ rw [← comap_comp_apply, (show (eval₂Hom (.id _) 0).comp C = .id R by ext; simp), comap_id, ContinuousMap.id_apply]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Charpoly.BaseChange", "Mathlib.LinearAlgebra.Eigenspace.Zero", "Mathlib.RingTheory.AdjoinRoot", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.Spectrum.Prime.Topology", "Mathlib.RingTheory.TensorProduct.MvPolynomial" ]
Mathlib/RingTheory/Spectrum/Prime/Polynomial.lean
comap_C_surjective
null
RingHom.specComap {R S : Type*} [CommSemiring R] [CommSemiring S] (f : R →+* S) : PrimeSpectrum S → PrimeSpectrum R := fun y => ⟨Ideal.comap f y.asIdeal, inferInstance⟩
abbrev
RingTheory
[ "Mathlib.RingTheory.Spectrum.Prime.Basic", "Mathlib.RingTheory.LocalRing.ResidueField.Ideal", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/Spectrum/Prime/RingHom.lean
RingHom.specComap
The pullback of an element of `PrimeSpectrum S` along a ring homomorphism `f : R →+* S`. The bundled continuous version is `PrimeSpectrum.comap`.