Stafford38/Paper/Section4/Euler.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 
3 public import Stafford38.Weyl.QuotientTransport
4 public import Stafford38.Weyl.EulerRemainder
5 public import Stafford38.Weyl.EulerSubring
6 public import Stafford38.Weyl.PaperEulerGrading
7 public import Stafford38.Paper.Section2.Weyl
8 public import Mathlib.LinearAlgebra.Eigenspace.Basic
9 
10 @[expose] public section
11 
12 /-!
13 # Section 4, first part: the Euler grading, Lemmas 4.1, 4.2 and Proposition 4.3
14 
15 `E = x₁ p` with `p = ∂₁`.  The paragraph before Lemma 4.1 introduces the
16 Euler grading, the nonnegative part `A_{≥0}` and the normality of `x₁` in it.
17 Lemma 4.1 computes `x₁^m p^m` and `p^m x₁^m` as products of Euler factors,
18 Lemma 4.2 produces `1 + u₀ x₁ ∈ 𝓘`, and Proposition 4.3 proves `Q = Q x₁`.
19 
20 The ring-theoretic paragraphs are stated for an arbitrary ring `A` with
21 `p x₁ = x₁ p + 1`; the paper's statements are their specializations to the
22 presented Weyl algebra `A_n = PresentedWeyl k (n+1)` (Lean indexes the
23 coordinates from `0`, so the paper's `x₁` is `presentedCoordinate k n` and the
24 transverse algebra `A_{n-1}` is the image of `previousWeylEmbedding k n`), the
25 normalized element `d̃` (`IsPBWMonicAt … N d`) and the right ideal
26 `𝓘 = d̃ A_n + x₁^N d̃ A_n` (`presentedCanonicalRightIdeal n N d`).
27 
28 The Euler grading is defined as in the paper, by the eigenspaces of the
29 commutator with `E` (`eulerDegree`), and `A_{≥0}` is its nonnegative part
30 (`nonnegativePart`).  The PBW description of `A_{≥0}` and the statement that
31 elements of Euler degree `≥ 1` lie in `A_{≥0} x₁` need the PBW basis and are
32 proved for `A_n` through one Ore pair stage `A_n ≃ PairStage(A_{n-1})`.
33 -/
34 
35 namespace Stafford38.Paper.Section4
36 
37 open Stafford
38 open Stafford38.EulerSurjectivity
39 open Stafford38.WeylEulerSubring
40 open Stafford38.WeylEulerResidue
41 open Stafford38.WeylEulerRemainder
42 open Stafford38.WeylIteratedEquivalence
43 open Stafford38.WeylPBWMonicBridge
44 open Stafford38.WeylQuotientTransport
45 open Stafford38.OrePairStage
46 open Stafford38.OreIteratedPairStage
47 
48 noncomputable section
49 
50 /-! ## The Euler grading paragraph (tex 523–543) -/
51 
52 section Grading
53 
54 variable {A : Type*} [Ring A]
55 
56 /-- The Euler element `E = x₁ p`. -/
57 abbrev eulerElement (x p : A) : A := x * p
58 
59 /-- The commutator `[E, ·]` with `E = x₁ p`, an additive endomorphism of `A`. -/
60 def eulerCommutator (x p : A) : Module.End ℤ A :=
61   LinearMap.mulLeft ℤ (eulerElement x p) - LinearMap.mulRight ℤ (eulerElement x p)
62 
63 /-- The part of Euler degree `m` of the grading defined by the commutator of `E`:
64 the elements `z` with `[E, z] = m z`. -/
65 def eulerDegree (x p : A) (m : ℤ) : Submodule ℤ A :=
66   Module.End.eigenspace (eulerCommutator x p) m
67 
68 theorem mem_eulerDegree {x p z : A} {m : ℤ} :
69     z ∈ eulerDegree x p m ↔ eulerElement x p * z - z * eulerElement x p = m • z := by
70   rw [eulerDegree, Module.End.mem_eigenspace_iff]
71   rfl
72 
73 /-- The grading is multiplicative: `[E, ·]` is a derivation. -/
74 theorem eulerDegree_mul {x p y z : A} {m m' : ℤ} (hy : y ∈ eulerDegree x p m)
75     (hz : z ∈ eulerDegree x p m') : y * z ∈ eulerDegree x p (m + m') := by
76   rw [mem_eulerDegree] at hy hz ⊢
77   calc eulerElement x p * (y * z) - y * z * eulerElement x p
78       = (eulerElement x p * y - y * eulerElement x p) * z +
79           y * (eulerElement x p * z - z * eulerElement x p) := by noncomm_ring
80     _ = (m + m') • (y * z) := by rw [hy, hz, smul_mul_assoc, mul_smul_comm, add_smul]
81 
82 theorem eulerDegree_pow {x p z : A} {m : ℤ} (hz : z ∈ eulerDegree x p m) :
83     ∀ l : ℕ, z ^ l ∈ eulerDegree x p (l * m)
84   | 0 => by rw [pow_zero, mem_eulerDegree]; simp
85   | l + 1 => by
86       rw [pow_succ]
87       convert eulerDegree_mul (eulerDegree_pow hz l) hz using 2
88       push_cast
89       ring
90 
91 /-- Elements commuting with `x₁` and `p` have Euler degree `0`. -/
92 theorem mem_eulerDegree_zero_of_commute {x p c : A} (hx : c * x = x * c)
93     (hp : c * p = p * c) : c ∈ eulerDegree x p 0 := by
94   rw [mem_eulerDegree, zero_smul, sub_eq_zero, eulerElement, mul_assoc, ← hp, ← mul_assoc,
95     ← hx, mul_assoc]
96 
97 /-- `x₁` has Euler degree `1`. -/
98 theorem coordinate_mem_eulerDegree {x p : A} (hweyl : p * x = x * p + 1) :
99     x ∈ eulerDegree x p 1 := by
100   rw [mem_eulerDegree, eulerElement, mul_assoc, hweyl]
101   noncomm_ring
102 
103 /-- `E` has Euler degree `0`. -/
104 theorem euler_mem_eulerDegree (x p : A) : eulerElement x p ∈ eulerDegree x p 0 := by
105   rw [mem_eulerDegree]
106   simp
107 
108 /-- `A_{≥0}`, the nonnegative part of `A` in the Euler grading: the sum of the
109 parts of Euler degree `m ≥ 0`.  It is a subring because the grading is
110 multiplicative. -/
111 def nonnegativePart (x p : A) : Subring A :=
112   { (⨆ m : ℕ, eulerDegree x p m).toAddSubgroup with
113     one_mem' := Submodule.mem_iSup_of_mem 0 (by
114       rw [mem_eulerDegree]; simp)
115     mul_mem' := by
116       intro a b ha hb
117       change a * b ∈ ⨆ m : ℕ, eulerDegree x p m
118       refine Submodule.iSup_induction _ (motive := fun a => a * b ∈ ⨆ m : ℕ, eulerDegree x p m)
119         ha (fun m a ha => ?_) (by simp) (fun a a' h h' => by rw [add_mul]; exact add_mem h h')
120       refine Submodule.iSup_induction _ (motive := fun b => a * b ∈ ⨆ m : ℕ, eulerDegree x p m)
121         hb (fun m' b hb => ?_) (by simp) (fun b b' h h' => by rw [mul_add]; exact add_mem h h')
122       exact Submodule.mem_iSup_of_mem (m + m')
123         (by simpa only [Nat.cast_add] using eulerDegree_mul ha hb) }
124 
125 theorem mem_nonnegativePart {x p z : A} :
126     z ∈ nonnegativePart x p ↔ z ∈ ⨆ m : ℕ, eulerDegree x p m := Iff.rfl
127 
128 /-- The elements of Euler degree `≥ 1`: the sum of the parts of degree `m ≥ 1`. -/
129 def positivePart (x p : A) : Submodule ℤ A :=
130   ⨆ m : ℕ, eulerDegree x p (m + 1 : ℕ)
131 
132 theorem mem_positivePart_of_mem {x p z : A} {m : ℤ} (hm : 1 ≤ m)
133     (hz : z ∈ eulerDegree x p m) : z ∈ positivePart x p := by
134   obtain ⟨l, rfl⟩ : ∃ l : ℕ, m = (l + 1 : ℕ) := ⟨m.toNat - 1, by omega⟩
135   exact Submodule.mem_iSup_of_mem l hz
136 
137 /-- Multiplying an element of degree `≥ 1` by one of degree `0` keeps degree `≥ 1`. -/
138 theorem positivePart_mul_eulerDegree_zero {x p z y : A} (hz : z ∈ positivePart x p)
139     (hy : y ∈ eulerDegree x p 0) : z * y ∈ positivePart x p := by
140   refine Submodule.iSup_induction _ (motive := fun z => z * y ∈ positivePart x p) hz
141     (fun m z hz => ?_) (by simp) (fun z z' h h' => by rw [add_mul]; exact add_mem h h')
142   exact Submodule.mem_iSup_of_mem m (by simpa only [add_zero] using eulerDegree_mul hz hy)
143 
144 /-- `x₁` and `E` lie in `A_{≥0}`. -/
145 theorem coordinate_mem_nonnegativePart {x p : A} (hweyl : p * x = x * p + 1) :
146     x ∈ nonnegativePart x p :=
147   Submodule.mem_iSup_of_mem 1 (by simpa using coordinate_mem_eulerDegree hweyl)
148 
149 theorem euler_mem_nonnegativePart (x p : A) : eulerElement x p ∈ nonnegativePart x p :=
150   Submodule.mem_iSup_of_mem 0 (by simpa using euler_mem_eulerDegree x p)
151 
152 /-- The transverse algebra `C`, `E` and `x₁` lie in `A_{≥0}`, hence so does the
153 subring they generate. -/
154 theorem eulerSubring_le_nonnegativePart (C : Subring A) (x p : A)
155     (hweyl : p * x = x * p + 1)
156     (hcomm : ∀ c ∈ C, c * x = x * c ∧ c * p = p * c) :
157     eulerSubring C x p ≤ nonnegativePart x p := by
158   apply Subring.closure_le.2
159   rintro a (ha | ha)
160   · exact Submodule.mem_iSup_of_mem 0
161       (by simpa using mem_eulerDegree_zero_of_commute (hcomm a ha).1 (hcomm a ha).2)
162   · simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at ha
163     rcases ha with rfl | rfl
164     · exact coordinate_mem_nonnegativePart hweyl
165     · exact euler_mem_nonnegativePart _ _
166 
167 /-- A ring map sending `x₁, p` to `x₁', p'` preserves Euler degrees. -/
168 theorem map_mem_eulerDegree {A' : Type*} [Ring A'] (φ : A →+* A') {x p : A} {x' p' : A'}
169     (hx : φ x = x') (hp : φ p = p') {m : ℤ} {z : A} (hz : z ∈ eulerDegree x p m) :
170     φ z ∈ eulerDegree x' p' m := by
171   subst hx hp
172   rw [mem_eulerDegree] at hz ⊢
173   simpa only [eulerElement, map_sub, map_mul, map_zsmul] using congrArg φ hz
174 
175 theorem map_mem_nonnegativePart {A' : Type*} [Ring A'] (φ : A →+* A') {x p : A}
176     {x' p' : A'} (hx : φ x = x') (hp : φ p = p') {z : A} (hz : z ∈ nonnegativePart x p) :
177     φ z ∈ nonnegativePart x' p' := by
178   refine Submodule.iSup_induction _ (motive := fun z => φ z ∈ nonnegativePart x' p')
179     (mem_nonnegativePart.mp hz) (fun m z hz => ?_) (by simp)
180     (fun z z' h h' => by rw [map_add]; exact add_mem h h')
181   exact Submodule.mem_iSup_of_mem m (map_mem_eulerDegree φ hx hp hz)
182 
183 theorem map_mem_positivePart {A' : Type*} [Ring A'] (φ : A →+* A') {x p : A}
184     {x' p' : A'} (hx : φ x = x') (hp : φ p = p') {z : A} (hz : z ∈ positivePart x p) :
185     φ z ∈ positivePart x' p' := by
186   refine Submodule.iSup_induction _ (motive := fun z => φ z ∈ positivePart x' p')
187     hz (fun m z hz => ?_) (by simp) (fun z z' h h' => by rw [map_add]; exact add_mem h h')
188   exact Submodule.mem_iSup_of_mem m (map_mem_eulerDegree φ hx hp hz)
189 
190 /-- **Equation (nonnegative-pbw).**  `E x₁ = x₁(E+1)`, `x₁E = (E−1)x₁`,
191 `Ep = p(E−1)`, `pE = (E+1)p`, from `p x₁ = x₁ p + 1`. -/
192 theorem eq_nonnegative_pbw (x p : A) (hweyl : p * x = x * p + 1) :
193     eulerElement x p * x = x * (eulerElement x p + 1) ∧
194       x * eulerElement x p = (eulerElement x p - 1) * x ∧
195       eulerElement x p * p = p * (eulerElement x p - 1) ∧
196       p * eulerElement x p = (eulerElement x p + 1) * p := by
197   simp only [eulerElement]
198   refine ⟨?_, ?_, ?_, ?_⟩
199   · rw [mul_assoc, hweyl]
200   · rw [sub_mul, one_mul, mul_assoc x p x, hweyl]
201     noncomm_ring
202   · rw [mul_sub, mul_one, ← mul_assoc p x p, hweyl]
203     noncomm_ring
204   · rw [← mul_assoc, hweyl]
205 
206 /-- **Normality of `x₁` in `A_{≥0}`.**  `x₁` commutes with the transverse
207 algebra `C`; once `A_{≥0}` is known to be generated by `C`, `E` and `x₁`
208 (`step_nonnegative_pbw` for `A_n`), for every `r ∈ A_{≥0}` there is
209 `r' ∈ A_{≥0}` with `x₁ r = r' x₁`.  Only this one-sided normality is used later. -/
210 theorem step_coordinate_normal (C : Subring A) (x p : A)
211     (hweyl : p * x = x * p + 1)
212     (hcomm : ∀ c : C, x * (c : A) = (c : A) * x)
213     (hpbw : nonnegativePart x p = eulerSubring C x p) :
214     ∀ r ∈ nonnegativePart x p, ∃ r' ∈ nonnegativePart x p, x * r = r' * x := by
215   rw [hpbw]
216   intro r hr
217   obtain ⟨s, hs⟩ := coordinate_normal_eulerSubring C x p hweyl hcomm ⟨r, hr⟩
218   exact ⟨s, s.property, hs⟩
219 
220 end Grading
221 
222 /-! ## Lemma 4.1 (tex 544–566) -/
223 
224 section Lemma41
225 
226 variable {A : Type*} [Ring A]
227 
228 /-- The factors `E − i` and `E + i` are polynomials in the single element `E`,
229 hence commute with one another. -/
230 theorem step_4_1_factors_commute (x p : A) :
231     (∀ i j : ℕ, Commute (eulerElement x p - i) (eulerElement x p - j)) ∧
232       ∀ i j : ℕ, Commute (eulerElement x p + i) (eulerElement x p + j) := by
233   refine ⟨fun i j => ?_, fun i j => ?_⟩
234   · exact ((Commute.refl _).sub_right (Nat.cast_commute j _).symm).sub_left
235       ((Nat.cast_commute i _).sub_right (Nat.cast_commute i (j : A)))
236   · exact ((Commute.refl _).add_right (Nat.cast_commute j _).symm).add_left
237       ((Nat.cast_commute i _).add_right (Nat.cast_commute i (j : A)))
238 
239 /-- `x₁ ∏(E − c) = ∏(E − 1 − c) x₁` for any list of shifts, from
240 `x₁E = (E−1)x₁`. -/
241 theorem step_4_1_coordinate_shift (x p : A) (hweyl : p * x = x * p + 1)
242     (l : List ℕ) :
243     x * (l.map fun i : ℕ => eulerElement x p - i).prod =
244       (l.map fun i : ℕ => eulerElement x p - 1 - i).prod * x := by
245   have hxE := (eq_nonnegative_pbw x p hweyl).2.1
246   induction l with
247   | nil => simp
248   | cons a l ih =>
249       simp only [List.map_cons, List.prod_cons]
250       rw [← mul_assoc, mul_sub, hxE, ← (Nat.cast_commute a x).eq, ← sub_mul,
251         mul_assoc, ih, mul_assoc]
252 
253 /-- `p ∏(E + c) = ∏(E + 1 + c) p` for any list of shifts, from `pE = (E+1)p`. -/
254 theorem step_4_1_momentum_shift (x p : A) (hweyl : p * x = x * p + 1)
255     (l : List ℕ) :
256     p * (l.map fun i : ℕ => eulerElement x p + i).prod =
257       (l.map fun i : ℕ => eulerElement x p + 1 + i).prod * p := by
258   have hpE := (eq_nonnegative_pbw x p hweyl).2.2.2
259   induction l with
260   | nil => simp
261   | cons a l ih =>
262       simp only [List.map_cons, List.prod_cons]
263       rw [← mul_assoc, mul_add, hpE, ← (Nat.cast_commute a p).eq, ← add_mul,
264         mul_assoc, ih, mul_assoc]
265 
266 /-- Induction step of the first identity:
267 `x₁^{m+1}p^{m+1} = x₁(∏_{i<m}(E−i))p = (∏_{i<m}(E−1−i))x₁p = ∏_{i≤m}(E−i)`. -/
268 theorem step_4_1_falling_succ (x p : A) (hweyl : p * x = x * p + 1) (m : ℕ)
269     (ih : x ^ m * p ^ m = ((List.range m).map fun i : ℕ => eulerElement x p - i).prod) :
270     x ^ (m + 1) * p ^ (m + 1) =
271       ((List.range (m + 1)).map fun i : ℕ => eulerElement x p - i).prod := by
272   calc x ^ (m + 1) * p ^ (m + 1) = x * (x ^ m * p ^ m) * p := by
273         rw [pow_succ', pow_succ]; simp only [mul_assoc]
274     _ = ((List.range m).map fun i : ℕ => eulerElement x p - 1 - i).prod * eulerElement x p := by
275         rw [ih, step_4_1_coordinate_shift x p hweyl, mul_assoc]
276     _ = eulerElement x p * ((List.range m).map fun i : ℕ => eulerElement x p - 1 - i).prod := by
277         refine (Commute.list_prod_left _ _ fun y hy => ?_).eq
278         obtain ⟨i, -, rfl⟩ := List.mem_map.mp hy
279         exact ((Commute.refl _).sub_left (Commute.one_left _)).sub_left
280           (Nat.cast_commute i _)
281     _ = ((List.range (m + 1)).map fun i : ℕ => eulerElement x p - i).prod := by
282         rw [List.range_succ_eq_map, List.map_cons, List.prod_cons, List.map_map]
283         congr 1
284         · simp
285         · congr 1
286           refine List.map_congr_left fun i _ => ?_
287           simp only [Function.comp_apply, Nat.succ_eq_add_one]
288           push_cast
289           abel
290 
291 /-- Induction step of the second identity, from `Ep = p(E−1)`, i.e.
292 `pE = (E+1)p`:
293 `p^{m+1}x₁^{m+1} = p(∏_{i=1}^m(E+i))x₁ = (∏_{i=1}^m(E+1+i))px₁ = ∏_{i=1}^{m+1}(E+i)`. -/
294 theorem step_4_1_rising_succ (x p : A) (hweyl : p * x = x * p + 1) (m : ℕ)
295     (ih : p ^ m * x ^ m = ((List.range' 1 m).map fun i : ℕ => eulerElement x p + i).prod) :
296     p ^ (m + 1) * x ^ (m + 1) =
297       ((List.range' 1 (m + 1)).map fun i : ℕ => eulerElement x p + i).prod := by
298   have hpx : p * x = eulerElement x p + 1 := hweyl
299   calc p ^ (m + 1) * x ^ (m + 1) = p * (p ^ m * x ^ m) * x := by
300         rw [pow_succ', pow_succ]; simp only [mul_assoc]
301     _ = ((List.range' 1 m).map fun i : ℕ => eulerElement x p + 1 + i).prod *
302           (eulerElement x p + 1) := by
303         rw [ih, step_4_1_momentum_shift x p hweyl, mul_assoc, hpx]
304     _ = (eulerElement x p + 1) *
305           ((List.range' 1 m).map fun i : ℕ => eulerElement x p + 1 + i).prod := by
306         refine (Commute.list_prod_left _ _ fun y hy => ?_).eq
307         obtain ⟨i, -, rfl⟩ := List.mem_map.mp hy
308         exact (Commute.refl (eulerElement x p + 1)).add_left (Nat.cast_commute i _)
309     _ = ((List.range' 1 (m + 1)).map fun i : ℕ => eulerElement x p + i).prod := by
310         rw [List.range'_succ, List.map_cons, List.prod_cons]
311         congr 1
312         · simp
313         · rw [List.range'_eq_map_range, List.range'_eq_map_range, List.map_map,
314             List.map_map]
315           congr 1
316           refine List.map_congr_left fun i _ => ?_
317           simp only [Function.comp_apply]
318           push_cast
319           rw [add_assoc _ 1, ← add_assoc 1 1, one_add_one_eq_two]
320 
321 /-- Lemma 4.1 for any ring with elements `x, p` satisfying `p x = x p + 1`:
322 for every `m ≥ 1`, `x^m p^m = ∏_{i=0}^{m-1}(E−i)` and `p^m x^m = ∏_{i=1}^{m}(E+i)`
323 with `E = x p`, the factors in each product commuting with one another.  The
324 products are taken in the listed order of `i`; by the last two clauses the order
325 does not matter. -/
326 theorem lemma_4_1_of_weylPair (x p : A) (hweyl : p * x = x * p + 1) (m : ℕ) (hm : 1 ≤ m) :
327     x ^ m * p ^ m = ((List.range m).map fun i : ℕ => eulerElement x p - i).prod ∧
328       p ^ m * x ^ m = ((List.range' 1 m).map fun i : ℕ => eulerElement x p + i).prod ∧
329       (∀ i j : ℕ, Commute (eulerElement x p - i) (eulerElement x p - j)) ∧
330       ∀ i j : ℕ, Commute (eulerElement x p + i) (eulerElement x p + j) := by
331   refine ⟨?_, ?_, step_4_1_factors_commute x p⟩
332   · -- induction from the trivial case `m = 1`
333     induction m, hm using Nat.le_induction with
334     | base => simp [eulerElement]
335     | succ m _ ih => exact step_4_1_falling_succ x p hweyl m ih
336   · induction m, hm using Nat.le_induction with
337     | base => simp [eulerElement, hweyl]
338     | succ m _ ih => exact step_4_1_rising_succ x p hweyl m ih
339 
340 end Lemma41
341 
342 open Stafford38.Paper.Section2 in
343 /-- **Lemma 4.1.** For `x₁, p = ∂₁ ∈ A_n(k)` and `E = x₁p`, for every `m ≥ 1`,
344 `x₁^m p^m = ∏_{i=0}^{m-1}(E−i)` and `p^m x₁^m = ∏_{i=1}^{m}(E+i)`, the factors in
345 each product commuting with one another.  The products are taken in the listed
346 order of `i` (`A_n(k)` is not commutative); by the last two clauses the order
347 does not matter.  Paper `n` is Lean `n + 1`. -/
348 theorem lemma_4_1 (k : Type*) [Field k] (n m : ℕ) (hm : 1 ≤ m) :
349     x₁ k n ^ m * p k n ^ m =
350         ((List.range m).map fun i : ℕ => eulerElement (x₁ k n) (p k n) - i).prod ∧
351       p k n ^ m * x₁ k n ^ m =
352         ((List.range' 1 m).map fun i : ℕ => eulerElement (x₁ k n) (p k n) + i).prod ∧
353       (∀ i j : ℕ, Commute (eulerElement (x₁ k n) (p k n) - i)
354         (eulerElement (x₁ k n) (p k n) - j)) ∧
355       ∀ i j : ℕ, Commute (eulerElement (x₁ k n) (p k n) + i)
356         (eulerElement (x₁ k n) (p k n) + j) :=
357   lemma_4_1_of_weylPair _ _ (convention_2_2_relations k n).1 m hm
358 
359 /-! ## The PBW form at one Ore pair stage
360 
361 Every element of `PairStage B` is a sum of PBW monomials `b x^a p^c`
362 (coefficient on the left; `b x^a p^c` and `p^c x^a b` have the same Euler
363 degree `a − c`).  This section proves that the part of Euler degree `m` is
364 spanned by the monomials of degree `m`. -/
365 
366 section PairStagePBW
367 
368 open AlgebraicAnalysis
369 open AlgebraicAnalysis.OreDivision
370 open AlgebraicAnalysis.OreAssociativity
371 open Stafford38.OreCoordinateStage
372 
373 variable (B : Type*) [Ring B]
374 
375 /-- Induction over the PBW form `∑ b x^a p^j` of a pair-stage element whose
376 outer exponents `j` satisfy `S`. -/
377 theorem pairStage_pbw_induction (S : ℕ → Prop) (P : PairStage (B := B) → Prop)
378     (h0 : P 0) (hadd : ∀ y z, P y → P z → P (y + z))
379     (hmono : ∀ (b : B) (a j : ℕ), S j →
380       P (pairCoefficient b * pairCoordinate ^ a * pairMomentum ^ j))
381     (z : PairStage (B := B))
382     (hS : ∀ j ∈ ((normalFormAddEquiv coordinateDerivation).symm z).support, S j) :
383     P z := by
384   have hcoeff : ∀ (c : CoordinateStage (B := B)) (j : ℕ), S j →
385       P (normalCoefficient coordinateDerivation c * pairMomentum ^ j) := by
386     intro c j hj
387     let r := (normalFormAddEquiv (zeroDerivation (B := B))).symm c
388     have hc : c = normalForm (zeroDerivation (B := B)) r :=
389       ((normalFormAddEquiv (zeroDerivation (B := B))).apply_symm_apply c).symm
390     rw [hc]
391     induction r using Polynomial.induction_on' with
392     | add r s hr hs =>
393         rw [normalForm_add,
394           (normalCoefficient (coordinateDerivation (B := B))).map_add, add_mul]
395         exact hadd _ _ hr hs
396     | monomial a b =>
397         rw [normalForm_monomial,
398           (normalCoefficient (coordinateDerivation (B := B))).map_mul,
399           (normalCoefficient (coordinateDerivation (B := B))).map_pow]
400         exact hmono b a j hj
401   let q := (normalFormAddEquiv coordinateDerivation).symm z
402   have hz : z = normalForm coordinateDerivation q :=
403     ((normalFormAddEquiv coordinateDerivation).apply_symm_apply z).symm
404   rw [hz, ← Polynomial.sum_monomial_eq q]
405   change P (normalFormAddHom (coordinateDerivation (B := B))
406     (∑ j ∈ q.support, Polynomial.monomial j (q.coeff j)))
407   rw [map_sum]
408   refine Finset.sum_induction _ P hadd h0 fun j hj => ?_
409   change P (normalForm (coordinateDerivation (B := B))
410     (Polynomial.monomial j (q.coeff j)))
411   rw [normalForm_monomial]
412   exact hcoeff (q.coeff j) j (hS j hj)
413 
414 /-- The PBW monomial `b x^a p^c` has Euler degree `a − c`. -/
415 theorem pairMonomial_mem_eulerDegree (b : B) (a c : ℕ) :
416     pairCoefficient b * pairCoordinate ^ a * pairMomentum ^ c ∈
417       eulerDegree (pairCoordinate (B := B)) pairMomentum ((a : ℤ) - c) :=
418   mem_eulerDegree.mpr (Stafford38.PaperEulerGrading.orderedPBWMonomial_eulerWeight B b a c)
419 
420 /-- The span of the PBW monomials of Euler degree `m`. -/
421 def pairWeightSpan (m : ℤ) : Submodule ℤ (PairStage (B := B)) :=
422   Submodule.span ℤ {z | ∃ (b : B) (a c : ℕ), (a : ℤ) - c = m ∧
423     z = pairCoefficient b * pairCoordinate ^ a * pairMomentum ^ c}
424 
425 theorem pairWeightSpan_le (m : ℤ) :
426     pairWeightSpan B m ≤ eulerDegree (pairCoordinate (B := B)) pairMomentum m := by
427   rw [pairWeightSpan, Submodule.span_le]
428   rintro _ ⟨b, a, c, rfl, rfl⟩
429   exact pairMonomial_mem_eulerDegree B b a c
430 
431 /-- PBW: every element is a sum of homogeneous PBW monomials. -/
432 theorem mem_iSup_pairWeightSpan (z : PairStage (B := B)) :
433     z ∈ ⨆ m, pairWeightSpan B m := by
434   refine pairStage_pbw_induction B (fun _ => True) (fun z => z ∈ ⨆ m, pairWeightSpan B m)
435     (zero_mem _) (fun _ _ hy hz => add_mem hy hz) (fun b a c _ => ?_) z fun _ _ => trivial
436   exact Submodule.mem_iSup_of_mem ((a : ℤ) - c) (Submodule.subset_span ⟨b, a, c, rfl, rfl⟩)
437 
438 /-- An element of Euler degree `m` is a sum of PBW monomials of degree `m`: the
439 parts of different degree are independent (eigenspaces of `[E, ·]`, the pair
440 stage being torsion-free as a `ℚ`-algebra). -/
441 theorem mem_pairWeightSpan_of_mem_eulerDegree [Algebra ℚ B] {m : ℤ}
442     {z : PairStage (B := B)} (hz : z ∈ eulerDegree pairCoordinate pairMomentum m) :
443     z ∈ pairWeightSpan B m := by
444   let : Algebra ℚ (CoordinateStage (B := B)) := coordinateStageAlgebra
445   let : Algebra ℚ (PairStage (B := B)) := pairStageAlgebra
446   have : IsAddTorsionFree (PairStage (B := B)) := .of_module_rat _
447   have hsplit := mem_iSup_pairWeightSpan B z
448   rw [iSup_split_single _ m, Submodule.mem_sup] at hsplit
449   obtain ⟨y, hy, r, hr, hyr⟩ := hsplit
450   have hr' : r ∈ ⨆ (ν : ℤ) (_ : ν ≠ m),
451       Module.End.eigenspace (eulerCommutator (pairCoordinate (B := B)) pairMomentum) ν :=
452     iSup₂_mono (fun j _ => pairWeightSpan_le B j) hr
453   have hrm : r ∈ Module.End.eigenspace (eulerCommutator (pairCoordinate (B := B)) pairMomentum) m := by
454     have hr_eq : r = z - y := by rw [← hyr]; abel
455     rw [hr_eq]
456     exact sub_mem hz (pairWeightSpan_le B m hy)
457   have h0 := Submodule.disjoint_def.mp
458     (Module.End.eigenspaces_iSupIndep (eulerCommutator (pairCoordinate (B := B)) pairMomentum) m) r hrm hr'
459   rw [← hyr, h0, add_zero]
460   exact hy
461 
462 variable [Algebra ℚ B]
463 
464 /-- Monomials of Euler degree `≥ 0` lie in the subring generated by the
465 coefficients, `x` and `E`. -/
466 theorem pairWeightSpan_le_eulerSubring {m : ℤ} (hm : 0 ≤ m) {z : PairStage (B := B)}
467     (hz : z ∈ pairWeightSpan B m) : z ∈ pairEulerSubring B := by
468   induction hz using Submodule.span_induction with
469   | mem z hz =>
470       obtain ⟨b, a, c, hac, rfl⟩ := hz
471       exact pairOrderedMonomial_mem_eulerSubring B b a c (by omega)
472   | zero => exact zero_mem _
473   | add y z _ _ hy hz => exact add_mem hy hz
474   | smul l z _ hz => exact zsmul_mem hz l
475 
476 /-- Monomials of Euler degree `≥ 1` have a right factor `x` with cofactor in
477 that subring, by normality of `x` (`pairOrderedMonomial_eq_eulerSubring_mul_coordinate`). -/
478 theorem pairWeightSpan_eq_mul_coordinate {m : ℤ} (hm : 1 ≤ m) {z : PairStage (B := B)}
479     (hz : z ∈ pairWeightSpan B m) :
480     ∃ U ∈ pairEulerSubring B, z = U * pairCoordinate := by
481   induction hz using Submodule.span_induction with
482   | mem z hz =>
483       obtain ⟨b, a, c, hac, rfl⟩ := hz
484       obtain ⟨U, hU⟩ := pairOrderedMonomial_eq_eulerSubring_mul_coordinate B b a c (by omega)
485       exact ⟨U, U.2, hU⟩
486   | zero => exact ⟨0, zero_mem _, by simp⟩
487   | add y z _ _ hy hz =>
488       obtain ⟨U, hU, rfl⟩ := hy
489       obtain ⟨V, hV, rfl⟩ := hz
490       exact ⟨U + V, add_mem hU hV, by rw [add_mul]⟩
491   | smul l z _ hz =>
492       obtain ⟨U, hU, rfl⟩ := hz
493       exact ⟨l • U, zsmul_mem hU l, by rw [smul_mul_assoc]⟩
494 
495 /-- At the pair stage, `A_{≥0}` lies in the subring generated by the
496 coefficients, `x` and `E`. -/
497 theorem pair_nonnegativePart_le :
498     nonnegativePart (pairCoordinate (B := B)) pairMomentum ≤ pairEulerSubring B := by
499   intro z hz
500   exact Submodule.iSup_induction _ (motive := fun z => z ∈ pairEulerSubring B)
501     (mem_nonnegativePart.mp hz)
502     (fun m z hz => pairWeightSpan_le_eulerSubring B (Int.natCast_nonneg m)
503       (mem_pairWeightSpan_of_mem_eulerDegree B hz))
504     (zero_mem _) (fun _ _ => add_mem)
505 
506 /-- At the pair stage, elements of Euler degree `≥ 1` lie in `R x` for the
507 subring `R` generated by the coefficients, `x` and `E`. -/
508 theorem pair_positivePart_eq_mul_coordinate {z : PairStage (B := B)}
509     (hz : z ∈ positivePart (pairCoordinate (B := B)) pairMomentum) :
510     ∃ U ∈ pairEulerSubring B, z = U * pairCoordinate := by
511   refine Submodule.iSup_induction _
512     (motive := fun z => ∃ U ∈ pairEulerSubring B, z = U * pairCoordinate) hz
513     (fun m z hz => pairWeightSpan_eq_mul_coordinate B (by omega)
514       (mem_pairWeightSpan_of_mem_eulerDegree B hz))
515     ⟨0, zero_mem _, by simp⟩ ?_
516   rintro _ _ ⟨U, hU, rfl⟩ ⟨V, hV, rfl⟩
517   exact ⟨U + V, add_mem hU hV, by rw [add_mul]⟩
518 
519 end PairStagePBW
520 
521 /-! ## The grading paragraph for `A_n` -/
522 
523 section Presented
524 
525 universe u
526 
527 variable (k : Type u) [Field k] (n : ℕ)
528 
529 /-- The transverse Weyl algebra `A_{n-1}` inside `A_n`. -/
530 abbrev transverse : Subring (PresentedWeyl k (n + 1)) :=
531   (previousWeylEmbedding k n).range.toSubring
532 
533 /-- `A_{≥0}` in `A_n`: the nonnegative part of the Euler grading. -/
534 abbrev presentedNonnegativePart : Subring (PresentedWeyl k (n + 1)) :=
535   nonnegativePart (presentedCoordinate k n) (presentedMomentum k n)
536 
537 /-- The elements of `A_n` of Euler degree `≥ 1`. -/
538 abbrev presentedPositivePart : Submodule ℤ (PresentedWeyl k (n + 1)) :=
539   positivePart (presentedCoordinate k n) (presentedMomentum k n)
540 
541 /-- The transverse algebra commutes with `x₁` (Convention 2.2). -/
542 theorem transverse_commutes_coordinate (c : transverse k n) :
543     presentedCoordinate k n * (c : PresentedWeyl k (n + 1)) =
544       (c : PresentedWeyl k (n + 1)) * presentedCoordinate k n :=
545   ((Stafford38.Paper.Section2.convention_2_2_relations k n).2.2 c c.2).1.symm
546 
547 /-- The rational scalars of `A_n`, through `ℚ → k`. -/
548 abbrev presentedRatAlgebra [Algebra ℚ k] : Algebra ℚ (PresentedWeyl k (n + 1)) :=
549   Algebra.compHom _ (algebraMap ℚ k)
550 
551 theorem rat_mem_transverse [Algebra ℚ k] (q : ℚ) :
552     @algebraMap ℚ _ _ _ (presentedRatAlgebra k n) q ∈ transverse k n := by
553   refine ⟨algebraMap k (PresentedWeyl k n) (algebraMap ℚ k q), ?_⟩
554   exact (previousWeylEmbedding k n).commutes _
555 
556 /-- The equivalence `A_n ≃ PairStage(A_{n-1})`, as a ring map. -/
557 abbrev toIterated : PresentedWeyl k (n + 1) →+* PairStage (B := IteratedPairStage k n) :=
558   (presentedIteratedEquiv k (n + 1)).toRingEquiv.toRingHom
559 
560 /-- The inverse of `A_n ≃ PairStage(A_{n-1})`, as a ring map. -/
561 abbrev fromIterated : PairStage (B := IteratedPairStage k n) →+* PresentedWeyl k (n + 1) :=
562   (presentedIteratedEquiv k (n + 1)).symm.toRingEquiv.toRingHom
563 
564 theorem fromIterated_coordinate :
565     fromIterated k n pairCoordinate = presentedCoordinate k n := by
566   apply (presentedIteratedEquiv k (n + 1)).injective
567   exact ((presentedIteratedEquiv k (n + 1)).apply_symm_apply _).trans
568     (presentedToIterated_coordinate k n).symm
569 
570 theorem fromIterated_momentum :
571     fromIterated k n pairMomentum = presentedMomentum k n := by
572   apply (presentedIteratedEquiv k (n + 1)).injective
573   exact ((presentedIteratedEquiv k (n + 1)).apply_symm_apply _).trans
574     (presentedToIterated_momentum k n).symm
575 
576 theorem fromIterated_toIterated (d : PresentedWeyl k (n + 1)) :
577     fromIterated k n (presentedToIterated k (n + 1) d) = d :=
578   (presentedIteratedEquiv k (n + 1)).symm_apply_apply d
579 
580 theorem fromIterated_toIterated_ringHom (d : PresentedWeyl k (n + 1)) :
581     fromIterated k n (toIterated k n d) = d :=
582   (presentedIteratedEquiv k (n + 1)).symm_apply_apply d
583 
584 theorem toIterated_coordinate :
585     toIterated k n (presentedCoordinate k n) = pairCoordinate := by
586   rw [← fromIterated_coordinate k n]
587   exact (presentedIteratedEquiv k (n + 1)).apply_symm_apply _
588 
589 theorem toIterated_momentum :
590     toIterated k n (presentedMomentum k n) = pairMomentum := by
591   rw [← fromIterated_momentum k n]
592   exact (presentedIteratedEquiv k (n + 1)).apply_symm_apply _
593 
594 /-- The Ore-tower transverse coefficients are the transverse algebra `A_{n-1}`. -/
595 theorem fromIterated_coefficient_mem_transverse (b : IteratedPairStage k n) :
596     fromIterated k n (pairCoefficient b) ∈ transverse k n := by
597   refine ⟨(presentedIteratedEquiv k n).symm b, ?_⟩
598   change previousWeylEmbedding k n _ = fromIterated k n (pairCoefficient b)
599   apply (presentedIteratedEquiv k (n + 1)).injective
600   refine Eq.trans ?_ ((presentedIteratedEquiv k (n + 1)).apply_symm_apply _).symm
601   have h := congrArg (fun g => g ((presentedIteratedEquiv k n).symm b))
602     (presentedToIterated_previous k n)
603   simp only [AlgHom.comp_apply] at h
604   refine h.trans ?_
605   change stageAlgHom k n (presentedIteratedEquiv k n
606     ((presentedIteratedEquiv k n).symm b)) = _
607   rw [AlgEquiv.apply_symm_apply]
608   rfl
609 
610 /-- The equivalence `A_n ≃ PairStage(A_{n-1})` sends the Ore-tower Euler subring
611 into the subring of `A_n` generated by `A_{n-1}`, `x₁` and `E`. -/
612 theorem iterated_eulerSubring_le (z : PairStage (B := IteratedPairStage k n))
613     (hz : z ∈ pairEulerSubring (IteratedPairStage k n)) :
614     fromIterated k n z ∈
615       eulerSubring (transverse k n) (presentedCoordinate k n) (presentedMomentum k n) := by
616   have hle : pairEulerSubring (IteratedPairStage k n) ≤
617       (eulerSubring (transverse k n) (presentedCoordinate k n)
618         (presentedMomentum k n)).comap (fromIterated k n) := by
619     apply Subring.closure_le.2
620     intro a ha
621     rcases ha with ⟨b, rfl⟩ | ha
622     · exact Subring.subset_closure (Or.inl (fromIterated_coefficient_mem_transverse k n b))
623     · simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at ha
624       rcases ha with rfl | rfl
625       · rw [SetLike.mem_coe, Subring.mem_comap, fromIterated_coordinate]
626         exact coordinate_mem_eulerSubring _ _ _
627       · rw [SetLike.mem_coe, Subring.mem_comap, map_mul, fromIterated_coordinate,
628           fromIterated_momentum]
629         exact euler_mem_eulerSubring _ _ _
630   exact hle hz
631 
632 /-- **`A_{≥0}` in PBW form.**  `A_{≥0}` is generated by the transverse algebra,
633 `E` and `x₁`: these have Euler degree `0, 0, 1`; conversely an element of Euler
634 degree `m ≥ 0` is, in PBW form, a sum of monomials `b x₁^a p^c` with
635 `a − c = m ≥ 0`, and each is `b x₁^{a−c} (x₁^c p^c)` with `x₁^c p^c` a
636 polynomial in `E`. -/
637 theorem step_nonnegative_pbw [Algebra ℚ k] :
638     presentedNonnegativePart k n =
639       eulerSubring (transverse k n) (presentedCoordinate k n) (presentedMomentum k n) := by
640   let := Stafford38.WeylEulerRemainder.iteratedRatAlgebra k n
641   apply le_antisymm
642   · intro z hz
643     have h := pair_nonnegativePart_le (IteratedPairStage k n)
644       (map_mem_nonnegativePart (toIterated k n) (toIterated_coordinate k n)
645         (toIterated_momentum k n) hz)
646     have h' := iterated_eulerSubring_le k n _ h
647     rwa [fromIterated_toIterated_ringHom] at h'
648   · exact eulerSubring_le_nonnegativePart _ _ _
649       (Stafford38.Paper.Section2.convention_2_2_relations k n).1
650       (fun c hc => (Stafford38.Paper.Section2.convention_2_2_relations k n).2.2 c hc)
651 
652 /-- **Normality of `x₁` in `A_{≥0}` for `A_n`.** -/
653 theorem presented_coordinate_normal [Algebra ℚ k] :
654     ∀ r ∈ presentedNonnegativePart k n, ∃ r' ∈ presentedNonnegativePart k n,
655       presentedCoordinate k n * r = r' * presentedCoordinate k n :=
656   step_coordinate_normal _ _ _ (Stafford38.Paper.Section2.convention_2_2_relations k n).1
657     (transverse_commutes_coordinate k n) (step_nonnegative_pbw k n)
658 
659 /-- **Elements of Euler degree `≥ 1` lie in `A_{≥0} x₁`.**  In PBW form such an
660 element is a sum of monomials `b x₁^a p^c` with `a > c`, and
661 `b x₁^a p^c = b x₁^{a−c−1} · x₁ (x₁^c p^c)`, where `x₁` crosses the
662 polynomial `x₁^c p^c` in `E` to the right by normality. -/
663 theorem step_positive_mem_nonnegative_mul_coordinate [Algebra ℚ k] :
664     ∀ z ∈ presentedPositivePart k n, ∃ u₀ ∈ presentedNonnegativePart k n,
665       z = u₀ * presentedCoordinate k n := by
666   let := Stafford38.WeylEulerRemainder.iteratedRatAlgebra k n
667   intro z hz
668   obtain ⟨U, hU, hzU⟩ := pair_positivePart_eq_mul_coordinate (IteratedPairStage k n)
669     (map_mem_positivePart (toIterated k n) (toIterated_coordinate k n)
670       (toIterated_momentum k n) hz)
671   refine ⟨fromIterated k n U, ?_, ?_⟩
672   · rw [step_nonnegative_pbw k n]
673     exact iterated_eulerSubring_le k n U hU
674   · have h := congrArg (fromIterated k n) hzU
675     rwa [map_mul, fromIterated_coordinate, fromIterated_toIterated_ringHom] at h
676 
677 end Presented
678 
679 #print axioms eq_nonnegative_pbw
680 #print axioms step_coordinate_normal
681 #print axioms mem_pairWeightSpan_of_mem_eulerDegree
682 #print axioms step_nonnegative_pbw
683 #print axioms presented_coordinate_normal
684 #print axioms step_positive_mem_nonnegative_mul_coordinate
685 #print axioms lemma_4_1_of_weylPair
686 #print axioms lemma_4_1
687 
688 end
689 
690 end Stafford38.Paper.Section4
691