Exact Lean source
TensorCloningKernel
formalization/Cloning/TensorCloningKernel.lean
Source hash: 51ee9ffd351b871004d0f834767107a2f7e9a2ee483a72df1c3675b223f95a9c
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.standardCount_postheorem Cloning.TensorCloning.exists_copy_weightdefinition Cloning.TensorCloning.oneRowPartitiontheorem Cloning.TensorCloning.oneRowPartition_antitonetheorem Cloning.TensorCloning.oneRowPartition_sumdefinition Cloning.TensorCloning.fallbackCopytheorem Cloning.TensorCloning.fallbackCopy_weightdefinition Cloning.TensorCloning.uniformFiberPMFtheorem Cloning.TensorCloning.uniformFiberPMF_applytheorem Cloning.TensorCloning.uniformFiberPMF_labeldefinition Cloning.TensorCloning.integerCopyLabeldefinition Cloning.TensorCloning.universalCopyPMFdefinition Cloning.TensorCloning.universalChannel1import Cloning.TensorCloningChannel
2import Cloning.TensorSchurDecompositionMultiplicity
3import Cloning.YoungHookVandermonde
4import Cloning.YoungCompatibilityFallback
5import Mathlib.Probability.Distributions.Uniform
6
7/-! The actual normalized randomized Young-label cloning kernel, distributed
8uniformly across physical multiplicity copies. -/
9noncomputable section
10open scoped BigOperators Classical ENNReal
11namespace Cloning.TensorCloning
12open Cloning.TensorLie Cloning.TensorLAN Cloning.YoungGeneral Cloning.YoungCompatibility
13open Cloning.PCT Cloning.InfiniteTraceClass
14set_option backward.isDefEq.respectTransparency false
15set_option maxHeartbeats 800000
16
17theorem standardCount_pos {d n : ℕ} (μ : Fin d → ℕ) (hμ : Antitone μ) (hn : ∑ i, μ i = n) :
18 0 < standardCount n μ := by
19 have h : (0 : ℝ) < (standardCount n μ : ℝ) := by
20 rw [standardCount_eq_vandermonde μ hμ hn]
21 apply mul_pos
22 · apply mul_pos (Nat.cast_pos.mpr (Nat.factorial_pos _))
23 apply Finset.prod_pos
24 intro i hi
25 apply Finset.prod_pos
26 intro j hj
27 apply sub_pos.mpr
28 exact_mod_cast shiftedRow_strictAnti μ hμ (Finset.mem_Ioi.mp hj)
29 · apply Finset.prod_pos
30 intro i hi
31 exact inv_pos.mpr (Nat.cast_pos.mpr (Nat.factorial_pos _))
32 exact_mod_cast h
33
34/-- Every actual partition occurs among the physical Schur copies. -/
35theorem exists_copy_weight {n d : ℕ} (μ : Fin d → ℕ) (hμ : Antitone μ)
36 (hn : ∑ i, μ i = n) :
37 ∃ j : SchurCopy n d, ((recursivePhysicalDecomposition n d).get j).weight = μ := by
38 have hc := recursivePhysicalDecomposition_copyCount n d μ
39 have hp : 0 < physicalCopyCount (recursivePhysicalDecomposition n d) μ := by
40 rw [hc]
41 exact standardCount_pos μ hμ hn
42 obtain ⟨j, hj⟩ := Finset.card_pos.mp hp
43 exact ⟨j, (Finset.mem_filter.mp hj).2⟩
44
45def oneRowPartition (n d : ℕ) : Fin (d+1) → ℕ := fun i ↦ if i = 0 then n else 0
46
47theorem oneRowPartition_antitone (n d : ℕ) : Antitone (oneRowPartition n d) := by
48 intro i j hij
49 by_cases hi : i = 0
50 · simp only [oneRowPartition, hi, if_true]
51 split_ifs <;> omega
52 · have hj : j ≠ 0 := by intro hj; exact hi (le_antisymm (hj ▸ hij) (Fin.zero_le _))
53 simp [oneRowPartition, hi, hj]
54
55@[simp] theorem oneRowPartition_sum (n d : ℕ) : ∑ i, oneRowPartition n d i = n := by
56 simp [oneRowPartition]
57
58def fallbackCopy (n d : ℕ) : SchurCopy n (d+1) :=
59 Classical.choose (exists_copy_weight (oneRowPartition n d) (oneRowPartition_antitone n d)
60 (oneRowPartition_sum n d))
61
62theorem fallbackCopy_weight (n d : ℕ) :
63 ((recursivePhysicalDecomposition n (d+1)).get (fallbackCopy n d)).weight = oneRowPartition n d :=
64 Classical.choose_spec (exists_copy_weight (oneRowPartition n d) (oneRowPartition_antitone n d)
65 (oneRowPartition_sum n d))
66
67section Fiber
68variable {ι Λ : Type*} [Fintype ι] [DecidableEq Λ]
69
70def uniformFiberPMF (label : ι → Λ) (i₀ : ι) (a : Λ) : PMF ι :=
71 if h : (Finset.univ.filter (fun i ↦ label i = a)).Nonempty then
72 PMF.uniformOfFinset (Finset.univ.filter (fun i ↦ label i = a)) h
73 else PMF.pure i₀
74
75theorem uniformFiberPMF_apply (label : ι → Λ) (i₀ : ι) (a : Λ)
76 (h : ∃ i, label i = a) (j : ι) :
77 uniformFiberPMF label i₀ a j =
78 if label j = a then ((Finset.univ.filter (fun i ↦ label i = a)).card : ℝ≥0∞)⁻¹ else 0 := by
79 have hn : (Finset.univ.filter (fun i ↦ label i = a)).Nonempty := by
80 obtain ⟨i, hi⟩ := h
81 exact ⟨i, Finset.mem_filter.mpr ⟨Finset.mem_univ i, hi⟩⟩
82 simp [uniformFiberPMF, hn]
83
84theorem uniformFiberPMF_label (label : ι → Λ) (i₀ : ι) (a : Λ)
85 (h : ∃ i, label i = a) : (uniformFiberPMF label i₀ a).map label = PMF.pure a := by
86 apply PMF.ext
87 intro b
88 rw [PMF.map_apply]
89 simp_rw [uniformFiberPMF_apply label i₀ a h]
90 by_cases hb : b = a
91 · subst b
92 have he : (∑' i, if a = label i then uniformFiberPMF label i₀ a i else 0) = 1 := by
93 rw [show (fun i ↦ if a = label i then uniformFiberPMF label i₀ a i else 0) =
94 uniformFiberPMF label i₀ a by
95 funext i
96 rw [uniformFiberPMF_apply label i₀ a h]
97 by_cases hi : label i = a <;> simp [hi, eq_comm]]
98 exact (uniformFiberPMF label i₀ a).tsum_coe
99 simpa only [uniformFiberPMF_apply label i₀ a h, PMF.pure_apply, if_true] using he
100 · rw [PMF.pure_apply, if_neg hb]
101 simp only [tsum_fintype]
102 apply Finset.sum_eq_zero
103 intro i hi
104 by_cases hj : label i = a <;> simp [hj, hb, eq_comm]
105
106end Fiber
107
108def integerCopyLabel (n d : ℕ) (i : SchurCopy n (d+1)) : Fin (d+1) → ℤ :=
109 fun a ↦ (((recursivePhysicalDecomposition n (d+1)).get i).weight a : ℤ)
110
111/-- The spectrum-independent randomized output-copy law is constructed by
112composing the normalized manuscript fallback kernel with uniform multiplicity
113sampling. It is a genuine PMF for every finite sample size. -/
114def universalCopyPMF (n m d : ℕ) (i : SchurCopy n (d+1)) : PMF (SchurCopy m (d+1)) :=
115 (fallbackKernel ((m : ℝ) / (n : ℝ)) (n : ℤ) (m : ℤ) (integerCopyLabel n d i)).bind
116 (uniformFiberPMF (integerCopyLabel m d) (fallbackCopy m d))
117
118/-- Actual global cloning channel with no spectral parameter in its
119construction, defined at all sample sizes (including n=0). -/
120def universalChannel (n m d : ℕ) :
121 QuantumChannel (TensorRegister n (Fin (d+1))) (TensorRegister m (Fin (d+1))) :=
122 channel n m (d+1) (fun i j ↦ (universalCopyPMF n m d i j).toReal)
123 (fun _ _ ↦ ENNReal.toReal_nonneg) (fun i ↦ by
124 simpa only [probability, tsum_fintype] using (hasSum_probability (universalCopyPMF n m d i)).tsum_eq)
125
126end Cloning.TensorCloning