BinaryTableDeficit.lean
1module23public import SubentropyCertificates.FourCellDeficit4public import SubentropyCertificates.ClassicalCurve5import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals67/-! Integration of the quantitative four-cell comparison. -/8@[expose] public section9noncomputable section10set_option backward.isDefEq.respectTransparency false11open Matrix MeasureTheory Set12open scoped BigOperators13namespace SubentropyCertificates.QubitDeficit14open SubentropyCertificates.FourCell15open SubentropyCertificates.ClassicalCurve16open D5.S3.Quantum.Subentropy.Basic17open D5.S3.Quantum.Subentropy.DensityKernel1819/-- In the library's integral variable s, the exponential lower bound20has density (1/s)^2 exp(-3/s). Substitute t = 1/s. -/21private theorem reciprocal_exponential :22 let f := fun s : ℝ => s⁻¹^2 * Real.exp (-(3*s⁻¹))23 IntegrableOn f (Ioi 0) ∧ (∫ s in Ioi 0, f s) = 1/3 := by24 let g := fun t : ℝ => Real.exp (-(3*t))25 have hi : IntegrableOn g (Ioi 0) := by26 simpa [g, neg_mul] using integrableOn_exp_mul_Ioi (a := (-3 : ℝ)) (by norm_num) 027 have hv : (∫ t in Ioi 0, g t) = 1/3 := by28 simpa [g, neg_mul] using integral_exp_mul_Ioi (a := (-3 : ℝ)) (by norm_num) 029 have he (s : ℝ) (hs : s ∈ Ioi (0 : ℝ)) :30 (|(-1 : ℝ)| * s ^ ((-1 : ℝ) - 1)) • g (s ^ (-1 : ℝ)) =31 s⁻¹^2 * Real.exp (-(3*s⁻¹)) := by32 rw [show (-1 : ℝ) - 1 = -(2 : ℝ) by norm_num, Real.rpow_neg hs.le,33 Real.rpow_two, Real.rpow_neg_one]34 simp [g]35 refine ⟨((integrableOn_Ioi_comp_rpow_iff g (p := -1) (by norm_num)).mpr hi).congr_fun he36 measurableSet_Ioi, ?_⟩37 rw [← setIntegral_congr_fun measurableSet_Ioi he, integral_comp_rpow_Ioi g (by norm_num : (-1 : ℝ) ≠ 0)]38 exact hv3940/-- The determinant kernel in the variable used in the four-cell comparison. -/41private theorem kernel_reciprocal {D : Type*} [Fintype D] [DecidableEq D] (p : D → ℝ)42 {s : ℝ} (hs : 0 < s) :43 subentropyKernel (diagonal (fun i => (p i : ℂ))) s =44 1/(1+s⁻¹) - 1/(∏ i, (1+p i*s⁻¹)) := by45 rw [kernel_diagonal _ s hs.ne']46 have h (x : ℝ) : s / (s+x) = (1+x*s⁻¹)⁻¹ := by47 rw [show 1+x*s⁻¹ = (s+x)/s by field_simp]48 simp49 simp_rw [h]50 rw [Finset.prod_inv_distrib, one_div (∏ i, (1+p i*s⁻¹))]51 congr 152 rw [add_comm (1 : ℝ) s, h 1, one_mul, one_div]5354/-- Integrated estimate for an arbitrary probability table on two binary55indices. The two marginal sums are given explicitly. -/56theorem classical_two_by_two_deficit (p : Fin 2 × Fin 2 → ℝ)57 (hp : p ∈ probabilitySimplex _) :58 let r := fun i => ∑ j, p (i,j)59 let c := fun j => ∑ i, p (i,j)60 r 0 * r 1 * (c 0 * c 1) / 3 ≤ classicalSubentropy r + classicalSubentropy c -61 classicalSubentropy p := by62 dsimp only63 let r := fun i => ∑ j, p (i,j)64 let c := fun j => ∑ i, p (i,j)65 have hr : r ∈ probabilitySimplex _ := ⟨fun i => Finset.sum_nonneg (fun j _ => hp.1 (i,j)),66 (Fintype.sum_prod_type p).symm.trans hp.2⟩67 have hc : c ∈ probabilitySimplex _ := ⟨fun j => Finset.sum_nonneg (fun i _ => hp.1 (i,j)),68 (Finset.sum_comm).trans hr.2⟩69 let K {D : Type} [Fintype D] [DecidableEq D] (w : D → ℝ) :=70 subentropyKernel (diagonal (fun i => (w i : ℂ)))71 have hK {D : Type} [Fintype D] [DecidableEq D] {w : D → ℝ}72 (hw : w ∈ probabilitySimplex D) : IntegrableOn (K w) (Ioi 0) :=73 integrable_subentropy_kernel (diagonal_density hw).1 (diagonal_density hw).274 let m := r 0 * r 1 * (c 0 * c 1)75 have hpoint (s : ℝ) (hs : s ∈ Ioi (0 : ℝ)) :76 m * (s⁻¹^2 * Real.exp (-(3*s⁻¹))) ≤ K r s + K c s - K p s := by77 have hn := hp.278 simp only [Fintype.sum_prod_type, Fin.sum_univ_two] at hn79 have h := four_cell_exponential_bound (p (0,0)) (p (0,1)) (p (1,0)) (p (1,1)) s⁻¹80 (hp.1 _) (hp.1 _) (hp.1 _) (hp.1 _) (by linarith only [hn]) (inv_nonneg.mpr hs.le)81 dsimp only [K]82 rw [kernel_reciprocal r hs, kernel_reciprocal c hs, kernel_reciprocal p hs]83 simp only [m, r, c, Fintype.prod_prod_type, Fin.prod_univ_two, Fin.sum_univ_two]84 unfold U V rowKernel columnKernel cellKernel at h85 -- The cell product over pairs groups the four factors by row.86 rw [mul_assoc ((1+p (0,0)*s⁻¹)*(1+p (0,1)*s⁻¹))] at h87 linarith only [h]88 obtain ⟨hi, hv⟩ := reciprocal_exponential89 have h := setIntegral_mono_on (hi.const_mul m) (((hK hr).add (hK hc)).sub (hK hp))90 measurableSet_Ioi hpoint91 simp only [Pi.sub_apply, Pi.add_apply] at h92 rw [integral_const_mul, hv, integral_sub (f := fun s => K r s + K c s) ((hK hr).add (hK hc)) (hK hp),93 integral_add (hK hr) (hK hc)] at h94 change m / 3 ≤ (∫ s in Ioi (0 : ℝ), K r s) + (∫ s in Ioi (0 : ℝ), K c s) -95 ∫ s in Ioi (0 : ℝ), K p s96 simpa only [div_eq_mul_inv, one_mul] using h9798end SubentropyCertificates.QubitDeficit
Axioms used
Choose a statement to see which axioms its proof uses.