# Smooth manifolds (possibly with boundary or corners)

A smooth manifold is a manifold modelled on a normed vector space, or a subset like a half-space (to get manifolds with boundaries) for which the change of coordinates are smooth maps. We define a model with corners as a map I : H → E embedding nicely the topological space H in the vector space E (or more precisely as a structure containing all the relevant properties). Given such a model with corners I on (E, H), we define the groupoid of local homeomorphisms of H which are smooth when read in E (for any regularity n : with_top ℕ). With this groupoid at hand and the general machinery of manifolds, we thus get the notion of C^n manifold with respect to any model with corners I on (E, H). We also introduce a specific type class for C^∞ manifolds as these are the most commonly used.

## Main definitions

• model_with_corners 𝕜 E H : a structure containing informations on the way a space H embeds in a model vector space E over the field 𝕜. This is all that is needed to define a smooth manifold with model space H, and model vector space E.
• model_with_corners_self 𝕜 E : trivial model with corners structure on the space E embedded in itself by the identity.
• times_cont_diff_groupoid n I : when I is a model with corners on (𝕜, E, H), this is the groupoid of local homeos of H which are of class C^n over the normed field 𝕜, when read in E.
• smooth_manifold_with_corners I M : a type class saying that the manifold M, modelled on the space H, has C^∞ changes of coordinates with respect to the model with corners I on (𝕜, E, H). This type class is just a shortcut for has_groupoid M (times_cont_diff_groupoid ⊤ I).
• ext_chart_at I x: in a smooth manifold with corners with the model I on (E, H), the charts take values in H, but often we may want to use their E-valued version, obtained by composing the charts with I. Since the target is in general not open, we can not register them as local homeomorphisms, but we register them as local equivs. ext_chart_at I x is the canonical such local equiv around x.

As specific examples of models with corners, we define (in the file real_instances.lean)

• euclidean_space n for a model vector space of dimension n.
• model_with_corners ℝ (euclidean_space n) (euclidean_half_space n) for the model space used to define n-dimensional real manifolds with boundary and
• model_with_corners ℝ (euclidean_space n) (euclidean_quadrant n) for the model space used to define n-dimensional real manifolds with corners

With these definitions at hand, to invoke an n-dimensional real manifold without boundary, one could use

variables {n : ℕ} {M : Type*} [topological_space M] [manifold (euclidean_space n)] [smooth_manifold_with_corners (model_with_corners_self ℝ (euclidean_space n)) M].

However, this is not the recommended way: a theorem proved using this assumption would not apply for instance to the tangent space of such a manifold, which is modelled on (euclidean_space n) × (euclidean_space n) and not on euclidean_space (2 * n)! In the same way, it would not apply to product manifolds, modelled on (euclidean_space n) × (euclidean_space m). The right invocation does not focus on one specific construction, but on all constructions sharing the right properties, like

variables {E : Type*} [normed_group E] [normed_space ℝ E] [finite_dimensional ℝ E] {I : model_with_corners ℝ E E} [I.boundaryless] {M : Type*} [topological_space M] [manifold E M] [smooth_manifold_with_corners I M]

Here, I.boundaryless is a typeclass property ensuring that there is no boundary (this is for instance the case for model_with_corners_self, or products of these). Note that one could consider as a natural assumption to only use the trivial model with corners model_with_corners_self ℝ E, but again in product manifolds the natural model with corners will not be this one but the product one (and they are not defeq as (λp : E × F, (p.1, p.2)) is not defeq to the identity). So, it is important to use the above incantation to maximize the applicability of theorems.

## Implementation notes

We want to talk about manifolds modelled on a vector space, but also on manifolds with boundary, modelled on a half space (or even manifolds with corners). For the latter examples, we still want to define smooth functions, tangent bundles, and so on. As smooth functions are well defined on vector spaces or subsets of these, one could take for model space a subtype of a vector space. With the drawback that the whole vector space itself (which is the most basic example) is not directly a subtype of itself: the inclusion of univ : set E in set E would show up in the definition, instead of id.

A good abstraction covering both cases it to have a vector space E (with basic example the Euclidean space), a model space H(with basic example the upper half space), and an embedding ofHintoE(which can be the identity forH = E, or subtype.valfor manifolds with corners). We say that the pair(E, H)with their embedding is a model with corners, and we encompass all the relevant properties (in particular the fact that the image ofHinEshould have unique differentials) in the definition ofmodel_with_corners.

We concentrate on C^∞ manifolds: all the definitions work equally well for C^n manifolds, but later on it is a pain to carry all over the smoothness parameter, especially when one wants to deal with C^k functions as there would be additional conditions k ≤ n everywhere. Since one deals almost all the time with C^∞ (or analytic) manifolds, this seems to be a reasonable choice that one could revisit later if needed. C^k manifolds are still available, but they should be called using has_groupoid M (times_cont_diff_groupoid k I) where I is the model with corners.

I have considered using the model with corners I as a typeclass argument, possibly out_param, to get lighter notations later on, but it did not turn out right, as on E × F there are two natural model with corners, the trivial (identity) one, and the product one, and they are not defeq and one needs to indicate to Lean which one we want to use. This means that when talking on objects on manifolds one will most often need to specify the model with corners one is using. For instance, the tangent bundle will be tangent_bundle I M and the derivative will be mfderiv I I' f, instead of the more natural notations tangent_bundle 𝕜 M and mfderiv 𝕜 f (the field has to be explicit anyway, as some manifolds could be considered both as real and complex manifolds).

### Models with corners.

@[nolint]
structure model_with_corners (𝕜 : Type u_1) (E : Type u_2) [normed_group E] [normed_space 𝕜 E] (H : Type u_3) :
Type (max u_2 u_3)

A structure containing informations on the way a space H embeds in a model vector space E over the field 𝕜. This is all what is needed to define a smooth manifold with model space H, and model vector space E.

def model_with_corners_self (𝕜 : Type u_1) (E : Type u_2) [normed_group E] [normed_space 𝕜 E] :

A vector space is a model with corners.

Equations
@[instance]
def model_with_corners.has_coe_to_fun {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} :

Equations
def model_with_corners.symm {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} :

The inverse to a model with corners, only registered as a local equiv.

Equations
@[simp]
theorem model_with_corners.to_local_equiv_coe {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

@[simp]
theorem model_with_corners.mk_coe {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (e : local_equiv H E) (a : e.source = set.univ) (b : unique_diff_on 𝕜 (set.range e.to_fun)) (c : continuous e.to_fun) (d : continuous e.inv_fun) :

@[simp]
theorem model_with_corners.to_local_equiv_coe_symm {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

@[simp]
theorem model_with_corners.mk_coe_symm {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (e : local_equiv H E) (a : e.source = set.univ) (b : unique_diff_on 𝕜 (set.range e.to_fun)) (c : continuous e.to_fun) (d : continuous e.inv_fun) :

theorem model_with_corners.unique_diff {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

theorem model_with_corners.continuous {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

theorem model_with_corners.continuous_symm {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

@[simp]
theorem model_with_corners_self_local_equiv (𝕜 : Type u_1) (E : Type u_2) [normed_group E] [normed_space 𝕜 E] :

In the trivial model with corners, the associated local equiv is the identity.

@[simp]
theorem model_with_corners_self_coe (𝕜 : Type u_1) (E : Type u_2) [normed_group E] [normed_space 𝕜 E] :

@[simp]
theorem model_with_corners_self_coe_symm (𝕜 : Type u_1) (E : Type u_2) [normed_group E] [normed_space 𝕜 E] :

@[simp]
theorem model_with_corners.target {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

@[simp]
theorem model_with_corners.left_inv {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) (x : H) :
(I.symm) (I x) = x

@[simp]
theorem model_with_corners.left_inv' {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

@[simp]
theorem model_with_corners.right_inv {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {x : E} :
x set.range I → I ((I.symm) x) = x

theorem model_with_corners.image {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) (s : set H) :

theorem model_with_corners.unique_diff_preimage {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {s : set H} :

theorem model_with_corners.unique_diff_preimage_source {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {β : Type u_4} {e : local_homeomorph H β} :

theorem model_with_corners.unique_diff_at_image {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {x : H} :

def model_with_corners.prod {𝕜 : Type u} {E : Type v} [normed_group E] [normed_space 𝕜 E] {H : Type w} (I : model_with_corners 𝕜 E H) {E' : Type v'} [normed_group E'] [normed_space 𝕜 E'] {H' : Type w'} :
model_with_corners 𝕜 E' H' → model_with_corners 𝕜 (E × E') (H × H')

Given two model_with_corners I on (E, H) and I' on (E', H'), we define the model with corners I.prod I' on (E × E', H × H'). This appears in particular for the manifold structure on the tangent bundle to a manifold modelled on (E, H): it will be modelled on (E × E, H × E).

Equations
def model_with_corners.tangent {𝕜 : Type u} {E : Type v} [normed_group E] [normed_space 𝕜 E] {H : Type w} :
model_with_corners 𝕜 E H → model_with_corners 𝕜 (E × E) (H × E)

Special case of product model with corners, which is trivial on the second factor. This shows up as the model to tangent bundles.

Equations
@[class]
structure model_with_corners.boundaryless {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} :
model_with_corners 𝕜 E H → Prop

Property ensuring that the model with corners I defines manifolds without boundary.

Instances
@[instance]
def model_with_corners_self_boundaryless (𝕜 : Type u_1) (E : Type u_2) [normed_group E] [normed_space 𝕜 E] :

The trivial model with corners has no boundary

Equations
• _ = _
@[instance]
def model_with_corners.range_eq_univ_prod {𝕜 : Type u} {E : Type v} [normed_group E] [normed_space 𝕜 E] {H : Type w} (I : model_with_corners 𝕜 E H) [I.boundaryless] {E' : Type v'} [normed_group E'] [normed_space 𝕜 E'] {H' : Type w'} (I' : model_with_corners 𝕜 E' H') [I'.boundaryless] :

If two model with corners are boundaryless, their product also is

Equations
• _ = _

### Smooth functions on models with corners

def times_cont_diff_groupoid (n : with_top ) {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} :

Given a model with corners (E, H), we define the groupoid of C^n transformations of H as the maps that are C^n when read in E through I.

Equations
theorem times_cont_diff_groupoid_le {m n : with_top } {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

Inclusion of the groupoid of C^n local diffeos in the groupoid of C^m local diffeos when m ≤ n

theorem times_cont_diff_groupoid_zero_eq {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) :

The groupoid of 0-times continuously differentiable maps is just the groupoid of all local homeomorphisms

theorem of_set_mem_times_cont_diff_groupoid (n : with_top ) {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {s : set H} (hs : is_open s) :

An identity local homeomorphism belongs to the C^n groupoid.

theorem symm_trans_mem_times_cont_diff_groupoid (n : with_top ) {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} (e : local_homeomorph M H) :

The composition of a local homeomorphism from H to M and its inverse belongs to the C^n groupoid.

### Smooth manifolds with corners

@[class]
structure smooth_manifold_with_corners {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) (M : Type u_4) [manifold H M] :
Prop

Typeclass defining smooth manifolds with corners with respect to a model with corners, over a field 𝕜 and with infinite smoothness to simplify typeclass search and statements later on.

Instances
@[instance]
def model_space_smooth {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} {I : model_with_corners 𝕜 E H} :

For any model with corners, the model space is a smooth manifold

Equations

### Extended charts

In a smooth manifold with corners, the model space is the space H. However, we will also need to use extended charts taking values in the model vector space E. These extended charts are not local_homeomorph as the target is not open in E in general, but we can still register them as local_equiv.

def ext_chart_at {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] :
M → local_equiv M E

The preferred extended chart on a manifold with corners around a point x, from a neighborhood of x to the model vector space.

Equations
theorem ext_chart_at_source {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_at_open_source {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

@[simp]
theorem mem_ext_chart_source {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

@[simp]
theorem ext_chart_at_to_inv {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_at_source_mem_nhds {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_at_continuous_on {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_at_continuous_at {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_at_continuous_on_symm {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_at_target_mem_nhds_within {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_at_coe {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x p : M) :

theorem ext_chart_at_coe_symm {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) (p : E) :

theorem nhds_within_ext_chart_target_eq {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_continuous_at_symm' {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) {x' : M} :

theorem ext_chart_continuous_at_symm {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) :

theorem ext_chart_preimage_mem_nhds_within' {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) {s t : set M} {x' : M} :

Technical lemma ensuring that the preimage under an extended chart of a neighborhood of a point in the source is a neighborhood of the preimage, within a set.

theorem ext_chart_preimage_mem_nhds_within {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) {s t : set M} :

Technical lemma ensuring that the preimage under an extended chart of a neighborhood of the base point is a neighborhood of the preimage, within a set.

theorem ext_chart_preimage_mem_nhds {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) {t : set M} :

Technical lemma ensuring that the preimage under an extended chart of a neighborhood of a point is a neighborhood of the preimage.

theorem ext_chart_preimage_inter_eq {𝕜 : Type u_1} {E : Type u_2} [normed_group E] [normed_space 𝕜 E] {H : Type u_3} (I : model_with_corners 𝕜 E H) {M : Type u_4} [manifold H M] (x : M) {s t : set M} :

Technical lemma to rewrite suitably the preimage of an intersection under an extended chart, to bring it into a convenient form to apply derivative lemmas.

@[simp]
theorem ext_chart_model_space_eq_id (𝕜 : Type u_1) {E : Type u_2} [normed_group E] [normed_space 𝕜 E] (x : E) :

In the case of the manifold structure on a vector space, the extended charts are just the identity.