Pratik Patil

KernelStrongConvexity.lean

1module2public import SubentropyCertificates.CurvatureEstimate34/-! A uniform second derivative bound along every simplex chord, at each5positive determinant parameter. All denominators are at least one. -/6@[expose] public section7noncomputable section8set_option autoImplicit false9open Set10open scoped BigOperators11namespace SubentropyCertificates.StrongConcavity12open SubentropyCertificates.ClassicalCurve13variable {D : Type*} [Fintype D]1415theorem laplace_chord (hd : 2 ≤ Fintype.card D) {t : ℝ} (ht : 0 ≤ t)16    {p q : D → ℝ} (hp : p ∈ probabilitySimplex D) (hq : q ∈ probabilitySimplex D)17    {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a+b=1) :18    laplace t (a • p+b • q) + (a*b/2*energy (q-p))*(t^2*Real.exp (-(rate (Fintype.card D)*t))) ≤19      a*laplace t p + b*laplace t q := by20  let h := q-p21  let P (x : ℝ) (i : D) := p i+x*h i22  let L (x : ℝ) := laplace t (P x)23  let v (x : ℝ) (i : D) := t*h i/(1+t*P x i)24  let V (x : ℝ) := ∑ i, v x i25  let W (x : ℝ) := ∑ i, (v x i)^226  let k := t^2 * Real.exp (-(rate (Fintype.card D)*t)) * energy h27  have hsum : ∑ i, h i = 0 := by simp [h,Finset.sum_sub_distrib,hp.2,hq.2]28  have hP {x : ℝ} (hx : x ∈ Icc 0 1) : P x ∈ probabilitySimplex D := by29    have he : P x = (1-x) • p + x • q := by30      funext i; change p i+x*(q i-p i) = (1-x)*p i+x*q i; ring31    rw [he]; exact (simplex_convex D) hp hq (sub_nonneg.mpr hx.2) hx.1 (by ring)32  have derivatives {x : ℝ} (hx : x ∈ Icc 0 1) :33      HasDerivAt L (L x * -(V x)) x ∧ HasDerivAt V (-W x) x := by34    have hden (i : D) : 0 < 1+t*P x i := by have := (hP hx).1 i; positivity35    have hd₁ (i : D) : HasDerivAt (fun z => 1+t*P z i) (t*h i) x := by36      simpa [P] using (((hasDerivAt_id x).mul_const (h i)).const_add (p i) |>.const_mul t |>.const_add 1)37    have hl (i : D) : HasDerivAt (fun z => Real.log (1+t*P z i)) (v x i) x :=38      (hd₁ i).log (hden i).ne'39    have hv (i : D) : HasDerivAt (fun z => v z i) (-(v x i)^2) x := by40      convert (hasDerivAt_const x (t*h i)).div (hd₁ i) (hden i).ne' using 141      dsimp [v]; rw [div_pow]; ring42    have hlog := HasDerivAt.fun_sum (u := Finset.univ) (fun i _ => hl i)43    have hrat := HasDerivAt.fun_sum (u := Finset.univ) (fun i _ => hv i)44    exact ⟨hlog.neg.exp,by simpa only [V,W,Finset.sum_neg_distrib] using hrat⟩45  let f (x : ℝ) := L x - k/2*x^246  let f' (x : ℝ) := L x * -(V x) - k*x47  let f'' (x : ℝ) := L x *((V x)^2+W x)-k48  have hd₁ {x : ℝ} (hx : x ∈ Icc 0 1) : HasDerivAt f (f' x) x := by49    convert (derivatives hx).1.sub (((hasDerivAt_id x).pow 2).const_mul (k/2)) using 150    · rfl51    · dsimp [f']; ring52  have hd₂ {x : ℝ} (hx : x ∈ Icc 0 1) : HasDerivAt f' (f'' x) x := by53    obtain ⟨hl,hv⟩ := derivatives hx54    convert (hl.mul hv.neg).sub ((hasDerivAt_id x).const_mul k) using 155    · rfl56    · dsimp [f'']; ring57  have hconv : ConvexOn ℝ (Icc 0 1) f := by58    apply convexOn_of_hasDerivWithinAt2_nonneg (convex_Icc 0 1)59      (fun x hx => (hd₁ hx).continuousAt.continuousWithinAt)60      (fun _ hx => (hd₁ (interior_subset hx)).hasDerivWithinAt)61      (fun _ hx => (hd₂ (interior_subset hx)).hasDerivWithinAt)62    intro x hx63    have hc : k ≤ L x * W x := laplace_curvature_lower hd ht (hP (interior_subset hx)) hsum64    have hl : 0 ≤ L x := Real.exp_nonneg _65    dsimp [f'']; nlinarith [mul_nonneg hl (sq_nonneg (V x))]66  have h0 : P 0 = p := by funext i; simp [P]67  have h1 : P 1 = q := by funext i; simp [P,h]68  have hbP : P b = a • p+b • q := by69    funext i; change p i+b*(q i-p i)=a*p i+b*q i70    linear_combination -p i*hab71  have hmix := hconv.2 (show (0:ℝ) ∈ Icc 0 1 by constructor <;> norm_num)72    (show (1:ℝ) ∈ Icc 0 1 by constructor <;> norm_num) ha hb hab73  simp only [smul_eq_mul,mul_zero,mul_one,zero_add,f,L,h0,h1,hbP,one_pow] at hmix74  have hab' : a*b=b-b^2 := by linear_combination b*hab75  rw [hab']76  change _ ≤ _77  dsimp [k,h] at hmix78  nlinarith only [hmix]7980end SubentropyCertificates.StrongConcavity

Axioms used

Choose a statement to see which axioms its proof uses.