File size: 14,004 Bytes
695bd70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
import Mathlib
import OAI.Geometry.SmoothYau.Estimates.PathExtension

namespace OAI

noncomputable section
namespace YauCounterexamples
section
open Set Filter Manifold Bundle MeasureTheory
open scoped Topology ContDiff ENNReal
open Set Filter Manifold Bundle
open scoped Topology ContDiff
open Set Filter Metric
open scoped Topology InnerProductSpace
open Set Filter Function Metric
open scoped Topology
open Set Filter Function Metric
open scoped Topology
open Set Filter Metric
open scoped Topology ContDiff
universe u v
variable {K : Type v} {E F : Type u} [TopologicalSpace K] [CompactSpace K]
  [NormedAddCommGroup E] [NormedSpace ℝ E]
  [NormedAddCommGroup F] [NormedSpace ℝ F]

local instance superpositionMapNorm : NormedAddCommGroup (E →L[ℝ] F) := inferInstance
local instance superpositionMapSpace : NormedSpace ℝ (E →L[ℝ] F) := inferInstance
local instance superpositionContinuousNorm : NormedAddCommGroup C(K, E) := inferInstance
local instance superpositionContinuousSpace : NormedSpace ℝ C(K, E) := inferInstance
local instance superpositionContinuousMapNorm : NormedAddCommGroup C(K, E →L[ℝ] F) := inferInstance
local instance superpositionContinuousMapSpace : NormedSpace ℝ C(K, E →L[ℝ] F) := inferInstance

def continuousMapApply (A : C(K, E →L[ℝ] F)) : C(K, E) →L[ℝ] C(K, F) := by
  let L : C(K, E) →ₗ[ℝ] C(K, F) :=
    { toFun := fun u => ⟨fun x => A x (u x), A.continuous.clm_apply u.continuous⟩
      map_add' := fun u v => by ext x; exact map_add (A x) (u x) (v x)
      map_smul' := fun c u => by ext x; exact map_smul (A x) c (u x) }
  exact L.mkContinuous ‖A‖ (fun u =>
    (ContinuousMap.norm_le (L u) (mul_nonneg (norm_nonneg A) (norm_nonneg u))).mpr
      (fun x => ((A x).le_opNorm (u x)).trans
        (mul_le_mul (A.norm_coe_le_norm x) (u.norm_coe_le_norm x) (norm_nonneg _) (norm_nonneg _))))

@[simp] lemma continuousMapApply_apply (A : C(K, E →L[ℝ] F)) (u : C(K, E)) (x : K) :
    continuousMapApply A u x = A x (u x) := rfl

lemma continuousMapApply_norm_le (A : C(K, E →L[ℝ] F)) :
    ‖continuousMapApply A‖ ≤ ‖A‖ :=
  ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg A) (fun u =>
    (ContinuousMap.norm_le (continuousMapApply A u) (mul_nonneg (norm_nonneg A) (norm_nonneg u))).mpr
      (fun x => ((A x).le_opNorm (u x)).trans
        (mul_le_mul (A.norm_coe_le_norm x) (u.norm_coe_le_norm x) (norm_nonneg _) (norm_nonneg _))))

def continuousMapApplyCLM : C(K, E →L[ℝ] F) →L[ℝ] (C(K, E) →L[ℝ] C(K, F)) := by
  let L : C(K, E →L[ℝ] F) →ₗ[ℝ] (C(K, E) →L[ℝ] C(K, F)) :=
    { toFun := continuousMapApply
      map_add' := fun A B => by ext u x; rfl
      map_smul' := fun c A => by ext u x; rfl }
  refine LinearMap.mkContinuous (𝕜 := ℝ) (𝕜₂ := ℝ)
    (E := C(K, E →L[ℝ] F)) (F := C(K, E) →L[ℝ] C(K, F)) L 1 ?_
  intro A
  change ‖continuousMapApply A‖ ≤ 1 * ‖A‖
  simpa only [one_mul] using continuousMapApply_norm_le A

def superposition (f : E → F) (hf : Continuous f) : C(K, E) → C(K, F) :=
  fun u => ⟨f ∘ u, hf.comp u.continuous⟩

omit [CompactSpace K] [NormedSpace ℝ E] [NormedSpace ℝ F] in
@[simp] lemma superposition_apply (f : E → F) (hf : Continuous f) (u : C(K, E)) (x : K) :
    superposition f hf u x = f (u x) := rfl

variable [FiniteDimensional ℝ E]

lemma hasFDerivAt_superposition {f : E → F} (hf : ContDiff ℝ ∞ f) (u : C(K, E)) :
    HasFDerivAt (superposition f hf.continuous)
      (continuousMapApply ⟨(fderiv ℝ f) ∘ u, (hf.continuous_fderiv (by simp)).comp u.continuous⟩) u := by
  rw [hasFDerivAt_iff_isLittleO_nhds_zero, Asymptotics.isLittleO_iff]
  intro ε hε
  have huc := (isCompact_closedBall (0 : E) (‖u‖ + 1)).uniformContinuousOn_of_continuous
    (hf.continuous_fderiv (by simp)).continuousOn
  obtain ⟨δ, hδ, hbound⟩ := Metric.uniformContinuousOn_iff.mp huc ε hε
  let r := min δ 1
  have hr : 0 < r := lt_min hδ zero_lt_one
  filter_upwards [continuous_norm.continuousAt.eventually_lt_const
    (show ‖(0 : C(K, E))‖ < r by simpa using hr)] with h hh
  apply (ContinuousMap.norm_le _ (mul_nonneg hε.le (norm_nonneg _))).mpr
  intro x
  have hx : u x ∈ closedBall (0 : E) (‖u‖ + 1) := by
    rw [mem_closedBall, dist_zero_right]
    exact (u.norm_coe_le_norm x).trans (le_add_of_nonneg_right zero_le_one)
  have hs : ball (u x) r ⊆ closedBall (0 : E) (‖u‖ + 1) := by
    intro y hy
    rw [mem_closedBall, dist_zero_right]
    calc ‖y‖ ≤ ‖y - u x‖ + ‖u x‖ := by simpa only [add_comm] using norm_le_insert' y (u x)
         _ ≤ 1 + ‖u‖ := add_le_add (by simpa only [dist_eq_norm] using (mem_ball.mp hy).le.trans (min_le_right δ 1))
           (u.norm_coe_le_norm x)
         _ = ‖u‖ + 1 := add_comm _ _
  have hderiv : ∀ y ∈ ball (u x) r, ‖fderiv ℝ f y - fderiv ℝ f (u x)‖ ≤ ε := by
    intro y hy
    simpa only [dist_eq_norm] using (hbound y (hs hy) (u x) hx
      ((mem_ball.mp hy).trans_le (min_le_left _ _))).le
  have hhx : u x + h x ∈ ball (u x) r := by
    rw [mem_ball, dist_eq_norm, add_sub_cancel_left]
    exact (h.norm_coe_le_norm x).trans_lt hh
  have hb := (convex_ball (u x) r).norm_image_sub_le_of_norm_fderiv_le'
    (fun y _ => hf.differentiable (by simp) y) hderiv (mem_ball_self hr) hhx
  simpa only [ContinuousMap.sub_apply, ContinuousMap.add_apply, superposition_apply,
      continuousMapApply_apply, ContinuousMap.coe_mk, Function.comp_apply, add_sub_cancel_left]
    using (by simpa only [add_sub_cancel_left] using hb :
      ‖f (u x + h x) - f (u x) - fderiv ℝ f (u x) (h x)‖ ≤ ε * ‖h x‖).trans
        (mul_le_mul_of_nonneg_left (h.norm_coe_le_norm x) hε.le)

lemma contDiff_nat_superposition (n : ℕ) :
    ∀ {F : Type u} [NormedAddCommGroup F] [NormedSpace ℝ F]
      (f : E → F) (hf : ContDiff ℝ ∞ f), ContDiff ℝ n (superposition (K := K) f hf.continuous) := by
  induction n with
  | zero =>
    intro F _ _ f hf
    exact contDiff_zero.mpr (Differentiable.continuous (fun u => (hasFDerivAt_superposition hf u).differentiableAt))
  | succ n ih =>
    intro F _ _ f hf
    rw [show (↑(n + 1) : WithTop ℕ∞) = (n : WithTop ℕ∞) + 1 by push_cast; rfl,
      contDiff_succ_iff_hasFDerivAt]
    refine ⟨fun u => continuousMapApplyCLM (superposition (fderiv ℝ f)
      (hf.continuous_fderiv (by simp)) u), ?_, ?_⟩
    · exact (continuousMapApplyCLM (K := K) (E := E) (F := F)).contDiff.comp
        (ih (fderiv ℝ f) (hf.fderiv_right (by simp)))
    · intro u
      exact hasFDerivAt_superposition hf u

theorem contDiff_superposition {f : E → F} (hf : ContDiff ℝ ∞ f) :
    ContDiff ℝ ∞ (superposition (K := K) f hf.continuous) := by
  rw [contDiff_infty]
  exact fun n => contDiff_nat_superposition n f hf


end

section
open Set Filter Manifold Bundle MeasureTheory
open scoped Topology ContDiff ENNReal
open Set Filter Manifold Bundle
open scoped Topology ContDiff
open Set Filter Metric
open scoped Topology InnerProductSpace
open Set Filter Function Metric
open scoped Topology
open Set Filter Function Metric
open scoped Topology
open Set Filter Metric
open scoped Topology ContDiff
open Set Filter Metric MeasureTheory intervalIntegral
open scoped Topology ContDiff
open Set Filter Function
open scoped Topology ContDiff
variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] [CompleteSpace X]

theorem smooth_inverse_on {f : X → X} (hf : ContDiff ℝ ∞ f) (x : X)
    (D : X ≃L[ℝ] X) (hd : HasFDerivAt f (D : X →L[ℝ] X) x) :
    ∃ (e : OpenPartialHomeomorph X X) (W : Set X),
      (e : X → X) = f ∧ x ∈ e.source ∧ IsOpen W ∧ f x ∈ W ∧ W ⊆ e.target ∧
      ContDiffOn ℝ ∞ e.symm W := by
  let e := hf.contDiffAt.toOpenPartialHomeomorph f hd (by simp)
  have hex : x ∈ e.source := hf.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp)
  have hefx : f x ∈ e.target := e.map_source hex
  have hunit : ∀ᶠ z in 𝓝 x, IsUnit (fderiv ℝ f z) := by
    apply (hf.continuous_fderiv (by simp)).continuousAt.eventually
    apply Units.isOpen.mem_nhds
    rw [hd.fderiv]
    exact ContinuousLinearMap.isUnit_iff_bijective.mpr D.bijective
  have hu : ∀ᶠ y in 𝓝 (f x), IsUnit (fderiv ℝ f (e.symm y)) := by
    have hc : Tendsto e.symm (𝓝 (f x)) (𝓝 x) := by
      have hc := e.symm.continuousAt hefx
      change Tendsto e.symm (𝓝 (f x)) (𝓝 (e.symm (f x))) at hc
      have he : e.symm (f x) = x := e.left_inv hex
      rwa [he] at hc
    exact hc.eventually hunit
  obtain ⟨W, hWsub, hWo, hW⟩ := _root_.mem_nhds_iff.mp (hu.and (e.open_target.mem_nhds hefx))
  refine ⟨e, W, rfl, hex, hWo, hW, fun y hy => (hWsub hy).2, ?_⟩
  intro y hy
  obtain ⟨huy, hyt⟩ := hWsub hy
  have hb := ContinuousLinearMap.isUnit_iff_bijective.mp huy
  let A := ContinuousLinearEquiv.ofBijective (fderiv ℝ f (e.symm y))
    (LinearMap.ker_eq_bot.mpr hb.1) (LinearMap.range_eq_top.mpr hb.2)
  have ha : HasFDerivAt (e : X → X) (A : X →L[ℝ] X) (e.symm y) :=
    hf.differentiable (by simp) (e.symm y) |>.hasFDerivAt
  exact (e.contDiffAt_symm hyt ha (hf.contDiffAt)).contDiffWithinAt

end

open Set Filter Manifold Bundle MeasureTheory
open scoped Topology ContDiff ENNReal
open Set Filter Manifold Bundle
open scoped Topology ContDiff
open Set Filter Metric
open scoped Topology InnerProductSpace
open Set Filter Function Metric
open scoped Topology
open Set Filter Function Metric
open scoped Topology
open Set Filter Metric
open scoped Topology ContDiff
open Set Filter Metric MeasureTheory intervalIntegral
open scoped Topology ContDiff
open Set Filter Function
open scoped Topology ContDiff
open Set Filter Function
open scoped Topology Manifold ContDiff ENNReal NNReal
open Set Filter Function Metric
open scoped Topology ContDiff
universe u
variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E]

abbrev FlowParameters (E : Type u) [TopologicalSpace E] := (ℝ × E) × C(unitInterval, E)

def flowIntegralMap (V : E → E) (hV : Continuous V) (p : FlowParameters E) : FlowParameters E :=
  (p.1, p.2 - ContinuousMap.const unitInterval p.1.2 - p.1.1 • volterra (superposition V hV p.2))

lemma flowIntegralMap_smooth {V : E → E} (hV : ContDiff ℝ ∞ V) :
    ContDiff ℝ ∞ (flowIntegralMap V hV.continuous) := by
  refine contDiff_fst.prodMk ((contDiff_snd.sub ?_).sub ?_)
  · exact (ContinuousLinearMap.const ℝ unitInterval : E →L[ℝ] C(unitInterval, E)).contDiff.comp contDiff_fst.snd
  · exact contDiff_fst.fst.smul (volterra.contDiff.comp ((contDiff_superposition hV).comp contDiff_snd))

def flowIntegralDerivative (S : C(unitInterval, E)) : FlowParameters E ≃L[ℝ] FlowParameters E where
  toFun p := (p.1, p.2 - ContinuousMap.const unitInterval p.1.2 - p.1.1 • S)
  invFun p := (p.1, p.2 + ContinuousMap.const unitInterval p.1.2 + p.1.1 • S)
  left_inv p := by ext <;> simp; abel
  right_inv p := by ext <;> simp; abel
  map_add' p q := by ext <;> simp [add_smul]; abel
  map_smul' c p := by ext <;> simp [smul_sub, smul_smul]
  continuous_toFun := by fun_prop
  continuous_invFun := by fun_prop

lemma flowIntegralMap_derivative {V : E → E} (hV : ContDiff ℝ ∞ V) (x : E) :
    HasFDerivAt (flowIntegralMap V hV.continuous)
      (flowIntegralDerivative (volterra (superposition V hV.continuous (ContinuousMap.const unitInterval x))) :
        FlowParameters E →L[ℝ] FlowParameters E) ((0,x), ContinuousMap.const unitInterval x) := by
  let p : FlowParameters E := ((0,x), ContinuousMap.const unitInterval x)
  let P := ContinuousLinearMap.fst ℝ (ℝ × E) C(unitInterval, E)
  let U := ContinuousLinearMap.snd ℝ (ℝ × E) C(unitInterval, E)
  let T := (ContinuousLinearMap.fst ℝ ℝ E).comp P
  let X := (ContinuousLinearMap.snd ℝ ℝ E).comp P
  have hQ := volterra.hasFDerivAt.comp p
    (((contDiff_superposition hV).differentiable (by simp) (U p)).hasFDerivAt.comp p U.hasFDerivAt)
  have hh := P.hasFDerivAt (x := p) |>.prodMk
    ((U.hasFDerivAt.sub ((ContinuousLinearMap.const ℝ unitInterval).hasFDerivAt.comp p X.hasFDerivAt)).sub
      (T.hasFDerivAt.smul hQ))
  convert! hh using 1
  ext q s <;> simp [flowIntegralDerivative, p, P, U, T, X]

theorem smooth_integral_paths {V : E → E} (hV : ContDiff ℝ ∞ V) (x : E) :
    ∃ (O : Set (ℝ × E)) (u : (ℝ × E) → C(unitInterval, E)),
      IsOpen O ∧ (0,x) ∈ O ∧ ContDiffOn ℝ ∞ u O ∧ u (0,x) = ContinuousMap.const unitInterval x ∧
      ∀ p ∈ O, u p = ContinuousMap.const unitInterval p.2 + p.1 • volterra (superposition V hV.continuous (u p)) := by
  let p : FlowParameters E := ((0,x), ContinuousMap.const unitInterval x)
  let D := flowIntegralDerivative (volterra (superposition V hV.continuous (ContinuousMap.const unitInterval x)))
  obtain ⟨e, W, hef, hep, hWo, hpW, hWt, hWs⟩ := smooth_inverse_on
    (flowIntegralMap_smooth hV) p D (flowIntegralMap_derivative hV x)
  let z : ℝ × E → FlowParameters E := fun q => (q,0)
  have hzp : z (0,x) = flowIntegralMap V hV.continuous p := by
    simp [z, flowIntegralMap, p]
  refine ⟨z ⁻¹' W, fun q => (e.symm (z q)).2, hWo.preimage (by fun_prop), ?_, ?_, ?_, ?_⟩
  · change z (0,x) ∈ W
    rwa [hzp]
  · exact (hWs.comp (f := z) (s := z ⁻¹' W) (by dsimp [z]; fun_prop) (fun q hq => hq)).snd
  · have he : e.symm (z (0,x)) = p := by
      rw [hzp, ← hef]
      exact e.left_inv hep
    exact congrArg Prod.snd he
  · intro q hq
    have he : flowIntegralMap V hV.continuous (e.symm (z q)) = z q := by
      rw [← hef]
      exact e.right_inv (hWt hq)
    have he1 : (e.symm (z q)).1 = q := congrArg Prod.fst he
    have he2 := congrArg Prod.snd he
    change (e.symm (z q)).2 - ContinuousMap.const unitInterval (e.symm (z q)).1.2 -
      (e.symm (z q)).1.1 • volterra (superposition V hV.continuous (e.symm (z q)).2) = 0 at he2
    rw [he1] at he2
    simpa only [sub_eq_zero, eq_sub_iff_add_eq, sub_eq_iff_eq_add, add_comm, zero_add] using he2


end YauCounterexamples
end

end OAI