Stafford38/Paper/Section5/Definitions.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 
3 public import Stafford38.Geometry.ProjectiveConormalDirections
4 public import Stafford38.Geometry.FibreConicalVanishingIdeal
5 public import Stafford38.Paper.Section2.Geometry
6 public import Mathlib.FieldTheory.AlgebraicClosure
7 public import Mathlib.RingTheory.AlgebraicIndependent.TranscendenceBasis
8 public import Mathlib.RingTheory.AlgebraicIndependent.AlgebraicClosure
9 
10 @[expose] public section
11 
12 /-!
13 # Definitions 5.4 and 5.6 of the paper, in the paper's form
14 
15 The repository's canonical notions are
16 `AffineConormalSpan.affineConormalSpace` (the conormal space `N*_y Y`, defined
17 as the annihilator of the embedded Zariski tangent space),
18 `ProjectiveConormalDirections.smoothConormalFibreProjection` (the conormal cone
19 `N(Y)`) and `FibreConicalVanishingIdeal.IsFibreConical`.  The paper defines
20 `N*_y Y` as the span of the differentials `df_y`, `f ∈ I(Y)`, and fibre-conical
21 sets by the scaling `(y, ξ) ↦ (y, tξ)`.  The lemmas below show that the
22 canonical notions are the paper's, with covectors written in the coordinates
23 `ξ = (ξ_1, …, ξ_n)` and `df_y = (∂_1 f(y), …, ∂_n f(y))`.
24 
25 Definition 5.4(a) is `IsIrreducibleClosed` (not a union of two proper closed
26 subsets), and `definition_5_4_a` proves the printed equivalence with primality of
27 `I(Y)` for nonempty closed `Y`.  Definition 5.4(b), the Jacobian smooth locus, is
28 `JacobianSmoothPoint` in `Stafford38.Paper.Section5.SmoothLocus`, where
29 `definition_5_4_b_iff` proves the Jacobian criterion identifying it with
30 `SmoothAffinePoint`, the smooth locus of `K[x]/I` in Mathlib's sense.
31 -/
32 
33 namespace Stafford38.Paper.Section5
34 
35 open Stafford38.Characteristic
36 open Stafford38.Geometry.AffineConormalSpan
37 open Stafford38.Geometry.CoisotropicTranslation
38 open Stafford38.Geometry.ProjectiveConormalDirections
39 open Stafford38.Geometry.SmoothAffineConormal
40 
41 noncomputable section
42 
43 variable {k : Type*} [Field k] {n : ℕ}
44 
45 /-- A Zariski-closed subset of `X = K^n`: `Y = V_K(J)` for an ideal `J ⊆ K[x]`. -/
46 def IsZariskiClosed (Y : Set (Fin n → k)) : Prop :=
47   ∃ J : Ideal (MvPolynomial (Fin n) k), Y = MvPolynomial.zeroLocus k J
48 
49 /-- **Definition 5.4(a).** A closed set `Y` is irreducible if it is not a union of two
50 proper closed subsets. -/
51 def IsIrreducibleClosed (Y : Set (Fin n → k)) : Prop :=
52   IsZariskiClosed Y ∧ ¬ ∃ Y₁ Y₂ : Set (Fin n → k), IsZariskiClosed Y₁ ∧ IsZariskiClosed Y₂ ∧
53     Y₁ ⊂ Y ∧ Y₂ ⊂ Y ∧ Y = Y₁ ∪ Y₂
54 
55 /-- A closed set is the zero set of its vanishing ideal: `V_K(I(Y)) = Y`. -/
56 theorem zeroLocus_vanishingIdeal_of_isZariskiClosed {Y : Set (Fin n → k)}
57     (hY : IsZariskiClosed Y) :
58     MvPolynomial.zeroLocus k (MvPolynomial.vanishingIdeal k Y) = Y := by
59   obtain ⟨J, rfl⟩ := hY
60   exact le_antisymm (MvPolynomial.zeroLocus_anti_mono (MvPolynomial.le_vanishingIdeal_zeroLocus J))
61     (MvPolynomial.zeroLocus_vanishingIdeal_le _)
62 
63 /-- `V_K(J + (f)) = V_K(J) ∩ {f = 0}`. -/
64 theorem mem_zeroLocus_sup_span_singleton (J : Ideal (MvPolynomial (Fin n) k))
65     (f : MvPolynomial (Fin n) k) (y : Fin n → k) :
66     y ∈ MvPolynomial.zeroLocus k (J ⊔ Ideal.span {f}) ↔
67       y ∈ MvPolynomial.zeroLocus k J ∧ MvPolynomial.aeval y f = 0 := by
68   simp only [MvPolynomial.mem_zeroLocus_iff]
69   constructor
70   · intro h
71     exact ⟨fun p hp => h p (Ideal.mem_sup_left hp),
72       h f (Ideal.mem_sup_right (Ideal.mem_span_singleton_self f))⟩
73   · rintro ⟨hJ, hf⟩ p hp
74     obtain ⟨a, ha, b, hb, rfl⟩ := Submodule.mem_sup.mp hp
75     obtain ⟨c, rfl⟩ := Ideal.mem_span_singleton'.mp hb
76     rw [map_add, map_mul, hJ a ha, hf, mul_zero, add_zero]
77 
78 /-- **Definition 5.4(a), "equivalently if `I(Y)` is prime"** ([Hartshorne, Cor. I.1.4]).
79 As there, `Y` is nonempty (the empty set has `I(∅) = K[x]`, which is not prime). -/
80 theorem definition_5_4_a {Y : Set (Fin n → k)} (hne : Y.Nonempty) (hY : IsZariskiClosed Y) :
81     IsIrreducibleClosed Y ↔ (MvPolynomial.vanishingIdeal k Y).IsPrime := by
82   constructor
83   · rintro ⟨-, hirr⟩
84     refine ⟨fun htop => ?_, fun {f g} hfg => ?_⟩
85     · obtain ⟨y, hy⟩ := hne
86       have h1 : (1 : MvPolynomial (Fin n) k) ∈ MvPolynomial.vanishingIdeal k Y :=
87         htop ▸ Submodule.mem_top
88       have := MvPolynomial.mem_vanishingIdeal_iff.mp h1 y hy
89       simp at this
90     · by_contra h
91       push Not at h
92       obtain ⟨hf, hg⟩ := h
93       obtain ⟨J, rfl⟩ := hY
94       apply hirr
95       have hproper : ∀ e : MvPolynomial (Fin n) k, e ∉ MvPolynomial.vanishingIdeal k
96           (MvPolynomial.zeroLocus k J) →
97           MvPolynomial.zeroLocus k (J ⊔ Ideal.span {e}) ⊂ MvPolynomial.zeroLocus k J := by
98         intro e he
99         refine ⟨MvPolynomial.zeroLocus_anti_mono le_sup_left, fun hsub => he ?_⟩
100         rw [MvPolynomial.mem_vanishingIdeal_iff]
101         intro y hy
102         exact ((mem_zeroLocus_sup_span_singleton J e y).mp (hsub hy)).2
103       refine ⟨_, _, ⟨_, rfl⟩, ⟨_, rfl⟩, hproper f hf, hproper g hg, ?_⟩
104       ext y
105       simp only [Set.mem_union, mem_zeroLocus_sup_span_singleton]
106       constructor
107       · intro hy
108         have h0 := MvPolynomial.mem_vanishingIdeal_iff.mp hfg y hy
109         rw [map_mul] at h0
110         rcases mul_eq_zero.mp h0 with h0 | h0
111         · exact Or.inl ⟨hy, h0⟩
112         · exact Or.inr ⟨hy, h0⟩
113       · rintro (⟨hy, -⟩ | ⟨hy, -⟩) <;> exact hy
114   · intro hP
115     refine ⟨hY, ?_⟩
116     rintro ⟨Y₁, Y₂, hY₁, hY₂, h₁, h₂, hU⟩
117     -- a proper closed `Y_i` is cut out inside `Y` by some `f_i ∈ I(Y_i) ∖ I(Y)`
118     have hsep : ∀ Z : Set (Fin n → k), IsZariskiClosed Z → Z ⊂ Y →
119         ∃ f ∈ MvPolynomial.vanishingIdeal k Z, f ∉ MvPolynomial.vanishingIdeal k Y := by
120       intro Z hZ hZY
121       obtain ⟨y, hyY, hyZ⟩ := Set.exists_of_ssubset hZY
122       rw [← zeroLocus_vanishingIdeal_of_isZariskiClosed hZ, MvPolynomial.mem_zeroLocus_iff] at hyZ
123       push Not at hyZ
124       obtain ⟨f, hf, hfy⟩ := hyZ
125       exact ⟨f, hf, fun hfY => hfy (MvPolynomial.mem_vanishingIdeal_iff.mp hfY y hyY)⟩
126     obtain ⟨f₁, hf₁, hf₁Y⟩ := hsep Y₁ hY₁ h₁
127     obtain ⟨f₂, hf₂, hf₂Y⟩ := hsep Y₂ hY₂ h₂
128     have hprod : f₁ * f₂ ∈ MvPolynomial.vanishingIdeal k Y := by
129       rw [MvPolynomial.mem_vanishingIdeal_iff]
130       intro y hy
131       rw [hU] at hy
132       rw [map_mul]
133       rcases hy with hy | hy
134       · rw [MvPolynomial.mem_vanishingIdeal_iff.mp hf₁ y hy, zero_mul]
135       · rw [MvPolynomial.mem_vanishingIdeal_iff.mp hf₂ y hy, mul_zero]
136     rcases hP.mem_or_mem hprod with h | h
137     · exact hf₁Y h
138     · exact hf₂Y h
139 
140 /-- For nonempty irreducible closed `Y`, the prime `I(Y)` as a point of `Spec K[x]`;
141 Definitions 5.4(b)–(d) and 5.5 are stated in terms of it. -/
142 def idealPoint (Y : Set (Fin n → k)) (hne : Y.Nonempty) (hY : IsIrreducibleClosed Y) :
143     PrimeSpectrum (MvPolynomial (Fin n) k) :=
144   ⟨MvPolynomial.vanishingIdeal k Y, (definition_5_4_a hne hY.1).1 hY⟩
145 
146 /-- `ξ ↦ Σ ξ_i dx_i`, the identification of coordinate vectors with covectors. -/
147 def coordinateCovectorLinear :
148     (Fin n → k) →ₗ[k] Module.Dual k (AffineTangentVector k n) where
149   toFun := coordinateCovector
150   map_add' ξ η := by
151     ext v
152     simp [add_mul, Finset.sum_add_distrib]
153   map_smul' c ξ := by
154     ext v
155     simp [Finset.mul_sum, mul_assoc]
156 
157 /-- **Definition 5.4(c).** `N*_y Y = span_K {df_y : f ∈ I}`, with covectors in
158 coordinates. -/
159 theorem definition_5_4_c
160     (I : Ideal (MvPolynomial (Fin n) k)) (y ξ : Fin n → k) :
161     coordinateCovector ξ ∈ affineConormalSpace y I ↔
162       ξ ∈ Submodule.span k (Set.range fun f : I => differentialAt y f.1) := by
163   have hspan : equationCovectorSpan y I =
164       (Submodule.span k (Set.range fun f : I => differentialAt y f.1)).map
165         (coordinateCovectorLinear (k := k) (n := n)) := by
166     rw [Submodule.map_span, ← Set.range_comp]
167     rfl
168   rw [affineConormalSpace_eq_equationCovectorSpan, hspan]
169   constructor
170   · rintro ⟨η, hη, hηξ⟩
171     have : η = ξ := coordinateCovector_injective hηξ
172     exact this ▸ hη
173   · intro hξ
174     exact ⟨ξ, hξ, rfl⟩
175 
176 /-- **Definition 5.4(d).** `N(Y) = ⋃_{y ∈ Y_sm} N*_y Y`, in the paper's form of
177 `N*_y Y`. -/
178 theorem definition_5_4_d
179     [IsAlgClosed k] (I : Ideal (MvPolynomial (Fin n) k)) (ξ : Fin n → k) :
180     ξ ∈ smoothConormalFibreProjection I ↔
181       ∃ y, SmoothAffinePoint I y ∧
182         ξ ∈ Submodule.span k (Set.range fun f : I => differentialAt y f.1) := by
183   constructor
184   · rintro ⟨y, hy, hξ⟩
185     exact ⟨y, hy, (definition_5_4_c I y ξ).1 hξ⟩
186   · rintro ⟨y, hy, hξ⟩
187     exact ⟨y, hy, (definition_5_4_c I y ξ).2 hξ⟩
188 
189 /-- **Definition 5.6.** `W` is fibre-conical iff it is stable under the
190 fibrewise scaling `(y, ξ) ↦ (y, tξ)`, `t ∈ K^×`: the scaling maps
191 `W ∩ T*_y X` into `W ∩ T*_y X` for every fibre `T*_y X = π⁻¹(y)`
192 (`Section2.fibre`, Definition 2.5). -/
193 theorem definition_5_6
194     [IsAlgClosed k] [CharZero k] (W : Set (PhaseVar n → k)) :
195     Stafford38.Geometry.FibreConicalVanishingIdeal.IsFibreConical W ↔
196       ∀ y ξ : Fin n → k, Sum.elim y ξ ∈ W ∩ Stafford38.Paper.Section2.fibre y →
197         ∀ t : k, t ≠ 0 → Sum.elim y (t • ξ) ∈ W ∩ Stafford38.Paper.Section2.fibre y := by
198   constructor
199   · intro hW y ξ hq t ht
200     exact ⟨by simpa [Pi.smul_def] using hW _ hq.1 t ht, rfl⟩
201   · intro hW q hq t ht
202     have hsplit : q = Sum.elim (fun i => q (.inl i)) (fun i => q (.inr i)) := by
203       funext i; cases i <;> rfl
204     rw [hsplit] at hq
205     simpa [Pi.smul_def] using (hW _ _ ⟨hq, rfl⟩ t ht).1
206 
207 section Definitions51to53
208 
209 /-! ### Definitions 5.1–5.3
210 
211 The proof of Theorem 5.7 works with Mathlib's notions for the printed
212 definitions: 5.1(a)–(b) `IsAlgebraic`, `Transcendental` (`transcendental_iff`
213 is the printed `g(z) = 0 ⇒ g = 0`), 5.1(c) `minpoly`, 5.1(d) `Algebra.IsAlgebraic`,
214 5.1(e) separability (automatic in characteristic zero), 5.1(f)
215 `AlgebraicIndependent` (`algebraicIndependent_iff`), 5.2(a) `Derivation`,
216 5.3(a) `ValuationSubring` and 5.3(b) `IsDiscreteValuationRing`, and 5.3(c)
217 `PowerSeries`, `LaurentSeries`; no step needs the printed wording of these, so
218 it is not restated.  Restated below are the items the proof uses in the
219 printed form: 5.1(g)–(h) (Lemma 5.11 and Lemma 5.12), and 5.2(b)–(c), the
220 presentation of `Ω_{κ/K}` and the dual derivations of the paragraph after
221 Lemma 5.11. -/
222 
223 variable {K L : Type*} [Field K] [Field L] [Algebra K L]
224 
225 /-- **Definition 5.1(g)–(h).** For a transcendence basis `B` of `L/K`, `L` is algebraic
226 over `K(B)`, and `|B| = trdeg_K L`. -/
227 theorem definition_5_1_g_h {B : Set L} (hB : IsTranscendenceBasis K ((↑) : B → L)) :
228     Algebra.IsAlgebraic (IntermediateField.adjoin K (Set.range ((↑) : B → L))) L ∧
229       Cardinal.mk B = Algebra.trdeg K L :=
230   ⟨hB.isAlgebraic_field, hB.cardinalMk_eq_trdeg⟩
231 
232 /-- **Definition 5.1, closing sentence.** The elements of `L` that are algebraic over
233 `K` form a subfield, and every finite set generating `L` over `K` contains a
234 transcendence basis ([Lang, Thm. VIII.1.1]). -/
235 theorem definition_5_1_closing :
236     (∃ E : IntermediateField K L, ∀ z : L, z ∈ E ↔ IsAlgebraic K z) ∧
237       ∀ S : Set L, S.Finite → IntermediateField.adjoin K S = ⊤ →
238         ∃ B ⊆ S, IsTranscendenceBasis K ((↑) : B → L) := by
239   refine ⟨⟨algebraicClosure K L, fun z => mem_algebraicClosure_iff⟩, fun S _ hS => ?_⟩
240   have : Algebra.IsAlgebraic (Algebra.adjoin K S) L := by
241     rw [← IntermediateField.isAlgebraic_adjoin_iff_top, hS]
242     exact ⟨fun z => ⟨Polynomial.X - Polynomial.C ⟨z, trivial⟩, Polynomial.X_sub_C_ne_zero _,
243       by simp [Polynomial.aeval_def]⟩⟩
244   exact exists_isTranscendenceBasis_subset S
245 
246 /-- The relations of Definition 5.2(b) in the free `κ`-vector space `𝒢` on symbols
247 `⟨a⟩ = Finsupp.single a 1`: `⟨a+b⟩ - ⟨a⟩ - ⟨b⟩`, `⟨ab⟩ - a⟨b⟩ - b⟨a⟩`, `⟨c⟩` (`c ∈ K`). -/
248 def differentialRelations (K κ : Type*) [Field K] [Field κ] [Algebra K κ] :
249     Submodule κ (κ →₀ κ) :=
250   Submodule.span κ
251     (((Set.range fun x : κ × κ ↦
252         Finsupp.single (x.1 + x.2) 1 - Finsupp.single x.1 1 - Finsupp.single x.2 1) ∪
253       Set.range fun x : κ × κ ↦
254         Finsupp.single (x.1 * x.2) 1 - x.1 • Finsupp.single x.2 1 -
255           x.2 • Finsupp.single x.1 1) ∪
256       Set.range fun c : K ↦ Finsupp.single (algebraMap K κ c) 1)
257 
258 /-- The printed relations span Mathlib's `KaehlerDifferential.kerTotal`. -/
259 theorem differentialRelations_eq_kerTotal :
260     differentialRelations K L = KaehlerDifferential.kerTotal K L := by
261   apply le_antisymm
262   · rw [differentialRelations, Submodule.span_le]
263     rintro _ ((⟨⟨a, b⟩, rfl⟩ | ⟨⟨a, b⟩, rfl⟩) | ⟨c, rfl⟩)
264     · have e : Finsupp.single (a + b) (1 : L) - Finsupp.single a 1 - Finsupp.single b 1 =
265           -(Finsupp.single a 1 + Finsupp.single b 1 - Finsupp.single (a + b) 1) := by abel
266       rw [SetLike.mem_coe]
267       beta_reduce
268       rw [e]
269       exact Submodule.neg_mem _ (Submodule.subset_span (Or.inl (Or.inl ⟨(a, b), rfl⟩)))
270     · have e : Finsupp.single (a * b) (1 : L) - a • Finsupp.single b 1 - b • Finsupp.single a 1 =
271           -(Finsupp.single b a + Finsupp.single a b - Finsupp.single (a * b) 1) := by
272         simp only [Finsupp.smul_single, smul_eq_mul, mul_one]
273         abel
274       rw [SetLike.mem_coe]
275       beta_reduce
276       rw [e]
277       exact Submodule.neg_mem _ (Submodule.subset_span (Or.inl (Or.inr ⟨(a, b), rfl⟩)))
278     · exact Submodule.subset_span (Or.inr ⟨c, rfl⟩)
279   · rw [KaehlerDifferential.kerTotal, Submodule.span_le]
280     rintro _ ((⟨⟨a, b⟩, rfl⟩ | ⟨⟨a, b⟩, rfl⟩) | ⟨c, rfl⟩)
281     · have e : Finsupp.single a (1 : L) + Finsupp.single b 1 - Finsupp.single (a + b) 1 =
282           -(Finsupp.single (a + b) 1 - Finsupp.single a 1 - Finsupp.single b 1) := by abel
283       rw [SetLike.mem_coe]
284       beta_reduce
285       rw [e]
286       exact Submodule.neg_mem _ (Submodule.subset_span (Or.inl (Or.inl ⟨(a, b), rfl⟩)))
287     · have e : Finsupp.single b a + Finsupp.single a b - Finsupp.single (a * b) (1 : L) =
288           -(Finsupp.single (a * b) 1 - a • Finsupp.single b 1 - b • Finsupp.single a 1) := by
289         simp only [Finsupp.smul_single, smul_eq_mul, mul_one]
290         abel
291       rw [SetLike.mem_coe]
292       beta_reduce
293       rw [e]
294       exact Submodule.neg_mem _ (Submodule.subset_span (Or.inl (Or.inr ⟨(a, b), rfl⟩)))
295     · exact Submodule.subset_span (Or.inr ⟨c, rfl⟩)
296 
297 /-- **Definition 5.2(b).** `Ω_{κ/K}`, the quotient of the free module `𝒢` by the printed
298 relations, is Mathlib's `Ω[κ⁄K]`, with the class of `⟨a⟩` going to `da`. -/
299 theorem definition_5_2_b :
300     ∃ e : ((L →₀ L) ⧸ differentialRelations K L) ≃ₗ[L] Ω[L⁄K],
301       ∀ a : L, e (Submodule.Quotient.mk (Finsupp.single a 1)) = KaehlerDifferential.D K L a := by
302   refine ⟨(Submodule.quotEquivOfEq _ _ differentialRelations_eq_kerTotal).trans
303     (KaehlerDifferential.quotKerTotalEquiv K L), fun a ↦ ?_⟩
304   simp [KaehlerDifferential.quotKerTotalEquiv]
305 
306 /-- **Definition 5.2(c), first sentences.** A `K`-derivation `D` of `κ` induces the
307 `κ`-linear map `Ω_{κ/K} → κ`, `da ↦ D(a)`, and conversely a `κ`-linear map
308 `φ : Ω_{κ/K} → κ` gives the `K`-derivation `a ↦ φ(da)`; the two constructions are
309 inverse (`KaehlerDifferential.linearMapEquivDerivation`). -/
310 theorem definition_5_2_c_correspondence :
311     ∃ e : (Ω[L⁄K] →ₗ[L] L) ≃ₗ[L] Derivation K L L,
312       (∀ (φ : Ω[L⁄K] →ₗ[L] L) (a : L), e φ a = φ (KaehlerDifferential.D K L a)) ∧
313         ∀ (D : Derivation K L L) (a : L), e.symm D (KaehlerDifferential.D K L a) = D a :=
314   ⟨KaehlerDifferential.linearMapEquivDerivation K L, fun _ _ => rfl,
315     fun D a => D.liftKaehlerDifferential_comp_D a⟩
316 
317 /-- **Definition 5.2(c).** A basis `dβ_1, …, dβ_d` of `Ω_{κ/K}` has dual derivations
318 `D_k` with `D_k(β_l) = δ_{kl}`, namely `D_k = (dβ_k)^* ∘ d`. -/
319 theorem definition_5_2_c {ι : Type*} [DecidableEq ι] (β : ι → L)
320     (b : Module.Basis ι L Ω[L⁄K]) (hb : ∀ l, b l = KaehlerDifferential.D K L (β l)) :
321     ∃ D : ι → Derivation K L L, ∀ k' l, D k' (β l) = if k' = l then 1 else 0 := by
322   -- `dβ_l` is the class of `⟨β_l⟩` (Definition 5.2(b)); `D_k` is the derivation
323   -- of the coordinate functional `(dβ_k)^*` on `Ω_{κ/K}`.
324   obtain ⟨e, he⟩ := definition_5_2_b (K := K) (L := L)
325   obtain ⟨c, hc, -⟩ := definition_5_2_c_correspondence (K := K) (L := L)
326   refine ⟨fun k' ↦ c (b.coord k'), fun k' l ↦ ?_⟩
327   have hb' : ∀ l, b l = e (Submodule.Quotient.mk (Finsupp.single (β l) 1)) :=
328     fun l ↦ (hb l).trans (he _).symm
329   rw [hc, ← he, ← hb', Module.Basis.coord_apply, Module.Basis.repr_self, Finsupp.single_apply]
330   by_cases h : k' = l
331   · subst h; simp
332   · simp [h, Ne.symm h]
333 
334 end Definitions51to53
335 
336 #print axioms zeroLocus_vanishingIdeal_of_isZariskiClosed
337 #print axioms mem_zeroLocus_sup_span_singleton
338 #print axioms definition_5_4_a
339 #print axioms definition_5_4_c
340 #print axioms definition_5_4_d
341 #print axioms definition_5_6
342 #print axioms definition_5_1_g_h
343 #print axioms definition_5_1_closing
344 #print axioms definition_5_2_c_correspondence
345 #print axioms differentialRelations_eq_kerTotal
346 #print axioms definition_5_2_b
347 #print axioms definition_5_2_c
348 
349 end
350 
351 end Stafford38.Paper.Section5
352