lemmaeventually_seminorm_bound_of_dense
{ι κ : Type*} {l : Filter ι} {p : ι →SeminormℝE} {q : SeminormℝE}
{K : ℝ≥0} (hp : ∀ i, LipschitzWithK (p i)) (hq : LipschitzWithK q)
{D : κ →E} (hD : DenseRangeD)
(hc : ∀ j, Tendsto (fun i => p i (D j)) l (𝓝 (q (D j))))
{ε : ℝ} (hε : 0 < ε) :
∀ᶠ i in l, ∀v : E, |p i v-q v| ≤ ε*‖v‖ :=by
proof · 7
lines
have hlim := tendsto_of_lipschitz_dense hp hq hD hc
have h := uniformly_tendsto_of_lipschitz hp hq (isCompact_sphere (0 : E) 1)
(fun v _ => hlim v) hε
filter_upwards [h] with i hi v
apply seminorm_sub_bound_of_sphere hε.le _ v
intro w hw
exact (hi w (by simpa only [mem_sphere,dist_zero_right] using hw)).le
lemmahasTwoPointMetricDifferential_of_uniformModulus
(hf : LipschitzWithK f) {s : SetE} {x : E}
(hc : ∀j : ℕ, ContinuousWithinAt (fun y => metricSeminorm f y (denseSeq E j)) s x)
{r : ℕ→ℝ} (hr : ∀ n, 0 < r n)
(hu : TendstoUniformlyOn (fun n => metricErrorModulus f (r n)) (fun _ =>0) atTop s) :
HasTwoPointMetricDifferential f (metricSeminorm f x) s x :=by
proof · 36
lines
apply Asymptotics.IsLittleO.of_bound
intro ε hε
have hp := eventually_seminorm_bound_of_dense (fun y => metricSeminorm_lipschitz hf y)
(metricSeminorm_lipschitz hf x) (denseRange_denseSeq E) hc (half_pos hε)
obtain ⟨N,hN⟩ := (eventually_atTop.1 ((Metric.tendstoUniformlyOn_iff.1 hu) (ε/2) (half_pos hε)))
have hNN (y : E) (hy : y ∈ s) : metricErrorModulus f (r N) y < ε/2:=byhave h := hN N le_rfl y hy
simpa only [dist_zero_left,Real.norm_eq_abs,abs_of_nonneg (metricErrorModulus_nonneg hf _ _)] using h
havehfst : Tendsto (funq : E×E=> q.1) (𝓝[s ×ˢ s] (x,x)) (𝓝[s] x) :=
continuous_fst.continuousWithinAt.tendsto_nhdsWithin (fun _ hq => hq.1)
havehnear : ∀ᶠ q : E×Ein 𝓝[s ×ˢ s] (x,x), ‖q.2-q.1‖ < r N:=byhaveht : Tendsto (funq : E×E=> ‖q.2-q.1‖) (𝓝[s ×ˢ s] (x,x)) (𝓝 0) :=by
simpa using ((continuous_snd.sub continuous_fst).norm.continuousWithinAt.tendsto (s := s ×ˢ s) (x := (x,x)))
exact (tendsto_order.1 ht).2 _ (hr N)
filter_upwards [hfst.eventually hp,hnear,self_mem_nhdsWithin] with q hqp hqr hqs
have he₁ := metricErrorModulus_bound hf q.1 (q.2-q.1) hqr
have he₂ := hqp (q.2-q.1)
have hm := hNN q.1 hqs.1haveht : ‖q.2-q.1‖ ≤ ‖q.1-x‖+‖q.2-x‖ :=bycalc ‖q.2-q.1‖ = ‖(q.2-x)-(q.1-x)‖ :=by congr 1; abel
_ ≤ ‖q.2-x‖+‖q.1-x‖ := norm_sub_le _ _
_ = _ := add_comm _ _
havehe : |dist (f q.1) (f q.2)-metricSeminorm f x (q.1-q.2)| ≤
ε*(‖q.1-x‖+‖q.2-x‖) :=byhavehpneg : metricSeminorm f x (q.1-q.2) = metricSeminorm f x (q.2-q.1) :=by
rw [←neg_sub q.2 q.1,map_neg_eq_map]
rw [hpneg,dist_comm]
calc |dist (f q.2) (f q.1)-metricSeminorm f x (q.2-q.1)| ≤
|dist (f q.2) (f q.1)-metricSeminorm f q.1 (q.2-q.1)| +
|metricSeminorm f q.1 (q.2-q.1)-metricSeminorm f x (q.2-q.1)| := abs_sub_le _ _ _
_ ≤ metricErrorModulus f (r N) q.1 * ‖q.2-q.1‖ + ε/2*‖q.2-q.1‖ :=by
apply add_le_add _ he₂
simpa only [←add_sub_assoc,add_sub_cancel_left] using he₁
_ ≤ ε*‖q.2-q.1‖ :=by nlinarith [norm_nonneg (q.2-q.1)]
_ ≤ ε*(‖q.1-x‖+‖q.2-x‖) := mul_le_mul_of_nonneg_left ht hε.le
simpa only [Real.norm_eq_abs,abs_of_nonneg (add_nonneg (norm_nonneg _) (norm_nonneg _))] using he