Offline · exact source
Exact Lean source

PCTCountMeasurementMixture

formalization/Cloning/PCTCountMeasurementMixture.lean

Source hash: 7c326358d085946463a021981f371f0e6443b2b3572c67401f959960b611c869

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.PCTCountMeasurementSmoothing
2import Cloning.PCTCountParameters
3import Cloning.ChannelAveraging
4 
5/-! The measured density of the actual tensor-product Gaussian mixture is
6exactly the conditional count mixture, with positivity and mass proved. -/
7noncomputable section
8open scoped BigOperators InnerProductSpace ComplexOrder Classical
9open MeasureTheory
10namespace Cloning.PCTCountMeasurement
11open Cloning.PCT Cloning.GeneralSymmetricOccupation Cloning.PCTReducedGaussian
12open Cloning.InfiniteTraceClass Cloning.InfiniteFiniteCorner Cloning.Hybrid
13open Cloning.YoungGeneral Cloning.YoungHyperplane Cloning.CountMultinomial
14open Cloning.PCTPhysicalState Cloning.PCTCount Cloning.PCTLocalChart
15open Cloning.MultimodeCoherentGaussianMixture
16set_option backward.isDefEq.respectTransparency false
17set_option maxHeartbeats 1000000
18 
19theorem measuredDensity_matrixTensorPower (d N : ℕ) (hN : 0<N)
20    (ρ : Matrix (Fin (d+1)) (Fin (d+1)) ℂ) (p : Fin (d+1) → ℝ)
21    (hp : ∀ i,0≤p i) (hs : ∑ i,p i=1) (hdiag : ∀ i,ρ i i=(p i : ℂ))
22    (x : rootSpace d) : measuredDensity d N (matrixTensorPower ρ N) x=density d N p hp hs x := by
23  rw [measuredDensity_eq_clm d N hN, density_eq_word_sum d N hN]
24  simp only [densityCLM, ContinuousLinearMap.smul_apply, smul_eq_mul, weightCLM_apply_any]
25  congr 1
26  apply Finset.sum_congr rfl
27  intro w _
28  have he (w : Word N (d+1)) :
29      ⟪registerBasis (Word N (d+1)) w,(matrixTensorPower ρ N).1 (registerBasis _ w)⟫_ℂ =
30        (wordWeight p w : ℂ) := by
31    change matrixOf (registerBasis (Word N (d+1)))
32      (ofMatrix (registerBasis (Word N (d+1))) (fun a c => ∏ i,ρ (a i) (c i))) w w = _
33    rw [matrixOf_ofMatrix (registerBasis (Word N (d+1))).orthonormal]
34    simp only [hdiag, ← Complex.ofReal_prod, wordWeight]
35  unfold latticeWordLabel
36  by_cases hw : sampleLabel d N (flatSpectrum (d+1)) x=shapeLattice d N (countShape w)
37  · simp only [hw, if_true, he, Complex.ofReal_re]
38  · simp only [hw, if_false, Ne.symm hw]
39 
40theorem measuredDensity_tensorState {d : ℕ} (ρ : Cloning.MatrixFidelity.State (Fin (d+1)))
41    (N : ℕ) (hN : 0<N) (x : rootSpace d) :
42    measuredDensity d N (tensorState ρ N).1 x = density d N (stateProbability ρ)
43      (stateProbability_nonneg ρ) (stateProbability_sum ρ) x := by
44  apply measuredDensity_matrixTensorPower d N hN
45  intro i
46  have hi := Complex.nonneg_iff.mp (ρ.positive.diag_nonneg (i := i))
47  apply Complex.ext <;> simp [stateProbability,hi.2]
48 
49theorem measuredDensity_frameState {d s : ℕ}
50    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (Fin (d+1) × Fin (d+1))))
51    (z : Fin s → ℂ) (N : ℕ) (hN : 0<N) (x : rootSpace d) :
52    measuredDensity d N (frameState u z N).1 x=density d N (particleProbability u z N)
53      (particleProbability_nonneg u z N) (particleProbability_sum u z N) x :=
54  measuredDensity_tensorState (reducedState (frameParticle u z N) (frameParticle_norm u.orthonormal z N)) N hN x
55 
56theorem traceClass_integral_nonneg {H X : Type*} [NormedAddCommGroup H]
57    [InnerProductSpace ℂ H] [CompleteSpace H] [MeasurableSpace X]
58    (μ : Measure X) (A : X → TraceClass H) (hA : Integrable A μ) (hpos : ∀ x,0≤(A x).1) :
59    0≤(∫ x,A x ∂μ).1 := by
60  apply nonneg_of_inner_nonneg
61  intro v
62  have he := ((traceClassMatrixCoefficient v v).integral_comp_comm hA).symm
63  change ⟪v,(∫ x,A x ∂μ).1 v⟫_ℂ = ∫ x,⟪v,(A x).1 v⟫_ℂ ∂μ at he
64  rw [he]
65  exact integral_complex_nonneg ((traceClassMatrixCoefficient v v).integrable_comp hA)
66    (fun x => ((A x).1.nonneg_iff_isPositive.mp (hpos x)).inner_nonneg_right v)
67 
68theorem integral_frameState_nonneg {d s : ℕ}
69    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (Fin (d+1) × Fin (d+1))))
70    (N : ℕ) (μ : Measure (Fin s → ℂ)) [IsFiniteMeasure μ] :
71    0≤(∫ z,(frameState u z N).1 ∂μ).1 :=
72  traceClass_integral_nonneg μ _ (integrable_frameState u N μ) (fun z => (frameState u z N).2)
73 
74theorem norm_integral_frameState {d s : ℕ}
75    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (Fin (d+1) × Fin (d+1))))
76    (N : ℕ) (μ : Measure (Fin s → ℂ)) [IsProbabilityMeasure μ] :
77    ‖∫ z,(frameState u z N).1 ∂μ‖=1 := by
78  rw [TraceClass.norm_eq_trace_re_of_nonneg _ (integral_frameState_nonneg u N μ)]
79  have he := ((Complex.reCLM.comp ((traceCLM : TraceClass (Register (Fin N → Fin (d+1))) →L[ℂ] ℂ).restrictScalars ℝ)).integral_comp_comm
80    (integrable_frameState u N μ)).symm
81  change (traceCLM (∫ z,(frameState u z N).1 ∂μ)).re=
82    ∫ z,(traceCLM (frameState u z N).1).re ∂μ at he
83  change (traceCLM (∫ z,(frameState u z N).1 ∂μ)).re=1
84  rw [he]
85  have ht z : (traceCLM (frameState u z N).1).re=1 := by
86    exact (TraceClass.norm_eq_trace_re_of_nonneg _ (frameState u z N).2).symm.trans
87      (norm_frameState u z N)
88  simp only [ht, integral_const, probReal_univ, one_smul]
89 
90theorem measuredDensity_frameMixture {d s : ℕ}
91    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (Fin (d+1) × Fin (d+1))))
92    (v : ℝ) (hv : 0<v) (N : ℕ) (hN : 0<N) (x : rootSpace d) :
93    measuredDensity d N (∫ z,(frameState u z N).1 ∂gaussianProductMeasure (fun _ : Fin s => v)) x=
94      ∫ z, density d N (particleProbability u z N) (particleProbability_nonneg u z N)
95        (particleProbability_sum u z N) x ∂gaussianProductMeasure (fun _ : Fin s => v) := by
96  letI := gaussianProductMeasure_probability (fun _ : Fin s => hv)
97  rw [measuredDensity_integral _ d N hN _ (integrable_frameState u N _)]
98  exact integral_congr_ae (Filter.Eventually.of_forall (fun z => measuredDensity_frameState u z N hN x))
99 
100end Cloning.PCTCountMeasurement