PositiveEquality.lean
1module2public import SubentropyCertificates.PinchingRank3public import SubentropyCertificates.PosteriorRefinement4public import SubentropyCertificates.PureGramSignals56/-! Necessity at positive conditional subentropy in the measurement7comparison. The pure decomposition is constructed from the given effects. -/8@[expose] public section9noncomputable section10set_option backward.isDefEq.respectTransparency false11open Matrix12open scoped BigOperators ComplexOrder MatrixOrder13namespace SubentropyCertificates.PinchingEquality14open D5.S3.Quantum.Foundation.FiniteStateChannel15open D5.S3.Quantum.Subentropy.ClassicalQuantumGram16open D5.S3.Quantum.Subentropy.PinchingGap17open SubentropyCertificates.MeasurementPosterior18open SubentropyCertificates.Discrimination19open SubentropyCertificates.ClassicalCurve20open SubentropyCertificates.QuantumEquality21variable {X B Y : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B] [Fintype Y]2223theorem gram_projector_of_positive_posterior_equality (p : X → ℝ) (hp : ∀ x, 0 ≤ p x)24 (hs : ∑ x, p x = 1) (ρ : X → DensityState B) (F : Y → Matrix B B ℂ)25 (hF : ∀ y, (F y).PosSemidef) (hsF : ∑ y, F y = 1)26 (hpos : 0 < conditionalSubentropy p hp hs ρ)27 (he : conditionalSubentropy p hp hs ρ = posteriorAverage p ρ F) :28 ∃ v, amplitude v v = 1 ∧ (cqRowSqrt p ρ).conjTranspose * cqRowSqrt p ρ = projector v := by29 classical30 have hX : Nonempty X := by31 by_contra h32 have : IsEmpty X := not_nonempty_iff.mp h33 simp at hs34 let x₀ := Classical.choice hX35 have hB : Nonempty B := by36 by_contra h37 have : IsEmpty B := not_nonempty_iff.mp h38 have ht := (ρ x₀).2.239 simp [Matrix.trace] at ht40 let i₀ : X × B := (x₀, Classical.choice hB)41 let M := cqRowSqrt p ρ42 let G y := effectGram p ρ (F y)43 have ht : ∑ y, G y = M.conjTranspose * M := sum_effectGram p ρ F hsF44 have htrace : (∑ y, G y).trace = 1 := by rw [ht]; exact gram_trace_one p hp hs ρ45 obtain ⟨w, hw, hws, v, hv, hdec, hub⟩ := refinement_of_gram_pieces G46 (fun y => effectGram_posSemidef p ρ _ (hF y)) htrace x₀47 have hgram := ht.symm.trans hdec48 have hcond : conditionalSubentropy p hp hs ρ = gain (∑ i, w i • projector (v i)) :=49 (cq_conditional_eq_pinchingGap p hp hs ρ).trans (congrArg gain hgram)50 have hupper : ∑ i, w i * gain (projector (v i)) ≤ posteriorAverage p ρ F := by51 have hb y : labelPosterior (G y) = posterior p ρ (F y) := by52 funext x53 simp only [G, labelPosterior, posterior, mass_effectGram p hp ρ, labelMass_effectGram p hp ρ]54 simpa only [posteriorAverage, hb, G, mass_effectGram p hp ρ] using hub55 have hstates i : (projector (v i)).PosSemidef ∧ (projector (v i)).trace = 1 := by56 refine ⟨Matrix.posSemidef_vecMulVec_self_star _, ?_⟩57 change (∑ k, v i k * star (v i k)) = 158 simpa only [amplitude, dotProduct, Pi.star_apply, mul_comm] using hv i59 have hlo : gain (∑ i, w i • projector (v i)) ≤ ∑ i, w i * gain (projector (v i)) :=60 (actual_pinching_gap_laws i₀).1.map_sum_le (fun i _ => hw i) hws (fun i _ => hstates i)61 obtain ⟨u, hu, hP⟩ := projector_of_positive_gain_equality i₀ w hw hws v hv62 (hpos.trans_eq hcond) (le_antisymm hlo (hupper.trans_eq (he.symm.trans hcond)))63 exact ⟨u, hu, hgram.trans hP⟩6465theorem gram_rank_one_of_positive_posterior_equality (p : X → ℝ) (hp : ∀ x, 0 ≤ p x)66 (hs : ∑ x, p x = 1) (ρ : X → DensityState B) (F : Y → Matrix B B ℂ)67 (hF : ∀ y, (F y).PosSemidef) (hsF : ∑ y, F y = 1)68 (hpos : 0 < conditionalSubentropy p hp hs ρ)69 (he : conditionalSubentropy p hp hs ρ = posteriorAverage p ρ F) :70 ((cqRowSqrt p ρ).conjTranspose * cqRowSqrt p ρ).rank = 1 := by71 obtain ⟨v, hv, hG⟩ := gram_projector_of_positive_posterior_equality p hp hs ρ F hF hsF hpos he72 rw [hG, projector_rank_one _ hv]7374theorem positive_posterior_equality_iff (p : X → ℝ) (hp : ∀ x, 0 ≤ p x)75 (hs : ∑ x, p x = 1) (ρ : X → DensityState B) (F : Y → Matrix B B ℂ)76 (hF : ∀ y, (F y).PosSemidef) (hsF : ∑ y, F y = 1)77 (hpos : 0 < conditionalSubentropy p hp hs ρ) :78 conditionalSubentropy p hp hs ρ = posteriorAverage p ρ F ↔79 ∃ (u : B → ℂ) (hu : ∑ b, star (u b) * u b = 1),80 ∀ x, 0 < p x → ρ x = pureSignal u hu := by81 constructor82 · intro he83 obtain ⟨v, hv, hG⟩ := gram_projector_of_positive_posterior_equality p hp hs ρ F hF hsF hpos he84 exact common_pure_signal_of_gram_projector p hp ρ v hv hG85 · rintro ⟨u, hu, h⟩86 exact posterior_equality_of_identical_pure_on_support p hp hs ρ u hu h F hF hsF8788end SubentropyCertificates.PinchingEquality
Axioms used
Choose a statement to see which axioms its proof uses.