lemmaexists_solution {ε T : ℝ} (hε : 0 < ε) (hT : 0≤T)
(U : ℝ→ℝ) (hU : ContinuousOnU (Icc0T)) (z : ℂ) :
∃H : ℝ→ℂ, H0 = z ∧∀ t ∈Icc0T,
HasDerivWithinAtH (velocity ε (U t) (H t)) (Icc0T) t :=by
proof · 17
lines
letL : ℝ≥0:= ⟨2 / ε, by positivity⟩
letK : ℝ≥0:= ⟨4 / ε^2, by positivity⟩
leta : ℝ≥0:= ⟨(2 / ε) * T, mul_nonneg (by positivity) hT⟩
havehp : IsPicardLindelof (fun t => velocity ε (U t))
⟨0, ⟨le_rfl, hT⟩⟩ z a 0LK:=by
constructor
· exact fun t _ => (velocity_lipschitz hε (U t)).lipschitzOnWith
· intro w _
havehc : ContinuousOn (funt : ℝ=> (U t, w)) (Icc0T) :=
hU.prodMk continuousOn_const
simpa only [Function.comp_def] using
(continuous_velocity hε).comp_continuousOn hc
· exact fun t _ w _ => norm_velocity_le hε (U t) w
· dsimp [L, a]
simp only [sub_zero, sub_self, max_eq_left hT]
rfl
exact hp.exists_eq_forall_mem_Icc_hasDerivWithinAt₀
lemmasolution_deriv {ε T : ℝ} (hε : 0 < ε) (hT : 0≤T) (U : C(I, ℝ)) (z : ℂ) :
∀ t ∈Icc0T, HasDerivWithinAt (solution hε hT U z)
(velocity ε (extendDriver TU t) (solution hε hT U z t)) (Icc0T) t :=
lemmaeq_source {Ω : Type*} (κ : ℝ) (B : ℝ≥0→ Ω →ℝ) (sample : Ω)
{γ : ℝ→ℂ} {g f : ℝ→ℂ→ℂ}
(h : IsLoewnerTraceUsing (fun t =>Real.sqrt κ * B t.toNNReal sample) γ g f)
(hc : Continuous (fun t =>B t sample)) (T : ℝ≥0) : value κ BT sample = γ T:=by
proof · 15
lines
by_cases hT : T = 0
· simpa [value,hT] using h.2.1.symm
· simp only [value,ite_eq_right hT]
apply ContinuousDriver.selectedLimit_eq
havehTp : 0 < (T:ℝ) := lt_of_le_of_ne T.coe_nonneg (by exact_mod_cast Ne.symm hT)
have he (n : ℕ) :
tipApprox (height_pos n) T.coe_nonneg (BrownianDriver.path B (Real.sqrt κ) T sample) =
f T ((Real.sqrt κ * BTsample:ℝ) + (height n:ℂ)*Complex.I) :=by
simpa only [Real.toNNReal_coe] using
tipApprox_eq_inverse h (height_pos n) hTp
((continuous_const.mul (hc.comp continuous_real_toNNReal)).continuousOn)
(BrownianDriver.path B (Real.sqrt κ) T sample)
(fun _ ht =>BrownianDriver.extend_eq B (Real.sqrt κ) T sample hc ht)
have ht := (h.2.2.2.2.2.2.2.2.2.2.2.2.2TT.coe_nonneg).comp height_tendsto
simpa only [Function.comp_def,he,Real.toNNReal_coe] using ht
lemmasource_point_reach {driver : ℝ→ℝ} {γ : ℝ→ℂ} {g f : ℝ→ℂ→ℂ}
(h : IsLoewnerTraceUsing driver γ g f) (hzero : driver 0=0)
{ε TS : ℝ} (hε : 0 < ε) (hT : 0≤T) (hS : 0≤S) (hST : S≤T)
(U : C(I, ℝ)) (hU : EqOn (extendDriver TU) driver (Icc0T))
(x a β δ d y : ℝ) (hβ : 0 < β) (hδ : 0 < δ) (hδhalf : δ ≤1/2)
(haδ : a ≤2-4*δ) (hd : 0 < d) (hdx : d < δ*x) (hεx : 2*ε < x) (hy : δ*ε < y)
(w : ℂ) (hw : w ∈ localizationDomain γ S) (hclose : dist w (x:ℂ) < d)
(hwS : g S w=(driver S:ℂ)+(y:ℂ)*Complex.I) :
reach U hε hT x β a ((δ/(4*d))^β) :=by
proof · 14
lines
apply tip_forces_reach hε hT hS hST U (by rw [hU ⟨le_rfl,hT⟩,hzero]) x a β δ d y
hβ hδ hδhalf haδ hd hdx hεx hy (fun t => g t w) (h.continuous_eval hS hw)
· intro t ht
rw [hU ⟨ht.1.le,ht.2.le.trans hST⟩]
exact h.hasDerivAt_eval ht.1 (survivingDomain_mono ht.2.le hw)
· rw [h.initial w hw.1.1]
exact (dist_eq_norm w (x:ℂ) ▸ hclose).le
· intro t ht
have hh := h.height_antitone hS hw ht ⟨hS,le_rfl⟩ ht.2
dsimp only at hh
rw [hwS] at hh
simpa using hh
· rw [hwS,hU ⟨hS,hST⟩]
simp
lemmasource_hit_eventually_reach {Ω : Type*} (B : ℝ≥0→ Ω →ℝ) (κ : ℝ)
(γ : Ω →ℝ→ℂ) (g f : Ω →ℝ→ℂ→ℂ) (ω : Ω)
(h : IsLoewnerTraceUsing (fun t =>Real.sqrt κ*B t.toNNReal ω) (γ ω) (g ω) (f ω))
(hc : Continuous (fun t =>B t ω)) (hb0 : B0 ω=0)
(x a β δ d : ℝ) (hx : 0 < x) (hβ : 0 < β) (hδ : 0 < δ) (hδhalf : δ ≤1/2)
(haδ : a ≤2-4*δ) (hd : 0 < d) (hdx : d < δ*x)
(hhit : ∃t : ℝ, 0≤ t ∧ dist (γ ω t) (x:ℂ) < d) :
∀ᶠ n : ℕin atTop, reach (BrownianDriver.path B (Real.sqrt κ) (n+1) ω)
(CanonicalTrace.height_pos n) (n+1 : ℝ≥0).coe_nonneg x β a ((δ/(4*d))^β) :=by
proof · 18
lines
obtain ⟨t,ht,hclose⟩ := hhit
obtain ⟨w,y,hy,hwd,hw,hwS⟩ := inverse_tip_point h ht hclose
havehsmall : ∀ᶠ n : ℕin atTop, CanonicalTrace.height n < min (x/2) (y/δ) :=
(CanonicalTrace.height_tendsto.mono_right nhdsWithin_le_nhds).eventually
(gt_mem_nhds (lt_min (half_pos hx) (div_pos hy hδ)))
havehlarge : ∀ᶠ n : ℕin atTop, t ≤ ((n+1:ℝ≥0):ℝ) :=byhavehh : Tendsto (funn : ℕ=> (n:ℝ)+1) atTop atTop := tendsto_atTop_add_const_right atTop 1 tendsto_natCast_atTop_atTop
simpa only [NNReal.coe_add,NNReal.coe_natCast,NNReal.coe_one] using hh.eventually (eventually_ge_atTop t)
filter_upwards [hsmall,hlarge] with n hn htn
have hn' := lt_min_iff.mp hn
havehxcut : 2*CanonicalTrace.height n < x :=by linarith [hn'.1]
havehycut : δ*CanonicalTrace.height n < y :=byhave hh := (lt_div_iff₀ hδ).mp hn'.2
simpa only [mul_comm] using hh
apply source_point_reach h (by simp [hb0]) (CanonicalTrace.height_pos n)
(n+1:ℝ≥0).coe_nonneg ht htn (BrownianDriver.path B (Real.sqrt κ) (n+1) ω)
(fun s hs =>BrownianDriver.extend_eq B _ (n+1) ω hc hs)
x a β δ d y hβ hδ hδhalf haδ hd hdx hxcut hycut w hw hwd hwS
lemmauniformBudget_dominates {Ω : Type*} (B : ℝ≥0→ Ω →ℝ) (κ β a x L : ℝ)
(hβ : 0≤ β) (hx : 0 < x) (n : ℕ) (ω : Ω) :
budget B κ β a (CanonicalTrace.height_pos n) (n+1) x L ω ≤ uniformBudget B κ β a x L n ω :=
by_cases hdx : d < δ*x
· letL : ℝ:= (δ/(4*d))^β
havehL : 0 < L:=Real.rpow_pos_of_pos (by positivity) _
have hm (n : ℕ) := uniformBudget_mean hB κ β a hκ hβ.le ha hba x L hx n
havehE : ∀ᵐ ω ∂P, (∃t : ℝ, 0≤ t ∧ dist (γ ω t) (x:ℂ) < d) →∀ᶠ n : ℕin atTop, L≤ uniformBudget B κ β a x L n ω :=by
filter_upwards [hmaps,hB.cont,hB.toIsPreBrownianReal.eval_zero_ae_eq_zero] with ω hh hc hb0
intro hhit
filter_upwards [source_hit_eventually_reach B κ γ g f ω hh hc hb0 x a β δ d hx hβ hδ hδhalf haδ hd hdx hhit] with n hn
have hb := budget_dominates_reach B κ β a hκ hβ.le ha hba (CanonicalTrace.height_pos n)
(n+1) (by positivity) x L ω hc hb0 hn
exact hb.trans (uniformBudget_dominates B κ β a x L hβ.le hx n ω)
have hh := measure_eventually_budget (uniformBudget B κ β a x L) (x^(-β)) L hL
(fun n => (hm n).1) (fun n => (hm n).2.2) (fun n => (hm n).2.1) _ hE
rwa [ratio_power_eq hx hd hδ] at hh
· havehratio : 1≤4*d/(δ*x) :=by
rw [le_div_iff₀ (mul_pos hδ hx)]
havehh : δ*x ≤ d := not_lt.1 hdx
linarith
havehp : 1≤ (4*d/(δ*x))^β :=Real.one_le_rpow hratio hβ.le
exact (prob_le_one).trans (by simpa usingENNReal.ofReal_le_ofReal hp)
by_cases hdx : d < δ*x
· letL : ℝ:= (δ/(4*d))^β
havehL : 0 < L:=Real.rpow_pos_of_pos (by positivity) _
have hm (n : ℕ) := uniformBudget_mean hB.neg κ β a hκ hβ.le ha hba x L hx n
havehE : ∀ᵐ ω ∂P, (∃t : ℝ, 0≤ t ∧ dist (γ ω t) ((-x:ℝ):ℂ) < d) →∀ᶠ n : ℕin atTop, L≤ uniformBudget (-B) κ β a x L n ω :=by
filter_upwards [hmaps,hB.cont,hB.toIsPreBrownianReal.eval_zero_ae_eq_zero] with ω hh hc hb0
intro hhit
filter_upwards [negative_source_hit_eventually_reach B κ γ g f ω hh hc hb0 x a β δ d hx hβ hδ hδhalf haδ hd hdx hhit] with n hn
have hb := budget_dominates_reach (-B) κ β a hκ hβ.le ha hba (CanonicalTrace.height_pos n)
(n+1) (by positivity) x L ω hc.neg (by simpa using congrArg Neg.neg hb0) hn
exact hb.trans (uniformBudget_dominates (-B) κ β a x L hβ.le hx n ω)
have hh := measure_eventually_budget (uniformBudget (-B) κ β a x L) (x^(-β)) L hL
(fun n => (hm n).1) (fun n => (hm n).2.2) (fun n => (hm n).2.1) _ hE
rwa [ratio_power_eq hx hd hδ] at hh
· havehratio : 1≤4*d/(δ*x) :=by
rw [le_div_iff₀ (mul_pos hδ hx)]
havehh : δ*x ≤ d := not_lt.1 hdx
linarith
havehp : 1≤ (4*d/(δ*x))^β :=Real.one_le_rpow hratio hβ.le
exact (prob_le_one).trans (by simpa usingENNReal.ofReal_le_ofReal hp)
rcases le_or_gt 0 x with hpos | hneg
· rw [abs_of_nonneg hpos] at hx ⊢
exact positive_real_bound hB κ β a δ hκ hβ ha hba hδ hδhalf haδ γ g f hmaps hx hd
· have hh := negative_real_bound hB κ β a δ hκ hβ ha hba hδ hδhalf haδ γ g f hmaps (neg_pos.2 hneg) hd
simpa only [neg_neg,abs_of_neg hneg] using hh
lemmahasDerivAt_pdf {b : ℝ} (hb : 0 < b) {s : ℝ} (hs : 0 < s) :
HasDerivAt (pdf b) (pdf b s*((b-1)/s-1)) s :=by
proof · 8
lines
have hd := (((hasDerivAt_neg s).exp).mul
((hasDerivAt_id s).rpow_const (p:=b-1) (Or.inl hs.ne'))).div_const (Real.Gamma b)
apply hd.congr_deriv
unfold pdf
simp only [id_eq]
rw [Real.rpow_sub_one hs.ne' (b-1)]
field_simp
ring
lemmacdf_tendsto {b : ℝ} (hb : 0 < b) : Tendsto (cdf b) atTop (𝓝 1) :=by
proof · 4
lines
change Tendsto (fun s => lowerGamma b s / Real.Gamma b) atTop (𝓝 1)
have hh := (lowerGamma_tendsto hb).div_const (Real.Gamma b)
convert hh using1
rw [div_self (Real.Gamma_pos_of_pos hb).ne']
lemmahasDerivAt_value_q {l b t q : ℝ} (hl : 0 < l) (hb : 0 < b)
(ht : 0 < t) (hq : 0 < q) : HasDerivAt (value l b t) (valueQ l b t q) q :=by
proof · 6
lines
have hs := scale_pos hl hb ht
have hh := ((hasDerivAt_cdf hb (div_pos hq hs)).comp q
((hasDerivAt_id q).div_const (scale l b t))).const_mul (Real.exp (l*b/2*t))
apply hh.congr_deriv
dsimp only [valueQ]
ring
lemmahasDerivAt_valueQ_q {l b t q : ℝ} (hl : 0 < l) (hb : 0 < b)
(ht : 0 < t) (hq : 0 < q) : HasDerivAt (valueQ l b t) (valueQQ l b t q) q :=by
proof · 6
lines
have hs := scale_pos hl hb ht
have hh := (((hasDerivAt_pdf hb (div_pos hq hs)).comp q
((hasDerivAt_id q).div_const (scale l b t))).const_mul (Real.exp (l*b/2*t))).div_const (scale l b t)
apply hh.congr_deriv
dsimp only [valueQQ]
ring
lemmahasDerivAt_value_t {l b t q : ℝ} (hl : 0 < l) (hb : 0 < b)
(ht : 0 < t) (hq : 0 < q) :
HasDerivAt (fun s => value l b s q) (valueT l b t q) t :=by
proof · 11
lines
have hs := scale_pos hl hb ht
havehbp : b+1≠0:=by positivity
have hh := ((((hasDerivAt_id t).const_mul (l*b/2)).exp).mul
((hasDerivAt_cdf hb (div_pos hq hs)).comp t ((hasDerivAt_const t q).div (hasDerivAt_scale l b t) hs.ne')))
apply hh.congr_deriv
simp only [id_eq, Function.comp_def, Pi.div_apply]
dsimp only [valueT, value]
havehe : Real.exp (l*t) = 2*(b+1)*scale l b t+1:=by unfold scale; field_simp; ring
rw [he]
field_simp
ring
theoremsupersolution {l b t q : ℝ} (hl : 0 < l) (hb : 0 < b)
(ht : 0 < t) (hq : 0 < q) (hq1 : q ≤1) :
l*q*(1-q)*valueQQ l b t q +
l*((1-b)-(3/2-b)*q)*valueQ l b t q ≤ valueT l b t q :=by
proof · 32
lines
let α := scale l b t
let s := q/α
letW:= pdf b s
letF:= cdf b s
havehα : 0 < α := scale_pos hl hb ht
havehs : 0 < s := div_pos hq hα
havehW : 0≤W:= (pdf_pos hb hs).le
havehbp : 0 < b+1:=by linarith
havehi : s^2*W/(b+1) ≤ b*F-s*W:= cdf_pdf_inequality hb hs
havehαs : α*s = q :=by dsimp [s]; field_simp
havehA : 0≤1-1/(2*(b+1)) :=by
rw [sub_nonneg, div_le_one (by positivity)]
linarith
havehrest : 0≤ l*(1-1/(2*(b+1)))*(1-q)*s*W/α :=by
exact div_nonneg (mul_nonneg (mul_nonneg (mul_nonneg (mul_nonneg hl.le hA) (sub_nonneg.2 hq1)) hs.le) hW) hα.le
havehmain : 0≤ l/2*(b*F-s*W-s^2*W/(b+1)) := mul_nonneg (by positivity) (sub_nonneg.2 hi)
havehe : valueT l b t q - (l*q*(1-q)*valueQQ l b t q +
l*((1-b)-(3/2-b)*q)*valueQ l b t q) =
Real.exp (l*b/2*t) *
(l/2*(b*F-s*W-s^2*W/(b+1)) + l*(1-1/(2*(b+1)))*(1-q)*s*W/α) :=by
dsimp only [valueT, value, valueQQ, valueQ]
change l*b/2*(Real.exp (l*b/2*t)*F) - Real.exp (l*b/2*t)*W*s*
(l+l/(2*(b+1)*α)) - (l*q*(1-q)*(Real.exp (l*b/2*t)*W*((b-1)/s-1)/α^2) +
l*((1-b)-(3/2-b)*q)*(Real.exp (l*b/2*t)*W/α)) = _
dsimp only [s]
field_simp
ring
havehh : 0≤ valueT l b t q - (l*q*(1-q)*valueQQ l b t q +
l*((1-b)-(3/2-b)*q)*valueQ l b t q) :=by
rw [he]
exact mul_nonneg (Real.exp_pos _).le (add_nonneg hmain hrest)
exact sub_nonneg.1 hh
lemmacontDiffAt_value {l b : ℝ} (hl : 0 < l) (hb : 0 < b) (n : ℕ)
{v : ℝ×ℝ} (ht : 0 < v.1) (hq : 0 < v.2) :
ContDiffAtℝ n (funv : ℝ×ℝ=> value l b v.1 v.2) v :=by
proof · 9
lines
havehe : ContDiffAtℝ n (funv : ℝ×ℝ=>Real.exp (l*b/2*v.1)) v :=by fun_prop
haveha : ContDiffAtℝ n (funv : ℝ×ℝ=> scale l b v.1) v :=by
unfold scale; fun_prop
have hs := scale_pos hl hb ht
havehqf : ContDiffAtℝ n (funv : ℝ×ℝ=> v.2/scale l b v.1) v :=
contDiffAt_snd.div ha hs.ne'
have hh := (contDiffAt_cdf hb n (div_pos hq hs)).comp v hqf
dsimp only [Function.comp_def] at hh
exact he.mul hh