QuadraticAttainment.lean
1module23public import SubentropyCertificates.QuadraticStatistic4public import SubentropyCertificates.QuadraticCurve5public import SubentropyCertificates.IdenticalPureSignals67/-! Pointwise sharpness of the complementary quadratic lower bound8for every prescribed attainable value of the purity difference. -/9@[expose] public section10noncomputable section11set_option backward.isDefEq.respectTransparency false12open Matrix Set13open scoped BigOperators14namespace SubentropyCertificates.Quadratic15open D5.S3.Quantum.Foundation.FiniteStateChannel16open D5.S3.Quantum.Information.OrthogonalRecordEntropy17open D5.S3.Quantum.Subentropy.GuessingProbability18open SubentropyCertificates.ClassicalCurve19open SubentropyCertificates.Discrimination20variable {X B : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]2122private theorem identical_pointer (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x=1) (b : B) :23 statistic p hp hs (fun _ => pointerState b) = collisionGap p := by24 let P := CStarMatrix.ofMatrix.symm (pointerState b).125 have hid : P*P=P := by26 change (diagonal (fun j : B => if j=b then (1:ℂ) else 0)) *27 diagonal (fun j => if j=b then 1 else 0) = diagonal (fun j => if j=b then 1 else 0)28 rw [Matrix.diagonal_mul_diagonal]29 apply congrArg diagonal30 funext j31 by_cases h : j=b <;> simp [h]32 have ht : P.trace = 1 := (pointerState b).2.233 have ho (x z : X) : overlap p (fun _ => pointerState b) x z = p x*p z := by34 change ((p x • P)*(p z • P)).trace.re = _35 simp [hid,Matrix.trace_smul,ht,Complex.real_smul,mul_comm]36 rw [statistic_eq_overlaps]37 simp only [ho]38 rw [distinct_sum (fun x z => p x*p z)]39 simp only [← Finset.mul_sum,hs,mul_one,← sq,collisionGap]4041private theorem extremal_collision (m : ℕ) (e : ℝ) :42 collisionGap (extremalVector m e) = curve m e := by43 rw [curve_formula]44 simp [collisionGap,Fintype.sum_option,extremalVector,nsmul_eq_mul]45 field_simp46 ring4748/-- On the same label type and signal space, identical pure signals attain49each c in the full interval, including both endpoints. -/50theorem quadratic_attainment [Nonempty B] (m : ℕ) (hn : Fintype.card X=m+2)51 (c : ℝ) (hc : c ∈ Icc 0 (radius m/2)) :52 ∃ (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x=1) (b : B),53 statistic p hp hs (fun _ => pointerState b) = c ∧54 1 - pGuess p (fun _ => pointerState b) = inverse m c := by55 classical56 let e := inverse m c57 obtain ⟨he,hec⟩ := inverse_spec m c hc58 rw [radius_eq] at he59 let f : X ≃ Option (Fin (m+1)) := Fintype.equivOfCardEq (by simp [hn,Nat.add_assoc])60 let w := extremalVector m e ∘ f61 have hw := simplex_reindex _ (extremal_probability_admissible m he) f62 let i := f.symm none63 have hi : w i = 1-e := by simp [w,i,extremalVector]64 have hmax (x : X) : w x ≤ w i := by65 simpa only [w,i,Function.comp_apply,Equiv.apply_symm_apply] using extremal_none_largest m he (f x)66 let b : B := Classical.arbitrary B67 refine ⟨w,hw.1,hw.2,b,?_,?_⟩68 · rw [identical_pointer]69 have hre : collisionGap w = collisionGap (extremalVector m e) := by70 unfold collisionGap71 rw [show (∑ x, w x^2) = _ from f.sum_comp (fun x => extremalVector m e x ^ 2)]72 exact hre.trans ((extremal_collision m e).trans hec)73 · rw [pGuess_identical w hw.1 hw.2 _ i hmax,hi]74 change 1-(1-e)=e75 ring7677end SubentropyCertificates.Quadratic
Axioms used
Choose a statement to see which axioms its proof uses.