Stafford38/Weyl/EulerSubring.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Quotient.EulerSurjectivity
3 public import Stafford38.Ore.PairStage
4 public import proofs.weyl_pure_power
5 
6 @[expose] public section
7 
8 /-!
9 # The Euler-nonnegative generated subring
10 
11 This file isolates the formal normality argument. Given a coefficient subring
12 commuting with a Weyl coordinate `x`, the subring generated by the
13 coefficients, `x`, and `E = x*p` satisfies `x*R ⊆ R*x`.
14 -/
15 
16 namespace Stafford38.WeylEulerSubring
17 
18 noncomputable section
19 
20 variable {A : Type*} [Ring A]
21 
22 /-- The subring generated by transverse coefficients, the coordinate, and the
23 Euler element. In the concrete Weyl tower this is the Euler-nonnegative
24 subring used by the quotient argument. -/
25 def eulerSubring (C : Subring A) (x p : A) : Subring A :=
26   Subring.closure ((C : Set A) ∪ {x, x * p})
27 
28 /-- Elements that can cross `x` from right to left while retaining a
29 cofactor in `R`. -/
30 def normalAcross (R : Subring A) (x : A) : Subring A where
31   carrier := {a | ∃ s : R, x * a = (s : A) * x}
32   zero_mem' := ⟨0, by simp⟩
33   one_mem' := ⟨1, by simp⟩
34   add_mem' := by
35     rintro a b ⟨s, hs⟩ ⟨t, ht⟩
36     refine ⟨s + t, ?_⟩
37     simp only [Subring.coe_add]
38     rw [mul_add, hs, ht, add_mul]
39   neg_mem' := by
40     rintro a ⟨s, hs⟩
41     refine ⟨-s, ?_⟩
42     simp only [Subring.coe_neg]
43     rw [mul_neg, hs, neg_mul]
44   mul_mem' := by
45     rintro a b ⟨s, hs⟩ ⟨t, ht⟩
46     refine ⟨s * t, ?_⟩
47     simp only [Subring.coe_mul]
48     calc
49       x * (a * b) = (x * a) * b := by rw [mul_assoc]
50       _ = ((s : A) * x) * b := by rw [hs]
51       _ = (s : A) * (x * b) := by rw [mul_assoc]
52       _ = (s : A) * ((t : A) * x) := by rw [ht]
53       _ = ((s : A) * (t : A)) * x := by rw [mul_assoc]
54 
55 lemma coefficient_mem_eulerSubring (C : Subring A) (x p : A) (c : C) :
56     (c : A) ∈ eulerSubring C x p := by
57   apply Subring.subset_closure
58   exact Or.inl c.property
59 
60 lemma coordinate_mem_eulerSubring (C : Subring A) (x p : A) :
61     x ∈ eulerSubring C x p := by
62   apply Subring.subset_closure
63   exact Or.inr (by simp)
64 
65 lemma euler_mem_eulerSubring (C : Subring A) (x p : A) :
66     x * p ∈ eulerSubring C x p := by
67   apply Subring.subset_closure
68   exact Or.inr (by simp)
69 
70 /-- One-sided normality of the Euler subring. -/
71 theorem coordinate_normal_eulerSubring
72     (C : Subring A) (x p : A)
73     (hweyl : p * x = x * p + 1)
74     (hcomm : ∀ c : C, x * (c : A) = (c : A) * x) :
75     ∀ r : eulerSubring C x p,
76       ∃ s : eulerSubring C x p, x * (r : A) = (s : A) * x := by
77   intro r
78   have hle : eulerSubring C x p ≤ normalAcross (eulerSubring C x p) x := by
79     apply Subring.closure_le.2
80     intro a ha
81     rcases ha with ha | ha
82     · exact ⟨⟨a, coefficient_mem_eulerSubring C x p ⟨a, ha⟩⟩,
83         hcomm ⟨a, ha⟩⟩
84     · simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at ha
85       rcases ha with hx | hE
86       · refine ⟨⟨x, coordinate_mem_eulerSubring C x p⟩, ?_⟩
87         calc
88           x * a = x * x := by rw [hx]
89           _ = (x : A) * x := rfl
90       · refine ⟨⟨x * p - 1, ?_⟩, ?_⟩
91         · exact (eulerSubring C x p).sub_mem
92             (euler_mem_eulerSubring C x p)
93             (eulerSubring C x p).one_mem
94         · calc
95             x * a = x * (x * p) := by rw [hE]
96             _ = x * (p * x - 1) := by rw [hweyl]; noncomm_ring
97             _ = (x * p - 1) * x := by noncomm_ring
98   exact hle r.property
99 
100 /-- If the ambient ring is generated by the coefficient subring and the Weyl
101 pair, adjoining `p` to the Euler subring still generates the ambient ring. -/
102 theorem closure_eulerSubring_union_momentum_eq_top
103     (C : Subring A) (x p : A)
104     (hgenerate : Subring.closure ((C : Set A) ∪ {x, p}) = ⊤) :
105     Subring.closure (((eulerSubring C x p : Subring A) : Set A) ∪ {p}) = ⊤ := by
106   apply top_unique
107   rw [← hgenerate]
108   apply Subring.closure_le.2
109   intro a ha
110   rcases ha with ha | ha
111   · apply Subring.subset_closure
112     show a ∈ ((eulerSubring C x p : Subring A) : Set A) ∪ {p}
113     exact Or.inl (coefficient_mem_eulerSubring C x p ⟨a, ha⟩)
114   · simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at ha
115     rcases ha with hx | hp
116     · apply Subring.subset_closure
117       show a ∈ ((eulerSubring C x p : Subring A) : Set A) ∪ {p}
118       refine Or.inl ?_
119       change a ∈ eulerSubring C x p
120       rw [hx]
121       exact coordinate_mem_eulerSubring C x p
122     · apply Subring.subset_closure
123       show a ∈ ((eulerSubring C x p : Subring A) : Set A) ∪ {p}
124       exact Or.inr (by simpa only [Set.mem_singleton_iff] using hp)
125 
126 section RationalEulerPolynomials
127 
128 variable [Algebra ℚ A]
129 
130 /-- Rational Euler polynomials lie in the Euler subring whenever the
131 coefficient subring contains the rational scalars. -/
132 theorem eulerPolynomialEval_mem_eulerSubring
133     (C : Subring A) (x p : A)
134     (hscalar : ∀ q : ℚ, algebraMap ℚ A q ∈ C)
135     (f : Polynomial ℚ) :
136     Stafford.eulerPolynomialEval x p f ∈ eulerSubring C x p := by
137   induction f using Polynomial.induction_on' with
138   | add f g hf hg =>
139       rw [map_add]
140       exact (eulerSubring C x p).add_mem hf hg
141   | monomial n q =>
142       rw [← Polynomial.C_mul_X_pow_eq_monomial, map_mul, map_pow,
143         Stafford.eulerPolynomialEval_C,
144         Stafford.eulerPolynomialEval_X]
145       exact (eulerSubring C x p).mul_mem
146         (coefficient_mem_eulerSubring C x p ⟨algebraMap ℚ A q, hscalar q⟩)
147         ((eulerSubring C x p).pow_mem
148           (euler_mem_eulerSubring C x p) n)
149 
150 /-- Euler polynomials cross the coordinate with a cofactor that remains in
151 the Euler subring. -/
152 theorem coordinate_mul_eulerPolynomial
153     (C : Subring A) (x p : A)
154     (hweyl : p * x = x * p + 1)
155     (hcomm : ∀ c : C, x * (c : A) = (c : A) * x)
156     (hscalar : ∀ q : ℚ, algebraMap ℚ A q ∈ C)
157     (f : Polynomial ℚ) :
158     ∃ s : eulerSubring C x p,
159       x * Stafford.eulerPolynomialEval x p f = (s : A) * x := by
160   let r : eulerSubring C x p :=
161     ⟨Stafford.eulerPolynomialEval x p f,
162       eulerPolynomialEval_mem_eulerSubring C x p hscalar f⟩
163   exact coordinate_normal_eulerSubring C x p hweyl hcomm r
164 
165 end RationalEulerPolynomials
166 
167 section PairStage
168 
169 open Stafford38.OrePairStage
170 
171 variable (B : Type*) [Ring B] [Algebra ℚ B]
172 
173 local instance : Algebra ℚ (Stafford38.OreCoordinateStage.CoordinateStage (B := B)) :=
174   coordinateStageAlgebra
175 
176 local instance : Algebra ℚ (PairStage (B := B)) :=
177   pairStageAlgebra
178 
179 /-- The embedded transverse coefficient ring inside one pair stage. -/
180 def pairOldSubring : Subring (PairStage (B := B)) :=
181   RingHom.range (pairCoefficient (B := B))
182 
183 /-- The concrete Euler subring of one pair stage. -/
184 abbrev pairEulerSubring : Subring (PairStage (B := B)) :=
185   eulerSubring (pairOldSubring B) pairCoordinate pairMomentum
186 
187 omit [Algebra ℚ B] in
188 lemma pairOldSubring_commutes_coordinate (c : pairOldSubring B) :
189     pairCoordinate * (c : PairStage (B := B)) =
190       (c : PairStage (B := B)) * pairCoordinate := by
191   obtain ⟨b, hb⟩ := c.property
192   rw [← hb]
193   exact pairCoordinate_mul_coefficient b
194 
195 lemma rational_mem_pairOldSubring (q : ℚ) :
196     algebraMap ℚ (PairStage (B := B)) q ∈ pairOldSubring B := by
197   refine ⟨algebraMap ℚ B q, ?_⟩
198   exact DFunLike.congr_fun
199     (pairStageAlgebra_algebraMap (k := ℚ) (B := B)) q |>.symm
200 
201 /-- Every ordered pair-stage monomial with at least as many coordinates as
202 momenta belongs to the Euler subring. -/
203 theorem pairOrderedMonomial_mem_eulerSubring
204     (b : B) (a j : ℕ) (hja : j ≤ a) :
205     pairCoefficient b * pairCoordinate ^ a * pairMomentum ^ j ∈
206       pairEulerSubring B := by
207   obtain ⟨f, hf⟩ := Stafford.exists_eulerPolynomial_x_pow_mul_d_pow
208     (A := PairStage (B := B)) pairCoordinate pairMomentum
209     pairMomentum_mul_coordinate j
210   have hb : pairCoefficient b ∈ pairEulerSubring B :=
211     coefficient_mem_eulerSubring (pairOldSubring B) pairCoordinate pairMomentum
212       ⟨pairCoefficient b, ⟨b, rfl⟩⟩
213   have hx : pairCoordinate ^ (a - j) ∈ pairEulerSubring B :=
214     (pairEulerSubring B).pow_mem
215       (coordinate_mem_eulerSubring (pairOldSubring B)
216         pairCoordinate pairMomentum) (a - j)
217   have hfmem : Stafford.eulerPolynomialEval pairCoordinate pairMomentum f ∈
218       pairEulerSubring B :=
219     eulerPolynomialEval_mem_eulerSubring (pairOldSubring B)
220       pairCoordinate pairMomentum (rational_mem_pairOldSubring B) f
221   have hfactor :
222       pairCoefficient b * pairCoordinate ^ a * pairMomentum ^ j =
223         pairCoefficient b * pairCoordinate ^ (a - j) *
224           Stafford.eulerPolynomialEval pairCoordinate pairMomentum f := by
225     rw [hf]
226     conv_lhs =>
227       rw [show a = (a - j) + j by omega, pow_add]
228     noncomm_ring
229   rw [hfactor]
230   exact (pairEulerSubring B).mul_mem
231     ((pairEulerSubring B).mul_mem hb hx) hfmem
232 
233 set_option maxHeartbeats 800000 in
234 /-- Every ordered pair-stage monomial with strictly more coordinates than
235 momenta has a right coordinate factor whose cofactor remains in the Euler
236 subring. -/
237 theorem pairOrderedMonomial_eq_eulerSubring_mul_coordinate
238     (b : B) (a j : ℕ) (hja : j < a) :
239     ∃ U : pairEulerSubring B,
240       pairCoefficient b * pairCoordinate ^ a * pairMomentum ^ j =
241         (U : PairStage (B := B)) * pairCoordinate := by
242   obtain ⟨f, hf⟩ := Stafford.exists_eulerPolynomial_x_pow_mul_d_pow
243     (A := PairStage (B := B)) pairCoordinate pairMomentum
244     pairMomentum_mul_coordinate j
245   obtain ⟨s, hs⟩ := coordinate_mul_eulerPolynomial
246     (pairOldSubring B) pairCoordinate pairMomentum
247     pairMomentum_mul_coordinate (pairOldSubring_commutes_coordinate B)
248     (rational_mem_pairOldSubring B) f
249   have hb : pairCoefficient b ∈ pairEulerSubring B :=
250     coefficient_mem_eulerSubring (pairOldSubring B) pairCoordinate pairMomentum
251       ⟨pairCoefficient b, ⟨b, rfl⟩⟩
252   have hx : pairCoordinate ^ (a - j - 1) ∈ pairEulerSubring B :=
253     (pairEulerSubring B).pow_mem
254       (coordinate_mem_eulerSubring (pairOldSubring B)
255         pairCoordinate pairMomentum) (a - j - 1)
256   let U : pairEulerSubring B :=
257     ⟨pairCoefficient b * pairCoordinate ^ (a - j - 1) * (s : PairStage (B := B)),
258       (pairEulerSubring B).mul_mem ((pairEulerSubring B).mul_mem hb hx) s.property⟩
259   refine ⟨U, ?_⟩
260   change pairCoefficient b * pairCoordinate ^ a * pairMomentum ^ j =
261     (pairCoefficient b * pairCoordinate ^ (a - j - 1) *
262       (s : PairStage (B := B))) * pairCoordinate
263   calc
264     pairCoefficient b * pairCoordinate ^ a * pairMomentum ^ j =
265         pairCoefficient b * pairCoordinate ^ (a - j - 1) *
266           (pairCoordinate * (pairCoordinate ^ j * pairMomentum ^ j)) := by
267       have ha : a = (a - j - 1) + 1 + j := by omega
268       conv_lhs => rw [ha, pow_add, pow_add]
269       simp only [pow_one]
270       simp only [mul_assoc]
271     _ = pairCoefficient b * pairCoordinate ^ (a - j - 1) *
272           (pairCoordinate * Stafford.eulerPolynomialEval
273             pairCoordinate pairMomentum f) := by rw [hf]
274     _ = pairCoefficient b * pairCoordinate ^ (a - j - 1) *
275           ((s : PairStage (B := B)) * pairCoordinate) := by rw [hs]
276     _ = (pairCoefficient b * pairCoordinate ^ (a - j - 1) *
277           (s : PairStage (B := B))) * pairCoordinate := by
278       simp only [mul_assoc]
279 
280 #print axioms pairOrderedMonomial_mem_eulerSubring
281 #print axioms pairOrderedMonomial_eq_eulerSubring_mul_coordinate
282 
283 end PairStage
284 
285 #print axioms coordinate_normal_eulerSubring
286 #print axioms closure_eulerSubring_union_momentum_eq_top
287 #print axioms eulerPolynomialEval_mem_eulerSubring
288 #print axioms coordinate_mul_eulerPolynomial
289 
290 end
291 end Stafford38.WeylEulerSubring
292