Stafford38/Paper/Section4/Residue.lean

This project (Stafford38) Β· 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 
3 public import Stafford38.Paper.Section4.Euler
4 public import Stafford38.Paper.Section2.Weyl
5 public import Stafford38.Paper.Section3.Transport
6 
7 @[expose] public section
8 
9 /-!
10 # Lemma 4.2: the Euler residue `1 + uβ‚€ x₁ ∈ π“˜`
11 
12 The proof of Lemma 4.2 has three paragraphs: the Bezout identity for the
13 Euler products `R_±` of Lemma 4.1, the expansion `d̃ = p^N + Σ` giving
14 `1 + w ∈ π“˜`, and the positivity `w ∈ A_{β‰₯0} x₁`.  Each is a declaration below,
15 first for an arbitrary ring with a Weyl pair, then for the presented Weyl
16 algebra.
17 -/
18 
19 namespace Stafford38.Paper.Section4
20 
21 open Stafford
22 open Stafford38.EulerSurjectivity
23 open Stafford38.WeylEulerSubring
24 open Stafford38.WeylEulerResidue
25 open Stafford38.WeylEulerRemainder
26 open Stafford38.WeylIteratedEquivalence
27 open Stafford38.WeylPBWMonicBridge
28 open Stafford38.WeylQuotientTransport
29 open Stafford38.OrePairStage
30 open Stafford38.OreIteratedPairStage
31 
32 noncomputable section
33 
34 section Generic
35 
36 /-- Products over lists of pairwise coprime factors are coprime. -/
37 theorem isCoprime_list_prod {R : Type*} [CommRing R] (l₁ lβ‚‚ : List R)
38     (h : βˆ€ a ∈ l₁, βˆ€ b ∈ lβ‚‚, IsCoprime a b) : IsCoprime l₁.prod lβ‚‚.prod := by
39   induction l₁ with
40   | nil => exact isCoprime_one_left
41   | cons a l₁ ih =>
42       rw [List.prod_cons]
43       refine IsCoprime.mul_left ?_ (ih fun a' ha' => h a' (List.mem_cons_of_mem _ ha'))
44       have ha := h a List.mem_cons_self
45       clear ih h
46       induction lβ‚‚ with
47       | nil => exact isCoprime_one_right
48       | cons b lβ‚‚ ihβ‚‚ =>
49           rw [List.prod_cons]
50           exact (ha b List.mem_cons_self).mul_right
51             (ihβ‚‚ fun b' hb' => ha b' (List.mem_cons_of_mem _ hb'))
52 
53 /-- `R_+(E) = ∏_{r=1}^N (E+r)` and `R_-(E) = ∏_{r=0}^{N-1}(Eβˆ’r)` have the disjoint
54 root sets `{βˆ’1,…,βˆ’N}` and `{0,…,Nβˆ’1}`, so `gcd(R_+, R_-) = 1` in `β„š[E]`. -/
55 theorem step_4_2_coprime (N : β„•) :
56     IsCoprime
57       ((List.range' 1 N).map fun r : β„• => (Polynomial.X + Polynomial.C (r : β„š))).prod
58       ((List.range N).map fun r : β„• => (Polynomial.X - Polynomial.C (r : β„š))).prod := by
59   apply isCoprime_list_prod
60   intro a ha b hb
61   obtain ⟨r, hr, rfl⟩ := List.mem_map.mp ha
62   obtain ⟨s, -, rfl⟩ := List.mem_map.mp hb
63   have hr1 : 1 ≀ r := (List.mem_range'_1.mp hr).1
64   have hunit : IsUnit (-(r : β„š) - s) := by
65     apply isUnit_iff_ne_zero.mpr
66     have : (1 : β„š) ≀ r := by exact_mod_cast hr1
67     have : (0 : β„š) ≀ s := by positivity
68     linarith
69   have := Polynomial.isCoprime_X_sub_C_of_isUnit_sub hunit
70   simpa [sub_eq_add_neg] using this
71 
72 variable {A : Type*} [Ring A] [Algebra β„š A]
73 
74 /-- Evaluating `R_Β±` at `E` gives the products of Lemma 4.1. -/
75 theorem step_4_2_eval_products (x p : A) (N : β„•) :
76     eulerPolynomialEval x p
77         ((List.range' 1 N).map fun r : β„• => (Polynomial.X + Polynomial.C (r : β„š))).prod =
78       ((List.range' 1 N).map fun i : β„• => eulerElement x p + i).prod ∧
79     eulerPolynomialEval x p
80         ((List.range N).map fun r : β„• => (Polynomial.X - Polynomial.C (r : β„š))).prod =
81       ((List.range N).map fun i : β„• => eulerElement x p - i).prod := by
82   constructor <;>
83   Β· rw [map_list_prod, List.map_map]
84     congr 1
85     refine List.map_congr_left fun r _ => ?_
86     simp [eulerElement]
87 
88 /-- **First paragraph of the proof of Lemma 4.2.**  By Lemma 4.1 (the
89 hypothesis `h41`, the product identities for `m = N`) and the extended Euclidean
90 algorithm in `β„š[E]` there are `u, v ∈ β„š[E]` with
91 `p^N x₁^N u(E) + x₁^N p^N v(E) = 1`. -/
92 theorem step_4_2_bezout (x p : A) (N : β„•)
93     (h41 : 1 ≀ N β†’
94       x ^ N * p ^ N = ((List.range N).map fun i : β„• => eulerElement x p - i).prod ∧
95         p ^ N * x ^ N = ((List.range' 1 N).map fun i : β„• => eulerElement x p + i).prod) :
96     βˆƒ u v : Polynomial β„š,
97       (p ^ N * x ^ N) * eulerPolynomialEval x p u +
98         (x ^ N * p ^ N) * eulerPolynomialEval x p v = 1 := by
99   obtain ⟨u, v, huv⟩ := step_4_2_coprime N
100   refine ⟨u, v, ?_⟩
101   rw [mul_comm u, mul_comm v] at huv
102   have h := congrArg (eulerPolynomialEval x p) huv
103   rw [map_add, map_mul, map_mul, map_one] at h
104   rcases Nat.eq_zero_or_pos N with rfl | hN
105   Β· simpa [add_comm] using h
106   obtain ⟨hminus, hplus⟩ := h41 hN
107   rw [(step_4_2_eval_products x p N).1, (step_4_2_eval_products x p N).2,
108     ← hplus, ← hminus] at h
109   exact h
110 
111 /-- **Second paragraph.**  With `d̃ = p^N + Σ`,
112 `(dΜƒ x₁^N) u(E) + (x₁^N dΜƒ) v(E) = 1 + w ∈ π“˜`, where
113 `w = Ξ£ x₁^N u(E) + x₁^N Ξ£ v(E)` and `π“˜ = dΜƒA + x₁^N dΜƒA`. -/
114 theorem step_4_2_residue (x p d sigma : A) (N : β„•) (u v : Polynomial β„š)
115     (hd : d = p ^ N + sigma)
116     (hbezout : (p ^ N * x ^ N) * eulerPolynomialEval x p u +
117         (x ^ N * p ^ N) * eulerPolynomialEval x p v = 1) :
118     (d * x ^ N) * eulerPolynomialEval x p u + (x ^ N * d) * eulerPolynomialEval x p v =
119         1 + ((sigma * x ^ N) * eulerPolynomialEval x p u +
120           (x ^ N * sigma) * eulerPolynomialEval x p v) ∧
121       1 + ((sigma * x ^ N) * eulerPolynomialEval x p u +
122           (x ^ N * sigma) * eulerPolynomialEval x p v) ∈ canonicalRightIdeal x d N := by
123   have hid := positiveEulerResidue_identity x p d sigma
124     (eulerPolynomialEval x p u) (eulerPolynomialEval x p v) N hd hbezout
125   rw [← mul_assoc] at hid
126   refine ⟨hid, ?_⟩
127   rw [← hid]
128   refine (canonicalRightIdeal x d N).add_mem ?_ ?_
129   Β· rw [mul_assoc]
130     change MulOpposite.op (x ^ N * eulerPolynomialEval x p u) β€’ d ∈
131       canonicalRightIdeal x d N
132     exact (canonicalRightIdeal x d N).smul_mem _ (firstGenerator_mem x d N)
133   Β· change MulOpposite.op (eulerPolynomialEval x p v) β€’ (x ^ N * d) ∈
134       canonicalRightIdeal x d N
135     exact (canonicalRightIdeal x d N).smul_mem _ (secondGenerator_mem x d N)
136 
137 /-- `u(E)` and `v(E)` depend only on `E`, so they have Euler degree `0`. -/
138 theorem step_4_2_eulerPolynomial_degree_zero (x p : A) (f : Polynomial β„š) :
139     eulerPolynomialEval x p f ∈ eulerDegree x p 0 := by
140   induction f using Polynomial.induction_on' with
141   | add f g hf hg =>
142       rw [map_add]
143       exact add_mem hf hg
144   | monomial l q =>
145       rw [← Polynomial.C_mul_X_pow_eq_monomial, map_mul, map_pow, eulerPolynomialEval_C,
146         eulerPolynomialEval_X]
147       have hq : algebraMap β„š A q ∈ eulerDegree x p 0 :=
148         mem_eulerDegree_zero_of_commute (Algebra.commutes q x) (Algebra.commutes q p)
149       simpa using eulerDegree_mul hq (eulerDegree_pow (euler_mem_eulerDegree x p) l)
150 
151 /-- **Third paragraph.**  `Ξ£ x₁^N` and `x₁^N Ξ£` have positive Euler degree
152 (`step_4_2_presented_remainder` for the presented `d̃`) and `u(E), v(E)` have
153 degree `0`, so every term of `w = Ξ£ x₁^N u(E) + x₁^N Ξ£ v(E)` has positive Euler
154 degree; hence `w ∈ A_{β‰₯0} x₁` (the hypothesis `hpos`, which is
155 `step_positive_mem_nonnegative_mul_coordinate` for `A_n`). -/
156 theorem step_4_2_positive (x p sigma : A) (N : β„•)
157     (hright : sigma * x ^ N ∈ positivePart x p) (hleft : x ^ N * sigma ∈ positivePart x p)
158     (hpos : βˆ€ z ∈ positivePart x p, βˆƒ uβ‚€ ∈ nonnegativePart x p, z = uβ‚€ * x)
159     (u v : Polynomial β„š) :
160     βˆƒ uβ‚€ ∈ nonnegativePart x p,
161       (sigma * x ^ N) * eulerPolynomialEval x p u +
162         (x ^ N * sigma) * eulerPolynomialEval x p v = uβ‚€ * x :=
163   hpos _ (add_mem
164     (positivePart_mul_eulerDegree_zero hright (step_4_2_eulerPolynomial_degree_zero x p u))
165     (positivePart_mul_eulerDegree_zero hleft (step_4_2_eulerPolynomial_degree_zero x p v)))
166 
167 /-- Lemma 4.2 for a Weyl pair, assembled from the three paragraphs, given the
168 identities of Lemma 4.1 for `m = N`. -/
169 theorem lemma_4_2_of_positive (x p d sigma : A) (N : β„•)
170     (h41 : 1 ≀ N β†’
171       x ^ N * p ^ N = ((List.range N).map fun i : β„• => eulerElement x p - i).prod ∧
172         p ^ N * x ^ N = ((List.range' 1 N).map fun i : β„• => eulerElement x p + i).prod)
173     (hd : d = p ^ N + sigma)
174     (hright : sigma * x ^ N ∈ positivePart x p) (hleft : x ^ N * sigma ∈ positivePart x p)
175     (hpos : βˆ€ z ∈ positivePart x p, βˆƒ uβ‚€ ∈ nonnegativePart x p, z = uβ‚€ * x) :
176     βˆƒ uβ‚€ ∈ nonnegativePart x p, 1 + uβ‚€ * x ∈ canonicalRightIdeal x d N := by
177   obtain ⟨u, v, hbez⟩ := step_4_2_bezout x p N h41
178   obtain ⟨-, hmem⟩ := step_4_2_residue x p d sigma N u v hd hbez
179   obtain ⟨uβ‚€, huβ‚€, hw⟩ := step_4_2_positive x p sigma N hright hleft hpos u v
180   exact ⟨uβ‚€, huβ‚€, hw β–Έ hmem⟩
181 
182 end Generic
183 
184 /-! ## The presented Weyl algebra -/
185 
186 section Presented
187 
188 universe u
189 
190 variable (k : Type u) [Field k] [Algebra β„š k] (n : β„•)
191 
192 variable {k n}
193 
194 /-- **Positivity of the remainder for `dΜƒ`.**  Write `Ξ£ = dΜƒ βˆ’ p^N` in PBW form:
195 a sum of terms `b x₁^a p^j` with `j < N` (`presentedRemainder_outer_support_lt`).
196 Such a term has Euler degree `a βˆ’ j`, so multiplied by `x₁^N` on either side it has
197 Euler degree `a + N βˆ’ j β‰₯ N βˆ’ j > 0`.  Hence `Ξ£ x₁^N` and `x₁^N Ξ£` have positive
198 Euler degree. -/
199 theorem step_4_2_presented_remainder {N : β„•} {d : PresentedWeyl k (n + 1)}
200     (hd : IsPBWMonicAt k (.inr (0 : Fin (n + 1))) N d) :
201     (d - presentedMomentum k n ^ N) * presentedCoordinate k n ^ N ∈
202         presentedPositivePart k n ∧
203       presentedCoordinate k n ^ N * (d - presentedMomentum k n ^ N) ∈
204         presentedPositivePart k n := by
205   have hxN := eulerDegree_pow (coordinate_mem_eulerDegree
206     (pairMomentum_mul_coordinate (B := IteratedPairStage k n))) N
207   have hpair := pairStage_pbw_induction (IteratedPairStage k n) (Β· < N)
208     (fun z => z * pairCoordinate ^ N ∈ positivePart pairCoordinate pairMomentum ∧
209       pairCoordinate ^ N * z ∈ positivePart pairCoordinate pairMomentum)
210     ⟨by simp, by simp⟩
211     (fun y z hy hz => ⟨by rw [add_mul]; exact add_mem hy.1 hz.1,
212       by rw [mul_add]; exact add_mem hy.2 hz.2⟩)
213     (fun b a j hj => by
214       have hmono := pairMonomial_mem_eulerDegree (IteratedPairStage k n) b a j
215       exact ⟨mem_positivePart_of_mem (by omega) (eulerDegree_mul hmono hxN),
216         mem_positivePart_of_mem (by omega) (eulerDegree_mul hxN hmono)⟩)
217     (presentedToIterated k (n + 1) d - stageMomentum k n ^ N)
218     (presentedRemainder_outer_support_lt k n N hd)
219   have hσ : fromIterated k n (presentedToIterated k (n + 1) d - stageMomentum k n ^ N) =
220       d - presentedMomentum k n ^ N := by
221     change (presentedIteratedEquiv k (n + 1)).symm
222       (presentedIteratedEquiv k (n + 1) d - stageMomentum k n ^ N) = _
223     rw [map_sub, AlgEquiv.symm_apply_apply, map_pow]
224     congr 2
225     exact fromIterated_momentum k n
226   have hright := map_mem_positivePart (fromIterated k n) (fromIterated_coordinate k n)
227     (fromIterated_momentum k n) hpair.1
228   have hleft := map_mem_positivePart (fromIterated k n) (fromIterated_coordinate k n)
229     (fromIterated_momentum k n) hpair.2
230   rw [RingHom.map_mul (fromIterated k n)
231       (presentedToIterated k (n + 1) d - stageMomentum k n ^ N),
232     RingHom.map_pow (fromIterated k n) pairCoordinate N, hσ, fromIterated_coordinate] at hright
233   rw [RingHom.map_mul (fromIterated k n) (pairCoordinate ^ N)
234       (presentedToIterated k (n + 1) d - stageMomentum k n ^ N),
235     RingHom.map_pow (fromIterated k n) pairCoordinate N, hσ, fromIterated_coordinate] at hleft
236   exact ⟨hright, hleft⟩
237 
238 /-- **Lemma 4.2.** For `dΜƒ` in the form (3.1) and `π“˜ = dΜƒA_n + x₁^N dΜƒA_n`
239 (Equation (3.2)), there is `uβ‚€ ∈ A_{β‰₯0}` with `1 + uβ‚€ x₁ ∈ π“˜`.  The proof uses
240 (3.1) only through its consequence `IsPBWMonicAt`
241 (`Section3.isPBWMonicAt_of_isMonicNormalForm`), and cites Lemma 4.1 for `m = N`. -/
242 theorem lemma_4_2 {N : β„•} {d : PresentedWeyl k (n + 1)}
243     (hform : Stafford38.Paper.Section3.IsMonicNormalForm k N d) :
244     βˆƒ uβ‚€ ∈ presentedNonnegativePart k n,
245       1 + uβ‚€ * presentedCoordinate k n ∈ Stafford38.Paper.Section3.idealI k N d := by
246   let := presentedRatAlgebra k n
247   have hd := Stafford38.Paper.Section3.isPBWMonicAt_of_isMonicNormalForm k hform
248   obtain ⟨hright, hleft⟩ := step_4_2_presented_remainder hd
249   exact lemma_4_2_of_positive (presentedCoordinate k n) (presentedMomentum k n) d
250     (d - presentedMomentum k n ^ N) N
251     (fun hN => ⟨(lemma_4_1 k n N hN).1, (lemma_4_1 k n N hN).2.1⟩)
252     (by abel) hright hleft (step_positive_mem_nonnegative_mul_coordinate k n)
253 
254 end Presented
255 
256 #print axioms step_4_2_coprime
257 #print axioms step_4_2_bezout
258 #print axioms step_4_2_eulerPolynomial_degree_zero
259 #print axioms step_4_2_residue
260 #print axioms step_4_2_positive
261 #print axioms lemma_4_2_of_positive
262 #print axioms step_4_2_presented_remainder
263 #print axioms lemma_4_2
264 
265 end
266 
267 end Stafford38.Paper.Section4
268