Stafford38/Geometry/CompletedDVRCoefficientSection.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.FiniteSeparableDVRChartFoundation
3 public import Stafford38.Geometry.RelativeCoefficientDVRPlace
4 public import Mathlib.RingTheory.AdicCompletion.Algebra
5 public import Mathlib.RingTheory.Ideal.Quotient.Nilpotent
6 
7 @[expose] public section
8 
9 /-!
10 # A residue-field section in the adic completion of the retained DVR
11 
12 Let `V` be a commutative local `E`-algebra and let `K` be its residue field.
13 If `K/E` is separable, formal etaleness gives a unique coefficient section in
14 every positive quotient `V / m^(n+1)`.  Uniqueness makes those sections
15 compatible with the quotient transition maps.  This file assembles the
16 compatible family in Mathlib's `m`-adic completion and proves that the
17 level-one residue map retracts it.
18 
19 The retained DVR produced by `RelativeCoefficientDVRPlace` satisfies the
20 separability hypothesis in characteristic zero, so the construction applies
21 to it directly.  No equivalence with a power-series ring is asserted.
22 -/
23 
24 namespace Stafford38.Geometry.CompletedDVRCoefficientSection
25 
26 open IsLocalRing
27 open Stafford38.Geometry.FiniteSeparableDVRChartFoundation
28 open Stafford38.Geometry.RelativeCoefficientDVR
29 open Stafford38.Geometry.RetainedDVR
30 open Stafford38.Geometry.AsymptoticDivisorExistence
31 
32 noncomputable section
33 
34 set_option maxHeartbeats 800000
35 set_option synthInstance.maxHeartbeats 100000
36 
37 universe u
38 
39 section LocalAlgebra
40 
41 variable (E V : Type u)
42 variable [Field E] [CommRing V] [IsLocalRing V] [Algebra E V]
43 
44 abbrev K := ResidueField V
45 abbrev m : Ideal V := maximalIdeal V
46 
47 /-- The positive `n`-th nilpotent quotient of the local ring. -/
48 abbrev AdicJet (n : ℕ) := V ⧸ ((m V) ^ (n + 1))
49 
50 /-- Reduction of a positive adic jet to the residue field. -/
51 def adicJetResidue (n : ℕ) : AdicJet V n →ₐ[E] K V :=
52   Ideal.Quotient.liftₐ ((m V) ^ (n + 1))
53     (IsScalarTower.toAlgHom E V (K V)) (by
54       intro x hx
55       change residue V x = 0
56       rw [residue_eq_zero_iff]
57       exact Ideal.pow_le_self (Nat.succ_ne_zero n) hx)
58 
59 /-- Reduction from every positive adic jet is surjective. -/
60 theorem adicJetResidue_surjective (n : ℕ) :
61     Function.Surjective (adicJetResidue E V n) := by
62   intro z
63   obtain ⟨x, rfl⟩ := residue_surjective (R := V) z
64   exact ⟨Ideal.Quotient.mk ((m V) ^ (n + 1)) x, rfl⟩
65 
66 /-- The kernel of positive-jet reduction is nilpotent. -/
67 theorem adicJetResidue_kernel_isNilpotent (n : ℕ) :
68     IsNilpotent (RingHom.ker (adicJetResidue E V n).toRingHom) := by
69   have hkerLift :
70       RingHom.ker (adicJetResidue E V n).toRingHom =
71         (RingHom.ker (IsScalarTower.toAlgHom E V (K V)).toRingHom).map
72           (Ideal.Quotient.mk ((m V) ^ (n + 1))) := by
73     exact Ideal.ker_quotient_lift _ _
74   rw [hkerLift]
75   have hker :
76       RingHom.ker (IsScalarTower.toAlgHom E V (K V)).toRingHom = m V := by
77     change RingHom.ker (algebraMap V (K V)) = m V
78     rw [ResidueField.algebraMap_eq, ker_residue]
79   rw [hker]
80   refine ⟨n + 1, ?_⟩
81   rw [← Ideal.map_pow, Ideal.map_quotient_self]
82   rfl
83 
84 /-- The unique coefficient section in the positive `n`-th adic jet. -/
85 def adicJetCoefficientSection
86     (hsep : Algebra.IsSeparable E (K V)) (n : ℕ) :
87     K V →ₐ[E] AdicJet V n :=
88   finiteSeparableSection E (K V) (AdicJet V n) hsep
89     (adicJetResidue E V n) (adicJetResidue_surjective E V n)
90     (adicJetResidue_kernel_isNilpotent E V n)
91 
92 /-- Each finite-level coefficient map is a section of reduction. -/
93 @[simp]
94 theorem adicJetResidue_comp_adicJetCoefficientSection
95     (hsep : Algebra.IsSeparable E (K V)) (n : ℕ) :
96     (adicJetResidue E V n).comp (adicJetCoefficientSection E V hsep n) =
97       AlgHom.id E (K V) :=
98   residue_comp_finiteSeparableSection E (K V) (AdicJet V n) hsep
99     (adicJetResidue E V n) (adicJetResidue_surjective E V n)
100     (adicJetResidue_kernel_isNilpotent E V n)
101 
102 /-- The transition map between two positive adic jets. -/
103 def adicJetTransition {a b : ℕ} (hab : a ≤ b) :
104     AdicJet V b →ₐ[E] AdicJet V a :=
105   Ideal.quotientMapₐ ((m V) ^ (a + 1)) (AlgHom.id E V) (by
106     simpa using Ideal.pow_le_pow_right (Nat.add_le_add_right hab 1))
107 
108 /-- Reduction commutes with every positive-jet transition. -/
109 theorem adicJetResidue_comp_transition {a b : ℕ} (hab : a ≤ b) :
110     (adicJetResidue E V a).comp (adicJetTransition E V hab) =
111       adicJetResidue E V b := by
112   ext x
113   obtain ⟨x, rfl⟩ := Ideal.Quotient.mk_surjective x
114   rfl
115 
116 /-- Uniqueness forces the positive finite-level sections to be compatible. -/
117 theorem adicJetCoefficientSection_compatible
118     (hsep : Algebra.IsSeparable E (K V)) {a b : ℕ} (hab : a ≤ b) :
119     (adicJetTransition E V hab).comp
120         (adicJetCoefficientSection E V hsep b) =
121       adicJetCoefficientSection E V hsep a := by
122   exact finiteSeparableSection_naturality E (K V)
123     (AdicJet V a) (AdicJet V b) hsep
124     (adicJetResidue E V a) (adicJetResidue_surjective E V a)
125     (adicJetResidue_kernel_isNilpotent E V a)
126     (adicJetResidue E V b) (adicJetResidue_surjective E V b)
127     (adicJetResidue_kernel_isNilpotent E V b)
128     (adicJetTransition E V hab) (adicJetResidue_comp_transition E V hab)
129 
130 /-- Convert the usual quotient by `m^n` to the coordinate quotient used in
131 the definition of `AdicCompletion`. -/
132 def exactQuotientToCompletionCoordinate (n : ℕ) :
133     (V ⧸ ((m V) ^ n)) ≃ₐ[E]
134       V ⧸ ((m V) ^ n • ⊤ : Ideal V) := by
135   have h : ((m V) ^ n • ⊤ : Ideal V) = (m V) ^ n := by
136     ext x
137     simp
138   exact (Ideal.quotientEquivAlgOfEq V h).symm.restrictScalars E
139 
140 /-- The zeroth completion coordinate is the zero quotient, so it has a unique
141 `E`-algebra map from the residue field. -/
142 def zeroCompletionCoordinateSection :
143     K V →ₐ[E] V ⧸ ((m V) ^ 0 • ⊤ : Ideal V) := by
144   have htop : ((m V) ^ 0 • ⊤ : Ideal V) = ⊤ := by simp
145   letI : Subsingleton (V ⧸ ((m V) ^ 0 • ⊤ : Ideal V)) := by
146     rw [htop]
147     infer_instance
148   exact {
149     toFun := fun _ ↦ 0
150     map_one' := Subsingleton.elim _ _
151     map_mul' := fun _ _ ↦ Subsingleton.elim _ _
152     map_zero' := rfl
153     map_add' := fun _ _ ↦ Subsingleton.elim _ _
154     commutes' := fun _ ↦ Subsingleton.elim _ _ }
155 
156 /-- The coefficient section in every coordinate of Mathlib's adic inverse
157 limit.  Coordinate zero is trivial; coordinate `n+1` is the formally etale
158 section in `V / m^(n+1)`. -/
159 def completionCoordinateSection
160     (hsep : Algebra.IsSeparable E (K V)) :
161     ∀ n : ℕ, K V →ₐ[E] V ⧸ ((m V) ^ n • ⊤ : Ideal V)
162   | 0 => zeroCompletionCoordinateSection E V
163   | n + 1 =>
164       (exactQuotientToCompletionCoordinate E V (n + 1)).toAlgHom.comp
165         (adicJetCoefficientSection E V hsep n)
166 
167 /-- Transition on exact power quotients agrees with transition on the raw
168 coordinates occurring in `AdicCompletion`. -/
169 theorem transition_exactQuotientToCompletionCoordinate
170     {a b : ℕ} (hab : a ≤ b) (x : V ⧸ ((m V) ^ b)) :
171     AdicCompletion.transitionMap (m V) V hab
172         (exactQuotientToCompletionCoordinate E V b x) =
173       exactQuotientToCompletionCoordinate E V a
174         (Ideal.quotientMapₐ ((m V) ^ a) (AlgHom.id E V)
175           (by simpa using Ideal.pow_le_pow_right hab) x) := by
176   obtain ⟨x, rfl⟩ := Ideal.Quotient.mk_surjective x
177   rfl
178 
179 /-- The completion-coordinate sections form a compatible inverse-limit
180 family. -/
181 theorem completionCoordinateSection_compatible
182     (hsep : Algebra.IsSeparable E (K V)) {a b : ℕ} (hab : a ≤ b)
183     (x : K V) :
184     AdicCompletion.transitionMap (m V) V hab
185         (completionCoordinateSection E V hsep b x) =
186       completionCoordinateSection E V hsep a x := by
187   cases a with
188   | zero =>
189       have htop : ((m V) ^ 0 • ⊤ : Ideal V) = ⊤ := by simp
190       letI : Subsingleton (V ⧸ ((m V) ^ 0 • ⊤ : Ideal V)) := by
191         rw [htop]
192         infer_instance
193       exact Subsingleton.elim _ _
194   | succ a =>
195       cases b with
196       | zero => omega
197       | succ b =>
198           have hab' : a ≤ b := Nat.succ_le_succ_iff.mp hab
199           change AdicCompletion.transitionMap (m V) V hab
200               (exactQuotientToCompletionCoordinate E V (b + 1)
201                 (adicJetCoefficientSection E V hsep b x)) =
202             exactQuotientToCompletionCoordinate E V (a + 1)
203               (adicJetCoefficientSection E V hsep a x)
204           rw [transition_exactQuotientToCompletionCoordinate E V hab]
205           change exactQuotientToCompletionCoordinate E V (a + 1)
206               (adicJetTransition E V hab'
207                 (adicJetCoefficientSection E V hsep b x)) =
208             exactQuotientToCompletionCoordinate E V (a + 1)
209               (adicJetCoefficientSection E V hsep a x)
210           exact congrArg (exactQuotientToCompletionCoordinate E V (a + 1))
211             (DFunLike.congr_fun
212               (adicJetCoefficientSection_compatible E V hsep hab') x)
213 
214 /-- The compatible finite-level sections assemble to an actual
215 `E`-algebra coefficient section in the adic completion. -/
216 def completedCoefficientSection
217     (hsep : Algebra.IsSeparable E (K V)) :
218     K V →ₐ[E] AdicCompletion (m V) V where
219   toFun x :=
220     ⟨fun n ↦ completionCoordinateSection E V hsep n x,
221       fun hab ↦ completionCoordinateSection_compatible E V hsep hab x⟩
222   map_one' := AdicCompletion.ext fun n ↦
223     (completionCoordinateSection E V hsep n).map_one
224   map_mul' x y := AdicCompletion.ext fun n ↦
225     (completionCoordinateSection E V hsep n).map_mul x y
226   map_zero' := AdicCompletion.ext fun n ↦
227     (completionCoordinateSection E V hsep n).map_zero
228   map_add' x y := AdicCompletion.ext fun n ↦
229     (completionCoordinateSection E V hsep n).map_add x y
230   commutes' e := AdicCompletion.ext fun n ↦
231     (completionCoordinateSection E V hsep n).commutes e
232 
233 /-- Evaluation of the completed section at every positive level recovers the
234 finite-level section constructed by formal etaleness. -/
235 theorem eval_completedCoefficientSection
236     (hsep : Algebra.IsSeparable E (K V)) (n : ℕ) :
237     ((AdicCompletion.evalₐ (m V) (n + 1)).restrictScalars E).comp
238         (completedCoefficientSection E V hsep) =
239       adicJetCoefficientSection E V hsep n := by
240   ext x
241   simp only [AlgHom.comp_apply, AlgHom.restrictScalars_apply,
242     completedCoefficientSection, AdicCompletion.evalₐ, AdicCompletion.eval_apply,
243     completionCoordinateSection, exactQuotientToCompletionCoordinate]
244   have h : ((m V) ^ (n + 1) • ⊤ : Ideal V) = (m V) ^ (n + 1) := by
245     ext y
246     simp
247   change (Ideal.quotientEquivAlgOfEq V h)
248       ((Ideal.quotientEquivAlgOfEq V h).symm
249         (adicJetCoefficientSection E V hsep n x)) =
250     adicJetCoefficientSection E V hsep n x
251   exact (Ideal.quotientEquivAlgOfEq V h).apply_symm_apply _
252 
253 /-- Residue specialization of the completion is evaluation modulo `m`,
254 followed by the ordinary residue map. -/
255 def completedResidue :
256     AdicCompletion (m V) V →ₐ[E] K V :=
257   (adicJetResidue E V 0).comp
258     ((AdicCompletion.evalₐ (m V) 1).restrictScalars E)
259 
260 /-- The adic-completion coefficient map is an actual section of residue. -/
261 @[simp]
262 theorem completedResidue_comp_completedCoefficientSection
263     (hsep : Algebra.IsSeparable E (K V)) :
264     (completedResidue E V).comp (completedCoefficientSection E V hsep) =
265       AlgHom.id E (K V) := by
266   ext x
267   change adicJetResidue E V 0
268       (AdicCompletion.evalₐ (m V) 1
269         (completedCoefficientSection E V hsep x)) = x
270   have heval :=
271     DFunLike.congr_fun (eval_completedCoefficientSection E V hsep 0) x
272   change AdicCompletion.evalₐ (m V) 1
273       (completedCoefficientSection E V hsep x) =
274     adicJetCoefficientSection E V hsep 0 x at heval
275   rw [heval]
276   exact DFunLike.congr_fun
277     (adicJetResidue_comp_adicJetCoefficientSection E V hsep 0) x
278 
279 end LocalAlgebra
280 
281 section RetainedDVR
282 
283 /-- The actual residue-field coefficient section in the maximal-ideal adic
284 completion of a retained DVR place. -/
285 def retainedCompletedCoefficientSection
286     (E : Type u) [Field E] [CharZero E]
287     {L : Type u} [Field L] [Algebra (SourceDVR E) L]
288     {a : SourceDVR E}
289     (D : RetainedDVRPlace (SourceDVR E) (L := L) a) :
290     letI : IsDiscreteValuationRing D.valuation.toSubring := D.isDiscrete
291     letI : Algebra E D.valuation.toSubring :=
292       (relativeCoefficientMap E D).toAlgebra
293     ResidueField D.valuation.toSubring →ₐ[E]
294       AdicCompletion (maximalIdeal D.valuation.toSubring)
295         D.valuation.toSubring := by
296   letI : IsDiscreteValuationRing D.valuation.toSubring := D.isDiscrete
297   letI : Algebra E D.valuation.toSubring :=
298     (relativeCoefficientMap E D).toAlgebra
299   exact completedCoefficientSection E D.valuation.toSubring
300     (relativeResidue_isSeparable E D)
301 
302 /-- The retained completed coefficient section is split by completed residue
303 specialization. -/
304 theorem retainedCompletedCoefficientSection_isSection
305     (E : Type u) [Field E] [CharZero E]
306     {L : Type u} [Field L] [Algebra (SourceDVR E) L]
307     {a : SourceDVR E}
308     (D : RetainedDVRPlace (SourceDVR E) (L := L) a) :
309     letI : IsDiscreteValuationRing D.valuation.toSubring := D.isDiscrete
310     letI : Algebra E D.valuation.toSubring :=
311       (relativeCoefficientMap E D).toAlgebra
312     (completedResidue E D.valuation.toSubring).comp
313         (retainedCompletedCoefficientSection E D) =
314       AlgHom.id E (ResidueField D.valuation.toSubring) := by
315   letI : IsDiscreteValuationRing D.valuation.toSubring := D.isDiscrete
316   letI : Algebra E D.valuation.toSubring :=
317     (relativeCoefficientMap E D).toAlgebra
318   exact completedResidue_comp_completedCoefficientSection E
319     D.valuation.toSubring (relativeResidue_isSeparable E D)
320 
321 end RetainedDVR
322 
323 #print axioms adicJetResidue
324 #print axioms adicJetResidue_surjective
325 #print axioms adicJetResidue_kernel_isNilpotent
326 #print axioms adicJetCoefficientSection
327 #print axioms adicJetCoefficientSection_compatible
328 #print axioms completionCoordinateSection_compatible
329 #print axioms completedCoefficientSection
330 #print axioms eval_completedCoefficientSection
331 #print axioms completedResidue
332 #print axioms completedResidue_comp_completedCoefficientSection
333 #print axioms retainedCompletedCoefficientSection
334 #print axioms retainedCompletedCoefficientSection_isSection
335 
336 end
337 
338 end Stafford38.Geometry.CompletedDVRCoefficientSection
339