@@ -9,9 +9,9 @@ import linear_algebra.finite_dimensional
9
9
/-!
10
10
# Constructing examples of manifolds over ℝ
11
11
12
- We introduce the necessary bits to be able to define manifolds modelled over ℝ^n, boundaryless
12
+ We introduce the necessary bits to be able to define manifolds modelled over ` ℝ^n` , boundaryless
13
13
or with boundary or with corners. As a concrete example, we construct explicitly the manifold with
14
- boundary structure on the real interval [x, y].
14
+ boundary structure on the real interval ` [x, y]` .
15
15
16
16
More specifically, we introduce
17
17
* `euclidean_space n` for a model vector space of dimension `n`.
@@ -22,30 +22,29 @@ to define `n`-dimensional real manifolds with corners
22
22
23
23
## Implementation notes
24
24
25
- The manifold structure on the interval [x, y] = Icc x y requires the assumption `x < y`. We
26
- introduce a dummy class `lt_class x y` for this, to make such an assumption available to typeclass
27
- search. This should hopefully not be necessary any more in Lean 4.
25
+ The manifold structure on the interval `[x, y] = Icc x y` requires the assumption `x < y` as a
26
+ typeclass. We provide it as `[fact (x < y)]`.
28
27
-/
29
28
30
29
noncomputable theory
31
30
open set
32
31
33
32
/--
34
- The space ℝ^n. Note that the name is slightly misleading, as we only need a normed space
35
- structure on ℝ^n, but the one we use here is the sup norm and not the euclidean one -- this is not
33
+ The space ` ℝ^n` . Note that the name is slightly misleading, as we only need a normed space
34
+ structure on ` ℝ^n` , but the one we use here is the sup norm and not the euclidean one -- this is not
36
35
a problem for the manifold applications, but should probably be refactored at some point.
37
36
-/
38
37
def euclidean_space (n : ℕ) : Type := (fin n → ℝ)
39
38
40
39
/--
41
- The half-space in ℝ^n, used to model manifolds with boundary. We only define it when `1 ≤ n`, as the
42
- definition only makes sense in this case.
40
+ The half-space in ` ℝ^n` , used to model manifolds with boundary. We only define it when
41
+ `1 ≤ n`, as the definition only makes sense in this case.
43
42
-/
44
43
def euclidean_half_space (n : ℕ) [has_zero (fin n)] : Type :=
45
44
{x : euclidean_space n // 0 ≤ x 0 }
46
45
47
46
/--
48
- The quadrant in ℝ^n, used to model manifolds with corners, made of all vectors with nonnegative
47
+ The quadrant in ` ℝ^n` , used to model manifolds with corners, made of all vectors with nonnegative
49
48
coordinates.
50
49
-/
51
50
def euclidean_quadrant (n : ℕ) : Type := {x : euclidean_space n // ∀i:fin n, 0 ≤ x i}
@@ -77,7 +76,7 @@ by simp
77
76
end
78
77
79
78
/--
80
- Definition of the model with corners (euclidean_space n, euclidean_half_space n), used as a
79
+ Definition of the model with corners ` (euclidean_space n, euclidean_half_space n)` , used as a
81
80
model for manifolds with boundary.
82
81
-/
83
82
def model_with_corners_euclidean_half_space (n : ℕ) [has_zero (fin n)] :
@@ -135,7 +134,7 @@ def model_with_corners_euclidean_half_space (n : ℕ) [has_zero (fin n)] :
135
134
end }
136
135
137
136
/--
138
- Definition of the model with corners (euclidean_space n, euclidean_quadrant n), used as a
137
+ Definition of the model with corners ` (euclidean_space n, euclidean_quadrant n)` , used as a
139
138
model for manifolds with corners -/
140
139
def model_with_corners_euclidean_quadrant (n : ℕ) :
141
140
model_with_corners ℝ (euclidean_space n) (euclidean_quadrant n) :=
@@ -187,22 +186,15 @@ def model_with_corners_euclidean_quadrant (n : ℕ) :
187
186
end }
188
187
189
188
/--
190
- Dummy class to make an assumption such as `x < y` available to typeclass search. Such an
191
- assumption is used to define a manifold structure on [x, y] when `x < y`. Should be fixed in Lean 4.
192
- -/
193
- def lt_class {α : Type *} [has_lt α] (x y : α) : Prop := x < y
194
- attribute [class] lt_class
195
-
196
- /--
197
- The left chart for the topological space [x, y], defined on [x,y) and sending x to 0 in
189
+ The left chart for the topological space `[x, y]`, defined on `[x,y)` and sending `x` to `0` in
198
190
`euclidean_half_space 1`.
199
191
-/
200
- def Icc_left_chart (x y : ℝ) [h : lt_class x y ] :
192
+ def Icc_left_chart (x y : ℝ) [fact (x < y) ] :
201
193
local_homeomorph (Icc x y) (euclidean_half_space 1 ) :=
202
194
{ source := {z : Icc x y | z.val < y},
203
195
target := {z : euclidean_half_space 1 | z.val 0 < y - x},
204
196
to_fun := λ(z : Icc x y), ⟨λi, z.val - x, sub_nonneg.mpr z.property.1 ⟩,
205
- inv_fun := λz, ⟨min (z.val 0 + x) y, by simp [le_refl, z.property, le_of_lt h ]⟩,
197
+ inv_fun := λz, ⟨min (z.val 0 + x) y, by simp [le_refl, z.property, le_of_lt ‹x < y› ]⟩,
206
198
map_source := by simp,
207
199
map_target := by { simp, assume z hz, left, linarith },
208
200
left_inv := by { rintros ⟨z, hz⟩ h'z, simp at hz h'z, simp [hz, h'z] },
@@ -242,15 +234,16 @@ def Icc_left_chart (x y : ℝ) [h : lt_class x y] :
242
234
end }
243
235
244
236
/--
245
- The right chart for the topological space [x, y], defined on (x,y] and sending y to 0 in
237
+ The right chart for the topological space ` [x, y]` , defined on ` (x,y]` and sending `y` to `0` in
246
238
`euclidean_half_space 1`.
247
239
-/
248
- def Icc_right_chart (x y : ℝ) [h : lt_class x y ] :
240
+ def Icc_right_chart (x y : ℝ) [fact (x < y) ] :
249
241
local_homeomorph (Icc x y) (euclidean_half_space 1 ) :=
250
242
{ source := {z : Icc x y | x < z.val},
251
243
target := {z : euclidean_half_space 1 | z.val 0 < y - x},
252
244
to_fun := λ(z : Icc x y), ⟨λi, y - z.val, sub_nonneg.mpr z.property.2 ⟩,
253
- inv_fun := λz, ⟨max (y - z.val 0 ) x, by simp [le_refl, z.property, le_of_lt h, sub_eq_add_neg]⟩,
245
+ inv_fun := λz,
246
+ ⟨max (y - z.val 0 ) x, by simp [le_refl, z.property, le_of_lt ‹x < y›, sub_eq_add_neg]⟩,
254
247
map_source := by simp,
255
248
map_target := by { simp, assume z hz, left, linarith },
256
249
left_inv := by { rintros ⟨z, hz⟩ h'z, simp at hz h'z, simp [hz, h'z, sub_eq_add_neg] },
@@ -290,25 +283,25 @@ def Icc_right_chart (x y : ℝ) [h : lt_class x y] :
290
283
end }
291
284
292
285
/--
293
- Manifold with boundary structure on [x, y], using only two charts.
286
+ Manifold with boundary structure on ` [x, y]` , using only two charts.
294
287
-/
295
- instance Icc_manifold (x y : ℝ) [h : lt_class x y ] : manifold (euclidean_half_space 1 ) (Icc x y) :=
288
+ instance Icc_manifold (x y : ℝ) [fact (x < y) ] : manifold (euclidean_half_space 1 ) (Icc x y) :=
296
289
{ atlas := {Icc_left_chart x y, Icc_right_chart x y},
297
290
chart_at := λz, if z.val < y then Icc_left_chart x y else Icc_right_chart x y,
298
291
mem_chart_source := λz, begin
299
292
by_cases h' : z.val < y,
300
293
{ simp only [h', if_true],
301
294
exact h' },
302
295
{ simp only [h', if_false],
303
- apply lt_of_lt_of_le h ,
296
+ apply lt_of_lt_of_le ‹x < y› ,
304
297
simpa using h' }
305
298
end ,
306
299
chart_mem_atlas := λz, by { by_cases h' : z.val < y; simp [h'] } }
307
300
308
301
/--
309
- The manifold structure on [x, y] is smooth.
302
+ The manifold structure on ` [x, y]` is smooth.
310
303
-/
311
- instance Icc_smooth_manifold (x y : ℝ) [lt_class x y ] :
304
+ instance Icc_smooth_manifold (x y : ℝ) [fact (x < y) ] :
312
305
smooth_manifold_with_corners (model_with_corners_euclidean_half_space 1 ) (Icc x y) :=
313
306
begin
314
307
have M : times_cont_diff_on ℝ ⊤ (λz : fin 1 → ℝ, (λi : fin 1 , y - x) - z) univ,
@@ -320,14 +313,14 @@ begin
320
313
apply has_groupoid_of_pregroupoid,
321
314
assume e e' he he',
322
315
simp [atlas] at he he',
323
- /- We need to check that any composition of two charts gives a C^∞ function. Each chart can be
316
+ /- We need to check that any composition of two charts gives a ` C^∞` function. Each chart can be
324
317
either the left chart or the right chart, leaving 4 possibilities that we handle successively.
325
318
-/
326
319
rcases he with rfl | rfl; rcases he' with rfl | rfl,
327
- { -- e = right chart, e' = right chart
320
+ { -- ` e = right chart`, ` e' = right chart`
328
321
refine ((mem_groupoid_of_pregroupoid _ _).mpr _).1 ,
329
322
exact symm_trans_mem_times_cont_diff_groupoid _ _ _ },
330
- { -- e = right chart, e' = left chart
323
+ { -- ` e = right chart`, ` e' = left chart`
331
324
apply M.congr_mono _ (subset_univ _),
332
325
assume z hz,
333
326
simp [-mem_range, range_half_space, model_with_corners_euclidean_half_space,
@@ -338,7 +331,7 @@ begin
338
331
rw subsingleton.elim i 0 ,
339
332
simp [model_with_corners_euclidean_half_space, Icc_left_chart, Icc_right_chart, A, B,
340
333
sub_right_comm y] },
341
- { -- e = left chart, e' = right chart
334
+ { -- ` e = left chart`, ` e' = right chart`
342
335
apply M.congr_mono _ (subset_univ _),
343
336
assume z hz,
344
337
simp [-mem_range, range_half_space, model_with_corners_euclidean_half_space,
@@ -349,7 +342,7 @@ begin
349
342
rw subsingleton.elim i 0 ,
350
343
simp [model_with_corners_euclidean_half_space, Icc_left_chart, Icc_right_chart, A, B,
351
344
sub_add_eq_sub_sub_swap] },
352
- { -- e = left chart, e' = left chart
345
+ { -- ` e = left chart`, ` e' = left chart`
353
346
refine ((mem_groupoid_of_pregroupoid _ _).mpr _).1 ,
354
347
exact symm_trans_mem_times_cont_diff_groupoid _ _ _ }
355
348
end ,
0 commit comments