Pratik Patil

OptimalGuessing.lean

1module23public import SubentropyCertificates.GuessingMeasurement4public import D5.S3.Quantum.Subentropy.GuessingProbability5public import Mathlib.Topology.Order.Monotone67/-!8# The curve bound at optimal quantum guessing probability910`pGuess` is the supremum of the actual success probabilities of positive11identity-summing labelled POVMs. Continuity extends the measurement bound to12that supremum through the closure of the success set. No attainment of the13supremum is assumed.1415The supporting `point_guess_probability_mem` proof is ported from the private16`point_guess_mem` helper in the Omega Institute's GuessingProbability.lean,17revision d3e1e931e66ad4a3f54c95ef96cf723edcd7e792 (Apache-2.0). The supporting18success-set bounds and their original attribution are retained upstream.19-/2021@[expose] public section22noncomputable section23set_option autoImplicit false24set_option backward.isDefEq.respectTransparency false25open Matrix MeasureTheory Set26open scoped BigOperators ComplexOrder MatrixOrder2728namespace SubentropyCertificates.Discrimination29open D5.S3.Quantum.Foundation.FiniteStateChannel30open D5.S3.Quantum.Subentropy.ClassicalQuantumGram31open D5.S3.Quantum.Subentropy.GuessingProbability32open SubentropyCertificates.ClassicalCurve33open SubentropyCertificates.MeasurementPosterior3435theorem curve_bound_at_supremum (m : ℕ) (S : Set ℝ)36    (hne : S.Nonempty) (hbounded : BddAbove S) (hS : S ⊆ Icc (0 : ℝ) 1)37    (q : ℝ) (hq : ∀ s ∈ S, q ≤ phi m (1 - s)) :38    q ≤ phi m (1 - sSup S) := by39  have hclosure : closure S ⊆ Icc (0 : ℝ) 1 := closure_minimal hS isClosed_Icc40  have hparam : ContinuousOn (fun s : ℝ => 1 - s) (Icc (0 : ℝ) 1) :=41    (continuous_const.sub continuous_id).continuousOn42  have hphi : ContinuousOn (fun s : ℝ => phi m (1 - s)) (Icc (0 : ℝ) 1) :=43    (phi_continuous m).comp hparam (fun s hs =>44      ⟨by linarith [hs.2], by linarith [hs.1]⟩)45  exact le_on_closure hq continuousOn_const (hphi.mono hclosure)46    (csSup_mem_closure hne hbounded)4748variable {X B : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]4950theorem guessing_curve_bound (m : ℕ) (hn : Fintype.card X = m + 2)51    (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)52    (ρ : X → DensityState B) (M : X → Matrix B B ℂ)53    (hM : ∀ x, (M x).PosSemidef) (hsM : ∑ x, M x = 1) :54    0 ≤ conditionalSubentropy p hp hs ρ ∧55      conditionalSubentropy p hp hs ρ ≤ phi m (1 - successProbability p ρ M) := by56  have h := measurement_curve_bound m hn p hp hs ρ M hM hsM id57  simpa only [decisionSuccess, jointProbability, successProbability, id_eq] using h5859theorem guessing_success_bounds (p : X → ℝ) (hp : ∀ x, 0 ≤ p x)60    (hs : ∑ x, p x = 1) (ρ : X → DensityState B)61    (M : X → Matrix B B ℂ) (hM : ∀ x, (M x).PosSemidef) (hsM : ∑ x, M x = 1) :62    0 ≤ successProbability p ρ M ∧ successProbability p ρ M ≤ 1 := by63  have h := decision_success_bounds p hp hs ρ M hM hsM id64  simpa only [decisionSuccess, jointProbability, successProbability, id_eq] using h6566omit [DecidableEq X] in67theorem point_guess_probability_mem (p : X → ℝ) (ρ : X → DensityState B) (x : X) :68    p x ∈ successProbabilitySet p ρ := by69  classical70  let M : X → Matrix B B ℂ := fun y => if y = x then 1 else 071  refine ⟨M, ?_, ?_, ?_⟩72  · intro y73    dsimp [M]74    split_ifs75    · exact Matrix.PosSemidef.one76    · exact Matrix.PosSemidef.zero77  · simp [M]78  · have ht : (trace (CStarMatrix.ofMatrix.symm (ρ x).1)).re = 1 :=79      congrArg Complex.re (ρ x).2.280    unfold successProbability81    rw [Finset.sum_eq_single x]82    · simp [M, ht]83    · intro y _ hy84      simp [M, hy]85    · simp8687omit [DecidableEq X] in88theorem pGuess_ge_prior (p : X → ℝ) (hp : ∀ x, 0 ≤ p x)89    (hs : ∑ x, p x = 1) (ρ : X → DensityState B) (x : X) :90    p x ≤ pGuess p ρ :=91  le_csSup (pGuess_bounds p hp hs ρ).2.1 (point_guess_probability_mem p ρ x)9293omit [DecidableEq X] in94theorem optimal_error_range (m : ℕ) (hn : Fintype.card X = m + 2)95    (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)96    (ρ : X → DensityState B) : 1 - pGuess p ρ ∈ Icc 0 (uniformError m) := by97  have hsum : 1 ≤ ((m + 2 : ℕ) : ℝ) * pGuess p ρ := by98    calc99      1 = ∑ x, p x := hs.symm100      _ ≤ ∑ _x : X, pGuess p ρ := Finset.sum_le_sum (fun x _ => pGuess_ge_prior p hp hs ρ x)101      _ = _ := by simp [hn, nsmul_eq_mul]102  have hnR : (0 : ℝ) < (m + 2 : ℕ) := by positivity103  have hlower : 1 / ((m + 2 : ℕ) : ℝ) ≤ pGuess p ρ := (div_le_iff₀ hnR).mpr (by104    simpa only [mul_comm] using hsum)105  have hupper : pGuess p ρ ≤ 1 := (pGuess_bounds p hp hs ρ).2.2.2.1106  exact ⟨sub_nonneg.mpr hupper, by unfold uniformError; linarith⟩107108/-- The nonlinear inequality and the admissible optimal-error range.109Pointwise attainment, the full equality characterization and the tangent bound110are separate certification targets. -/111theorem optimal_discrimination_bound (m : ℕ) (hn : Fintype.card X = m + 2)112    (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)113    (ρ : X → DensityState B) :114    0 ≤ conditionalSubentropy p hp hs ρ ∧115      conditionalSubentropy p hp hs ρ ≤ phi m (1 - pGuess p ρ) ∧116      1 - pGuess p ρ ∈ Icc 0 (uniformError m) := by117  have hb := pGuess_bounds p hp hs ρ118  have hS : successProbabilitySet p ρ ⊆ Icc (0 : ℝ) 1 := by119    rintro s ⟨M, hM, hsM, rfl⟩120    exact guessing_success_bounds p hp hs ρ M hM hsM121  have hcurve := curve_bound_at_supremum m (successProbabilitySet p ρ) hb.1 hb.2.1 hS122    (conditionalSubentropy p hp hs ρ) (by123      rintro s ⟨M, hM, hsM, rfl⟩124      exact (guessing_curve_bound m hn p hp hs ρ M hM hsM).2)125  have hzero : 0 ≤ conditionalSubentropy p hp hs ρ := by126    obtain ⟨s, M, hM, hsM, hsuccess⟩ := hb.1127    exact (guessing_curve_bound m hn p hp hs ρ M hM hsM).1128  exact ⟨hzero, hcurve, optimal_error_range m hn p hp hs ρ⟩129130/-- A threshold formulation of inversion on the checked increasing branch. -/131theorem error_threshold_lower_bound (m : ℕ) (hn : Fintype.card X = m + 2)132    (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)133    (ρ : X → DensityState B) (r : ℝ) (hr : r ∈ Icc 0 (uniformError m))134    (hcert : phi m r ≤ conditionalSubentropy p hp hs ρ) : r ≤ 1 - pGuess p ρ := by135  have h := optimal_discrimination_bound m hn p hp hs ρ136  by_contra hnle137  have hlt : 1 - pGuess p ρ < r := lt_of_not_ge hnle138  have hcurve := phi_strictMono m h.2.2 hr hlt139  linarith [h.2.1]140141end SubentropyCertificates.Discrimination

Axioms used

Choose a statement to see which axioms its proof uses.