Pratik Patil

BinaryCrossoverConvex.lean

1module23public import SubentropyCertificates.SmallOverlap4public import Mathlib.Analysis.Convex.SpecificFunctions.Deriv5import all SubentropyCertificates.OverlapRemainders67/-! Strict convexity of the conditional subentropy in the squared overlap of two pure signals. -/8@[expose] public section9noncomputable section10set_option autoImplicit false11set_option backward.isDefEq.respectTransparency false12open MeasureTheory Set Filter13open scoped BigOperators Topology14namespace SubentropyCertificates.BinaryCrossover15open SubentropyCertificates.SmallOverlap16open SubentropyCertificates.ClassicalCurve1718private def integrand (u t : ℝ) := kernel (1/2) t - kernel ((1-Real.sqrt u)/2) t1920private theorem gap_integrable {u : ℝ} (hu : u ∈ Icc 0 1) :21    IntegrableOn (integrand u) (Ioi 0) := by22  have h := Real.sqrt_le_sqrt hu.223  rw [Real.sqrt_one] at h24  exact (kernel_integrable (u := 1/2) (by constructor <;> norm_num)).sub25    (kernel_integrable (u := (1-Real.sqrt u)/2) (by constructor <;> linarith [Real.sqrt_nonneg u]))2627private theorem gap_integral {u : ℝ} (hu : u ∈ Icc 0 1) :28    (∫ t in Ioi (0:ℝ), integrand u t) = conditionalCurve (Real.sqrt u) := by29  have h := Real.sqrt_le_sqrt hu.230  rw [Real.sqrt_one] at h31  exact integral_sub (kernel_integrable (u := 1/2) (by constructor <;> norm_num))32    (kernel_integrable (u := (1-Real.sqrt u)/2) (by constructor <;> linarith [Real.sqrt_nonneg u]))3334private def denominator (t u : ℝ) := (t+1/2)^2-u/43536private theorem denominator_pos {t u : ℝ} (ht : 0 < t) (hu : u ≤ 1) : 0 < denominator t u := by37  unfold denominator38  nlinarith [sq_nonneg t]3940private theorem gap_formula {t u : ℝ} (ht : 0 < t) (hu : 0 ≤ u) :41    integrand u t = t^2 * ((denominator t u)⁻¹ - ((t+1/2)^2)⁻¹) := by42  unfold integrand43  rw [kernel_formula _ ht, kernel_formula _ ht, div_mul_div_comm, div_mul_div_comm]44  have ha : (t+(1-(1-Real.sqrt u)/2)) * (t+(1-Real.sqrt u)/2) = denominator t u := by45    unfold denominator46    nlinarith [Real.sq_sqrt hu]47  rw [ha, show (t+(1-1/2)) * (t+1/2) = (t+1/2)^2 by ring]48  simp only [div_eq_mul_inv]49  ring5051/-- Strict convexity on the closed interval, with t denoting squared overlap. -/52theorem conditional_squared_strictConvex :53    StrictConvexOn ℝ (Icc (0 : ℝ) 1) (fun u ↦ conditionalCurve (Real.sqrt u)) := by54  refine ⟨convex_Icc _ _, ?_⟩55  intro x hx y hy hxy a b ha hb hab56  have hz := (convex_Icc (0 : ℝ) 1) hx hy ha.le hb.le hab57  simp only [smul_eq_mul] at hz ⊢58  have hi := ((gap_integrable hx).const_mul a).add ((gap_integrable hy).const_mul b)59  have hlt := integral_strict_mono_Ioi (gap_integrable hz) hi (fun t ht ↦ by60    change integrand (a*x+b*y) t < a*integrand x t + b*integrand y t61    rw [gap_formula ht hz.1,gap_formula ht hx.1,gap_formula ht hy.1]62    have hd : denominator t x ≠ denominator t y := by63      intro hh64      apply hxy65      unfold denominator at hh66      linarith67    have hdm : denominator t (a*x+b*y) = a*denominator t x + b*denominator t y := by68      unfold denominator69      linear_combination -((t+1/2)^2)*hab70    have hh := (strictConvexOn_zpow (m := (-1 : ℤ)) (by decide) (by decide)).271      (denominator_pos ht hx.2) (denominator_pos ht hy.2) hd ha hb hab72    simp only [smul_eq_mul, zpow_neg_one] at hh73    rw [hdm]74    have hp := mul_lt_mul_of_pos_left hh (sq_pos_of_pos ht)75    linear_combination hp + (t^2*((t+1/2)^2)⁻¹)*hab)76  simp only [Pi.add_apply] at hlt77  rw [integral_add ((gap_integrable hx).const_mul a) ((gap_integrable hy).const_mul b),78    integral_const_mul, integral_const_mul, gap_integral hz, gap_integral hx, gap_integral hy] at hlt79  exact hlt8081/-- The scalar comparison at squared overlap t. -/82def gap (t : ℝ) := conditionalCurve (Real.sqrt t) - phi 0 (t/4)8384theorem gap_strictConvex : StrictConvexOn ℝ (Icc (0:ℝ) 1) gap := by85  refine ⟨convex_Icc _ _, ?_⟩86  intro x hx y hy hxy a b ha hb hab87  have h := conditional_squared_strictConvex.2 hx hy hxy ha hb hab88  have h' := (phi_concave 0).2 (show x/4 ∈ Icc (0:ℝ) 1 by constructor <;> linarith [hx.1,hx.2])89    (show y/4 ∈ Icc (0:ℝ) 1 by constructor <;> linarith [hy.1,hy.2]) ha.le hb.le hab90  simp only [smul_eq_mul] at h h' ⊢91  unfold gap92  rw [show (a*x+b*y)/4 = a*(x/4)+b*(y/4) by ring]93  linarith9495end SubentropyCertificates.BinaryCrossover

Axioms used

Choose a statement to see which axioms its proof uses.