ThreeLabelPerturbationAnalysis.lean
1module23public import SubentropyCertificates.FixedMarginalTable4public import SubentropyCertificates.PerturbationCoefficient5import all SubentropyCertificates.FixedMarginalTable67/-! The determinant representation and quartic remainder for the three-label perturbation. -/8@[expose] public section9noncomputable section10open Matrix MeasureTheory Set Filter Asymptotics11open scoped Topology12namespace SubentropyCertificates.ThreeLabelPerturbation13open SubentropyCertificates.ClassicalCurve14open SubentropyCertificates.Representations15open SubentropyCertificates.ConditionalContinuity (diagonal_integrand)1617def spectrum (e : ℝ) : Fin 3 → ℝ := ![2/3, 1/6+e, 1/6-e]18def spectralDifference (e : ℝ) := classicalSubentropy (spectrum 0) - classicalSubentropy (spectrum e)19def integrand (e t : ℝ) := 1 / ((1+2*t/3)*(1+t/6)^2*((1+t/6)^2 - t^2*e^2))20def alpha : ℝ := (256*Real.log 2-150)/272122theorem spectrum_probability {e : ℝ} (he : |e| ≤ 1/6) : spectrum e ∈ probabilitySimplex (Fin 3) := by23 obtain ⟨lo,hi⟩ := abs_le.mp he24 constructor25 · intro i26 fin_cases i <;> simp [spectrum] <;> linarith27 · simp [spectrum,Fin.sum_univ_succ]28 ring2930/-- The exact spectral difference as an integral, through the degenerate endpoint. -/31theorem spectralDifference_integral {e : ℝ} (he : |e| ≤ 1/6) :32 spectralDifference e = e^2 * ∫ t in Ioi (0:ℝ), integrand e t := by33 obtain ⟨h0,t0⟩ := diagonal_density (spectrum_probability (e := 0) (by norm_num))34 obtain ⟨he',te⟩ := diagonal_density (spectrum_probability he)35 obtain ⟨i0,q0⟩ := reciprocal_determinant_integral _ h0 t036 obtain ⟨ie,qe⟩ := reciprocal_determinant_integral _ he' te37 unfold spectralDifference classicalSubentropy38 rw [q0,qe,← integral_sub i0 ie,← integral_const_mul]39 apply setIntegral_congr_fun measurableSet_Ioi40 intro t ht41 simp only [diagonal_integrand, spectrum, Fin.prod_univ_succ, Matrix.cons_val_zero,42 Matrix.cons_val_succ, Finset.univ_eq_empty, Finset.prod_empty, mul_one, add_zero, sub_zero]43 change (1/(1+t)-(1+t*(2/3))⁻¹*((1+t*(1/6))⁻¹*(1+t*(1/6))⁻¹))/t^2 -44 (1/(1+t)-(1+t*(2/3))⁻¹*((1+t*(1/6+e))⁻¹*(1+t*(1/6-e))⁻¹))/t^2 =45 e^2 * integrand e t46 have ht' : 0 < t := ht47 obtain ⟨lo,hi⟩ := abs_le.mp he48 let A := 1+2*t/349 let B := 1+t/650 have ha : 0 < A := by dsimp [A]; positivity51 have hb : 0 < B := by dsimp [B]; positivity52 have hp : 0 < B+t*e := by dsimp [B]; nlinarith [mul_nonneg ht'.le (show 0 ≤ 1/6+e by linarith)]53 have hm : 0 < B-t*e := by dsimp [B]; nlinarith [mul_nonneg ht'.le (sub_nonneg.mpr hi)]54 unfold integrand55 rw [show 1+t*(2/3) = A by dsimp [A]; ring, show 1+t*(1/6) = B by dsimp [B]; ring,56 show 1+t*(1/6+e) = B+t*e by dsimp [B]; ring,57 show 1+t*(1/6-e) = B-t*e by dsimp [B]; ring]58 change (1/(1+t)-A⁻¹*(B⁻¹*B⁻¹))/t^2 - (1/(1+t)-A⁻¹*((B+t*e)⁻¹*(B-t*e)⁻¹))/t^2 =59 e^2*(1/(A*B^2*(B^2-t^2*e^2)))60 rw [show B^2-t^2*e^2 = (B+t*e)*(B-t*e) by ring]61 field_simp [ha.ne',hb.ne',hp.ne',hm.ne',ht'.ne']62 ring6364/-- Uniform bounds controlling both the integrand and its deviation from the value at e=0. -/65theorem integrand_bounds {e t : ℝ} (he : |e| ≤ 1/12) (ht : 0 < t) :66 kernel t ≤ integrand e t ∧ integrand e t ≤ (4/3)*kernel t ∧67 integrand e t - kernel t ≤ (48*e^2)*kernel t := by68 let B := 1+t/669 let x := (t*e / B)^270 have hb : 0 < B := by dsimp [B]; positivity71 have ha : 0 < 1+2*t/3 := by positivity72 have hk : 0 < kernel t := by unfold kernel; positivity73 have hratio : t/B ≤ 6 := (div_le_iff₀ hb).2 (by dsimp [B]; linarith)74 have hx0 : 0 ≤ x := sq_nonneg _75 have hx36 : x ≤ 36*e^2 := by76 have hp := pow_le_pow_left₀ (div_nonneg ht.le hb.le) hratio 277 have hg := mul_le_mul_of_nonneg_right hp (sq_nonneg e)78 dsimp [x]79 convert hg using 1 <;> ring80 have he2 := pow_le_pow_left₀ (abs_nonneg e) he 281 rw [sq_abs] at he282 have hx : x ≤ 1/4 := by nlinarith83 have hx1 : 0 < 1-x := by linarith84 have form : integrand e t = kernel t/(1-x) := by85 change 1/((1+2*t/3)*B^2*(B^2-t^2*e^2)) = (1/((1+2*t/3)*B^4))/(1-x)86 have hB : B^2*(1-x) = B^2-t^2*e^2 := by dsimp [x]; field_simp [hb.ne']87 rw [← hB]88 field_simp [hb.ne',hx1.ne']89 rw [form]90 constructor91 · exact (le_div_iff₀ hx1).2 (by nlinarith [mul_nonneg hk.le hx0])92 constructor93 · apply (div_le_iff₀ hx1).294 nlinarith [mul_nonneg hk.le (sub_nonneg.mpr hx)]95 · have h : kernel t/(1-x) - kernel t = kernel t*x/(1-x) := by field_simp [hx1.ne']; ring96 rw [h]97 apply (div_le_iff₀ hx1).298 have hg := mul_le_mul_of_nonneg_left hx36 hk.le99 have hj := mul_nonneg (mul_nonneg (sq_nonneg e) hk.le) (sub_nonneg.mpr hx)100 nlinarith101102/-- A signed, explicit quartic remainder on the full interval in the paper. -/103theorem spectralDifference_remainder {e : ℝ} (he : |e| ≤ 1/12) :104 0 ≤ spectralDifference e - alpha*e^2 ∧105 spectralDifference e - alpha*e^2 ≤ 48*alpha*e^4 := by106 let μ := volume.restrict (Ioi (0:ℝ))107 have hk : Integrable kernel μ := coefficient_integral.1108 have hkv : (∫ t, kernel t ∂μ) = alpha := coefficient_integral.2109 have hkn (t : ℝ) (ht : 0 < t) : 0 ≤ kernel t := by unfold kernel; positivity110 have hm : AEStronglyMeasurable (integrand e) μ := by111 apply Measurable.aestronglyMeasurable112 unfold integrand113 fun_prop114 have hbool := ae_restrict_mem (μ := volume) (measurableSet_Ioi (a := (0:ℝ)))115 have hi : Integrable (integrand e) μ := (hk.const_mul (4/3:ℝ)).mono' hm (by116 filter_upwards [hbool] with t ht117 rw [Real.norm_of_nonneg ((hkn t ht).trans (integrand_bounds he ht).1)]118 exact (integrand_bounds he ht).2.1)119 have hlo : alpha ≤ ∫ t, integrand e t ∂μ := by120 rw [← hkv]121 apply integral_mono_ae hk hi122 filter_upwards [hbool] with t ht123 exact (integrand_bounds he ht).1124 have hup : (∫ t, integrand e t ∂μ)-alpha ≤ (48*e^2)*alpha := by125 rw [← hkv, ← integral_sub hi hk, ← integral_const_mul]126 apply integral_mono_ae (hi.sub hk) (hk.const_mul _)127 filter_upwards [hbool] with t ht128 exact (integrand_bounds he ht).2.2129 rw [spectralDifference_integral (he.trans (by norm_num : (1:ℝ)/12 ≤ 1/6))]130 constructor131 · nlinarith [mul_le_mul_of_nonneg_left hlo (sq_nonneg e)]132 · nlinarith [mul_le_mul_of_nonneg_left hup (sq_nonneg e)]133134theorem spectralDifference_expansion :135 (fun e ↦ spectralDifference e-alpha*e^2) =O[𝓝 (0:ℝ)] (fun e ↦ e^4) := by136 refine isBigO_iff.mpr ⟨48*alpha,?_⟩137 have hsmall : ∀ᶠ e : ℝ in 𝓝 0, |e| ≤ 1/12 := by138 filter_upwards [Ioo_mem_nhds (show -(1/12:ℝ)<0 by norm_num) (show (0:ℝ)<1/12 by norm_num)] with e he139 exact abs_le.mpr ⟨he.1.le,he.2.le⟩140 filter_upwards [hsmall] with e he141 obtain ⟨hl,hu⟩ := spectralDifference_remainder he142 rw [Real.norm_eq_abs,abs_of_nonneg hl,Real.norm_eq_abs,abs_of_nonneg (by positivity : 0 ≤ e^4)]143 exact hu144145/-- The dimensionless partial fraction identity used after the change of variable t=6x. -/146theorem scaled_partial_fraction {x : ℝ} (hx : 0 ≤ x) :147 1/((1+4*x)*(1+x)^4) = (256/81)/(1+4*x) - (64/81)/(1+x) -148 (16/27)/(1+x)^2 - (4/9)/(1+x)^3 - (1/3)/(1+x)^4 := by149 have hp : 0 < 1+4*x := by positivity150 have hq : 0 < 1+x := by positivity151 field_simp [hp.ne',hq.ne']152 ring153154theorem coefficient_log_comparison : (177:ℝ)/256 < 842/1215 ∧ (842:ℝ)/1215 < Real.log 2 := by155 have h := (SubentropyCertificates.LogEnclosure.rational_log_enclosure (y := 2) (by norm_num) 4).1156 norm_num [Finset.sum_range_succ] at h157 exact ⟨by norm_num, by linarith⟩158159end SubentropyCertificates.ThreeLabelPerturbation
Axioms used
Choose a statement to see which axioms its proof uses.