rw [tiltedMean, abs_div, abs_of_pos (partition_pos m hi), div_le_iff₀ (partition_pos m hi)]
calc
|∫ x, A x * Real.exp (m * F x) ∂μ| ≤∫ x, |A x * Real.exp (m * F x)| ∂μ :=by simpa only [Real.norm_eq_abs] using norm_integral_le_integral_norm (fun x =>A x * Real.exp (m * F x))
_ ≤∫ x, B * Real.exp (m * F x) ∂μ :=by
apply integral_mono (integrable_weighted hi hA hb).norm (hi.const_mul B)
intro x
change |A x * Real.exp (m * F x)| ≤B * Real.exp (m * F x)
rw [abs_mul, abs_of_pos (Real.exp_pos _)]
exact mul_le_mul_of_nonneg_right (hb x) (Real.exp_nonneg _)
_ = B * ∫ x, Real.exp (m * F x) ∂μ := integral_const_mul _ _
| 0, f =>Continuous f ∧∃B : ℝ, 0≤B∧∀ x, |f x| ≤B
| n + 1, f =>BddSmooth n f ∧∀v : E, ∃g : E→ℝ, BddSmooth n g ∧∀ x t, HasDerivAt (funs : ℝ=> f (x + s • v)) (g (x + t • v)) t
theoremBddSmooth.const (n : ℕ) (c : ℝ) : BddSmooth n (fun_ : E=> c) :=by
proof · 4
lines
induction n generalizing c with
| zero => exact ⟨continuous_const, |c|, abs_nonneg _, fun _ => le_rfl⟩
| succ n ih =>
exact ⟨ih c, fun v => ⟨fun _ =>0, ih 0, fun _ t => hasDerivAt_const t c⟩⟩
theoremBddSmooth.add {n : ℕ} {f g : E→ℝ} (hf : BddSmooth n f) (hg : BddSmooth n g) :
BddSmooth n (fun x => f x + g x) :=by
proof · 12
lines
induction n generalizing f g with
| zero =>
obtain ⟨B, hB, hb⟩ := hf.bound
obtain ⟨C, hC, hc⟩ := hg.bound
exact ⟨hf.continuous.add hg.continuous, B + C, add_nonneg hB hC,
fun x => (abs_add_le _ _).trans (add_le_add (hb x) (hc x))⟩
| succ n ih =>
refine ⟨ih hf.1 hg.1, ?_⟩
intro v
obtain ⟨f', hf', hdf⟩ := hf.2 v
obtain ⟨g', hg', hdg⟩ := hg.2 v
exact ⟨fun x => f' x + g' x, ih hf' hg', fun x t => (hdf x t).add (hdg x t)⟩
theoremBddSmooth.mul {n : ℕ} {f g : E→ℝ} (hf : BddSmooth n f) (hg : BddSmooth n g) :
BddSmooth n (fun x => f x * g x) :=by
proof · 15
lines
induction n generalizing f g with
| zero =>
obtain ⟨B, hB, hb⟩ := hf.bound
obtain ⟨C, hC, hc⟩ := hg.bound
refine ⟨hf.continuous.mul hg.continuous, B * C, mul_nonneg hB hC, ?_⟩
intro x
rw [abs_mul]
exact mul_le_mul (hb x) (hc x) (abs_nonneg _) hB
| succ n ih =>
refine ⟨ih hf.1 hg.1, ?_⟩
intro v
obtain ⟨f', hf', hdf⟩ := hf.2 v
obtain ⟨g', hg', hdg⟩ := hg.2 v
exact ⟨fun x => f' x * g x + f x * g' x,
(ih hf' hg.1).add (ih hf.1 hg'), fun x t => (hdf x t).mul (hdg x t)⟩
theoremhasDerivAt_shiftedMean {FF₁AA₁ : E→ℝ} {CBm : ℝ} {v : E}
(hC : 0≤C) (hB : 0≤B)
(hF : ContinuousF) (hF₁ : ContinuousF₁) (hA : ContinuousA) (hA₁ : ContinuousA₁)
(hdF : ∀ x t, HasDerivAt (funs : ℝ=>F (x + s • v)) (F₁ (x + t • v)) t)
(hdA : ∀ x t, HasDerivAt (funs : ℝ=>A (x + s • v)) (A₁ (x + t • v)) t)
(hbF : ∀ x, |F₁ x| ≤C) (hbA : ∀ x, |A x| ≤B) (hbA₁ : ∀ x, |A₁ x| ≤B)
(hi : ∀ x, Integrable (fun z =>Real.exp (m * F (x + z))) ν) (x : E) (t : ℝ) :
HasDerivAt (funs : ℝ=> shiftedMean ν m FA (x + s • v))
(SKFluctuations.Hierarchy.shiftedMean ν m FA₁ (x + t • v) + m *
(SKFluctuations.Hierarchy.shiftedMean ν m F (fun y =>A y * F₁ y) (x + t • v) -
SKFluctuations.Hierarchy.shiftedMean ν m FA (x + t • v) * SKFluctuations.Hierarchy.shiftedMean ν m FF₁ (x + t • v))) t :=by
proof · 10
lines
exact hasDerivAt_tiltedMean
(F:=fun s z =>F (x + s • v + z)) (F₁:=fun s z =>F₁ (x + s • v + z))
(A:=fun s z =>A (x + s • v + z)) (A₁:=fun s z =>A₁ (x + s • v + z)) hC hB
(fun s => (hF.comp (continuous_const.add continuous_id)).measurable)
(fun s => (hF₁.comp (continuous_const.add continuous_id)).measurable)
(fun s => (hA.comp (continuous_const.add continuous_id)).measurable)
(fun s => (hA₁.comp (continuous_const.add continuous_id)).measurable)
(fun s z =>by simpa only [add_assoc, add_comm z] using hdF (x + z) s)
(fun s z =>by simpa only [add_assoc, add_comm z] using hdA (x + z) s)
(fun s z => hbF _) (fun s z => hbA _) (fun s z => hbA₁ _) m t (hi _)
theoremPotentialRegularity.shiftedContinuation {n : ℕ} {F : E→ℝ} {m : ℝ}
(hF : PotentialRegularity n F) (hm : 0 < m)
(hi : ∀ x, Integrable (fun z =>Real.exp (m * F (x + z))) ν) :
PotentialRegularity n (shiftedContinuation ν m F) :=by
proof · 13
lines
obtain ⟨C, hC⟩ := hF.1
refine ⟨⟨C, lipschitzWith_shiftedContinuation hC hm hi⟩, ?_⟩
intro v
obtain ⟨F₁, hF₁, hdF⟩ := hF.2 v
refine ⟨shiftedMean ν m FF₁, hF₁.shiftedMean hF hi, ?_⟩
obtain ⟨B, hB, hb⟩ := hF₁.bound
intro x t
exact hasDerivAt_continuation
(F:=fun s z =>F (x + s • v + z)) (F₁:=fun s z =>F₁ (x + s • v + z)) hB hm.ne'
(fun s => (hC.continuous.comp (continuous_const.add continuous_id)).measurable)
(fun s => (hF₁.continuous.comp (continuous_const.add continuous_id)).measurable)
(fun s z =>by simpa only [add_assoc, add_comm z] using hdF (x + z) s)
(fun s z => hb _) t (hi _)
theoremBddSmooth.sum {ι : Type*} {n : ℕ} (s : Finset ι) {f : ι →E→ℝ}
(hf : ∀ i ∈ s, BddSmooth n (f i)) : BddSmooth n (fun x =>∑ i ∈ s, f i x) :=by
proof · 6
lines
classical
induction s usingFinset.induction_on with
| empty => simpa usingBddSmooth.const n (0 : ℝ)
| @insert i s his ih =>
simpa only [Finset.sum_insert his] using (hf i (Finset.mem_insert_self _ _)).add
(ih (fun j hj => hf j (Finset.mem_insert_of_mem hj)))
theoremhasDerivAt_spinPartition (w : S→ℝ) (φ : S→E→L[ℝ] ℝ) (x v : E) (t : ℝ) :
HasDerivAt (funs : ℝ=> spinPartition w φ (x + s • v))
(∑ s, w s * (Real.exp (φ s (x + t • v)) * φ s v)) t :=by
proof · 1
line
simpa only [spinPartition, Finset.sum_fn] usingHasDerivAt.sum (u :=Finset.univ) (fun s _ => ((line_derivative_linear (φ s) x v t).exp).const_mul (w s))
theorembddSmooth_spinWeight {w : S→ℝ} (hw : ∀ s, 0 < w s)
(φ : S→E→L[ℝ] ℝ) (n : ℕ) (s : S) : BddSmooth n (fun x => spinWeight w φ x s) :=by
proof · 13
lines
induction n generalizing s with
| zero =>
refine ⟨continuous_spinWeight hw φ s, 1, by norm_num, ?_⟩
intro x
rw [abs_of_nonneg (spinWeight_nonneg hw φ x s)]
exact spinWeight_le_one hw φ x s
| succ n ih =>
refine ⟨ih s, fun v => ?_⟩
refine ⟨fun x => spinWeight w φ x s * (φ s v - ∑ j, spinWeight w φ x j * φ j v), ?_, ?_⟩
· apply (ih s).mul
apply (BddSmooth.const n (φ s v)).sub
exact BddSmooth.sum Finset.univ (fun j _ => (ih j).mul (BddSmooth.const n (φ j v)))
· exact hasDerivAt_spinWeight hw φ s (v := v)
theoremhasDerivAt_spinLogPartition {w : S→ℝ} (hw : ∀ s, 0 < w s)
(φ : S→E→L[ℝ] ℝ) (x v : E) (t : ℝ) :
HasDerivAt (funr : ℝ=> spinLogPartition w φ (x + r • v))
(∑ s, spinWeight w φ (x + t • v) s * φ s v) t :=by
proof · 3
lines
have h := (hasDerivAt_spinPartition w φ x v t).log (spinPartition_pos hw φ (x + t • v)).ne'
apply h.congr_deriv
simp only [spinWeight, div_mul_eq_mul_div, ←Finset.sum_div, mul_assoc]
letC : ℝ≥0:=∑ s, ‖φ s‖₊
have hφ (s : S) : LipschitzWithC (φ s) :=
(φ s).lipschitzWith.weaken (Finset.single_le_sum (fun j _ => (zero_le (a := ‖φ j‖₊))) (Finset.mem_univ s))
have hle (x y : E) : spinLogPartition w φ x - spinLogPartition w φ y ≤C * dist x y :=byhavehz : spinPartition w φ x ≤Real.exp (C * dist x y) * spinPartition w φ y :=by
rw [spinPartition, spinPartition, Finset.mul_sum]
apply Finset.sum_le_sum
intro s _
havehd : φ s x ≤C * dist x y + φ s y :=byhave h := (le_abs_self _).trans ((hφ s).dist_le_mul x y)
linarith
have he :=Real.exp_le_exp.mpr hd
rw [Real.exp_add] at he
have h := mul_le_mul_of_nonneg_left he (hw s).le
nlinarith
have hl :=Real.log_le_log (spinPartition_pos hw φ x) hz
rw [Real.log_mul (Real.exp_ne_zero _) (spinPartition_pos hw φ y).ne', Real.log_exp] at hl
exact sub_le_iff_le_add.mpr hl
apply LipschitzWith.of_dist_le_mul
intro x y
rw [Real.dist_eq, abs_le]
exact ⟨byhave:= hle y x; rw [dist_comm y x] at this; linarith, hle x y⟩
theorempotentialRegularity_spinLogPartition {w : S→ℝ} (hw : ∀ s, 0 < w s)
(φ : S→E→L[ℝ] ℝ) (n : ℕ) : PotentialRegularity n (spinLogPartition w φ) :=by
proof · 4
lines
refine ⟨⟨_, lipschitzWith_spinLogPartition hw φ⟩, fun v => ?_⟩
exact ⟨fun x =>∑ s, spinWeight w φ x s * φ s v,
BddSmooth.sum Finset.univ (fun s _ => (bddSmooth_spinWeight hw φ n s).mul
(BddSmooth.const n (φ s v))), fun x t => hasDerivAt_spinLogPartition hw φ x v t⟩
theoremshiftedMean_add (hA : BddSmooth0A) (hB : BddSmooth0B)
{x : E} (hi : Integrable (fun z =>Real.exp (m * F (x + z))) ν) :
shiftedMean ν m F (fun y =>A y + B y) x =
shiftedMean ν m FA x + shiftedMean ν m FB x :=by
theoremshiftedMean_sub (hA : BddSmooth0A) (hB : BddSmooth0B)
{x : E} (hi : Integrable (fun z =>Real.exp (m * F (x + z))) ν) :
shiftedMean ν m F (fun y =>A y - B y) x =
shiftedMean ν m FA x - shiftedMean ν m FB x :=by
theoremshiftedMean_mono (hA : BddSmooth0A) (hB : BddSmooth0B)
(hab : ∀ y, A y ≤B y) {x : E}
(hi : Integrable (fun z =>Real.exp (m * F (x + z))) ν) :
shiftedMean ν m FA x ≤ shiftedMean ν m FB x :=by
proof · 3
lines
apply div_le_div_of_nonneg_right _ (partition_pos m hi).le
exact integral_mono (hA.integrable_shifted_weighted hi) (hB.integrable_shifted_weighted hi)
(fun z => mul_le_mul_of_nonneg_right (hab _) (Real.exp_nonneg _))
theoremshiftedMean_nonneg (hA : ∀ y, 0≤A y) {x : E}
(hi : Integrable (fun z =>Real.exp (m * F (x + z))) ν) :
0≤ shiftedMean ν m FA x := tiltedMean_nonneg hi (fun _z => hA _)
theoremshiftedMean_square_sub_nonneg (hF : ContinuousF) (hA : BddSmooth0A) {x : E}
(hi : Integrable (fun z =>Real.exp (m * F (x + z))) ν) :
0≤ shiftedMean ν m F (fun y => (A y)^2) x - (shiftedMean ν m FA x)^2:=by
proof · 4
lines
obtain ⟨C, _, hb⟩ := hA.bound
exact tiltedMean_square_sub_nonneg
(hF.comp (continuous_const.add continuous_id)).measurable
(hA.continuous.comp (continuous_const.add continuous_id)).measurable hi (fun z => hb _)
potential : E→ℝmean : E→ℝsecondMoment : E→ℝhessian : E→ℝregular : ∀ n, PotentialRegularity n potential
mean_smooth : ∀ n, BddSmooth n mean
second_smooth : ∀ n, BddSmooth n secondMoment
hessian_smooth : ∀ n, BddSmooth n hessian
first : ∀ x t, HasDerivAt (funs : ℝ=> potential (x + s • v)) (mean (x + t • v)) t
second : ∀ x t, HasDerivAt (funs : ℝ=> mean (x + s • v)) (hessian (x + t • v)) t
mass_nonneg : 0≤ a
mass_le_one : a ≤1variance_nonneg : ∀ x, 0≤ secondMoment x - (mean x)^2lower : ∀ x, a * (secondMoment x - (mean x)^2) ≤ hessian x
upper : ∀ x, hessian x ≤ secondMoment x - (mean x)^2
defSourceContinuation.step {v : E} {a : ℝ} (T : SourceContinuation v a)
(ν : MeasureE) [IsProbabilityMeasure ν] (hν : ExponentialIncrement ν)
(m : ℝ) (hm : 0 < m) (hma : m ≤ a) : SourceContinuation v m :=by
body · 72
lines
letC:=Classical.choose (T.regular 0).1havehC : LipschitzWithCT.potential :=Classical.choose_spec (T.regular 0).1have hi (x : E) := hν.integrable_shift hC m x
letM:= shiftedMean ν m T.potential T.mean
letQ:= shiftedMean ν m T.potential T.secondMoment
letV:=fun x => shiftedMean ν m T.potential (fun y => (T.mean y)^2) x - (M x)^2letH:=fun x => shiftedMean ν m T.potential T.hessian x + m * V x
have hMs (n : ℕ) : BddSmooth n M:= (T.mean_smooth n).shiftedMean (T.regular n) hi
have hQs (n : ℕ) : BddSmooth n Q:= (T.second_smooth n).shiftedMean (T.regular n) hi
have hMsq (n : ℕ) : BddSmooth n (fun y => (T.mean y)^2) :=by
simpa only [pow_two] using (T.mean_smooth n).mul (T.mean_smooth n)
have hVs (n : ℕ) : BddSmooth n V:=by
simpa only [V, pow_two] using ((hMsq n).shiftedMean (T.regular n) hi).sub ((hMs n).mul (hMs n))
have hHs (n : ℕ) : BddSmooth n H:=
((T.hessian_smooth n).shiftedMean (T.regular n) hi).add ((hVs n).const_mul m)
have hV (x : E) : 0≤V x := shiftedMean_square_sub_nonneg hC.continuous (T.mean_smooth 0) (hi x)
letK:=fun y =>T.secondMoment y - (T.mean y)^2havehKs : BddSmooth0K:= (T.second_smooth 0).sub (hMsq 0)
have hK (x : E) : 0≤ shiftedMean ν m T.potential K x :=
shiftedMean_nonneg T.variance_nonneg (hi x)
have hKeq (x : E) : shiftedMean ν m T.potential K x =
Q x - shiftedMean ν m T.potential (fun y => (T.mean y)^2) x :=
shiftedMean_sub (T.second_smooth 0) (hMsq 0) (hi x)
have hul (x : E) : shiftedMean ν m T.potential T.hessian x ≤
shiftedMean ν m T.potential K x :=
shiftedMean_mono (T.hessian_smooth 0) hKs T.upper (hi x)
have hll (x : E) : m * shiftedMean ν m T.potential K x ≤
shiftedMean ν m T.potential T.hessian x :=by
rw [← shiftedMean_const_mul]
apply shiftedMean_mono (hKs.const_mul m) (T.hessian_smooth 0) _ (hi x)
intro y
exact (mul_le_mul_of_nonneg_right hma (T.variance_nonneg y)).trans (T.lower y)
refine { potential := shiftedContinuation ν m T.potential
mean :=M, secondMoment :=Q, hessian :=H
regular :=fun n => (T.regular n).shiftedContinuation hm hi
mean_smooth := hMs, second_smooth := hQs, hessian_smooth := hHs
mass_nonneg := hm.le, mass_le_one := hma.trans T.mass_le_one
first := ?_, second := ?_, variance_nonneg := ?_, lower := ?_, upper := ?_ }
· obtain ⟨B, hB, hb⟩ := (T.mean_smooth 0).bound
intro x t
exact hasDerivAt_continuation
(F:=fun s z =>T.potential (x + s • v + z))
(F₁:=fun s z =>T.mean (x + s • v + z)) hB hm.ne'
(fun s => (hC.continuous.comp (continuous_const.add continuous_id)).measurable)
(fun s => ((T.mean_smooth 0).continuous.comp (continuous_const.add continuous_id)).measurable)
(fun s z =>by simpa only [add_assoc, add_comm z] usingT.first (x + z) s)
(fun s z => hb _) t (hi _)
· obtain ⟨B, hB, hb⟩ := (T.mean_smooth 0).bound
obtain ⟨D, hD, hd⟩ := (T.hessian_smooth 0).bound
intro x t
simpa only [H, V, M, pow_two] using hasDerivAt_shiftedMean hB (add_nonneg hB hD)
hC.continuous (T.mean_smooth 0).continuous (T.mean_smooth 0).continuous
(T.hessian_smooth 0).continuous T.first T.second hb
(fun y => (hb y).trans (by linarith)) (fun y => (hd y).trans (by linarith)) hi x t
· intro x
have hv := hV x
have hk := hK x
rw [hKeq x] at hk
dsimp [V] at hv
linarith
· intro x
have hl := hll x
rw [hKeq x] at hl
dsimp [H, V]
nlinarith
· intro x
have hu := hul x
rw [hKeq x] at hu
have hv := hV x
havehm1 : m ≤1:= hma.trans T.mass_le_one
dsimp [H, V] at *
nlinarith