Offline · exact source
Exact Lean source

TensorLieProduct

formalization/Cloning/TensorLieProduct.lean

Source hash: 3fa8781599f8657469246ee116991d6836b5715929b04c8717d540ebed07b23a

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.TensorLieHighestWeight
2 
3/-! Literal tensor concatenation, its Hilbert norm, and the collective Lie
4generator product rule. These apply to arbitrary register vectors. -/
5 
6noncomputable section
7open scoped BigOperators InnerProductSpace ComplexOrder
8namespace Cloning.TensorLie
9open Cloning.PCT
10set_option maxHeartbeats 1000000
11set_option backward.isDefEq.respectTransparency false
12set_option linter.unusedSectionVars false
13 
14variable {A : Type*} [Fintype A] [DecidableEq A] {n m : ℕ}
15 
16def splitWordsEquiv (n m : ℕ) :
17    (Fin (n + m) → A) ≃ (Fin n → A) × (Fin m → A) where
18  toFun w := (fun i => w (Fin.castAdd m i), fun j => w (Fin.natAdd n j))
19  invFun p := Fin.addCases p.1 p.2
20  left_inv w := Fin.addCases_castAdd_natAdd w
21  right_inv p := by ext <;> simp
22 
23def tensorJoin (x : TensorRegister n A) (y : TensorRegister m A) :
24    TensorRegister (n + m) A :=
25  ⟨fun w => x (fun i => w (Fin.castAdd m i)) * y (fun j => w (Fin.natAdd n j)),
26    memℓp_gen (by simp only [ENNReal.toReal_ofNat]; exact (hasSum_fintype _).summable)⟩
27 
28@[simp] theorem tensorJoin_apply (x : TensorRegister n A) (y : TensorRegister m A)
29    (w : Fin (n + m) → A) :
30    tensorJoin x y w =
31      x (fun i => w (Fin.castAdd m i)) * y (fun j => w (Fin.natAdd n j)) := rfl
32 
33@[simp] theorem tensorJoin_zero_left (y : TensorRegister m A) :
34    tensorJoin (0 : TensorRegister n A) y = 0 := by ext; simp
35 
36@[simp] theorem tensorJoin_zero_right (x : TensorRegister n A) :
37    tensorJoin x (0 : TensorRegister m A) = 0 := by ext; simp
38 
39@[simp] theorem tensorJoin_smul_left (c : ℂ) (x : TensorRegister n A)
40    (y : TensorRegister m A) : tensorJoin (c • x) y = c • tensorJoin x y := by
41  ext; simp [mul_assoc]
42 
43@[simp] theorem tensorJoin_smul_right (c : ℂ) (x : TensorRegister n A)
44    (y : TensorRegister m A) : tensorJoin x (c • y) = c • tensorJoin x y := by
45  ext; simp [mul_left_comm]
46 
47theorem tensorJoin_inner (x x' : TensorRegister n A) (y y' : TensorRegister m A) :
48    ⟪tensorJoin x y, tensorJoin x' y'⟫_ℂ = ⟪x, x'⟫_ℂ * ⟪y, y'⟫_ℂ := by
49  simp only [lp.inner_eq_tsum, tsum_fintype, RCLike.inner_apply, tensorJoin_apply,
50    map_mul]
51  change (∑ w, (fun p : (Fin n → A) × (Fin m → A) =>
52    (x' p.1 * y' p.2) * (star (x p.1) * star (y p.2)))
53    (splitWordsEquiv n m w)) = _
54  rw [(splitWordsEquiv (A := A) n m).sum_comp (fun p =>
55    (x' p.1 * y' p.2) * (star (x p.1) * star (y p.2)))]
56  simp only [Fintype.sum_prod_type]
57  simp only [Finset.sum_mul, Finset.mul_sum]
58  rw [Finset.sum_comm (f := fun v w =>
59    x' v * y' w * (star (x v) * star (y w)))]
60  apply Finset.sum_congr rfl
61  intro v hv
62  apply Finset.sum_congr rfl
63  intro w hw
64  simp only [starRingEnd_apply]
65  ring
66 
67theorem tensorJoin_norm (x : TensorRegister n A) (y : TensorRegister m A) :
68    ‖tensorJoin x y‖ = ‖x‖ * ‖y‖ := by
69  have he := congrArg Complex.re (tensorJoin_inner x x y y)
70  rw [Complex.mul_re] at he
71  change (RCLike.re : ℂ → ℝ) ⟪tensorJoin x y, tensorJoin x y⟫_ℂ =
72    (RCLike.re : ℂ → ℝ) ⟪x, x⟫_ℂ * (RCLike.re : ℂ → ℝ) ⟪y, y⟫_ℂ -
73    (RCLike.im : ℂ → ℝ) ⟪x, x⟫_ℂ * (RCLike.im : ℂ → ℝ) ⟪y, y⟫_ℂ at he
74  simp only [inner_self_eq_norm_sq, inner_self_im, mul_zero, sub_zero] at he
75  have hx := norm_nonneg x
76  have hy := norm_nonneg y
77  have hz := norm_nonneg (tensorJoin x y)
78  nlinarith [mul_nonneg hx hy]
79 
80theorem tensorJoin_norm_one (x : TensorRegister n A) (y : TensorRegister m A)
81    (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) : ‖tensorJoin x y‖ = 1 := by
82  rw [tensorJoin_norm, hx, hy, one_mul]
83 
84theorem restrict_update_left (w : Fin (n + m) → A) (t : Fin n) (b : A) :
85    (fun i => Function.update w (Fin.castAdd m t) b (Fin.castAdd m i)) =
86      Function.update (fun i => w (Fin.castAdd m i)) t b := by
87  funext i
88  by_cases hi : i = t
89  · subst i; simp
90  · have hne : Fin.castAdd m i ≠ Fin.castAdd m t := by simpa using hi
91    simp [Function.update_of_ne hi, Function.update_of_ne hne]
92 
93theorem restrict_update_left_other (w : Fin (n + m) → A) (t : Fin n) (b : A) :
94    (fun j => Function.update w (Fin.castAdd m t) b (Fin.natAdd n j)) =
95      (fun j => w (Fin.natAdd n j)) := by
96  funext j
97  apply Function.update_of_ne
98  intro he
99  have := congrArg Fin.val he
100  simp only [Fin.val_natAdd, Fin.val_castAdd] at this
101  omega
102 
103theorem restrict_update_right (w : Fin (n + m) → A) (t : Fin m) (b : A) :
104    (fun j => Function.update w (Fin.natAdd n t) b (Fin.natAdd n j)) =
105      Function.update (fun j => w (Fin.natAdd n j)) t b := by
106  funext j
107  by_cases hj : j = t
108  · subst j; simp
109  · have hne : Fin.natAdd n j ≠ Fin.natAdd n t := by simpa using hj
110    simp [Function.update_of_ne hj, Function.update_of_ne hne]
111 
112theorem restrict_update_right_other (w : Fin (n + m) → A) (t : Fin m) (b : A) :
113    (fun i => Function.update w (Fin.natAdd n t) b (Fin.castAdd m i)) =
114      (fun i => w (Fin.castAdd m i)) := by
115  funext i
116  apply Function.update_of_ne
117  intro he
118  have := congrArg Fin.val he
119  simp only [Fin.val_natAdd, Fin.val_castAdd] at this
120  omega
121 
122/-- The actual collective matrix-unit generator obeys the tensor product rule. -/
123theorem collectiveGenerator_tensorJoin (a b : A)
124    (x : TensorRegister n A) (y : TensorRegister m A) :
125    collectiveGenerator (n + m) a b (tensorJoin x y) =
126      tensorJoin (collectiveGenerator n a b x) y +
127      tensorJoin x (collectiveGenerator m a b y) := by
128  ext w
129  simp only [collectiveGenerator_apply, tensorJoin_apply, lp.coeFn_add, Pi.add_apply,
130    Fin.sum_univ_add, Finset.sum_mul, Finset.mul_sum]
131  congr 1
132  · apply Finset.sum_congr rfl
133    intro t ht
134    rw [restrict_update_left, restrict_update_left_other]
135    split_ifs <;> simp
136  · apply Finset.sum_congr rfl
137    intro t ht
138    rw [restrict_update_right, restrict_update_right_other]
139    split_ifs <;> simp
140 
141theorem tensorJoin_raising_zero (a b : A) (x : TensorRegister n A)
142    (y : TensorRegister m A) (hx : collectiveGenerator n a b x = 0)
143    (hy : collectiveGenerator m a b y = 0) :
144    collectiveGenerator (n + m) a b (tensorJoin x y) = 0 := by
145  rw [collectiveGenerator_tensorJoin, hx, hy, tensorJoin_zero_left,
146    tensorJoin_zero_right, add_zero]
147 
148theorem tensorJoin_cartan (a : A) (x : TensorRegister n A) (y : TensorRegister m A)
149    (α β : ℂ) (hx : collectiveGenerator n a a x = α • x)
150    (hy : collectiveGenerator m a a y = β • y) :
151    collectiveGenerator (n + m) a a (tensorJoin x y) = (α + β) • tensorJoin x y := by
152  rw [collectiveGenerator_tensorJoin, hx, hy, tensorJoin_smul_left,
153    tensorJoin_smul_right, add_smul]
154 
155end Cloning.TensorLie