Offline · exact source
Exact Lean source

TensorRankOneProduct

formalization/Cloning/TensorRankOneProduct.lean

Source hash: 2f7be67bdfbcd4381a606cff5c0eecc5f46d1f8b0a90fa096673420697b52b19

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.TensorRankOneHighest
2import Cloning.TensorCartanStateProduct
3import Cloning.PCTCoordinateFrame
4import Cloning.PCTGaussianAssembly
5 
6/-! The first-factor highest projector is the literal fixed-input-slot operator. -/
7noncomputable section
8open scoped BigOperators InnerProductSpace
9namespace Cloning.TensorLie
10open Cloning.PCT Cloning.TensorCloning Cloning.GeneralSymmetricOccupation Cloning.InfiniteTraceClass
11set_option maxHeartbeats 1200000
12set_option backward.isDefEq.respectTransparency false
13 
14local instance {n d : ℕ} : FiniteDimensional ℂ (TensorRegister n (Fin d)) :=
15  (registerBasis (Fin n → Fin d)).toOrthonormalBasis.toBasis.finiteDimensional_of_finite
16 
17theorem rankOne_top_occupation {n d : ℕ} (Ω : TensorRegister n (Fin (d+1)))
18    (hnorm : ‖Ω‖=1) (htop : collectiveGenerator n 0 0 Ω=(n:ℂ) • Ω) :
19    InnerProductSpace.rankOne ℂ Ω Ω=InnerProductSpace.rankOne ℂ (highestTensor n d) (highestTensor n d) := by
20  let c := Ω (fun _=>0)
21  have he : Ω=c • highestTensor n d := top_occupation_eq_smul_highest Ω htop
22  have hcc : star c*c=1 := by
23    have h := inner_self_eq_norm_sq_to_K (𝕜 := ℂ) Ω
24    rw [hnorm] at h
25    rw [he,inner_smul_left,inner_smul_right,
26      inner_self_eq_norm_sq_to_K,highestTensor_norm] at h
27    norm_num only [one_pow,map_one,mul_one,starRingEnd_apply] at h
28    exact h
29  apply ContinuousLinearMap.ext
30  intro x
31  rw [he]
32  simp only [InnerProductSpace.rankOne_apply,inner_smul_left,smul_smul,starRingEnd_apply]
33  have hc (a : ℂ) : (star c*a)*c=a := by rw [mul_right_comm,hcc,one_mul]
34  rw [hc]
35 
36theorem inputSlots_subset_letterSlots_iff {n m d : ℕ} (w : Fin (n+m) → Fin (d+1)) :
37    inputSlots n (n+m) (Nat.le_add_right n m) ⊆ letterSlots w 0 ↔
38      (fun i : Fin n => w (Fin.castAdd m i))=(fun _=>0) := by
39  simp only [Finset.subset_iff,mem_inputSlots,mem_letterSlots,funext_iff]
40  constructor
41  · intro h i
42    exact h i.isLt
43  · intro h i hi
44    have he : Fin.castAdd m (⟨i.val,hi⟩ : Fin n)=i := Fin.ext rfl
45    rw [← he]
46    exact h _
47 
48theorem fixedSlotProjector_tensorJoin {n m d : ℕ}
49    (x : TensorRegister n (Fin (d+1))) (y : TensorRegister m (Fin (d+1))) :
50    fixedSlotProjector 0 (inputSlots n (n+m) (Nat.le_add_right n m)) (tensorJoin x y)=
51      tensorJoin (InnerProductSpace.rankOne ℂ (highestTensor n d) (highestTensor n d) x) y := by
52  ext w
53  simp only [fixedSlotProjector_apply,inputSlots_subset_letterSlots_iff]
54  simp only [tensorJoin_apply,InnerProductSpace.rankOne_apply,highestTensor,registerBasis_apply,
55    lp.inner_single_left,RCLike.inner_apply,map_one,mul_one,
56    lp.coeFn_smul,Pi.smul_apply,smul_eq_mul,lp.single_apply,Pi.single_apply]
57  split_ifs with hw
58  · rw [hw]
59    simp
60  · simp
61 
62theorem pureSlotsOperator_basis_zero {L d : ℕ} (S : Finset (Fin L)) :
63    pureSlotsOperator (registerBasis (Fin (d+1)) 0) S=fixedSlotProjector 0 S := by
64  have h := tensorFrame_fixedSlot_physical
65    (Cloning.PCTGlobal.coordinateFrame (Equiv.refl (Fin (d+1)))) 0 S
66  simp only [Cloning.PCTGlobal.coordinateFrame_apply,Equiv.refl_apply] at h
67  rw [← h]
68  apply register_operator_ext
69  intro a b
70  exact (Cloning.PCTGlobal.coordinate_operator_coefficient (Equiv.refl (Fin (d+1))) L
71    (fixedSlotProjector 0 S) a b)
72 
73def oneRowHighestVector (n d : ℕ) :
74    cyclicSector (partitionHighestTensor (oneRowPartition n d) (oneRowPartition_antitone n d)) :=
75  ⟨partitionHighestTensor _ _,highest_mem_cyclicSector _⟩
76 
77theorem oneRowHighest_rankOne_apply (n d : ℕ)
78    (x : cyclicSector (partitionHighestTensor (oneRowPartition n d) (oneRowPartition_antitone n d))) :
79    ((vectorProjector (oneRowHighestVector n d)).1 x :
80      TensorRegister (∑i,oneRowPartition n d i) (Fin (d+1)))=
81      InnerProductSpace.rankOne ℂ (highestTensor (∑i,oneRowPartition n d i) d)
82        (highestTensor (∑i,oneRowPartition n d i) d) x.val := by
83  have ht : collectiveGenerator (∑i,oneRowPartition n d i) 0 0
84      (partitionHighestTensor (oneRowPartition n d) (oneRowPartition_antitone n d))=
85      ((∑i,oneRowPartition n d i : ℕ):ℂ) • partitionHighestTensor _ _ :=
86    (partitionHighestTensor_cartan _ _ 0).trans (by congr 1; simp [oneRowPartition])
87  exact congrArg (fun T => T (x : TensorRegister (∑i,oneRowPartition n d i) (Fin (d+1))))
88    (rankOne_top_occupation _ (partitionHighestTensor_norm _ _) ht)
89 
90theorem cartanProductOperator_oneRow_highest (n m d : ℕ) :
91    let mu := oneRowPartition n d
92    let nu := oneRowPartition m d
93    let hm := oneRowPartition_antitone n d
94    let hn := oneRowPartition_antitone m d
95    let S := tensorProductSector (cyclicSector (partitionHighestTensor mu hm))
96      (cyclicSector (partitionHighestTensor nu hn))
97    S.subtypeL.comp (cartanProductOperator mu nu hm hn (vectorProjector (oneRowHighestVector n d)).1)=
98      (fixedSlotProjector 0 (inputSlots (∑i,mu i) ((∑i,mu i)+∑i,nu i) (Nat.le_add_right _ _))).comp
99        S.subtypeL := by
100  dsimp only
101  apply ContinuousLinearMap.coe_injective
102  apply (cartanProductBasis _ _ _ _).toBasis.ext
103  intro i
104  simp only [OrthonormalBasis.coe_toBasis,cartanProductBasis,productSectorBasis_apply,
105    ContinuousLinearMap.comp_apply]
106  change (cartanProductOperator _ _ _ _ _ (cartanProductVector _ _ _ _
107    (partitionBasis _ _ i.1) (partitionBasis _ _ i.2))).val=_
108  rw [cartanProductOperator_productVector]
109  change tensorJoin ((vectorProjector (oneRowHighestVector n d)).1 (partitionBasis _ _ i.1)).val
110    (partitionBasis _ _ i.2).val=_
111  rw [oneRowHighest_rankOne_apply]
112  exact (fixedSlotProjector_tensorJoin _ _).symm
113 
114end Cloning.TensorLie