AlgebraicAnalysis/Ore/RightQuotient.lean

AlgebraicAnalysis library · bbbbf3fc358ca8100b158cec4cf47f336ab70163

1 module
2 public import AlgebraicAnalysis.Ore.Associativity
3 public import Mathlib.Algebra.Module.MinimalAxioms
4 public import Mathlib.RingTheory.Finiteness.Basic
5 
6 @[expose] public section
7 
8 /-!
9 # Finite right quotients over noncommutative Ore coefficients
10 
11 Monic right division leaves coefficient-left remainders. A signed reverse
12 normal-ordering identity rewrites them in a finite right-coefficient window.
13 The natural scalar ring is therefore `Bᵐᵒᵖ`, not `B`; this removes the
14 commutativity restriction from the older finite-quotient consumer.
15 
16 The final section instantiates the construction on the outer momentum layer
17 of the iterated Weyl tower and uses the literal generators `d` and `x^N d`.
18 -/
19 
20 namespace AlgebraicAnalysis.OreRightQuotient
21 
22 open Polynomial
23 open AlgebraicAnalysis
24 open AlgebraicAnalysis.OreDivision
25 open AlgebraicAnalysis.OreAssociativity
26 
27 noncomputable section
28 
29 variable {B : Type*} [Ring B]
30 
31 instance normalOreNontrivial [Nontrivial B] (D : OreDivisionDerivation B) :
32     Nontrivial (NormalOre D) := by
33   refine ⟨⟨0, 1, ?_⟩⟩
34   intro h
35   have h' : normalForm D (0 : Polynomial B) = normalForm D 1 := by
36     rw [normalForm_zero, normalForm_one]
37     exact h
38   exact zero_ne_one (normalForm_injective D h')
39 
40 theorem normalCoefficient_injective (D : OreDivisionDerivation B) :
41     Function.Injective (normalCoefficient D) := by
42   intro a b h
43   apply Polynomial.C_injective
44   apply normalForm_injective D
45   simpa only [normalForm_C] using h
46 
47 instance normalOreOpSMul (D : OreDivisionDerivation B) :
48     SMul Bᵐᵒᵖ (NormalOre D) :=
49   ⟨fun b a => a * normalCoefficient D b.unop⟩
50 
51 instance normalOreOpModule (D : OreDivisionDerivation B) :
52     Module Bᵐᵒᵖ (NormalOre D) :=
53   Module.ofMinimalAxioms
54     (fun b x y => by
55       change (x + y) * normalCoefficient D b.unop =
56         x * normalCoefficient D b.unop + y * normalCoefficient D b.unop
57       exact add_mul x y (normalCoefficient D b.unop))
58     (fun b c x => by
59       change x * normalCoefficient D (b + c).unop =
60         x * normalCoefficient D b.unop + x * normalCoefficient D c.unop
61       rw [MulOpposite.unop_add, (normalCoefficient D).map_add, mul_add])
62     (fun b c x => by
63       change x * normalCoefficient D (b * c).unop =
64         (x * normalCoefficient D c.unop) * normalCoefficient D b.unop
65       rw [MulOpposite.unop_mul, (normalCoefficient D).map_mul, mul_assoc])
66     (fun x => by
67       change x * normalCoefficient D (1 : Bᵐᵒᵖ).unop = x
68       rw [MulOpposite.unop_one, (normalCoefficient D).map_one, mul_one])
69 
70 @[simp] theorem normalOre_op_smul_def (D : OreDivisionDerivation B)
71     (b : Bᵐᵒᵖ) (a : NormalOre D) :
72     b • a = a * normalCoefficient D b.unop := rfl
73 
74 @[simp] theorem normalForm_X_pow_coe (D : OreDivisionDerivation B) (n : ℕ) :
75     (normalForm D (X ^ n) : AddMonoid.End (Polynomial B)) =
76       (leftOreShift D) ^ n := by
77   change OreAmbient.eval D (faithfulAmbient D) (X ^ n) = _
78   rw [Polynomial.X_pow_eq_monomial, OreAmbient.eval_monomial]
79   simp [faithfulAmbient]
80 
81 theorem normalForm_monomial_reverse (D : OreDivisionDerivation B)
82     (b : B) (n : ℕ) :
83     normalForm D (monomial n b) =
84       ∑ ij ∈ Finset.HasAntidiagonal.antidiagonal n,
85         n.choose ij.1 •
86           ((-1 : NormalOre D) ^ ij.1 *
87             ((MulOpposite.op ((D^[ij.1]) b)) •
88               normalForm D (X ^ ij.2))) := by
89   apply Subtype.ext
90   change OreAmbient.eval D (faithfulAmbient D) (monomial n b) = _
91   rw [OreAmbient.eval_monomial]
92   rw [OreAmbient.reverse_mul D (faithfulAmbient D) b n]
93   unfold OreAmbient.reverseExpansion OreAmbient.reverseSignedTerm
94     OreAmbient.reverseTerm
95   change _ = (faithfulRange D).subtype
96     (∑ ij ∈ Finset.HasAntidiagonal.antidiagonal n,
97       n.choose ij.1 •
98         ((-1 : NormalOre D) ^ ij.1 *
99           ((MulOpposite.op ((D^[ij.1]) b)) •
100             normalForm D (X ^ ij.2))))
101   have hsum :
102       (faithfulRange D).subtype
103           (∑ ij ∈ Finset.HasAntidiagonal.antidiagonal n,
104             n.choose ij.1 •
105               ((-1 : NormalOre D) ^ ij.1 *
106                 ((MulOpposite.op ((D^[ij.1]) b)) •
107                   normalForm D (X ^ ij.2)))) =
108         ∑ ij ∈ Finset.HasAntidiagonal.antidiagonal n,
109           (faithfulRange D).subtype
110             (n.choose ij.1 •
111               ((-1 : NormalOre D) ^ ij.1 *
112                 ((MulOpposite.op ((D^[ij.1]) b)) •
113                   normalForm D (X ^ ij.2)))) := by
114     exact map_sum (faithfulRange D).subtype.toAddMonoidHom _ _
115   rw [hsum]
116   apply Finset.sum_congr rfl
117   intro ij hij
118   change
119     n.choose ij.1 •
120         ((-1 : AddMonoid.End (Polynomial B)) ^ ij.1 *
121           ((leftOreShift D) ^ ij.2 * coefficientLeft ((D^[ij.1]) b))) =
122       n.choose ij.1 •
123         ((((-1 : NormalOre D) ^ ij.1 *
124           ((MulOpposite.op ((D^[ij.1]) b)) •
125             normalForm D (X ^ ij.2))) : NormalOre D) :
126               AddMonoid.End (Polynomial B))
127   apply congrArg (fun z : AddMonoid.End (Polynomial B) => n.choose ij.1 • z)
128   simp only [normalOre_op_smul_def]
129   change
130     (-1 : AddMonoid.End (Polynomial B)) ^ ij.1 *
131         ((leftOreShift D) ^ ij.2 * coefficientLeft ((D^[ij.1]) b)) =
132       (-1 : AddMonoid.End (Polynomial B)) ^ ij.1 *
133         (((normalForm D (X ^ ij.2) : NormalOre D) :
134             AddMonoid.End (Polynomial B)) * coefficientLeft ((D^[ij.1]) b))
135   rw [normalForm_X_pow_coe]
136 
137 /-- The finite right-coefficient window of order less than `n`. -/
138 def rightCoefficientWindow (D : OreDivisionDerivation B) (n : ℕ) :
139     Submodule Bᵐᵒᵖ (NormalOre D) :=
140   Submodule.span Bᵐᵒᵖ
141     (Set.range fun j : Fin n => normalForm D (X ^ (j : ℕ)))
142 
143 lemma normalForm_monomial_mem_rightCoefficientWindow
144     (D : OreDivisionDerivation B) (b : B) {j n : ℕ} (hj : j < n) :
145     normalForm D (monomial j b) ∈ rightCoefficientWindow D n := by
146   rw [normalForm_monomial_reverse]
147   apply Submodule.sum_mem
148   intro ij hij
149   rw [← Nat.cast_smul_eq_nsmul Bᵐᵒᵖ]
150   apply Submodule.smul_mem
151   have hijSum : ij.1 + ij.2 = j :=
152     Finset.HasAntidiagonal.mem_antidiagonal.mp hij
153   have hijLt : ij.2 < n := by omega
154   have hpow : normalForm D (X ^ ij.2) ∈ rightCoefficientWindow D n := by
155     apply Submodule.subset_span
156     exact ⟨⟨ij.2, hijLt⟩, rfl⟩
157   have hscalar :
158       (MulOpposite.op ((D^[ij.1]) b)) • normalForm D (X ^ ij.2) ∈
159         rightCoefficientWindow D n :=
160     Submodule.smul_mem _ _ hpow
161   by_cases heven : Even ij.1
162   · rw [heven.neg_one_pow]
163     simpa only [one_mul] using hscalar
164   · have hodd : Odd ij.1 := Nat.not_even_iff_odd.mp heven
165     rw [hodd.neg_one_pow]
166     simpa only [neg_one_mul] using
167       (rightCoefficientWindow D n).neg_mem hscalar
168 
169 theorem normalForm_mem_rightCoefficientWindow_of_degree_lt
170     (D : OreDivisionDerivation B) (p : Polynomial B) (n : ℕ)
171     (hp : p = 0 ∨ p.natDegree < n) :
172     normalForm D p ∈ rightCoefficientWindow D n := by
173   rcases hp with rfl | hp
174   · simp
175   · change normalFormAddHom D p ∈ rightCoefficientWindow D n
176     rw [← Polynomial.sum_monomial_eq p, Polynomial.sum_def,
177       map_sum (normalFormAddHom D)]
178     apply Submodule.sum_mem
179     intro j hj
180     apply normalForm_monomial_mem_rightCoefficientWindow D
181     exact lt_of_le_of_lt (Polynomial.le_natDegree_of_mem_supp j hj) hp
182 
183 /-- A right ideal viewed as a coefficient-opposite submodule. -/
184 def rightIdealAsCoeffSubmodule (D : OreDivisionDerivation B)
185     (I : Submodule (NormalOre D)ᵐᵒᵖ (NormalOre D)) :
186     Submodule Bᵐᵒᵖ (NormalOre D) where
187   carrier := I
188   zero_mem' := I.zero_mem
189   add_mem' := I.add_mem
190   smul_mem' := by
191     intro b a ha
192     change a * normalCoefficient D b.unop ∈ I
193     rw [← op_smul_eq_mul]
194     exact I.smul_mem (MulOpposite.op (normalCoefficient D b.unop)) ha
195 
196 /-- The right ideal generated by two normal forms. -/
197 def twoGeneratorRightIdeal (D : OreDivisionDerivation B)
198     (H J : Polynomial B) :
199     Submodule (NormalOre D)ᵐᵒᵖ (NormalOre D) :=
200   Submodule.span (NormalOre D)ᵐᵒᵖ
201     ({normalForm D H, normalForm D J} : Set (NormalOre D))
202 
203 /-- The coefficient-opposite submodule underlying a two-generator ideal. -/
204 def twoGeneratorCoeffSubmodule (D : OreDivisionDerivation B)
205     (H J : Polynomial B) : Submodule Bᵐᵒᵖ (NormalOre D) :=
206   rightIdealAsCoeffSubmodule D (twoGeneratorRightIdeal D H J)
207 
208 /-- The corresponding quotient as a coefficient-opposite module. -/
209 abbrev TwoGeneratorQuotient (D : OreDivisionDerivation B)
210     (H J : Polynomial B) :=
211   NormalOre D ⧸ twoGeneratorCoeffSubmodule D H J
212 
213 lemma normalForm_H_mem_twoGeneratorRightIdeal
214     (D : OreDivisionDerivation B) (H J : Polynomial B) :
215     normalForm D H ∈ twoGeneratorRightIdeal D H J := by
216   apply Submodule.subset_span
217   simp
218 
219 lemma normalForm_rightMul_H_mem_twoGeneratorCoeffSubmodule
220     (D : OreDivisionDerivation B) (H J q : Polynomial B) :
221     normalForm D (rightMul D H q) ∈
222       twoGeneratorCoeffSubmodule D H J := by
223   change normalForm D (rightMul D H q) ∈ twoGeneratorRightIdeal D H J
224   rw [normalForm_mul, ← op_smul_eq_mul]
225   exact (twoGeneratorRightIdeal D H J).smul_mem
226     (MulOpposite.op (normalForm D q))
227     (normalForm_H_mem_twoGeneratorRightIdeal D H J)
228 
229 theorem rightCoefficientWindow_quotient_surjective
230     [Nontrivial B] (D : OreDivisionDerivation B)
231     (H J : Polynomial B) (hH : H.Monic) :
232     Function.Surjective
233       ((twoGeneratorCoeffSubmodule D H J).mkQ.comp
234         (rightCoefficientWindow D H.natDegree).subtype) := by
235   intro y
236   obtain ⟨a, rfl⟩ :=
237     (twoGeneratorCoeffSubmodule D H J).mkQ_surjective y
238   obtain ⟨p, rfl⟩ := normalForm_surjective D a
239   obtain ⟨q, r, hdecomp, hr⟩ := right_division_exists D H p hH
240   have hrWindow : normalForm D r ∈
241       rightCoefficientWindow D H.natDegree :=
242     normalForm_mem_rightCoefficientWindow_of_degree_lt D r H.natDegree hr
243   refine ⟨⟨normalForm D r, hrWindow⟩, ?_⟩
244   change (twoGeneratorCoeffSubmodule D H J).mkQ (normalForm D r) =
245     (twoGeneratorCoeffSubmodule D H J).mkQ (normalForm D p)
246   apply (Submodule.Quotient.eq (twoGeneratorCoeffSubmodule D H J)).2
247   have hmultiple : normalForm D (rightMul D H q) ∈
248       twoGeneratorCoeffSubmodule D H J :=
249     normalForm_rightMul_H_mem_twoGeneratorCoeffSubmodule D H J q
250   rw [hdecomp, normalForm_add]
251   simpa using (twoGeneratorCoeffSubmodule D H J).neg_mem hmultiple
252 
253 theorem twoGeneratorQuotient_finite
254     [Nontrivial B] (D : OreDivisionDerivation B)
255     (H J : Polynomial B) (hH : H.Monic) :
256     Module.Finite Bᵐᵒᵖ (TwoGeneratorQuotient D H J) := by
257   letI : Module.Finite Bᵐᵒᵖ (rightCoefficientWindow D H.natDegree) :=
258     Module.Finite.span_of_finite Bᵐᵒᵖ (Set.finite_range
259       (fun j : Fin H.natDegree => normalForm D (X ^ (j : ℕ))))
260   exact Module.Finite.of_surjective
261     ((twoGeneratorCoeffSubmodule D H J).mkQ.comp
262       (rightCoefficientWindow D H.natDegree).subtype)
263     (rightCoefficientWindow_quotient_surjective D H J hH)
264 
265 #print axioms normalOreOpModule
266 #print axioms normalCoefficient_injective
267 #print axioms normalForm_monomial_reverse
268 #print axioms twoGeneratorQuotient_finite
269 
270 
271 end
272 end AlgebraicAnalysis.OreRightQuotient
273