Exact Lean source
TensorCloningCopyAffinity
formalization/Cloning/TensorCloningCopyAffinity.lean
Source hash: 6ed944424d8a61c338da9a94e53d20a9ae1b4188a97363c1cf49a2ef0d750b70
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
theorem
Cloning.TensorCloning.probability_map_eq_sumtheorem Cloning.TensorCloning.affinity_map_of_constant_fibersdefinition Cloning.TensorCloning.universalOutputCopyPMFtheorem Cloning.TensorCloning.physicalCopyPMF_integer_labeltheorem Cloning.TensorCloning.universalOutputCopyPMF_integer_labeltheorem Cloning.TensorCloning.universalCopyPMF_constant_fiberstheorem Cloning.TensorCloning.universalOutputCopyPMF_constant_fiberstheorem Cloning.TensorCloning.physicalCopyPMF_constant_fiberstheorem Cloning.TensorCloning.universalOutputCopyPMF_affinity1import Cloning.TensorCloningKernelLabels
2import Cloning.TensorLANEmbeddingSchurWeights
3import Cloning.YoungPhysicalRoundingLabels
4
5/-! Exact preservation of classical fidelity when uniformly distributed
6physical multiplicity copies are grouped into their Young labels. -/
7noncomputable section
8open scoped BigOperators Classical ENNReal
9namespace Cloning.TensorCloning
10open Cloning.TensorLie Cloning.TensorLAN Cloning.YoungGeneral Cloning.YoungCompatibility
11open Cloning.YoungHyperplane
12set_option backward.isDefEq.respectTransparency false
13set_option maxHeartbeats 1000000
14
15section FiberAffinity
16variable {ι Λ : Type*} [Fintype ι] [DecidableEq Λ]
17
18theorem probability_map_eq_sum (P : PMF ι) (label : ι → Λ) (a : Λ) :
19 probability (P.map label) a = ∑ i ∈ Finset.univ.filter (fun i ↦ label i = a), probability P i := by
20 rw [probability, PMF.map_apply, tsum_fintype,
21 ENNReal.toReal_sum (by intro i hi; split_ifs <;> simp [P.apply_ne_top i])]
22 simp only [Finset.sum_filter]
23 apply Finset.sum_congr rfl
24 intro i hi
25 by_cases h : label i = a
26 · simp only [h, if_true, probability]
27 · simp only [h, Ne.symm h, if_false, ENNReal.toReal_zero]
28
29/-- Grouping copies loses no affinity when each law is constant on every
30multiplicity fiber. The label type can be countably infinite. -/
31theorem affinity_map_of_constant_fibers (P Q : PMF ι) (label : ι → Λ)
32 (hP : ∀ i j, label i = label j → probability P i = probability P j)
33 (hQ : ∀ i j, label i = label j → probability Q i = probability Q j) :
34 CountableScheffe.affinity (probability (P.map label)) (probability (Q.map label)) =
35 CountableScheffe.affinity (probability P) (probability Q) := by
36 unfold CountableScheffe.affinity
37 rw [tsum_eq_sum (s := Finset.univ.image label) (by
38 intro a ha
39 have hz : probability (P.map label) a = 0 := by
40 rw [probability_map_eq_sum]
41 apply Finset.sum_eq_zero
42 intro i hi
43 exact False.elim (ha (Finset.mem_image.mpr ⟨i, Finset.mem_univ i, (Finset.mem_filter.mp hi).2⟩))
44 rw [hz, Real.sqrt_zero, zero_mul])]
45 rw [tsum_fintype]
46 calc
47 (∑ a ∈ Finset.univ.image label, Real.sqrt (probability (P.map label) a) *
48 Real.sqrt (probability (Q.map label) a)) =
49 ∑ a ∈ Finset.univ.image label, ∑ i ∈ Finset.univ.filter (fun i ↦ label i = a),
50 Real.sqrt (probability P i) * Real.sqrt (probability Q i) := by
51 apply Finset.sum_congr rfl
52 intro a ha
53 obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp ha
54 let S := Finset.univ.filter (fun i ↦ label i = label j)
55 have hps : (∑ i ∈ S, probability P i) = (S.card : ℝ) * probability P j := by
56 rw [Finset.sum_congr rfl (fun i hi ↦ hP i j (Finset.mem_filter.mp hi).2),
57 Finset.sum_const, nsmul_eq_mul]
58 have hqs : (∑ i ∈ S, probability Q i) = (S.card : ℝ) * probability Q j := by
59 rw [Finset.sum_congr rfl (fun i hi ↦ hQ i j (Finset.mem_filter.mp hi).2),
60 Finset.sum_const, nsmul_eq_mul]
61 rw [probability_map_eq_sum, probability_map_eq_sum]
62 change Real.sqrt (∑ i ∈ S, probability P i) * Real.sqrt (∑ i ∈ S, probability Q i) = _
63 rw [hps, hqs, Real.sqrt_mul (Nat.cast_nonneg _), Real.sqrt_mul (Nat.cast_nonneg _)]
64 have he : ∀ i ∈ S, Real.sqrt (probability P i) * Real.sqrt (probability Q i) =
65 Real.sqrt (probability P j) * Real.sqrt (probability Q j) := by
66 intro i hi
67 rw [hP i j (Finset.mem_filter.mp hi).2, hQ i j (Finset.mem_filter.mp hi).2]
68 rw [show (∑ i ∈ Finset.univ.filter (fun i ↦ label i = label j),
69 Real.sqrt (probability P i) * Real.sqrt (probability Q i)) =
70 (S.card : ℝ) * (Real.sqrt (probability P j) * Real.sqrt (probability Q j)) by
71 rw [Finset.sum_congr rfl he, Finset.sum_const, nsmul_eq_mul]]
72 calc
73 _ = (Real.sqrt (S.card : ℝ) * Real.sqrt (S.card : ℝ)) *
74 (Real.sqrt (probability P j) * Real.sqrt (probability Q j)) := by ring
75 _ = _ := by rw [Real.mul_self_sqrt (Nat.cast_nonneg _)]
76 _ = _ := Finset.sum_fiberwise_of_maps_to (fun i _ ↦ Finset.mem_image.mpr ⟨i, Finset.mem_univ i, rfl⟩) _
77
78end FiberAffinity
79
80/-- The output-copy law of the literal spectrum-independent channel. -/
81def universalOutputCopyPMF (n m d : ℕ) (p : Fin (d+1) → ℝ)
82 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : PMF (SchurCopy m (d+1)) :=
83 (physicalCopyPMF n (d+1) p hp hs).bind (universalCopyPMF n m d)
84
85theorem physicalCopyPMF_integer_label (n d : ℕ) (p : Fin (d+1) → ℝ)
86 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
87 (physicalCopyPMF n (d+1) p hp hs).map (integerCopyLabel n d) =
88 tensorYoungIntegerPMF d n p hp hs := by
89 rw [tensorYoungIntegerPMF, tensorYoungPMF_eq_map_copies, PMF.map_comp]
90 rfl
91
92theorem universalOutputCopyPMF_integer_label (n m d : ℕ) (p : Fin (d+1) → ℝ)
93 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
94 (universalOutputCopyPMF n m d p hp hs).map (integerCopyLabel m d) =
95 tensorYoungFallbackOutput d n m ((m : ℝ)/(n : ℝ)) p hp hs := by
96 rw [universalOutputCopyPMF, PMF.map_bind]
97 simp_rw [universalCopyPMF_label]
98 rw [tensorYoungFallbackOutput, tensorYoungPMF_eq_map_copies, PMF.bind_map]
99 rfl
100
101theorem universalCopyPMF_constant_fibers (n m d : ℕ) (i : SchurCopy n (d+1))
102 (j k : SchurCopy m (d+1)) (hjk : integerCopyLabel m d j = integerCopyLabel m d k) :
103 universalCopyPMF n m d i j = universalCopyPMF n m d i k := by
104 unfold universalCopyPMF
105 rw [PMF.bind_apply, PMF.bind_apply]
106 apply tsum_congr
107 intro ν
108 by_cases hz : fallbackKernel ((m : ℝ)/(n : ℝ)) n m (integerCopyLabel n d i) ν = 0
109 · simp [hz]
110 · have hv := fallbackKernel_support_isYoung ((m : ℝ)/(n : ℝ)) n m
111 (by omega) (integerCopyLabel n d i) (integerCopyLabel_isYoung n d i) ν hz
112 simp only [uniformFiberPMF_apply _ _ ν (exists_copy_integer_label m d ν hv), hjk]
113
114theorem universalOutputCopyPMF_constant_fibers (n m d : ℕ) (p : Fin (d+1) → ℝ)
115 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1)
116 (j k : SchurCopy m (d+1)) (hjk : integerCopyLabel m d j = integerCopyLabel m d k) :
117 probability (universalOutputCopyPMF n m d p hp hs) j =
118 probability (universalOutputCopyPMF n m d p hp hs) k := by
119 unfold probability universalOutputCopyPMF
120 congr 1
121 rw [PMF.bind_apply, PMF.bind_apply]
122 apply tsum_congr
123 intro i
124 rw [universalCopyPMF_constant_fibers n m d i j k hjk]
125
126theorem physicalCopyPMF_constant_fibers (n d : ℕ) (p : Fin (d+1) → ℝ)
127 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1)
128 (j k : SchurCopy n (d+1)) (hjk : integerCopyLabel n d j = integerCopyLabel n d k) :
129 probability (physicalCopyPMF n (d+1) p hp hs) j =
130 probability (physicalCopyPMF n (d+1) p hp hs) k := by
131 have hw : ((recursivePhysicalDecomposition n (d+1)).get j).weight =
132 ((recursivePhysicalDecomposition n (d+1)).get k).weight := by
133 funext a
134 have ha := congrFun hjk a
135 change (((recursivePhysicalDecomposition n (d+1)).get j).weight a : ℤ) =
136 (((recursivePhysicalDecomposition n (d+1)).get k).weight a : ℤ) at ha
137 exact_mod_cast ha
138 simp only [probability, physicalCopyPMF_toReal,
139 PhysicalHighestTensor.character_eq_physicalSectorCharacter, hw]
140
141/-- The actual copy sampler retains exactly the classical Young-label
142fidelity. No multiplicity correction remains in the global protocol. -/
143theorem universalOutputCopyPMF_affinity (n m d : ℕ) (p : Fin (d+1) → ℝ)
144 (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
145 CountableScheffe.affinity (probability (universalOutputCopyPMF n m d p hp hs))
146 (probability (physicalCopyPMF m (d+1) p hp hs)) =
147 CountableScheffe.affinity
148 (probability (tensorYoungFallbackOutput d n m ((m : ℝ)/(n : ℝ)) p hp hs))
149 (probability (tensorYoungIntegerPMF d m p hp hs)) := by
150 rw [← affinity_map_of_constant_fibers _ _ (integerCopyLabel m d)
151 (universalOutputCopyPMF_constant_fibers n m d p hp hs)
152 (physicalCopyPMF_constant_fibers m d p hp hs),
153 universalOutputCopyPMF_integer_label, physicalCopyPMF_integer_label]
154
155end Cloning.TensorCloning