Pratik Patil

OverlapRemainders.lean

1module2public import SubentropyCertificates.OverlapCurves34/-! Quartic remainder estimates from the binary determinant kernel and5the defining quadratic identity of the Helstrom error. -/6@[expose] public section7noncomputable section8set_option autoImplicit false9open Matrix MeasureTheory Set Filter10open scoped BigOperators Topology11namespace SubentropyCertificates.SmallOverlap12open SubentropyCertificates.ClassicalCurve13open D5.S3.Quantum.Subentropy.Basic14open D5.S3.Quantum.Subentropy.DensityKernel1516private def kernel (u t : ℝ) :=17  subentropyKernel (diagonal (fun i => (extremalVector 0 u i : ℂ))) t1819private theorem kernel_formula (u : ℝ) {t : ℝ} (ht : 0<t) :20    kernel u t = t/(1+t) - (t/(t+(1-u)))*(t/(t+u)) := by21  simp [kernel,kernel_diagonal _ t ht.ne',extremalVector,Fintype.prod_option]22  rw [div_mul_div_comm,← sq]2324private theorem kernel_integrable {u : ℝ} (hu : u ∈ Icc (0:ℝ) 1) :25    IntegrableOn (kernel u) (Ioi 0) := by26  have h := diagonal_density (extremal_probability 0 hu)27  exact integrable_subentropy_kernel h.1 h.22829private def weight (t : ℝ) := (ratio (1/2) t)^2/(t+1/2)^23031private theorem kernel_bounds {s t : ℝ} (hs : s ∈ Icc 0 (1/2)) (ht : 0<t) :32    (s^2/4)*weight t ≤ kernel (1/2) t - kernel ((1-s)/2) t ∧33    kernel (1/2) t - kernel ((1-s)/2) t ≤ ((s^2/4)*(1+2*s^2))*weight t := by34  let r := t+1/235  let x := s^2/(4*r^2)36  have hr : 0 < r := by dsimp [r]; linarith37  have hd : 1 ≤ 4*r^2 := by dsimp [r]; nlinarith [sq_nonneg t]38  have hx : 0 ≤ x := by dsimp [x]; positivity39  have hxs : x ≤ s^2 := div_le_self (sq_nonneg s) hd40  have hs2 : s^2 ≤ 1/4 := by41    nlinarith [mul_nonneg (sub_nonneg.mpr hs.2) (show 0 ≤ 1/2+s by linarith [hs.1])]42  have hx1 : 0 < 1-x := by linarith43  have hinv : 1 ≤ 1/(1-x) := (le_div_iff₀ hx1).mpr (by linarith)44  have hinv' : 1/(1-x) ≤ 1+2*s^2 := by45    apply le_trans _ (show 1+2*x ≤ 1+2*s^2 by linarith)46    apply (div_le_iff₀ hx1).mpr47    nlinarith [mul_nonneg hx (show 0 ≤ 1-2*x by linarith)]48  have hgap : kernel (1/2) t - kernel ((1-s)/2) t =49      ((s^2/4)*weight t)*(1/(1-x)) := by50    rw [kernel_formula _ ht,kernel_formula _ ht]51    have hsum : t+(1-(1-s)/2) = r+s/2 := by dsimp [r]; ring52    have hsub : t+(1-s)/2 = r-s/2 := by dsimp [r]; ring53    rw [hsum,hsub,show t+(1-1/2)=r by dsimp [r]; ring]54    change _ = (s^2/4*((t/r)^2/r^2))*(1/(1-x))55    change (t/(1+t)-t/r*(t/r))-(t/(1+t)-t/(r+s/2)*(t/(r-s/2))) = _56    rw [mul_one_div]57    apply (eq_div_iff hx1.ne').mpr58    dsimp only [x]59    have hp : 0 < r+s/2 := by linarith [hs.1]60    have hm : 0 < r-s/2 := by dsimp [r]; linarith [hs.2]61    field_simp [hr.ne',hp.ne',hm.ne']62    ring_nf63    field_simp [show r^2*4-s^2 ≠ 0 by linarith]64    ring65  have hw : 0 ≤ (s^2/4)*weight t := by unfold weight; positivity66  rw [hgap]67  constructor68  · simpa only [mul_one] using mul_le_mul_of_nonneg_left hinv hw69  · calc _ ≤ ((s^2/4)*weight t)*(1+2*s^2) := mul_le_mul_of_nonneg_left hinv' hw70         _ = _ := by ring7172/-- On [0,1/2] the subentropy remainder is nonnegative and bounded by s^4/3. -/73theorem conditional_remainder {s : ℝ} (hs : s ∈ Icc 0 (1/2)) :74    0 ≤ conditionalCurve s - s^2/6 ∧ conditionalCurve s - s^2/6 ≤ s^4/3 := by75  let μ := volume.restrict (Ioi (0:ℝ))76  have hw := integral_ratio_power (1/2 : ℝ) (by norm_num) 277  have hi : Integrable weight μ := hw.178  have hv : (∫ t, weight t ∂μ) = 2/3 := by79    change (∫ t in Ioi (0:ℝ), (ratio (1/2) t)^2/(t+1/2)^2) = 2/380    rw [hw.2]; norm_num81  let gap := fun t => kernel (1/2) t - kernel ((1-s)/2) t82  have h₀ := kernel_integrable (u := 1/2) (by constructor <;> norm_num)83  have h₁ := kernel_integrable (u := (1-s)/2) (by constructor <;> linarith [hs.1,hs.2])84  have hg : Integrable gap μ := h₀.sub h₁85  have hq : (∫ t, gap t ∂μ) = conditionalCurve s := integral_sub h₀ h₁86  have ha : ∀ᵐ t ∂μ, (s^2/4)*weight t ≤ gap t := by87    filter_upwards [ae_restrict_mem (μ := volume) measurableSet_Ioi] with t ht88    exact (kernel_bounds hs ht).189  have hb : ∀ᵐ t ∂μ, gap t ≤ ((s^2/4)*(1+2*s^2))*weight t := by90    filter_upwards [ae_restrict_mem (μ := volume) measurableSet_Ioi] with t ht91    exact (kernel_bounds hs ht).292  have hlow := integral_mono_ae (hi.const_mul _) hg ha93  have hupp := integral_mono_ae hg (hi.const_mul _) hb94  rw [hq,integral_const_mul,hv] at hlow hupp95  constructor <;> nlinarith9697/-- The error remainder equals e(s)^2, with e(s) at most s^2/2. -/98theorem error_remainder {s : ℝ} (hs : s ∈ Icc 0 1) :99    0 ≤ errorCurve s - s^2/4 ∧ errorCurve s - s^2/4 ≤ s^4/4 := by100  have hr := Real.sq_sqrt (show 0 ≤ 1-s^2 by101    nlinarith [mul_nonneg (sub_nonneg.mpr hs.2) (show 0 ≤ 1+s by linarith [hs.1])])102  have hroot := Real.sqrt_nonneg (1-s^2)103  have hroot1 : Real.sqrt (1-s^2) ≤ 1 := by nlinarith [sq_nonneg s]104  have he : 0 ≤ errorCurve s := by dsimp [errorCurve]; linarith105  have he' : errorCurve s ≤ s^2/2 := by106    dsimp [errorCurve]; nlinarith [mul_nonneg hroot (sub_nonneg.mpr hroot1)]107  have hid : errorCurve s-s^2/4 = (errorCurve s)^2 := by dsimp [errorCurve]; nlinarith108  rw [hid]109  have hmul := mul_nonneg (sub_nonneg.mpr he') (show 0 ≤ s^2/2+errorCurve s by positivity)110  exact ⟨sq_nonneg _,by nlinarith⟩111112end SubentropyCertificates.SmallOverlap

Axioms used

Choose a statement to see which axioms its proof uses.