CalibratedInverse.lean
1module23public import SubentropyCertificates.CalibratedCurveContinuity4public import SubentropyCertificates.CalibratedMonotonicity5public import SubentropyCertificates.CalibratedMeasurementCurve6public import Mathlib.Topology.Order.IntermediateValue78/-! The inverse of the calibrated curve on the admissible error interval in Proposition 25. -/9@[expose] public section10noncomputable section11open Set12open scoped BigOperators1314namespace SubentropyCertificates.AncillaCalibration15open D5.S3.Quantum.Foundation.FiniteStateChannel (DensityState)16open D5.S3.Quantum.Information.PartialTraceMutualInformation (productState)17open D5.S3.Quantum.Subentropy.ClassicalQuantumGram (conditionalSubentropy)18open D5.S3.Quantum.Subentropy.GuessingProbability (pGuess)19open SubentropyCertificates.ClassicalCurve20open SubentropyCertificates.Discrimination2122variable {C : Type*} [Fintype C] [DecidableEq C]2324/-- The closed interval of subentropy values attained by the calibrated error curve. -/25def calibratedCurveRange (ν : DensityState C) (m : ℕ) : Set ℝ :=26 Icc 0 (calibratedPhi ν m (uniformError m))2728/-- The calibrated curve maps the admissible error interval bijectively onto its full range. -/29theorem calibratedPhi_bijOn (ν : DensityState C) (m : ℕ) :30 BijOn (calibratedPhi ν m) (Icc 0 (uniformError m)) (calibratedCurveRange ν m) := by31 have hmono := calibratedPhi_strictMono ν m32 have h0 : (0 : ℝ) ∈ Icc 0 (uniformError m) := ⟨le_rfl, (uniformError_mem m).1⟩33 have hmax : uniformError m ∈ Icc 0 (uniformError m) := ⟨(uniformError_mem m).1, le_rfl⟩34 refine ⟨?_, hmono.injOn, ?_⟩35 · intro e he36 have h := hmono.monotoneOn h0 he he.137 rw [calibratedPhi_zero] at h38 exact ⟨h, hmono.monotoneOn he hmax he.2⟩39 · have hsub : Icc 0 (uniformError m) ⊆ Icc (0 : ℝ) 1 :=40 fun _ he ↦ ⟨he.1, he.2.trans (uniformError_mem m).2⟩41 simpa only [calibratedCurveRange, calibratedPhi_zero] using42 ((calibratedPhi_continuousOn ν m).mono hsub).surjOn_Icc h0 hmax4344/-- The inverse at any subentropy value in the closed range of the calibrated curve. -/45def calibratedPhiInverse (ν : DensityState C) (m : ℕ) (q : ℝ)46 (hq : q ∈ calibratedCurveRange ν m) : ℝ :=47 Classical.choose ((calibratedPhi_bijOn ν m).surjOn hq)4849/-- The inverse returns an admissible error whose image is exactly the supplied value. -/50theorem calibratedPhiInverse_spec (ν : DensityState C) (m : ℕ) (q : ℝ)51 (hq : q ∈ calibratedCurveRange ν m) :52 calibratedPhiInverse ν m q hq ∈ Icc 0 (uniformError m) ∧53 calibratedPhi ν m (calibratedPhiInverse ν m q hq) = q :=54 Classical.choose_spec ((calibratedPhi_bijOn ν m).surjOn hq)5556/-- Inverting the value at any admissible error recovers that error, including the endpoints. -/57theorem calibratedPhiInverse_phi (ν : DensityState C) (m : ℕ) (e : ℝ)58 (he : e ∈ Icc 0 (uniformError m)) :59 calibratedPhiInverse ν m (calibratedPhi ν m e) ((calibratedPhi_bijOn ν m).mapsTo he) = e := by60 obtain ⟨hmem, hval⟩ := calibratedPhiInverse_spec ν m _ ((calibratedPhi_bijOn ν m).mapsTo he)61 exact (calibratedPhi_strictMono ν m).injOn hmem he hval6263/-- Comparing an inverse value to an admissible error is equivalent to comparing curve values. -/64theorem calibratedPhiInverse_le_iff (ν : DensityState C) (m : ℕ) {q e : ℝ}65 (hq : q ∈ calibratedCurveRange ν m) (he : e ∈ Icc 0 (uniformError m)) :66 calibratedPhiInverse ν m q hq ≤ e ↔ q ≤ calibratedPhi ν m e := by67 obtain ⟨hmem, hval⟩ := calibratedPhiInverse_spec ν m q hq68 have h := ((calibratedPhi_strictMono ν m).le_iff_le hmem he).symm69 rwa [hval] at h7071variable {X B : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]7273/-- Every independently extended ensemble supplies an argument in the calibrated inverse domain. -/74theorem conditional_product_mem_calibratedRange (ν : DensityState C) (m : ℕ)75 (hn : Fintype.card X = m + 2) (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)76 (ρ : X → DensityState B) :77 conditionalSubentropy p hp hs (fun x ↦ productState (ρ x) ν) ∈ calibratedCurveRange ν m := by78 have he := optimal_error_range m hn p hp hs ρ79 exact ⟨(optimal_discrimination_bound m hn p hp hs (fun x ↦ productState (ρ x) ν)).1,80 (ancilla_optimal_curve_bound ν m hn p hp hs ρ).trans ((calibratedPhi_bijOn ν m).mapsTo he).2⟩8182/-- Proposition 25: inverting the extended conditional subentropy bounds the optimal guessing83error of the original ensemble for every fixed independent ancillary density. -/84theorem ancilla_inverse_discrimination_bound (ν : DensityState C) (m : ℕ)85 (hn : Fintype.card X = m + 2) (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)86 (ρ : X → DensityState B) :87 calibratedPhiInverse ν m (conditionalSubentropy p hp hs (fun x ↦ productState (ρ x) ν))88 (conditional_product_mem_calibratedRange ν m hn p hp hs ρ) ≤ 1 - pGuess p ρ :=89 (calibratedPhiInverse_le_iff ν m _ (optimal_error_range m hn p hp hs ρ)).290 (ancilla_optimal_curve_bound ν m hn p hp hs ρ)9192end SubentropyCertificates.AncillaCalibration
Axioms used
Choose a statement to see which axioms its proof uses.