Offline · exact source
Exact Lean source

TensorCloningShrinkingWindows

formalization/Cloning/TensorCloningShrinkingWindows.lean

Source hash: dc450b21e8aa15c606db2ed2a50430cc459b7220317f384847951a54315c72ef

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.

In the dependency map: Cartan sectors

Paper ↔ Lean correspondence in this module
Declarations in this module
1import Cloning.TensorCloningRetainedTypical
2import Cloning.PhysicalCloningConverseUnknown
3 
4/-! Arbitrary shrinking windows in the uniform Cartan-sector estimate.
5Mixture cardinalities and probabilities are unrestricted. -/
6noncomputable section
7open scoped BigOperators InnerProductSpace Classical Topology
8open Filter
9namespace Cloning.TensorCloning
10open Cloning.PCT Cloning.TensorLie Cloning.TensorLAN Cloning.InfiniteTraceClass Cloning.Hybrid
11open Cloning.YoungCompatibility
12set_option backward.isDefEq.respectTransparency false
13set_option maxHeartbeats 2400000
14set_option synthInstance.maxHeartbeats 200000
15variable {d : ℕ}
16local instance (n d : ℕ) : FiniteDimensional ℂ (TensorRegister n (Fin d)) :=
17  (registerBasis (Fin n → Fin d)).toOrthonormalBasis.toBasis.finiteDimensional_of_finite
18 
19/-- Vanishing coordinate errors give uniform convergence of varying families. -/
20theorem uniform_coordinates_of_shrinking {J : ℕ → Type*}
21    (x : ∀ N, J N → Fin d → ℝ) (pN : ℕ → Fin d → ℝ) (p : Fin d → ℝ)
22    (δ : ℕ → ℝ) (hδ : Tendsto δ atTop (𝓝 0))
23    (hp : ∀ a, Tendsto (fun N => pN N a) atTop (𝓝 (p a)))
24    (hx : ∀ N j a, |x N j a-pN N a| ≤ δ N)
25    (a : Fin d) (ε : ℝ) (hε : 0<ε) :
26    ∀ᶠ N in atTop, ∀ j : J N, |x N j a-p a|<ε := by
27  filter_upwards [hδ.eventually (eventually_lt_nhds (show (0:ℝ)<ε/2 by positivity)),
28    (Metric.tendsto_nhds.mp (hp a) (ε/2) (by positivity))] with N hN hpN j
29  rw [Real.dist_eq] at hpN
30  have h := abs_sub_le (x N j a) (pN N a) (p a)
31  have hb := hx N j a
32  linarith
33 
34/-- One threshold works for every spectrum, target, finite source family and
35probability law in an arbitrary shrinking window. This is actual root fidelity
36of the physical Cartan mixture, with no typical-window restriction. -/
37theorem eventually_uniform_shrinkingWindow_mixture_fidelity
38    (K : Set (SimpleSpectrum d)) (hK : IsCompact K)
39    (m : ℕ → ℕ) (γ : ℝ) (hγ : 1<γ)
40    (hgain : Tendsto (fun n => (m n : ℝ)/n) atTop (𝓝 γ))
41    (δ : ℕ → ℝ) (hδ : Tendsto δ atTop (𝓝 0))
42    (ε : ℝ) (hε : 0<ε) :
43    ∀ᶠ (n : ℕ) in atTop, ∀ p∈K, ∀ s : ℕ,
44      ∀ (μ : Fin s → Fin d → ℕ) (ν : Fin d → ℕ)
45        (hμ : ∀ j, Antitone (μ j)) (hν : Antitone ν),
46      (∀ j a, |(μ j a : ℝ)/n-p.eigenvalue a|≤δ n) →
47      (∀ a, |(ν a : ℝ)/(m n : ℝ)-p.eigenvalue a|≤δ n) →
48      ∀ (q : Fin s → ℝ) (hq : ∀ j, 0≤q j), (∑ j,q j)=1 →
49      |(partitionTransitionMixture μ ν hμ hν p.eigenvalue p.positive q hq).rootFidelity
50        (partitionGibbsPositive ν hν p.eigenvalue p.positive)-orbitalValue γ p|<ε := by
51  rw [eventually_atTop]
52  by_contra h
53  push_neg at h
54  choose n hn p hpK s μ ν hμ hν hμclose hνclose q hq hs hb using h
55  have hnlim : Tendsto n atTop atTop := tendsto_atTop_mono hn tendsto_id
56  obtain ⟨p₀,hp₀,φ,hφ,hconv⟩ := (hK.image SimpleSpectrum.continuous_eigenvalue).tendsto_subseq
57    (fun N => show (p N).eigenvalue ∈ SimpleSpectrum.eigenvalue '' K from ⟨p N,hpK N,rfl⟩)
58  obtain ⟨p₁,hp₁,rfl⟩ := hp₀
59  have hlim a : Tendsto (fun N => (p (φ N)).eigenvalue a) atTop (𝓝 (p₁.eigenvalue a)) :=
60    (continuous_apply a).continuousAt.tendsto.comp hconv
61  have hsample := hnlim.comp hφ.tendsto_atTop
62  have hμlim := uniform_coordinates_of_shrinking
63    (fun N (j : Fin (s (φ N))) a => (μ (φ N) j a : ℝ)/(n (φ N) : ℝ))
64    (fun N => (p (φ N)).eigenvalue) p₁.eigenvalue
65    (fun N => δ (n (φ N))) (hδ.comp hsample) hlim (fun N => hμclose (φ N))
66  have hνscaled (a : Fin d) :
67      Tendsto (fun N => (ν (φ N) a : ℝ)/(m (n (φ N)) : ℝ)) atTop (𝓝 (p₁.eigenvalue a)) := by
68    apply Metric.tendsto_nhds.mpr
69    intro η hη
70    have hh := uniform_coordinates_of_shrinking (J := fun _ => Unit)
71      (fun N _ a => (ν (φ N) a : ℝ)/(m (n (φ N)) : ℝ))
72      (fun N => (p (φ N)).eigenvalue) p₁.eigenvalue
73      (fun N => δ (n (φ N))) (hδ.comp hsample) hlim
74      (fun N _ => hνclose (φ N)) a η hη
75    exact hh.mono (fun N hN => by simpa only [Real.dist_eq] using hN ())
76  have hm := PhysicalCloningConverse.output_size_tendsto m γ (by linarith) hgain
77  have hνlim (a : Fin d) :
78      Tendsto (fun N => (ν (φ N) a : ℝ)/(n (φ N) : ℝ)) atTop (𝓝 (γ*p₁.eigenvalue a)) := by
79    have hh := (hgain.comp hsample).mul (hνscaled a)
80    apply hh.congr'
81    filter_upwards [(hm.comp hsample).eventually (eventually_gt_atTop 0)] with N hN
82    have hm0 : (m (n (φ N)) : ℝ) ≠ 0 := by exact_mod_cast hN.ne'
83    dsimp only [Function.comp_apply]
84    field_simp
85  have hf := partitionTransitionMixture_rootFidelity_tendsto
86    (fun N => n (φ N)) hsample (fun N => μ (φ N)) (fun N => ν (φ N))
87    (fun N => hμ (φ N)) (fun N => hν (φ N))
88    (fun N => (p (φ N)).eigenvalue) (fun N => (p (φ N)).positive) p₁ hlim γ hγ hμlim hνlim
89    (fun N => q (φ N)) (fun N => hq (φ N)) (fun N => hs (φ N))
90  have hpconv : Tendsto (fun N => p (φ N)) atTop (𝓝 p₁) :=
91    SimpleSpectrum.isEmbedding_eigenvalue.tendsto_nhds_iff.mpr hconv
92  have ho := (continuous_orbitalValue (by linarith : 0<γ)).continuousAt.tendsto.comp hpconv
93  have he := hf.sub ho
94  rw [sub_self] at he
95  obtain ⟨N,hN⟩ := (Metric.tendsto_nhds.mp he ε hε).exists
96  rw [Real.dist_eq,sub_zero] at hN
97  exact (not_lt_of_ge (hb (φ N))) hN
98 
99/-- Signed lattice compatibility follows from scaled row limits; output
100nonnegativity and dominance are not assumptions. -/
101theorem eventually_intCompatible_of_scaled_limits
102    (n m : ℕ → ℕ) (hn : Tendsto n atTop atTop) (μ ν : ℕ → Fin d → ℤ)
103    (hμmass : ∀ N, ∑ a,μ N a=(n N : ℤ)) (hνmass : ∀ N, ∑ a,ν N a=(m N : ℤ))
104    (p : Fin d → ℝ) (hp : ∀ a,0<p a) (hord : StrictAnti p)
105    (γ : ℝ) (hγ : 1<γ)
106    (hμ : ∀ a,Tendsto (fun N => (μ N a : ℝ)/(n N : ℝ)) atTop (𝓝 (p a)))
107    (hν : ∀ a,Tendsto (fun N => (ν N a : ℝ)/(n N : ℝ)) atTop (𝓝 (γ*p a))) :
108    ∀ᶠ N in atTop,Compatible (n N : ℤ) (m N : ℤ) (μ N) (ν N) := by
109  have hd (a : Fin d) : Tendsto
110      (fun N => (ν N a : ℝ)/(n N : ℝ)-(μ N a : ℝ)/(n N : ℝ)) atTop (𝓝 ((γ-1)*p a)) := by
111    have he : γ*p a-p a=(γ-1)*p a := by ring
112    simpa only [he] using (hν a).sub (hμ a)
113  have hpos : ∀ᶠ N in atTop,∀ a,
114      0<(ν N a : ℝ)/(n N : ℝ)-(μ N a : ℝ)/(n N : ℝ) :=
115    eventually_all.mpr (fun a => (hd a).eventually (eventually_gt_nhds (mul_pos (sub_pos.mpr hγ) (hp a))))
116  have hgap : ∀ᶠ N in atTop,∀ r : PositiveRoot d,
117      0<((ν N r.val.1 : ℝ)/(n N : ℝ)-(μ N r.val.1 : ℝ)/(n N : ℝ))-
118        ((ν N r.val.2 : ℝ)/(n N : ℝ)-(μ N r.val.2 : ℝ)/(n N : ℝ)) := by
119    apply eventually_all.mpr
120    intro r
121    apply ((hd r.val.1).sub (hd r.val.2)).eventually
122    apply eventually_gt_nhds
123    nlinarith [hord r.property]
124  filter_upwards [hpos,hgap,hn.eventually (eventually_gt_atTop 0)] with N hN hg hN0
125  have hnreal : (0:ℝ)<n N := by exact_mod_cast hN0
126  refine ⟨?_,?_,?_⟩
127  · intro a
128    have hh := hN a
129    rw [← sub_div,div_pos_iff_of_pos_right hnreal] at hh
130    exact_mod_cast hh.le
131  · intro a b hab
132    rcases hab.eq_or_lt with rfl | hab
133    · exact le_rfl
134    have hh := hg ⟨(a,b),hab⟩
135    simp only at hh
136    rw [← sub_div,← sub_div,← sub_div,div_pos_iff_of_pos_right hnreal] at hh
137    have hreal : (ν N b : ℝ)-(μ N b : ℝ)≤(ν N a : ℝ)-(μ N a : ℝ) := by linarith
138    exact_mod_cast hreal
139  · rw [Finset.sum_sub_distrib,hμmass,hνmass]
140 
141/-- Arbitrary shrinking windows make the signed output lattice label and its
142source difference Young labels, uniformly over both labels and the spectrum. -/
143theorem eventually_uniform_shrinkingWindow_compatible
144    (K : Set (SimpleSpectrum d)) (hK : IsCompact K)
145    (m : ℕ → ℕ) (γ : ℝ) (hγ : 1<γ)
146    (hgain : Tendsto (fun n => (m n : ℝ)/n) atTop (𝓝 γ))
147    (δ : ℕ → ℝ) (hδ : Tendsto δ atTop (𝓝 0)) :
148    ∀ᶠ (n : ℕ) in atTop,∀ p∈K,∀ μ ν : Fin d → ℤ,
149      IsYoung (n : ℤ) μ → (∑ a,ν a)=(m n : ℤ) →
150      (∀ a,|(μ a : ℝ)/n-p.eigenvalue a|≤δ n) →
151      (∀ a,|(ν a : ℝ)/(m n : ℝ)-p.eigenvalue a|≤δ n) →
152      Compatible (n : ℤ) (m n : ℤ) μ ν ∧ IsYoung (m n : ℤ) ν := by
153  rw [eventually_atTop]
154  by_contra h
155  push_neg at h
156  choose n hn p hpK μ ν hμ hνmass hμclose hνclose hb using h
157  have hnlim : Tendsto n atTop atTop := tendsto_atTop_mono hn tendsto_id
158  obtain ⟨p₀,hp₀,φ,hφ,hconv⟩ := (hK.image SimpleSpectrum.continuous_eigenvalue).tendsto_subseq
159    (fun N => show (p N).eigenvalue ∈ SimpleSpectrum.eigenvalue '' K from ⟨p N,hpK N,rfl⟩)
160  obtain ⟨p₁,hp₁,rfl⟩ := hp₀
161  have hlim a : Tendsto (fun N => (p (φ N)).eigenvalue a) atTop (𝓝 (p₁.eigenvalue a)) :=
162    (continuous_apply a).continuousAt.tendsto.comp hconv
163  have hsample := hnlim.comp hφ.tendsto_atTop
164  have hsource (a : Fin d) : Tendsto
165      (fun N => (μ (φ N) a : ℝ)/(n (φ N) : ℝ)) atTop (𝓝 (p₁.eigenvalue a)) := by
166    apply Metric.tendsto_nhds.mpr
167    intro η hη
168    have hh := uniform_coordinates_of_shrinking (J:=fun _ => Unit)
169      (fun N _ a => (μ (φ N) a : ℝ)/(n (φ N) : ℝ))
170      (fun N => (p (φ N)).eigenvalue) p₁.eigenvalue
171      (fun N => δ (n (φ N))) (hδ.comp hsample) hlim (fun N _ => hμclose (φ N)) a η hη
172    exact hh.mono (fun N hN => by simpa only [Real.dist_eq] using hN ())
173  have htarget (a : Fin d) : Tendsto
174      (fun N => (ν (φ N) a : ℝ)/(m (n (φ N)) : ℝ)) atTop (𝓝 (p₁.eigenvalue a)) := by
175    apply Metric.tendsto_nhds.mpr
176    intro η hη
177    have hh := uniform_coordinates_of_shrinking (J:=fun _ => Unit)
178      (fun N _ a => (ν (φ N) a : ℝ)/(m (n (φ N)) : ℝ))
179      (fun N => (p (φ N)).eigenvalue) p₁.eigenvalue
180      (fun N => δ (n (φ N))) (hδ.comp hsample) hlim (fun N _ => hνclose (φ N)) a η hη
181    exact hh.mono (fun N hN => by simpa only [Real.dist_eq] using hN ())
182  have hm := PhysicalCloningConverse.output_size_tendsto m γ (by linarith) hgain
183  have htarget' (a : Fin d) : Tendsto
184      (fun N => (ν (φ N) a : ℝ)/(n (φ N) : ℝ)) atTop (𝓝 (γ*p₁.eigenvalue a)) := by
185    have hh := (hgain.comp hsample).mul (htarget a)
186    apply hh.congr'
187    filter_upwards [(hm.comp hsample).eventually (eventually_gt_atTop 0)] with N hN
188    have hm0 : (m (n (φ N)) : ℝ) ≠ 0 := by exact_mod_cast hN.ne'
189    dsimp only [Function.comp_apply]
190    field_simp
191  have hc := eventually_intCompatible_of_scaled_limits
192    (fun N => n (φ N)) (fun N => m (n (φ N))) hsample
193    (fun N => μ (φ N)) (fun N => ν (φ N))
194    (fun N => (hμ (φ N)).2.2) (fun N => hνmass (φ N))
195    p₁.eigenvalue p₁.positive p₁.strictAnti γ hγ hsource htarget'
196  obtain ⟨N,hN⟩ := hc.exists
197  have hy := compatible_isYoung (hμ (φ N)) hN
198  exact hb (φ N) hN hy
199 
200/-- The single-sector assertion is included with the same arbitrary window. -/
201theorem eventually_uniform_shrinkingWindow_sector_fidelity
202    (K : Set (SimpleSpectrum d)) (hK : IsCompact K)
203    (m : ℕ → ℕ) (γ : ℝ) (hγ : 1<γ)
204    (hgain : Tendsto (fun n => (m n : ℝ)/n) atTop (𝓝 γ))
205    (δ : ℕ → ℝ) (hδ : Tendsto δ atTop (𝓝 0))
206    (ε : ℝ) (hε : 0<ε) :
207    ∀ᶠ (n : ℕ) in atTop,∀ p∈K,
208      ∀ (μ ν : Fin d → ℕ) (hμ : Antitone μ) (hν : Antitone ν),
209      (∀ a,|(μ a : ℝ)/n-p.eigenvalue a|≤δ n) →
210      (∀ a,|(ν a : ℝ)/(m n : ℝ)-p.eigenvalue a|≤δ n) →
211      |(partitionTransitionOutput μ ν hμ hν p.eigenvalue p.positive).rootFidelity
212        (partitionGibbsPositive ν hν p.eigenvalue p.positive)-orbitalValue γ p|<ε := by
213  filter_upwards [eventually_uniform_shrinkingWindow_mixture_fidelity K hK m γ hγ hgain δ hδ ε hε]
214    with n hn p hp μ ν hμ hν hμclose hνclose
215  have hh := hn p hp 1 (fun _ => μ) ν (fun _ => hμ) hν
216    (fun _ => hμclose) hνclose (fun _ => 1) (fun _ => by norm_num) (by simp)
217  have he : partitionTransitionMixture (fun _ : Fin 1 => μ) ν (fun _ => hμ) hν
218      p.eigenvalue p.positive (fun _ => 1) (fun _ => by norm_num) =
219      partitionTransitionOutput μ ν hμ hν p.eigenvalue p.positive := by
220    apply Subtype.ext
221    simp only [partitionTransitionMixture,PositiveTraceClass.finiteMixture_val,Fin.sum_univ_one,
222      Complex.ofReal_one,one_smul]
223  simpa only [he] using hh
224 
225end Cloning.TensorCloning