CalibratedPosterior.lean
1module23public import SubentropyCertificates.CalibratedConcavity4public import SubentropyCertificates.CalibratedPinching5public import SubentropyCertificates.CalibratedPure6public import SubentropyCertificates.CalibratedGram7public import SubentropyCertificates.QuantumMeasurement89/-! The calibrated posterior comparison in Proposition 25. -/10@[expose] public section11noncomputable section12set_option backward.isDefEq.respectTransparency false13open Matrix Set14open scoped BigOperators MatrixOrder ComplexOrder Kronecker15namespace SubentropyCertificates.AncillaCalibration16open D5.S3.Quantum.Foundation.FiniteStateChannel (DensityState)17open D5.S3.Quantum.Information.PartialTraceMutualInformation (productState)18open D5.S3.Quantum.Subentropy.ClassicalQuantumGram (cqRowSqrt conditionalSubentropy)19open SubentropyCertificates.ClassicalCurve20open SubentropyCertificates.MeasurementPosterior21open SubentropyCertificates.PinchingEquality2223variable {X B C Y : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]24 [Fintype C] [DecidableEq C] [Fintype Y]2526omit [Fintype X] [DecidableEq X] [DecidableEq B] in27private theorem labelMass_convex_sum (w : Y → ℝ) (H : Y → Matrix (X × B) (X × B) ℂ) :28 (∑ y, w y • labelMass (H y)) = labelMass (∑ y, w y • H y) := by29 funext x30 simp only [Finset.sum_apply, Pi.smul_apply, smul_eq_mul, labelMass, Matrix.sum_apply,31 Matrix.smul_apply, Complex.re_sum, Complex.smul_re, Finset.mul_sum]32 exact Finset.sum_comm3334/-- Spectral refinement bounds the calibrated pinching gap of a normalized Gram matrix35by f_ν of its label masses. -/36theorem calibrated_gap_le_labelMass (ν : DensityState C) (G : Matrix (X × B) (X × B) ℂ)37 (hG : G.PosSemidef) (htr : G.trace = 1) (i₀ : X × (B × C)) :38 calibratedGap ν G ≤ calibratedSubentropy ν (labelMass G) := by39 obtain ⟨w, hw, hs, v, hv, hmix, _⟩ := spectral_refinement G hG htr i₀.140 let R := fun j ↦ projector (v j)41 have hR (j) : (R j).PosSemidef ∧ (R j).trace = 1 := by42 refine ⟨Matrix.posSemidef_vecMulVec_self_star _, ?_⟩43 change (∑ a, v j a * star (v j a)) = 144 simpa only [amplitude, dotProduct, Pi.star_apply, mul_comm] using hv j45 have hp (j) : labelMass (R j) ∈ probabilitySimplex X := by46 refine ⟨labelMass_nonneg _ (hR j).1, ?_⟩47 rw [sum_labelMass, mass, (hR j).2, Complex.one_re]48 have hg := (calibrated_gap_laws ν i₀).1.map_sum_le (t := Finset.univ) (w := w) (p := R)49 (fun j _ ↦ hw j) hs (fun j _ ↦ hR j)50 have hf := (calibratedSubentropy_concave ν (i₀.1,i₀.2.2)).le_map_sum51 (t := Finset.univ) (w := w) (p := fun j ↦ labelMass (R j))52 (fun j _ ↦ hw j) hs (fun j _ ↦ hp j)53 have he : (∑ j, w j • R j) = G := hmix.symm54 rw [he] at hg55 rw [labelMass_convex_sum, he] at hf56 refine hg.trans (le_trans (le_of_eq ?_) hf)57 apply Finset.sum_congr rfl58 intro j _59 exact congrArg (w j • ·) (calibrated_gap_projector ν (v j) (hv j))6061/-- A finite decomposition into positive Gram pieces gives an average of f_ν over the62normalized, positive-mass outcomes. Zero-mass pieces vanish as matrices. -/63theorem calibrated_gap_le_outcome_average (ν : DensityState C) (G : Y → Matrix (X × B) (X × B) ℂ)64 (hG : ∀ y, (G y).PosSemidef) (ht : (∑ y, G y).trace = 1) (i₀ : X × (B × C)) :65 calibratedGap ν (∑ y, G y) ≤66 ∑ y ∈ Finset.univ.filter (fun y ↦ 0 < mass (G y)),67 mass (G y) * calibratedSubentropy ν (labelPosterior (G y)) := by68 classical69 let P := Finset.univ.filter (fun y ↦ 0 < mass (G y))70 let q y := mass (G y)71 let H y := (q y)⁻¹ • G y72 have hpos {y} (hy : y ∈ P) : 0 < q y := (Finset.mem_filter.mp hy).273 have hzero {y} (hy : y ∉ P) : q y = 0 := by74 have hn : ¬ 0 < mass (G y) := fun h ↦ hy (Finset.mem_filter.mpr ⟨Finset.mem_univ _, h⟩)75 exact le_antisymm (le_of_not_gt hn) (mass_nonneg _ (hG y))76 have hs : ∑ y ∈ P, q y = 1 := by77 rw [Finset.sum_subset (Finset.subset_univ P) (fun y _ hy ↦ hzero hy)]78 simp only [q, mass, ← Complex.re_sum, ← Matrix.trace_sum, ht, Complex.one_re]79 have hH (y) (hy : y ∈ P) : (H y).PosSemidef ∧ (H y).trace = 1 := by80 refine ⟨(hG y).smul (inv_nonneg.mpr (hpos hy).le), ?_⟩81 rw [show H y = (q y)⁻¹ • G y from rfl, trace_smul, psd_trace_eq_real_mass _ (hG y)]82 change (q y)⁻¹ • ((q y : ℝ) : ℂ) = 183 simp [(hpos hy).ne']84 have hmix : ∑ y ∈ P, q y • H y = ∑ y, G y := by85 calc86 _ = ∑ y ∈ P, G y := Finset.sum_congr rfl (fun y hy ↦ by87 simp only [H, smul_smul, mul_inv_cancel₀ (hpos hy).ne', one_smul])88 _ = _ := Finset.sum_subset (Finset.subset_univ P) (fun y _ hy ↦89 psd_eq_zero_of_mass_zero _ (hG y) (hzero hy))90 have hg := (calibrated_gap_laws ν i₀).1.map_sum_le (t := P) (w := q) (p := H)91 (fun _ hy ↦ (hpos hy).le) hs hH92 rw [hmix] at hg93 apply hg.trans94 apply Finset.sum_le_sum95 intro y hy96 have hlabels : labelMass (H y) = labelPosterior (G y) := by97 funext x98 rw [show H y = (q y)⁻¹ • G y from rfl, labelMass_smul]99 simp only [q, labelPosterior, div_eq_inv_mul]100 exact mul_le_mul_of_nonneg_left (hlabels ▸ calibrated_gap_le_labelMass ν (H y)101 (hH y hy).1 (hH y hy).2 i₀) (hpos hy).le102103private theorem density_index_nonempty {T : Type*} [Fintype T] [DecidableEq T] (τ : DensityState T) :104 Nonempty T := by105 by_contra h106 have := not_nonempty_iff.mp h107 have ht := τ.2.2108 simp [Matrix.trace] at ht109110/-- Proposition 25, posterior comparison: for any fixed independent ancillary state and111any finite POVM on the original system, the extended conditional subentropy is nonnegative112and bounded by the positive-outcome average of the calibrated label subentropy. -/113theorem ancilla_measurement_posterior_comparison114 (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)115 (ρ : X → DensityState B) (ν : DensityState C) (F : Y → Matrix B B ℂ)116 (hF : ∀ y, (F y).PosSemidef) (hsF : ∑ y, F y = 1) :117 0 ≤ conditionalSubentropy p hp hs (fun x ↦ productState (ρ x) ν) ∧118 conditionalSubentropy p hp hs (fun x ↦ productState (ρ x) ν) ≤119 ∑ y ∈ Finset.univ.filter (fun y ↦ 0 < outcomeProbability p ρ (F y)),120 outcomeProbability p ρ (F y) * calibratedSubentropy ν (posterior p ρ (F y)) := by121 classical122 have hX : Nonempty X := by123 by_contra h124 have := not_nonempty_iff.mp h125 simp at hs126 let x₀ := Classical.choice hX127 let i₀ := (x₀, Classical.choice (density_index_nonempty (ρ x₀)), Classical.choice (density_index_nonempty ν))128 let G y := effectGram p ρ (F y)129 have hG y : (G y).PosSemidef := effectGram_posSemidef p ρ (F y) (hF y)130 have hg := sum_effectGram p ρ F hsF131 have ht := gram_trace_one p hp hs ρ132 have ht' : (∑ y, G y).trace = 1 := by rw [show (∑ y, G y) = _ from hg]; exact ht133 rw [conditional_product_eq_calibratedGap]134 refine ⟨(calibrated_gap_laws ν i₀).2 _ (Matrix.posSemidef_conjTranspose_mul_self _) ht, ?_⟩135 have h := calibrated_gap_le_outcome_average ν G hG ht' i₀136 rw [show (∑ y, G y) = _ from hg] at h137 have hb (y) : labelPosterior (G y) = posterior p ρ (F y) := by138 funext x139 simp only [G, labelPosterior, mass_effectGram p hp ρ, labelMass_effectGram p hp ρ, posterior]140 simpa only [hb, G, mass_effectGram p hp ρ] using h141142end SubentropyCertificates.AncillaCalibration
Axioms used
Choose a statement to see which axioms its proof uses.