Offline · exact source
Exact Lean source

TensorLANEmbeddingCellProtocol

formalization/Cloning/TensorLANEmbeddingCellProtocol.lean

Source hash: 52e2fb7b8199fbf1df7b572cbc60e2489aa7e5ace9cae005f846b28640e773cb

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.TensorLANEmbeddingWhiteningGaussian
2import Cloning.TensorLANEmbeddingSelector
3 
4/-! Parameter-independent classical cells and quantization, coupled to the
5actual physical Schur/Fock channels at every sample size. -/
6noncomputable section
7open scoped BigOperators Topology Classical InnerProductSpace NNReal ENNReal
8open MeasureTheory Filter
9namespace Cloning.TensorLAN
10open Cloning.YoungHyperplane Cloning.PCTJointGaussianWhitening Cloning.TensorLie
11open Cloning.InfiniteTraceClass Cloning.Hybrid Cloning.PCT
12set_option backward.isDefEq.respectTransparency false
13set_option maxHeartbeats 1200000
14variable {d : ℕ}
15 
16/-- The genuine uniform cell probability density on the full root space. -/
17def rootCellDensity (d N : ℕ) (p : Fin (d+1) → ℝ) (mu : Lattice d (N : ℤ)) :
18    rootSpace d → ℝ :=
19  sampleInterpolate d N p (fun nu => (PMF.pure mu nu).toReal)
20 
21theorem rootCellDensity_nonneg (d N : ℕ) (p : Fin (d+1) → ℝ)
22    (mu : Lattice d (N : ℤ)) (x : rootSpace d) : 0 ≤ rootCellDensity d N p mu x := by
23  unfold rootCellDensity sampleInterpolate euclideanInterpolate interpolate
24    YoungRounding.affineDensity YoungRounding.interpolate
25  positivity
26 
27theorem rootCellDensity_integral (d N : ℕ) (hN : 0 < N) (p : Fin (d+1) → ℝ)
28    (mu : Lattice d (N : ℤ)) : (∫ x, rootCellDensity d N p mu x) = 1 := by
29  rw [rootCellDensity, sampleInterpolate_integral d N (by exact_mod_cast hN)]
30  · exact (YoungCompatibility.hasSum_probability (PMF.pure mu)).tsum_eq
31  · exact (YoungCompatibility.hasSum_probability (PMF.pure mu)).summable
32 
33theorem rootCellDensity_integrable (d N : ℕ) (hN : 0 < N) (p : Fin (d+1) → ℝ)
34    (mu : Lattice d (N : ℤ)) : Integrable (rootCellDensity d N p mu) := by
35  by_contra hi
36  have h := rootCellDensity_integral d N hN p mu
37  rw [integral_undef hi] at h
38  norm_num at h
39 
40/-- Each physical copy has its actual complete affine lattice label. -/
41def schurCopyLattice (N d : ℕ) (i : SchurCopy N (d+1)) : Lattice d (N : ℤ) :=
42  ⟨fun a => (((recursivePhysicalDecomposition N (d+1)).get i).weight a : ℤ),
43    by
44      change (∑ a, (((recursivePhysicalDecomposition N (d+1)).get i).weight a : ℤ)) = (N : ℤ)
45      exact_mod_cast ((recursivePhysicalDecomposition N (d+1)).get i).weight_sum⟩
46 
47variable (p : Fin (d+1) → ℝ) (hp : ∀ a, 0 < p a)
48    (b : OrthonormalBasis (Fin (d+1)) ℝ (EuclideanSpace ℝ (Fin (d+1))))
49    (hb : b 0 = sqrtSpectrum p)
50 
51/-- At positive sample sizes this is precisely the whitened fixed-reference
52cell. The zero-fold experiment is completed by a normalized Gaussian. -/
53def physicalCellDensity (N : ℕ) (i : SchurCopy N (d+1)) : (Fin d → ℝ) → ℝ :=
54  if 0 < N then whiteningDensity (rootWhitening p hp b hb)
55    (rootCellDensity d N p (schurCopyLattice N d i))
56  else GaussianAffinity.productDensity (fun _ : Fin d => (1/2 : ℝ))
57 
58theorem physicalCellDensity_nonneg (N : ℕ) (i : SchurCopy N (d+1)) (x : Fin d → ℝ) :
59    0 ≤ physicalCellDensity p hp b hb N i x := by
60  unfold physicalCellDensity
61  split_ifs
62  · exact mul_nonneg (NNReal.coe_nonneg _) (rootCellDensity_nonneg ..)
63  · exact GaussianAffinity.productDensity_nonneg _ _
64 
65theorem physicalCellDensity_integrable (N : ℕ) (i : SchurCopy N (d+1)) :
66    Integrable (physicalCellDensity p hp b hb N i) := by
67  unfold physicalCellDensity
68  split_ifs with hn
69  · exact whiteningDensity_integrable _ _ (rootCellDensity_integrable d N hn p _)
70  · exact Integrable.fintype_prod fun _ => GaussianAffinity.integrable_density (by norm_num)
71 
72theorem physicalCellDensity_integral (N : ℕ) (i : SchurCopy N (d+1)) :
73    (∫ x, physicalCellDensity p hp b hb N i x) = 1 := by
74  unfold physicalCellDensity
75  split_ifs with hn
76  · rw [whiteningDensity_integral, rootCellDensity_integral d N hn]
77  · exact GaussianAffinity.integral_productDensity _ (fun _ => by norm_num)
78 
79/-- A literal forward channel, depending only on the fixed base spectrum,
80its whitening frame, and the retained quantum cutoff. -/
81def physicalCellForward (N R : ℕ) :
82    QuantumToHybrid (TensorRegister N (Fin (d+1))) (RootFock (d+1))
83      (volume : Measure (Fin d → ℝ)) :=
84  schurForward N (d+1) R (physicalCellDensity p hp b hb N)
85    (physicalCellDensity_integrable p hp b hb N)
86    (physicalCellDensity_nonneg p hp b hb N)
87    (physicalCellDensity_integral p hp b hb N)
88 
89def physicalCellQuantizer (N : ℕ) (x : Fin d → ℝ) : Lattice d (N : ℤ) :=
90  sampleLabel d N p ((rootWhitening p hp b hb).symm x)
91 
92theorem physicalCellQuantizer_measurable (N : ℕ) :
93    Measurable (physicalCellQuantizer p hp b hb N) :=
94  (measurable_sampleLabel d N p).comp (rootWhitening p hp b hb).symm.continuous.measurable
95 
96/-- A fixed actual tensor vector provides the completely positive replacement
97on any unrepresented affine lattice outcome. -/
98def physicalFallback (N d : ℕ) : DensityState (TensorRegister N (Fin (d+1))) :=
99  DensityState.pure (registerBasis (Fin N → Fin (d+1)) (fun _ => 0))
100    ((registerBasis _).orthonormal.norm_eq_one _)
101 
102/-- Reverse quantization reads a complete integer label, chooses uniformly
103among its physical copies, and uses the genuine all-input reverse sector map. -/
104def physicalCellReverse (N R : ℕ) :
105    HybridToQuantum (RootFock (d+1)) (TensorRegister N (Fin (d+1)))
106      (volume : Measure (Fin d → ℝ)) :=
107  schurReverse N (d+1) R (physicalFallback N d)
108    (uniformLabelSelector (schurCopyLattice N d) (physicalCellQuantizer p hp b hb N))
109    (fun i => (uniformLabelSelector_measurable _ _
110      (physicalCellQuantizer_measurable p hp b hb N) i).aestronglyMeasurable)
111    (uniformLabelSelector_nonneg _ _) (uniformLabelSelector_sum _ _)
112 
113end Cloning.TensorLAN