Offline · exact source
Exact Lean source

TensorPBWOrder

formalization/Cloning/TensorPBWOrder.lean

Source hash: 928daf147bd26219b49d542ae0a65c9694221b0fb996441730655950d4326795

Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.

The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.

Declarations in this module
1import Cloning.TensorCyclicFiltration
2import Mathlib.Data.List.Sort
3import Mathlib.Data.Finset.Sort
4 
5/-! A concrete total order and termination measure for physical lowering words. -/
6noncomputable section
7namespace Cloning.TensorLie
8set_option maxHeartbeats 1000000
9variable {d : ℕ}
10 
11/-- Lexicographic order of positive roots, encoded without changing the ambient
12product order on pairs of finite indices. -/
13def rootKey (a : PositiveRoot d) : ℕ := d * a.val.1.val + a.val.2.val
14 
15theorem rootKey_injective : Function.Injective (@rootKey d) := by
16  intro a b h
17  apply Subtype.ext
18  apply Prod.ext <;> apply Fin.ext
19  · have ha := a.val.2.isLt
20    have hb := b.val.2.isLt
21    simp only [rootKey] at h
22    have hdiv := congrArg (fun x => x / d) h
23    have hd : 0 < d := by omega
24    simpa [Nat.add_comm, Nat.add_mul_div_left _ _ hd, Nat.div_eq_of_lt ha,
25      Nat.div_eq_of_lt hb] using hdiv
26  · have ha := a.val.2.isLt
27    have hb := b.val.2.isLt
28    have hmod := congrArg (fun x => x % d) h
29    simpa [rootKey, Nat.add_mod, Nat.mod_eq_of_lt ha, Nat.mod_eq_of_lt hb] using hmod
30 
31def RootOrdered (w : List (PositiveRoot d)) : Prop :=
32  w.Pairwise (fun a b => rootKey a ≤ rootKey b)
33 
34noncomputable def rootInversions : List (PositiveRoot d) → ℕ
35  | [] => 0
36  | a :: w => rootInversions w + w.countP (fun b => rootKey b < rootKey a)
37 
38theorem rootInversions_swap (p w : List (PositiveRoot d)) (a b : PositiveRoot d)
39    (h : rootKey b < rootKey a) :
40    rootInversions (p ++ b :: a :: w) + 1 = rootInversions (p ++ a :: b :: w) := by
41  induction p with
42  | nil =>
43    simp only [List.nil_append, rootInversions, List.countP_cons]
44    simp only [h, Nat.not_lt.mpr (Nat.le_of_lt h), decide_true, decide_false,
45      Bool.false_eq_true, ↓reduceIte]
46    omega
47  | cons c p ih =>
48    simp only [List.cons_append, rootInversions, List.countP_append, List.countP_cons]
49    omega
50 
51theorem exists_adjacent_rootInversion (w : List (PositiveRoot d)) (h : ¬ RootOrdered w) :
52    ∃ p a b t, w = p ++ a :: b :: t ∧ rootKey b < rootKey a := by
53  induction w with
54  | nil => exact (h (by simp [RootOrdered])).elim
55  | cons a w ih =>
56    cases w with
57    | nil => exact (h (by simp [RootOrdered])).elim
58    | cons b t =>
59      by_cases hab : rootKey a ≤ rootKey b
60      · have ht : ¬ RootOrdered (b :: t) := by
61          intro ht
62          apply h
63          rw [RootOrdered, List.pairwise_cons] at ht ⊢
64          refine ⟨?_, List.pairwise_cons.mpr ht⟩
65          intro c hc
66          rcases List.mem_cons.mp hc with rfl | hc
67          · exact hab
68          · exact hab.trans (ht.1 c hc)
69        obtain ⟨p, c, e, u, hp, hce⟩ := ih ht
70        exact ⟨a :: p, c, e, u, by simp [hp], hce⟩
71      · exact ⟨[], a, b, t, rfl, Nat.lt_of_not_ge hab⟩
72 
73theorem loweringHeight_append (p w : List (PositiveRoot d)) :
74    loweringHeight (p ++ w) = loweringHeight p + loweringHeight w := by
75  induction p with
76  | nil => simp [loweringHeight]
77  | cons a p ih => simp [loweringHeight, ih, Nat.add_assoc]
78 
79theorem loweringWord_append {n : ℕ} (Ω : TensorRegister n (Fin d))
80    (p w : List (PositiveRoot d)) :
81    loweringWord Ω (p ++ w) = loweringWord (loweringWord Ω w) p := by
82  induction p with
83  | nil => rfl
84  | cons a p ih => simp only [List.cons_append, loweringWord, ih]
85 
86noncomputable def loweringOperator (n : ℕ) : List (PositiveRoot d) →
87    (TensorRegister n (Fin d) →L[ℂ] TensorRegister n (Fin d))
88  | [] => ContinuousLinearMap.id ℂ _
89  | a :: w => collectiveGenerator n a.val.2 a.val.1 * loweringOperator n w
90 
91@[simp] theorem loweringOperator_apply {n : ℕ} (w : List (PositiveRoot d))
92    (Ω : TensorRegister n (Fin d)) : loweringOperator n w Ω = loweringWord Ω w := by
93  induction w with
94  | nil => rfl
95  | cons a w ih => simp only [loweringOperator, ContinuousLinearMap.mul_apply, ih, loweringWord]
96 
97end Cloning.TensorLie