SharpDiscriminationEquality.lean
1module23public import SubentropyCertificates.GuessingAttainment4public import SubentropyCertificates.PositiveEquality5public import SubentropyCertificates.ClassicalEquality6public import SubentropyCertificates.CurveInverse78/-! Equality in the sharp discrimination bound. At an optimal labelled POVM both9inequalities in the posterior comparison must be equalities. At positive error10this first identifies the supported signals and then identifies every prior. -/11@[expose] public section12noncomputable section13set_option autoImplicit false14set_option backward.isDefEq.respectTransparency false15open Matrix Set16open scoped BigOperators ComplexOrder MatrixOrder1718namespace SubentropyCertificates.Discrimination19open D5.S3.Quantum.Foundation.FiniteStateChannel20open D5.S3.Quantum.Subentropy.ClassicalQuantumGram21open D5.S3.Quantum.Subentropy.GuessingProbability22open SubentropyCertificates.ClassicalCurve23open SubentropyCertificates.MeasurementPosterior24open SubentropyCertificates.QuantumEquality25open SubentropyCertificates.PinchingEquality2627variable {X B : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]2829theorem posteriorAverage_le_guessing_curve (m : ℕ) (hn : Fintype.card X = m + 2)30 (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)31 (ρ : X → DensityState B) (M : X → Matrix B B ℂ)32 (hM : ∀ x, (M x).PosSemidef) (hsM : ∑ x, M x = 1) :33 posteriorAverage p ρ M ≤ phi m (1 - successProbability p ρ M) := by34 let q (x : X) := outcomeProbability p ρ (M x)35 let S := Finset.univ.filter (fun x => 0 < q x)36 have hq (x : X) : 0 ≤ q x := outcomeProbability_nonneg p hp ρ (M x) (hM x)37 have hsum : ∑ x ∈ S, q x = 1 := by38 rw [sum_over_positive q hq q (fun _ hz => hz)]39 exact sum_outcomeProbability p hp hs ρ M hsM40 have hb (x : X) (hx : x ∈ S) : posterior p ρ (M x) ∈ probabilitySimplex X :=41 posterior_probability p hp ρ (M x) (hM x) (Finset.mem_filter.mp hx).242 have h := classical_posterior_bound_finset m hn S q (fun x _ => hq x) hsum43 (fun x => posterior p ρ (M x)) hb id44 have he := posterior_average_error p hp hs ρ M hM hsM id45 change (∑ x ∈ S, q x * (1 - posterior p ρ (M x) (id x))) =46 1 - successProbability p ρ M at he47 rw [he] at h48 exact h4950omit [DecidableEq X] in51/-- A finite ensemble can be guessed perfectly exactly when a labelled POVM52has success one. This includes arbitrary signals at zero-prior labels. -/53theorem pGuess_one_iff_perfect_povm (p : X → ℝ) (hp : ∀ x, 0 ≤ p x)54 (hs : ∑ x, p x = 1) (ρ : X → DensityState B) :55 pGuess p ρ = 1 ↔ ∃ M : X → Matrix B B ℂ, (∀ x, (M x).PosSemidef) ∧56 ∑ x, M x = 1 ∧ successProbability p ρ M = 1 := by57 constructor58 · intro h59 obtain ⟨M, hM, hsM, he⟩ := exists_optimal_povm p hp hs ρ60 exact ⟨M, hM, hsM, he.trans h⟩61 · rintro ⟨M, hM, hsM, he⟩62 have hb := pGuess_bounds p hp hs ρ63 exact le_antisymm hb.2.2.2.1 (le_csSup hb.2.1 ⟨M, hM, hsM, he.symm⟩)6465/-- At error e, all signals are the same pure state and the priors are661-e for one label and e/(n-1) for every other label. No unique maximizer is required. -/67def extremalPureEnsemble (m : ℕ) (p : X → ℝ) (ρ : X → DensityState B) (e : ℝ) : Prop :=68 ∃ (i : X) (u : B → ℂ) (hu : ∑ b, star (u b) * u b = 1),69 (∀ x, ρ x = pureSignal u hu) ∧ p i = 1 - e ∧ ∀ j, j ≠ i → p j = e / (m + 1 : ℕ)7071theorem sharp_equality_iff_of_positive_error (m : ℕ) (hn : Fintype.card X = m + 2)72 (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)73 (ρ : X → DensityState B) (herr : 0 < 1 - pGuess p ρ) :74 conditionalSubentropy p hp hs ρ = phi m (1 - pGuess p ρ) ↔75 extremalPureEnsemble m p ρ (1 - pGuess p ρ) := by76 classical77 constructor78 · intro heq79 have hr := optimal_error_range m hn p hp hs ρ80 have hpos : 0 < conditionalSubentropy p hp hs ρ := by81 rw [heq, ← phi_zero m]82 exact phi_strictMono m ⟨le_rfl, (uniformError_mem m).1⟩ hr herr83 obtain ⟨M, hM, hsM, hopt⟩ := exists_optimal_povm p hp hs ρ84 have hupper := posteriorAverage_le_guessing_curve m hn p hp hs ρ M hM hsM85 rw [hopt, ← heq] at hupper86 have hpost := le_antisymm (measurement_posterior_comparison p hp hs ρ M hM hsM).2 hupper87 obtain ⟨u, hu, hρ⟩ := (positive_posterior_equality_iff p hp hs ρ M hM hsM hpos).mp hpost88 have : Nonempty X := Fintype.card_pos_iff.mp (by omega)89 obtain ⟨i, _, hi⟩ := Finset.exists_max_image Finset.univ p Finset.univ_nonempty90 have hmax (x : X) := hi x (Finset.mem_univ x)91 have hg : pGuess p ρ = p i := (pGuess_congr_on_support p hp ρ _ hρ).trans92 (pGuess_identical p hp hs (pureSignal u hu) i hmax)93 have hc : conditionalSubentropy p hp hs ρ = classicalSubentropy p :=94 (conditional_congr_on_support p hp hs ρ _ hρ).trans (conditional_identical_pure p hp hs u hu)95 rw [hc, hg] at heq96 rw [hg] at herr ⊢97 have hall := positive_priors_of_map_equality m hn p ⟨hp, hs⟩ i hmax herr heq98 exact ⟨i, u, hu, fun x => hρ x (hall x), by ring,99 (classical_coordinate_eq_iff m hn p ⟨hp, hs⟩ i).mp heq⟩100 · rintro ⟨i, u, hu, hρ, hi, htail⟩101 have hc := (conditional_congr_on_support p hp hs ρ _ (fun x _ => hρ x)).trans102 (conditional_identical_pure p hp hs u hu)103 have he : 1 - p i = 1 - pGuess p ρ := by linarith104 rw [hc, ← he]105 exact (classical_coordinate_eq_iff m hn p ⟨hp, hs⟩ i).mpr106 (fun j hj => (htail j hj).trans (congrArg (fun t : ℝ => t / (m + 1 : ℕ)) he.symm))107108/-- The zero-error endpoint and the positive-error family exhaust equality. -/109theorem sharp_discrimination_equality_iff (m : ℕ) (hn : Fintype.card X = m + 2)110 (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1) (ρ : X → DensityState B) :111 conditionalSubentropy p hp hs ρ = phi m (1 - pGuess p ρ) ↔112 pGuess p ρ = 1 ∨ extremalPureEnsemble m p ρ (1 - pGuess p ρ) := by113 by_cases h : pGuess p ρ = 1114 · have hb := optimal_discrimination_bound m hn p hp hs ρ115 have hz : conditionalSubentropy p hp hs ρ ≤ 0 := by116 simpa only [h, sub_self, phi_zero] using hb.2.1117 simp [h, phi_zero, le_antisymm hz hb.1]118 · have herr := sub_pos.mpr (lt_of_le_of_ne (pGuess_bounds p hp hs ρ).2.2.2.1 h)119 simpa only [h, false_or] using sharp_equality_iff_of_positive_error m hn p hp hs ρ herr120121theorem inverse_discrimination_equality_iff (m : ℕ) (hn : Fintype.card X = m + 2)122 (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1) (ρ : X → DensityState B) :123 phiInverse m (conditionalSubentropy p hp hs ρ) (conditional_subentropy_range m hn p hp hs ρ) =124 1 - pGuess p ρ ↔ pGuess p ρ = 1 ∨ extremalPureEnsemble m p ρ (1 - pGuess p ρ) := by125 rw [← sharp_discrimination_equality_iff m hn p hp hs ρ]126 constructor127 · intro h128 rw [← h, phi_phiInverse]129 · intro h130 apply phi_preimage_unique m (phiInverse_mem m _ _) (optimal_error_range m hn p hp hs ρ)131 rw [phi_phiInverse, h]132133end SubentropyCertificates.Discrimination
Axioms used
Choose a statement to see which axioms its proof uses.