@@ -5,6 +5,7 @@ Authors: Sébastien Gouëzel
55-/
66import Mathlib.Analysis.Calculus.ContDiff.Operations
77import Mathlib.Analysis.Normed.Module.Convex
8+ import Mathlib.Analysis.RCLike.TangentCone
89import Mathlib.Data.Bundle
910import Mathlib.Geometry.Manifold.ChartedSpace
1011
@@ -135,39 +136,62 @@ open scoped Manifold Topology ContDiff
135136
136137/-! ### Models with corners. -/
137138
138-
139+ open scoped Classical in
139140/-- A structure containing information on the way a space `H` embeds in a
140141model vector space `E` over the field `𝕜`. This is all what is needed to
141142define a `C^n` manifold with model space `H`, and model vector space `E`.
142143
143- We require two conditions `uniqueDiffOn'` and `target_subset_closure_interior`, which
144- are satisfied in the relevant cases (where `range I = univ` or a half space or a quadrant) and
145- useful for technical reasons. The former makes sure that manifold derivatives are uniquely
146- defined, the latter ensures that for `C^2` maps the second derivatives are symmetric even for points
147- on the boundary, as these are limit points of interior points where symmetry holds. If further
148- conditions turn out to be useful, they can be added here.
144+ We require that, when the field is `ℝ` or `ℂ`, the range is `ℝ`-convex, as this is what is needed
145+ to do calculus and covers the standard examples of manifolds with boundary. Over other fields,
146+ we require that the range is `univ`, as there is no relevant notion of manifold of boundary there.
149147-/
150148@[ext]
151149structure ModelWithCorners (𝕜 : Type *) [NontriviallyNormedField 𝕜] (E : Type *)
152150 [NormedAddCommGroup E] [NormedSpace 𝕜 E] (H : Type *) [TopologicalSpace H] extends
153151 PartialEquiv H E where
154152 source_eq : source = univ
155- uniqueDiffOn' : UniqueDiffOn 𝕜 toPartialEquiv.target
156- target_subset_closure_interior : toPartialEquiv.target ⊆ closure (interior toPartialEquiv.target)
153+ /-- To check this condition when the space already has a real normed space structure,
154+ use `Convex.convex_isRCLikeNormedField` which eliminates the `letI`s below, or the constructor
155+ `ModelWithCorners.of_convex_range` -/
156+ convex_range' :
157+ if h : IsRCLikeNormedField 𝕜 then
158+ letI := h.rclike 𝕜;
159+ letI : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 E
160+ Convex ℝ (range toPartialEquiv)
161+ else range toPartialEquiv = univ
162+ nonempty_interior' : (interior (range toPartialEquiv)).Nonempty
157163 continuous_toFun : Continuous toFun := by continuity
158164 continuous_invFun : Continuous invFun := by continuity
159165
166+ lemma ModelWithCorners.range_eq_target {𝕜 E H : Type *} [NontriviallyNormedField 𝕜]
167+ [NormedAddCommGroup E] [NormedSpace 𝕜 E] [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H) :
168+ range I.toPartialEquiv = I.target := by
169+ rw [← I.image_source_eq_target, I.source_eq, image_univ.symm]
170+
171+ /-- If a model with corners has full range, the `convex_range'` condition is satisfied. -/
172+ def ModelWithCorners.of_target_univ (𝕜 : Type *) [NontriviallyNormedField 𝕜]
173+ {E : Type *} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type *} [TopologicalSpace H]
174+ (φ : PartialEquiv H E) (hsource : φ.source = univ) (htarget : φ.target = univ)
175+ (hcont : Continuous φ) (hcont_inv : Continuous φ.symm) : ModelWithCorners 𝕜 E H where
176+ toPartialEquiv := φ
177+ source_eq := hsource
178+ convex_range' := by
179+ have : range φ = φ.target := by rw [← φ.image_source_eq_target, hsource, image_univ.symm]
180+ simp only [this, htarget, dite_else_true]
181+ intro h
182+ letI := h.rclike 𝕜
183+ letI := NormedSpace.restrictScalars ℝ 𝕜 E
184+ exact convex_univ
185+ nonempty_interior' := by
186+ have : range φ = φ.target := by rw [← φ.image_source_eq_target, hsource, image_univ.symm]
187+ simp [this, htarget]
188+
160189attribute [simp, mfld_simps] ModelWithCorners.source_eq
161190
162191/-- A vector space is a model with corners, denoted as `𝓘(𝕜, E)` within the `Manifold` namespace. -/
163192def modelWithCornersSelf (𝕜 : Type *) [NontriviallyNormedField 𝕜] (E : Type *)
164- [NormedAddCommGroup E] [NormedSpace 𝕜 E] : ModelWithCorners 𝕜 E E where
165- toPartialEquiv := PartialEquiv.refl E
166- source_eq := rfl
167- uniqueDiffOn' := uniqueDiffOn_univ
168- target_subset_closure_interior := by simp
169- continuous_toFun := continuous_id
170- continuous_invFun := continuous_id
193+ [NormedAddCommGroup E] [NormedSpace 𝕜 E] : ModelWithCorners 𝕜 E E :=
194+ ModelWithCorners.of_target_univ 𝕜 (PartialEquiv.refl E) rfl rfl continuous_id continuous_id
171195
172196@[inherit_doc] scoped [Manifold] notation "𝓘(" 𝕜 ", " E ")" => modelWithCornersSelf 𝕜 E
173197
@@ -252,12 +276,76 @@ theorem target_eq : I.target = range (I : H → E) := by
252276 rw [← image_univ, ← I.source_eq]
253277 exact I.image_source_eq_target.symm
254278
255- protected theorem uniqueDiffOn : UniqueDiffOn 𝕜 (range I) :=
256- I.target_eq ▸ I.uniqueDiffOn'
279+ theorem nonempty_interior : (interior (range I)).Nonempty :=
280+ I.nonempty_interior'
281+
282+ theorem range_eq_univ_of_not_isRCLikeNormedField (h : ¬ IsRCLikeNormedField 𝕜) :
283+ range I = univ := by
284+ simpa [h] using I.convex_range'
285+
286+ /-- If a set is `ℝ`-convex for some normed space structure, then it is `ℝ`-convex for the
287+ normed space structure coming from an `IsRCLikeNormedField 𝕜`. Useful when constructing model
288+ spaces to avoid diamond issues when populating the field `convex_range'`. -/
289+ lemma _root_.Convex.convex_isRCLikeNormedField [NormedSpace ℝ E] [h : IsRCLikeNormedField 𝕜]
290+ {s : Set E} (hs : Convex ℝ s) :
291+ letI := h.rclike
292+ letI := NormedSpace.restrictScalars ℝ 𝕜 E
293+ Convex ℝ s := by
294+ letI := h.rclike
295+ letI := NormedSpace.restrictScalars ℝ 𝕜 E
296+ simp only [Convex, StarConvex] at hs ⊢
297+ intro u hu v hv a b ha hb hab
298+ convert hs hu hv ha hb hab using 2
299+ · rw [← @algebraMap_smul (R := ℝ) (A := 𝕜), ← @algebraMap_smul (R := ℝ) (A := 𝕜)]
300+ · rw [← @algebraMap_smul (R := ℝ) (A := 𝕜), ← @algebraMap_smul (R := ℝ) (A := 𝕜)]
301+
302+ /-- Construct a model with corners over `ℝ` from a continuous partial equiv with convex range. -/
303+ def of_convex_range
304+ {E : Type *} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type *} [TopologicalSpace H]
305+ (φ : PartialEquiv H E) (hsource : φ.source = univ) (htarget : Convex ℝ φ.target)
306+ (hcont : Continuous φ) (hcont_inv : Continuous φ.symm) (hint : (interior φ.target).Nonempty) :
307+ ModelWithCorners ℝ E H where
308+ toPartialEquiv := φ
309+ source_eq := hsource
310+ convex_range' := by
311+ have : range φ = φ.target := by rw [← φ.image_source_eq_target, hsource, image_univ.symm]
312+ simp only [instIsRCLikeNormedField, ↓reduceDIte, this]
313+ exact htarget.convex_isRCLikeNormedField
314+ nonempty_interior' := by
315+ have : range φ = φ.target := by rw [← φ.image_source_eq_target, hsource, image_univ.symm]
316+ simp [this, htarget, hint]
317+
318+ theorem convex_range [NormedSpace ℝ E] : Convex ℝ (range I) := by
319+ by_cases h : IsRCLikeNormedField 𝕜
320+ · letI : RCLike 𝕜 := h.rclike
321+ have W := I.convex_range'
322+ simp only [h, ↓reduceDIte, toPartialEquiv_coe] at W
323+ simp only [Convex, StarConvex] at W ⊢
324+ intro u hu v hv a b ha hb hab
325+ convert W hu hv ha hb hab using 2
326+ · rw [← @algebraMap_smul (R := ℝ) (A := 𝕜)]
327+ rfl
328+ · rw [← @algebraMap_smul (R := ℝ) (A := 𝕜)]
329+ rfl
330+ · simp [range_eq_univ_of_not_isRCLikeNormedField I h, convex_univ]
331+
332+ protected theorem uniqueDiffOn : UniqueDiffOn 𝕜 (range I) := by
333+ by_cases h : IsRCLikeNormedField 𝕜
334+ · letI := h.rclike 𝕜;
335+ letI := NormedSpace.restrictScalars ℝ 𝕜 E
336+ apply uniqueDiffOn_convex_of_isRCLikeNormedField _ I.nonempty_interior
337+ simpa [h] using I.convex_range
338+ · simp [range_eq_univ_of_not_isRCLikeNormedField I h, uniqueDiffOn_univ]
257339
258340theorem range_subset_closure_interior : range I ⊆ closure (interior (range I)) := by
259- rw [← I.target_eq]
260- exact I.target_subset_closure_interior
341+ by_cases h : IsRCLikeNormedField 𝕜
342+ · letI := h.rclike 𝕜
343+ letI := NormedSpace.restrictScalars ℝ 𝕜 E
344+ rw [Convex.closure_interior_eq_closure_of_nonempty_interior (𝕜 := ℝ)]
345+ · apply subset_closure
346+ · apply I.convex_range
347+ · apply I.nonempty_interior
348+ · simp [range_eq_univ_of_not_isRCLikeNormedField I h]
261349
262350@ [simp, mfld_simps]
263351protected theorem left_inv (x : H) : I.symm (I x) = x := by refine I.left_inv' ?_; simp
@@ -398,10 +486,17 @@ def ModelWithCorners.prod {𝕜 : Type u} [NontriviallyNormedField 𝕜] {E : Ty
398486 invFun := fun x => (I.symm x.1 , I'.symm x.2 )
399487 source := { x | x.1 ∈ I.source ∧ x.2 ∈ I'.source }
400488 source_eq := by simp only [setOf_true, mfld_simps]
401- uniqueDiffOn' := I.uniqueDiffOn'.prod I'.uniqueDiffOn'
402- target_subset_closure_interior := by
403- simp only [PartialEquiv.prod_target, target_eq, interior_prod_eq, closure_prod_eq]
404- exact Set.prod_mono I.range_subset_closure_interior I'.range_subset_closure_interior
489+ convex_range' := by
490+ have : range (fun (x : ModelProd H H') ↦ (I x.1 , I' x.2 )) = range (Prod.map I I') := rfl
491+ rw [this, Set.range_prodMap]
492+ split_ifs with h
493+ · letI := h.rclike;
494+ letI := NormedSpace.restrictScalars ℝ 𝕜 E; letI := NormedSpace.restrictScalars ℝ 𝕜 E'
495+ exact I.convex_range.prod I'.convex_range
496+ · simp [range_eq_univ_of_not_isRCLikeNormedField, h]
497+ nonempty_interior' := by
498+ have : range (fun (x : ModelProd H H') ↦ (I x.1 , I' x.2 )) = range (Prod.map I I') := rfl
499+ simp [this, interior_prod_eq, nonempty_interior]
405500 continuous_toFun := I.continuous_toFun.prodMap I'.continuous_toFun
406501 continuous_invFun := I.continuous_invFun.prodMap I'.continuous_invFun }
407502
@@ -414,10 +509,16 @@ def ModelWithCorners.pi {𝕜 : Type u} [NontriviallyNormedField 𝕜] {ι : Typ
414509 ModelWithCorners 𝕜 (∀ i, E i) (ModelPi H) where
415510 toPartialEquiv := PartialEquiv.pi fun i => (I i).toPartialEquiv
416511 source_eq := by simp only [pi_univ, mfld_simps]
417- uniqueDiffOn' := UniqueDiffOn.pi ι E _ _ fun i _ => (I i).uniqueDiffOn'
418- target_subset_closure_interior := by
419- simp only [PartialEquiv.pi_target, target_eq, finite_univ, interior_pi_set, closure_pi_set]
420- exact Set.pi_mono (fun i _ ↦ (I i).range_subset_closure_interior)
512+ convex_range' := by
513+ rw [PartialEquiv.pi_apply, Set.range_piMap]
514+ split_ifs with h
515+ · letI := h.rclike;
516+ letI := fun i ↦ NormedSpace.restrictScalars ℝ 𝕜 (E i);
517+ exact convex_pi fun i _hi ↦ (I i).convex_range
518+ · simp [range_eq_univ_of_not_isRCLikeNormedField, h]
519+ nonempty_interior' := by
520+ rw [PartialEquiv.pi_apply, Set.range_piMap]
521+ simp [interior_pi_set finite_univ, univ_pi_nonempty_iff, nonempty_interior]
421522 continuous_toFun := continuous_pi fun i => (I i).continuous.comp (continuous_apply i)
422523 continuous_invFun := continuous_pi fun i => (I i).continuous_symm.comp (continuous_apply i)
423524
0 commit comments