Pratik Patil

ClassicalStrict.lean

1module23public import SubentropyCertificates.ClassicalCurve45/-! Strict concavity from the original determinant kernel, including zero weights. -/67@[expose] public section8noncomputable section9set_option autoImplicit false10open Matrix MeasureTheory Set11open scoped BigOperators1213namespace SubentropyCertificates.ClassicalCurve14open D5.S3.Quantum.Subentropy.Basic15open D5.S3.Quantum.Subentropy.DensityKernel1617theorem inverse_product_exp {ι : Type*} [Fintype ι]18    (p : ι → ℝ) (hp : ∀ i, 0 ≤ p i) {t : ℝ} (ht : 0 < t) :19    (∏ i, (t + p i)⁻¹) = Real.exp (-(∑ i, Real.log (t + p i))) := by20  rw [Real.exp_neg, Real.exp_sum, ← Finset.prod_inv_distrib]21  apply Finset.prod_congr rfl22  intro i _23  rw [Real.exp_log (add_pos_of_pos_of_nonneg ht (hp i))]2425theorem inverse_product_strict {ι : Type*} [Fintype ι]26    (p q : ι → ℝ) (hp : ∀ i, 0 ≤ p i) (hq : ∀ i, 0 ≤ q i)27    (hpq : p ≠ q) (a b : ℝ) (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1)28    {t : ℝ} (ht : 0 < t) :29    (∏ i, (t + (a * p i + b * q i))⁻¹) <30      a * (∏ i, (t + p i)⁻¹) + b * (∏ i, (t + q i)⁻¹) := by31  classical32  have hmix (i : ι) : 0 ≤ a * p i + b * q i :=33    add_nonneg (mul_nonneg ha.le (hp i)) (mul_nonneg hb.le (hq i))34  have hcoord (i : ι) : a * Real.log (t + p i) + b * Real.log (t + q i) ≤35      Real.log (t + (a * p i + b * q i)) := by36    have h := strictConcaveOn_log_Ioi.concaveOn.237      (show 0 < t + p i by linarith [hp i])38      (show 0 < t + q i by linarith [hq i]) ha.le hb.le hab39    have heq : a * (t + p i) + b * (t + q i) = t + (a * p i + b * q i) := by40      nlinarith41    simpa only [smul_eq_mul, heq] using h42  obtain ⟨j, hj⟩ : ∃ j, p j ≠ q j := by43    by_contra h44    push Not at h45    exact hpq (funext h)46  have hjlt : a * Real.log (t + p j) + b * Real.log (t + q j) <47      Real.log (t + (a * p j + b * q j)) := by48    have h := strictConcaveOn_log_Ioi.249      (show 0 < t + p j by linarith [hp j])50      (show 0 < t + q j by linarith [hq j])51      (show t + p j ≠ t + q j by exact fun h => hj (by linarith)) ha hb hab52    have heq : a * (t + p j) + b * (t + q j) = t + (a * p j + b * q j) := by53      nlinarith54    simpa only [smul_eq_mul, heq] using h55  have hsum := Finset.sum_lt_sum (s := Finset.univ) (fun i _ => hcoord i)56    ⟨j, Finset.mem_univ j, hjlt⟩57  simp only [Finset.sum_add_distrib, ← Finset.mul_sum] at hsum58  rw [inverse_product_exp _ hmix ht, inverse_product_exp _ hp ht,59    inverse_product_exp _ hq ht]60  calc61    _ < Real.exp (a * (-(∑ i, Real.log (t + p i))) +62        b * (-(∑ i, Real.log (t + q i)))) := by63      apply Real.exp_lt_exp.mpr64      linarith65    _ ≤ _ := convexOn_exp.2 (mem_univ _) (mem_univ _) ha.le hb.le hab6667theorem classical_kernel_strict {ι : Type*} [Fintype ι] [DecidableEq ι]68    (p q : ι → ℝ) (hp : ∀ i, 0 ≤ p i) (hq : ∀ i, 0 ≤ q i)69    (hpq : p ≠ q) (a b : ℝ) (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1)70    {t : ℝ} (ht : 0 < t) :71    a * subentropyKernel (diagonal (fun i => (p i : ℂ))) t +72      b * subentropyKernel (diagonal (fun i => (q i : ℂ))) t <73      subentropyKernel (diagonal (fun i => ((a * p i + b * q i : ℝ) : ℂ))) t := by74  simp only [kernel_diagonal _ t ht.ne', div_eq_mul_inv,75    Finset.prod_mul_distrib, Finset.prod_const, Finset.card_univ]76  have h := mul_lt_mul_of_pos_left (inverse_product_strict p q hp hq hpq a b ha hb hab ht)77    (pow_pos ht (Fintype.card ι))78  have hc := congrArg (fun r : ℝ => r * (t * (1 + t)⁻¹)) hab79  nlinarith only [h, hc]8081theorem integral_strict_mono_Ioi {f g : ℝ → ℝ}82    (hf : IntegrableOn f (Ioi 0)) (hg : IntegrableOn g (Ioi 0))83    (hfg : ∀ t ∈ Ioi (0 : ℝ), f t < g t) :84    (∫ t in Ioi (0 : ℝ), f t) < ∫ t in Ioi (0 : ℝ), g t := by85  have hlt : ∀ᵐ t ∂volume.restrict (Ioi (0 : ℝ)), f t < g t := by86    filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht87    exact hfg t ht88  have hle := hlt.mono (fun _ h => h.le)89  apply lt_of_le_of_ne (integral_mono_ae hf hg hle)90  intro heq91  have he := (integral_eq_iff_of_ae_le hf hg hle).mp heq92  have hfalse : ∀ᵐ t ∂volume.restrict (Ioi (0 : ℝ)), False := by93    filter_upwards [hlt, he] with t ht heq94    exact ht.ne heq95  have hz : volume.restrict (Ioi (0 : ℝ)) = 0 := by96    simpa only [Filter.eventually_false_iff_eq_bot, ae_eq_bot] using hfalse97  have hm := congrArg (fun μ : Measure ℝ => μ (Ioc 1 2)) hz98  have hset : Ioc (1 : ℝ) 2 ∩ Ioi 0 = Ioc 1 2 := by99    ext x100    simp only [mem_inter_iff, mem_Ioc, mem_Ioi]101    constructor102    · exact fun h => h.1103    · intro h104      exact ⟨h, lt_trans zero_lt_one h.1⟩105  norm_num [Measure.restrict_apply, measurableSet_Ioc, hset] at hm106107theorem classical_subentropy_strictConcave {ι : Type*} [Fintype ι] [DecidableEq ι] :108    StrictConcaveOn ℝ (probabilitySimplex ι) classicalSubentropy := by109  refine ⟨simplex_convex ι, ?_⟩110  intro p hp q hq hpq a b ha hb hab111  have hmix := simplex_convex ι hp hq ha.le hb.le hab112  have hdP := diagonal_density hp113  have hdQ := diagonal_density hq114  have hdM := diagonal_density hmix115  have h := integral_strict_mono_Ioi116    (((integrable_subentropy_kernel hdP.1 hdP.2).const_mul a).add117      ((integrable_subentropy_kernel hdQ.1 hdQ.2).const_mul b))118    (integrable_subentropy_kernel hdM.1 hdM.2)119    (fun t ht => classical_kernel_strict p q hp.1 hq.1 hpq a b ha hb hab ht)120  simp only [Pi.add_apply] at h121  rw [integral_add ((integrable_subentropy_kernel hdP.1 hdP.2).const_mul a)122    ((integrable_subentropy_kernel hdQ.1 hdQ.2).const_mul b),123    integral_const_mul, integral_const_mul] at h124  exact h125126theorem phi_strictConcave (m : ℕ) : StrictConcaveOn ℝ (Icc (0 : ℝ) 1) (phi m) := by127  refine ⟨convex_Icc _ _, ?_⟩128  intro u hu v hv huv a b ha hb hab129  have hne : extremalVector m u ≠ extremalVector m v := by130    intro he131    have hn := congrFun he none132    simp only [extremalVector] at hn133    exact huv (by linarith)134  have h := classical_subentropy_strictConcave.2135    (extremal_probability m hu) (extremal_probability m hv) hne ha hb hab136  simpa only [phi, smul_eq_mul, ← extremal_affine m u v a b hab] using h137138end SubentropyCertificates.ClassicalCurve

Axioms used

Choose a statement to see which axioms its proof uses.