QuadraticDiscrimination.lean
1module23public import SubentropyCertificates.QuadraticPosterior4public import SubentropyCertificates.QuadraticAttainment56/-! The complementary quadratic lower bound and pointwise sharpness7for every prescribed attainable value of the purity difference. -/8@[expose] public section9noncomputable section10set_option backward.isDefEq.respectTransparency false11open Matrix Set12open scoped BigOperators13namespace SubentropyCertificates.Quadratic14open D5.S3.Quantum.Foundation.FiniteStateChannel15open D5.S3.Quantum.Information.OrthogonalRecordEntropy16open D5.S3.Quantum.Subentropy.GuessingProbability17open SubentropyCertificates.ClassicalCurve18open SubentropyCertificates.Discrimination19variable {X B : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]2021/-- Proposition prop:quadratic-certificate with n=m+2. The statistic is22half the difference of the average and joint purities. -/23theorem complementary_quadratic_bound (m : ℕ) (hn : Fintype.card X=m+2)24 (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x=1) (ρ : X → DensityState B) :25 let c := statistic p hp hs ρ26 let e := 1-pGuess p ρ27 (0 ≤ c ∧ c ≤ curve m e ∧ inverse m c ≤ e) ∧28 ∀ s ∈ Icc 0 (radius m/2),29 ∃ (w : X → ℝ) (hw : ∀ x, 0 ≤ w x) (hsw : ∑ x, w x=1) (b : B),30 statistic w hw hsw (fun _ => pointerState b) = s ∧31 1-pGuess w (fun _ => pointerState b) = inverse m s := by32 let c := statistic p hp hs ρ33 let e := 1-pGuess p ρ34 have hc : 0 ≤ c := by35 dsimp [c]36 rw [statistic_eq_gram]37 exact div_nonneg (offSquare_nonneg _) (by norm_num)38 have hce := optimal_quadratic_upper m hn p hp hs ρ39 have he : e ∈ Icc 0 (radius m) := by rw [radius_eq]; exact optimal_error_range m hn p hp hs ρ40 obtain ⟨hin,hval⟩ := inverse_spec m c ⟨hc,hce.trans (curve_le_max m _)⟩41 have hle : inverse m c ≤ e := by42 by_contra! h43 exact (not_lt_of_ge hce) ((curve_strict m he hin h).trans_eq hval)44 have hX : Nonempty X := Fintype.card_pos_iff.mp (by omega)45 have : Nonempty B := by46 by_contra h47 have : IsEmpty B := not_nonempty_iff.mp h48 have ht := (ρ (Classical.choice hX)).2.249 simp [Matrix.trace] at ht50 exact ⟨⟨hc,hce,hle⟩, quadratic_attainment m hn⟩5152end SubentropyCertificates.Quadratic
Axioms used
Choose a statement to see which axioms its proof uses.