File size: 4,316 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import OAI.MathematicalPhysics.NavierStokes.ForcedComputation.Flow.FlowPointwise
import Mathlib.Analysis.Calculus.ContDiff.Comp
import Mathlib.Analysis.Normed.Module.FiniteDimension
import Mathlib.Topology.UniformSpace.HeineCantor

namespace OAI

/-! Differentiation of a smooth finite-dimensional field on compact path space.
Compactness makes the derivative remainder uniform over the path; this is the
analytic ingredient needed to apply the implicit function theorem to Picard's
integral equation. -/

noncomputable section
namespace ForcedComputation.Flow

open Set Filter Metric
open scoped Topology ContDiff

variable {K E F : Type} [TopologicalSpace K] [CompactSpace K]
  [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E]
  [NormedAddCommGroup F] [NormedSpace ℝ F]

def postcompose (f : C(E, F)) (u : C(K, E)) : C(K, F) := f.comp u

omit [CompactSpace K] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedSpace ℝ F] in
theorem postcompose_continuous (f : C(E, F)) :
    Continuous (postcompose (K := K) f) := f.continuous_postcomp

theorem postcompose_hasFDerivAt (f : C(E, F))
    (hf : ContDiff ℝ 1 (f : E β†’ F)) (u : C(K, E)) :
    HasFDerivAt (postcompose f)
      (applyPath ⟨fun t => fderiv ℝ f (u t),
        (hf.continuous_fderiv (by simp)).comp u.continuous⟩) u := by
  rw [hasFDerivAt_iff_isLittleO, Asymptotics.isLittleO_iff]
  intro Ξ΅ hΞ΅
  have hdf := hf.continuous_fderiv (by simp)
  have huc : UniformContinuousOn (fderiv ℝ f)
      (closedBall (0 : E) (β€–uβ€– + 1)) :=
    (isCompact_closedBall (0 : E) (β€–uβ€– + 1)).uniformContinuousOn_of_continuous
      hdf.continuousOn
  obtain ⟨δ, hδ, hcontrol⟩ := Metric.uniformContinuousOn_iff.mp huc Ρ hΡ
  filter_upwards [Metric.ball_mem_nhds u (lt_min hΞ΄ zero_lt_one)] with v hv
  have hvnorm : β€–v - uβ€– < min Ξ΄ 1 := by simpa only [mem_ball, dist_eq_norm] using hv
  apply (ContinuousMap.norm_le _
    (mul_nonneg hΞ΅.le (norm_nonneg (v - u)))).mpr
  intro t
  change β€–f (v t) - f (u t) - fderiv ℝ f (u t) (v t - u t)β€– ≀ Ξ΅ * β€–v - uβ€–
  have hu : u t ∈ closedBall (0 : E) (β€–uβ€– + 1) := by
    rw [mem_closedBall, dist_zero_right]
    exact (u.norm_coe_le_norm t).trans (by linarith)
  have hdiff : β€–v t - u tβ€– ≀ β€–v - uβ€– := (v - u).norm_coe_le_norm t
  have hv' : v t ∈ closedBall (0 : E) (β€–uβ€– + 1) := by
    rw [mem_closedBall, dist_zero_right]
    calc
      β€–v tβ€– ≀ β€–v t - u tβ€– + β€–u tβ€– := by
        simpa only [sub_add_cancel] using norm_add_le (v t - u t) (u t)
      _ ≀ β€–v - uβ€– + β€–uβ€– := add_le_add hdiff (u.norm_coe_le_norm t)
      _ ≀ β€–uβ€– + 1 := by linarith [lt_of_lt_of_le hvnorm (min_le_right Ξ΄ 1)]
  have hsegment := (convex_closedBall (0 : E) (β€–uβ€– + 1)).segment_subset hu hv'
  have hr := remainder_bound (fun z => (hf.differentiable (by simp) z).hasFDerivAt)
    (u t) (v t) (Ξ΅ := Ξ΅) (by
      intro z hz
      have hzΞ΄ : dist z (u t) < Ξ΄ := by
        rw [dist_eq_norm]
        exact (norm_sub_le_of_mem_segment hz).trans_lt
          (hdiff.trans_lt (lt_of_lt_of_le hvnorm (min_le_left Ξ΄ 1)))
      simpa only [dist_eq_norm] using (hcontrol z (hsegment hz) (u t) hu hzΞ΄).le)
  exact hr.trans (mul_le_mul_of_nonneg_left hdiff hΞ΅.le)

theorem postcompose_contDiff_nat (n : β„•) (f : C(E, F))
    (hf : ContDiff ℝ n (f : E β†’ F)) :
    ContDiff ℝ n (postcompose (K := K) f) := by
  induction n generalizing F with
  | zero =>
      exact contDiff_zero.mpr (postcompose_continuous f)
  | succ n ih =>
      have h1 : ContDiff ℝ 1 (f : E β†’ F) := hf.of_le (by norm_cast; omega)
      let df : C(E, E β†’L[ℝ] F) :=
        ⟨fderiv ℝ f, h1.continuous_fderiv (by simp)⟩
      have hdf : ContDiff ℝ n (df : E β†’ E β†’L[ℝ] F) :=
        hf.fderiv_right (m := n) (by simp)
      apply contDiff_succ_iff_hasFDerivAt.mpr
      refine ⟨fun u => applyPathL (postcompose df u), ?_, ?_⟩
      Β· exact (applyPathL (K := K) (E := E) (F := F)).contDiff.comp (ih df hdf)
      Β· intro u
        exact postcompose_hasFDerivAt f h1 u

theorem postcompose_contDiff (f : C(E, F)) (hf : ContDiff ℝ ∞ (f : E β†’ F)) :
    ContDiff ℝ ∞ (postcompose (K := K) f) := by
  rw [contDiff_infty]
  intro n
  exact postcompose_contDiff_nat n f (hf.of_le (by simp))

end ForcedComputation.Flow

end

end OAI