Pratik Patil

BinaryCrossoverSeries.lean

1module23public import SubentropyCertificates.BinaryCrossoverConvex4public import Mathlib.MeasureTheory.Integral.DominatedConvergence5import all SubentropyCertificates.BinaryCrossoverConvex6import all SubentropyCertificates.CounterexampleIntegral78/-! The power series for binary conditional subentropy in the squared overlap. -/9@[expose] public section10noncomputable section11open MeasureTheory Set12namespace SubentropyCertificates.BinaryCrossover13open SubentropyCertificates.SmallOverlap14open SubentropyCertificates.QuantumCounterexample (Evaluates eval_add eval_scale)15open D5.S3.Quantum.Subentropy.UniformIntegrals (inverse_power)1617private def term (u : ℝ) (n : ℕ) (t : ℝ) :=18  u^(n+1) * (1/2 : ℝ)^(2*n+2) * (t^2 / (t+1/2)^(2*n+4))1920private def coefficient (u : ℝ) (n : ℕ) :=21  u^(n+1) / (2*((n:ℝ)+1)*(4*((n:ℝ)+1)^2-1))2223private theorem integral_term (u : ℝ) (n : ℕ) :24    Evaluates (term u n) (coefficient u n) := by25  let a : ℝ := 1/226  have ev (j : ℕ) : Evaluates (fun t : ℝ ↦ 1/(t+a)^(j+2)) (1/(((j:ℝ)+1)*a^(j+1))) :=27    inverse_power a (by norm_num [a]) j28  have I := eval_scale (u^(n+1)*a^(2*n+2))29    (eval_add (eval_add (ev (2*n)) (eval_scale (-1) (ev (2*n+1))))30      (eval_scale (1/4) (ev (2*n+2))))31  have E (t : ℝ) (ht : t ∈ Ioi (0:ℝ)) : term u n t =32      u^(n+1)*a^(2*n+2)*((1/(t+a)^(2*n+2) + -1*(1/(t+a)^(2*n+1+2))) +33        (1/4)*(1/(t+a)^(2*n+2+2))) := by34    change u^(n+1)*a^(2*n+2)*(t^2/(t+a)^(2*n+4)) = _35    congr 136    have hr : 0 < t+a := by dsimp [a]; linarith [ht.out]37    rw [show 2*n+1+2 = 2*n+3 by omega, show 2*n+2+2 = 2*n+4 by omega]38    simp only [pow_add]39    field_simp [hr.ne']40    dsimp [a]41    ring42  refine ⟨I.1.congr_fun (fun t ht ↦ (E t ht).symm) measurableSet_Ioi, ?_⟩43  rw [setIntegral_congr_fun measurableSet_Ioi E, I.2]44  unfold coefficient45  push_cast46  rw [show 2*n+1+1 = 2*n+2 by omega, show 2*n+2+1 = 2*n+3 by omega]47  simp only [pow_add]48  have hp : 0 < a^(2*n) := by dsimp [a]; positivity49  have hn : 0 ≤ (n:ℝ) := Nat.cast_nonneg _50  have h₁ : 0 < 2*(n:ℝ)+1 := by positivity51  have h₂ : 0 < 2*(n:ℝ)+1+1 := by positivity52  have h₃ : 0 < 2*(n:ℝ)+2+1 := by positivity53  have h₄ : 0 < 4*((n:ℝ)+1)^2-1 := by nlinarith [sq_nonneg (n:ℝ)]54  have ha : a ≠ 0 := by norm_num [a]55  field_simp [hp.ne',ha,h₁.ne',h₂.ne',h₃.ne',h₄.ne']56  dsimp [a]57  ring5859private theorem sum_term {u t : ℝ} (hu : u ∈ Ico 0 1) (ht : 0 < t) :60    (∑' n : ℕ, term u n t) = integrand u t := by61  let r := t + 1/262  let x := u / (4*r^2)63  have hr : 0 < r := by dsimp [r]; linarith64  have hden : 1 ≤ 4*r^2 := by dsimp [r]; nlinarith [sq_nonneg t]65  have hx : 0 ≤ x := div_nonneg hu.1 (by positivity)66  have hx1 : x < 1 := (div_le_self hu.1 hden).trans_lt hu.267  have ht' (n : ℕ) : term u n t = (t^2/r^2*x)*x^n := by68    change u^(n+1)*(1/2:ℝ)^(2*n+2)*(t^2/r^(2*n+4)) = _69    rw [show 2*n+2 = 2*(n+1) by omega, show 2*n+4 = 2+2*(n+1) by omega,70      pow_mul, pow_add r, pow_mul]71    rw [show (t^2/r^2*x)*x^n = t^2/r^2*x^(n+1) by rw [pow_succ]; ring]72    rw [show x = (u*(1/2)^2)/r^2 by dsimp [x]; field_simp [hr.ne']; ring]73    simp only [div_pow, mul_pow]74    field_simp [hr.ne']75  rw [tsum_congr ht', tsum_mul_left, (hasSum_geometric_of_lt_one hx hx1).tsum_eq,76    gap_formula ht hu.1]77  change t^2/r^2*x*(1-x)⁻¹ = t^2*((r^2-u/4)⁻¹-(r^2)⁻¹)78  have hd : 0 < r^2-u/4 := by linarith [hu.2]79  have hsub : 0 < 1-x := sub_pos.mpr hx180  have hxden : r^2*(1-x) = r^2-u/4 := by dsimp [x]; field_simp [hr.ne']81  rw [← hxden]82  field_simp [hr.ne',hsub.ne']83  ring8485/-- The power series in Appendix F.3, indexed by n+1 to start at the first positive power. -/86theorem conditional_squared_hasSum {u : ℝ} (hu : u ∈ Ico 0 1) :87    HasSum (fun n : ℕ ↦ u^(n+1)/(2*((n:ℝ)+1)*(4*((n:ℝ)+1)^2-1)))88      (conditionalCurve (Real.sqrt u)) := by89  let μ := volume.restrict (Ioi (0:ℝ))90  have hpos (n : ℕ) : ∀ᵐ t ∂μ, 0 ≤ term u n t := by91    filter_upwards [ae_restrict_mem (μ := volume) measurableSet_Ioi] with t ht92    have ht' : 0 < t := ht93    unfold term94    have hu' := hu.195    positivity96  have hcoef (n : ℕ) : (∫ t, ‖term u n t‖ ∂μ) = coefficient u n := by97    rw [show (∫ t, ‖term u n t‖ ∂μ) = ∫ t, term u n t ∂μ from integral_congr_ae98      ((hpos n).mono fun t ht ↦ Real.norm_of_nonneg ht), (integral_term u n).2]99  have hsum : Summable (coefficient u) := by100    have hg := ((hasSum_geometric_of_lt_one hu.1 hu.2).summable).mul_right u101    apply hg.of_nonneg_of_le102    · intro n103      have h : 1 ≤ 2*((n:ℝ)+1)*(4*((n:ℝ)+1)^2-1) := by104        nlinarith [Nat.cast_nonneg (α := ℝ) n, sq_nonneg (n:ℝ), pow_nonneg (Nat.cast_nonneg (α := ℝ) n) 3]105      exact div_nonneg (pow_nonneg hu.1 _) (by linarith)106    · intro n107      have h : 1 ≤ 2*((n:ℝ)+1)*(4*((n:ℝ)+1)^2-1) := by108        nlinarith [Nat.cast_nonneg (α := ℝ) n, sq_nonneg (n:ℝ), pow_nonneg (Nat.cast_nonneg (α := ℝ) n) 3]109      simpa [coefficient,pow_succ] using div_le_self (pow_nonneg hu.1 (n+1)) h110  have h := hasSum_integral_of_summable_integral_norm (μ := μ) (fun n ↦ (integral_term u n).1)111    (show Summable (fun n ↦ ∫ t, ‖term u n t‖ ∂μ) by simpa only [hcoef] using hsum)112  have hI : (∫ t, ∑' n, term u n t ∂μ) = conditionalCurve (Real.sqrt u) := by113    rw [show (∫ t, ∑' n, term u n t ∂μ) = ∫ t, integrand u t ∂μ from114      setIntegral_congr_fun measurableSet_Ioi (fun t ht ↦ sum_term hu ht),115      gap_integral ⟨hu.1,hu.2.le⟩]116  rw [hI] at h117  simpa only [show ∀ n, (∫ t, term u n t ∂μ) = coefficient u n from fun n ↦ (integral_term u n).2,118    coefficient] using h119120end SubentropyCertificates.BinaryCrossover

Axioms used

Choose a statement to see which axioms its proof uses.