Offline · exact source
Exact Lean source

TensorFlatProjectorCopyCoupling

formalization/Cloning/TensorFlatProjectorCopyCoupling.lean

Source hash: 31f13b022688b3edb756cb7fa6c093176f3ece2ad7e9b3ef8bd04ac458a0b113

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.TensorFlatProjectorMixture
2import Cloning.TensorLANEmbeddingSelector
3 
4/-! Exact uniform lifting of a physical label coupling to the actual Schur copies. -/
5noncomputable section
6open scoped BigOperators Classical
7namespace Cloning.TensorCloning
8open Cloning.TensorLie Cloning.TensorLAN Cloning.YoungGeneral
9set_option maxHeartbeats 1500000
10set_option backward.isDefEq.respectTransparency false
11 
12section Finite
13variable {I J A B : Type*} [Fintype I] [Fintype J] [Fintype A] [Fintype B]
14    [DecidableEq A] [DecidableEq B]
15 
16theorem sum_by_label (labels : I → A) (f : A → ℝ) :
17    ∑ i, f (labels i) = ∑ a, (labelMultiplicity labels a : ℝ) * f a := by
18  calc
19    _ = ∑ i : I, ∑ a : A, if labels i=a then f a else 0 := by simp
20    _ = ∑ a : A, ∑ i : I, if labels i=a then f a else 0 := Finset.sum_comm
21    _ = _ := by simp [labelMultiplicity, Finset.sum_ite, mul_comm]
22 
23theorem sum_uniform_copies (labels : I → A) (f : A → ℝ)
24    (hf : ∀ a, labelMultiplicity labels a=0 → f a=0) :
25    ∑ i, f (labels i)/(labelMultiplicity labels (labels i) : ℝ) = ∑ a, f a := by
26  rw [sum_by_label labels (fun a => f a/(labelMultiplicity labels a : ℝ))]
27  apply Finset.sum_congr rfl
28  intro a _
29  by_cases ha : labelMultiplicity labels a=0
30  · simp [ha,hf a ha]
31  · field_simp
32 
33def uniformCopyCoupling (l : I → A) (r : J → B) (K : A → B → ℝ) (i : I) (j : J) : ℝ :=
34  K (l i) (r j) / ((labelMultiplicity l (l i) : ℝ)*(labelMultiplicity r (r j) : ℝ))
35 
36theorem labelMultiplicity_pos_at (l : I → A) (i : I) : 0 < labelMultiplicity l (l i) := by
37  apply Finset.card_pos.mpr
38  exact ⟨i, by simp [labelMultiplicity]⟩
39 
40theorem uniformCopyCoupling_row (l : I → A) (r : J → B) (K : A → B → ℝ)
41    (v : A → ℝ) (w : B → ℝ) (hK : ∀ a b, 0 ≤ K a b)
42    (hrow : ∀ a, ∑ b, K a b = (labelMultiplicity l a : ℝ)*v a)
43    (hcol : ∀ b, ∑ a, K a b = (labelMultiplicity r b : ℝ)*w b) (i : I) :
44    ∑ j, uniformCopyCoupling l r K i j = v (l i) := by
45  have hz (b : B) (hb : labelMultiplicity r b=0) : K (l i) b=0 := by
46    have he := Finset.single_le_sum (fun a _ => hK a b) (Finset.mem_univ (l i))
47    rw [hcol,hb,Nat.cast_zero,zero_mul] at he
48    exact le_antisymm he (hK _ _)
49  have he : (∑ j, uniformCopyCoupling l r K i j) =
50      (∑ j, K (l i) (r j)/(labelMultiplicity r (r j) : ℝ))/(labelMultiplicity l (l i) : ℝ) := by
51    rw [Finset.sum_div]
52    apply Finset.sum_congr rfl
53    intro j _
54    unfold uniformCopyCoupling
55    ring
56  rw [he,sum_uniform_copies r _ hz,hrow]
57  exact mul_div_cancel_left₀ _ (Nat.cast_ne_zero.mpr (labelMultiplicity_pos_at l i).ne')
58 
59theorem uniformCopyCoupling_col (l : I → A) (r : J → B) (K : A → B → ℝ)
60    (v : A → ℝ) (w : B → ℝ) (hK : ∀ a b, 0 ≤ K a b)
61    (hrow : ∀ a, ∑ b, K a b = (labelMultiplicity l a : ℝ)*v a)
62    (hcol : ∀ b, ∑ a, K a b = (labelMultiplicity r b : ℝ)*w b) (j : J) :
63    ∑ i, uniformCopyCoupling l r K i j = w (r j) := by
64  have he := uniformCopyCoupling_row r l (fun b a => K a b) w v
65    (fun b a => hK a b) hcol hrow j
66  simpa only [uniformCopyCoupling, mul_comm] using he
67 
68theorem uniformCopyCoupling_observable (l : I → A) (r : J → B) (K : A → B → ℝ)
69    (hzeroL : ∀ a b, labelMultiplicity l a=0 → K a b=0)
70    (hzeroR : ∀ a b, labelMultiplicity r b=0 → K a b=0) (f : A → B → ℝ) :
71    ∑ i : I, ∑ j : J, uniformCopyCoupling l r K i j*f (l i) (r j) =
72      ∑ a : A, ∑ b : B, K a b*f a b := by
73  have hi (i : I) : (∑ j : J, uniformCopyCoupling l r K i j*f (l i) (r j)) =
74      ∑ b : B, (K (l i) b*f (l i) b)/(labelMultiplicity l (l i) : ℝ) := by
75    have he : (∑ j : J, uniformCopyCoupling l r K i j*f (l i) (r j)) =
76        ∑ j : J, ((K (l i) (r j)*f (l i) (r j))/(labelMultiplicity l (l i) : ℝ)) /
77          (labelMultiplicity r (r j) : ℝ) := by
78      apply Finset.sum_congr rfl
79      intro j _
80      unfold uniformCopyCoupling
81      ring
82    rw [he]
83    exact sum_uniform_copies r (fun b => K (l i) b*f (l i) b/(labelMultiplicity l (l i) : ℝ))
84      (fun b hb => by simp only [hzeroR (l i) b hb, zero_mul, zero_div])
85  simp_rw [hi]
86  rw [Finset.sum_comm]
87  calc
88    _ = ∑ b : B, ∑ a : A, K a b*f a b := by
89      apply Finset.sum_congr rfl
90      intro b _
91      exact sum_uniform_copies l (fun a => K a b*f a b)
92        (fun a ha => by simp only [hzeroL a b ha, zero_mul])
93    _ = _ := Finset.sum_comm
94end Finite
95 
96variable {n m d : ℕ}
97def physicalCopyShape (n d : ℕ) (i : SchurCopy n d) : Shape d n :=
98  ((recursivePhysicalDecomposition n d).get i).shape
99 
100theorem physicalCopyShape_multiplicity (mu : Shape d n) :
101    labelMultiplicity (physicalCopyShape n d) mu =
102      physicalCopyCount (recursivePhysicalDecomposition n d) (fun a => (mu a).val) := by
103  unfold labelMultiplicity physicalCopyCount
104  congr 1
105  apply Finset.filter_congr
106  intro i _
107  exact PhysicalHighestTensor.shape_eq_iff _ mu
108 
109def labelCouplingCopies (K : Shape d n → Shape d m → ℝ) :=
110  uniformCopyCoupling (physicalCopyShape n d) (physicalCopyShape m d) K
111 
112theorem labelCouplingCopies_nonneg (K : Shape d n → Shape d m → ℝ)
113    (hK : ∀ mu lam, 0 ≤ K mu lam) (i : SchurCopy n d) (j : SchurCopy m d) :
114    0 ≤ labelCouplingCopies K i j := by
115  exact div_nonneg (hK _ _) (mul_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _))
116 
117theorem labelCouplingCopies_row (p : Fin d → ℝ) (hp : ∀a,0≤p a) (hs : ∑a,p a=1)
118    (K : Shape d n → Shape d m → ℝ) (hK : ∀ mu lam,0≤K mu lam)
119    (hrow : ∀ mu, ∑ lam,K mu lam=(tensorYoungPMF n d p hp hs mu).toReal)
120    (hcol : ∀ lam, ∑ mu,K mu lam=(tensorYoungPMF m d p hp hs lam).toReal)
121    (i : SchurCopy n d) : ∑ j,labelCouplingCopies K i j=knownCopyWeight n d p i := by
122  have hr (mu : Shape d n) : ∑ lam,K mu lam=
123      (labelMultiplicity (physicalCopyShape n d) mu : ℝ)*physicalSectorCharacter (fun a=>(mu a).val) p := by
124    rw [hrow, tensorYoungPMF, physicalYoungPMF_toReal, physicalCopyShape_multiplicity]
125  have hc (lam : Shape d m) : ∑ mu,K mu lam=
126      (labelMultiplicity (physicalCopyShape m d) lam : ℝ)*physicalSectorCharacter (fun a=>(lam a).val) p := by
127    rw [hcol, tensorYoungPMF, physicalYoungPMF_toReal, physicalCopyShape_multiplicity]
128  exact (uniformCopyCoupling_row _ _ K _ _ hK hr hc i).trans
129    (PhysicalHighestTensor.character_eq_physicalSectorCharacter _ p).symm
130 
131theorem labelCouplingCopies_col (p : Fin d → ℝ) (hp : ∀a,0≤p a) (hs : ∑a,p a=1)
132    (K : Shape d n → Shape d m → ℝ) (hK : ∀ mu lam,0≤K mu lam)
133    (hrow : ∀ mu, ∑ lam,K mu lam=(tensorYoungPMF n d p hp hs mu).toReal)
134    (hcol : ∀ lam, ∑ mu,K mu lam=(tensorYoungPMF m d p hp hs lam).toReal)
135    (j : SchurCopy m d) : ∑ i,labelCouplingCopies K i j=knownCopyWeight m d p j := by
136  have he := labelCouplingCopies_row p hp hs (fun lam mu => K mu lam) (fun lam mu => hK mu lam)
137    hcol hrow j
138  simpa only [labelCouplingCopies,uniformCopyCoupling,mul_comm] using he
139 
140theorem labelCouplingCopies_observable (p : Fin d → ℝ) (hp : ∀a,0≤p a) (hs : ∑a,p a=1)
141    (K : Shape d n → Shape d m → ℝ) (hK : ∀ mu lam,0≤K mu lam)
142    (hrow : ∀ mu, ∑ lam,K mu lam=(tensorYoungPMF n d p hp hs mu).toReal)
143    (hcol : ∀ lam, ∑ mu,K mu lam=(tensorYoungPMF m d p hp hs lam).toReal)
144    (f : Shape d n → Shape d m → ℝ) :
145    ∑ i, ∑ j, labelCouplingCopies K i j*f (physicalCopyShape n d i) (physicalCopyShape m d j) =
146      ∑ mu, ∑ lam, K mu lam*f mu lam := by
147  apply uniformCopyCoupling_observable
148  · intro mu lam hz
149    have he := Finset.single_le_sum (fun lam _ => hK mu lam) (Finset.mem_univ lam)
150    rw [hrow,tensorYoungPMF,physicalYoungPMF_toReal,← physicalCopyShape_multiplicity,hz,
151      Nat.cast_zero,zero_mul] at he
152    exact le_antisymm he (hK _ _)
153  · intro mu lam hz
154    have he := Finset.single_le_sum (fun mu _ => hK mu lam) (Finset.mem_univ mu)
155    rw [hcol,tensorYoungPMF,physicalYoungPMF_toReal,← physicalCopyShape_multiplicity,hz,
156      Nat.cast_zero,zero_mul] at he
157    exact le_antisymm he (hK _ _)
158 
159end Cloning.TensorCloning