Offline · exact source
Exact Lean source

TensorCartanFrame

formalization/Cloning/TensorCartanFrame.lean

Source hash: 4728a9c90ba340ff93d1e706326c9cdf3fd568c117ffb75b64d42e6c6f227d8c

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.TensorCartanProduct
2import Mathlib.Analysis.InnerProductSpace.PiL2
3 
4/-! Actual orthonormal coordinates on the physical tensor-product subspace. -/
5noncomputable section
6open scoped BigOperators InnerProductSpace
7namespace Cloning.TensorLie
8open Cloning.PCT
9set_option maxHeartbeats 1000000
10set_option backward.isDefEq.respectTransparency false
11variable {n m d : ℕ}
12 
13@[simp] theorem tensorJoin_sum_left {ι : Type*} (s : Finset ι)
14    (x : ι → TensorRegister n (Fin d)) (y : TensorRegister m (Fin d)) :
15    tensorJoin (∑ i ∈ s, x i) y = ∑ i ∈ s, tensorJoin (x i) y := by
16  ext w
17  simp [tensorJoin_apply, lp.coeFn_sum, Finset.sum_mul]
18 
19@[simp] theorem tensorJoin_sum_right {ι : Type*} (s : Finset ι)
20    (x : TensorRegister n (Fin d)) (y : ι → TensorRegister m (Fin d)) :
21    tensorJoin x (∑ i ∈ s, y i) = ∑ i ∈ s, tensorJoin x (y i) := by
22  ext w
23  simp [tensorJoin_apply, lp.coeFn_sum, Finset.mul_sum]
24 
25variable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]
26    (P : Submodule ℂ (TensorRegister n (Fin d)))
27    (Q : Submodule ℂ (TensorRegister m (Fin d)))
28    (bP : OrthonormalBasis I ℂ P) (bQ : OrthonormalBasis J ℂ Q)
29 
30def productSectorFrame (ij : I × J) : tensorProductSector P Q :=
31  ⟨tensorJoin (bP ij.1) (bQ ij.2),
32    tensorJoin_mem_tensorProductSector P Q (bP ij.1).property (bQ ij.2).property⟩
33 
34@[simp] theorem productSectorFrame_coe (ij : I × J) :
35    (productSectorFrame P Q bP bQ ij : TensorRegister (n + m) (Fin d)) =
36      tensorJoin (bP ij.1) (bQ ij.2) := rfl
37 
38theorem productSectorFrame_orthonormal : Orthonormal ℂ (productSectorFrame P Q bP bQ) := by
39  rw [orthonormal_iff_ite]
40  intro i j
41  change ⟪tensorJoin (bP i.1 : TensorRegister n (Fin d)) (bQ i.2 : TensorRegister m (Fin d)),
42    tensorJoin (bP j.1 : TensorRegister n (Fin d)) (bQ j.2 : TensorRegister m (Fin d))⟫_ℂ = _
43  rw [tensorJoin_inner]
44  change ⟪bP i.1, bP j.1⟫_ℂ * ⟪bQ i.2, bQ j.2⟫_ℂ = _
45  rw [orthonormal_iff_ite.mp bP.orthonormal, orthonormal_iff_ite.mp bQ.orthonormal]
46  by_cases h1 : i.1 = j.1 <;> by_cases h2 : i.2 = j.2 <;>
47    simp [h1, h2, Prod.ext_iff]
48 
49theorem tensorJoin_basis_expansion (x : P) (y : Q) :
50    tensorJoin (x : TensorRegister n (Fin d)) (y : TensorRegister m (Fin d)) =
51      ∑ i : I, ∑ j : J, (bP.repr x i * bQ.repr y j) •
52        tensorJoin (bP i) (bQ j) := by
53  have hx := congrArg (fun z : P => (z : TensorRegister n (Fin d))) (bP.sum_repr x)
54  have hy := congrArg (fun z : Q => (z : TensorRegister m (Fin d))) (bQ.sum_repr y)
55  simp only [Submodule.coe_sum, Submodule.coe_smul] at hx hy
56  conv_lhs => rw [← hx, ← hy]
57  simp only [tensorJoin_sum_left, tensorJoin_sum_right, tensorJoin_smul_left,
58    tensorJoin_smul_right, Finset.smul_sum, smul_smul]
59  rw [Finset.sum_comm]
60  simp only [mul_comm]
61 
62/-- Every literal product of sector vectors lies in the span of the product
63orthonormal frame, by finite expansions in the two actual sector bases. -/
64theorem productSectorFrame_spans :
65    ⊤ ≤ Submodule.span ℂ (Set.range (productSectorFrame P Q bP bQ)) := by
66  let S := Submodule.span ℂ (Set.range (productSectorFrame P Q bP bQ))
67  let T := S.map (tensorProductSector P Q).subtype
68  have hT : tensorProductSector P Q ≤ T := by
69    apply Submodule.span_le.mpr
70    rintro z ⟨x, hx, y, hy, rfl⟩
71    rw [tensorJoin_basis_expansion P Q bP bQ ⟨x, hx⟩ ⟨y, hy⟩]
72    apply T.sum_mem
73    intro i hi
74    apply T.sum_mem
75    intro j hj
76    apply T.smul_mem
77    exact ⟨productSectorFrame P Q bP bQ (i, j),
78      Submodule.subset_span (Set.mem_range_self (i, j)), rfl⟩
79  intro x _
80  obtain ⟨y, hy, he⟩ := hT x.property
81  have hxy : y = x := Subtype.ext he
82  rw [← hxy]
83  exact hy
84 
85/-- An actual complete orthonormal basis of the physical product subspace. -/
86def productSectorBasis : OrthonormalBasis (I × J) ℂ (tensorProductSector P Q) :=
87  OrthonormalBasis.mk (productSectorFrame_orthonormal P Q bP bQ)
88    (productSectorFrame_spans P Q bP bQ)
89 
90@[simp] theorem productSectorBasis_apply (ij : I × J) :
91    productSectorBasis P Q bP bQ ij = productSectorFrame P Q bP bQ ij := by
92  simp [productSectorBasis]
93 
94end Cloning.TensorLie