1
1
/-
2
2
Copyright (c) 2019 Scott Morrison. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
- Authors: Scott Morrison
4
+ Authors: Scott Morrison, Nicolò Cavalleri
5
5
-/
6
6
import topology.algebra.module
7
+ import topology.continuous_map
7
8
8
- /- TODO: change subtype of continuous functions into continuous bundled functions. -/
9
+ /-!
10
+ # Algebraic structures over continuous functions
9
11
10
- universes u v
12
+ In this file we define instances of algebraic sturctures over continuous functions. Instances are
13
+ present both in the case of the subtype of continuous functions and the type of continuous bundled
14
+ functions. Both implementations have advantages and disadvantages, but many experienced people in
15
+ Zulip have expressed a preference towards continuous bundled maps, so when there is no particular
16
+ reason to use the subtype, continuous bundled functions should be used for the sake of uniformity.
17
+ -/
11
18
12
19
local attribute [elab_simple] continuous.comp
13
20
@@ -20,6 +27,19 @@ instance : has_coe_to_fun {f : α → β | continuous f } := ⟨_, subtype.val
20
27
21
28
end continuous_functions
22
29
30
+ namespace continuous_map
31
+
32
+ @[to_additive]
33
+ instance has_mul {α : Type *} {β : Type *} [topological_space α] [topological_space β]
34
+ [has_mul β] [has_continuous_mul β] : has_mul C(α, β) :=
35
+ ⟨λ f g, ⟨f * g, continuous_mul.comp (f.continuous.prod_mk g.continuous)⟩⟩
36
+
37
+ @[to_additive]
38
+ instance {α : Type *} {β : Type *} [topological_space α] [topological_space β]
39
+ [has_one β] : has_one C(α, β) := ⟨const (1 : β)⟩
40
+
41
+ end continuous_map
42
+
23
43
section group_structure
24
44
25
45
/-!
@@ -29,26 +49,28 @@ In this section we show that continuous functions valued in a topological group
29
49
the structure of a group.
30
50
-/
31
51
52
+ section subtype
53
+
32
54
@[to_additive continuous_add_submonoid]
33
- instance continuous_submonoid (α : Type u ) (β : Type v ) [topological_space α] [topological_space β]
55
+ instance continuous_submonoid (α : Type * ) (β : Type * ) [topological_space α] [topological_space β]
34
56
[monoid β] [has_continuous_mul β] : is_submonoid { f : α → β | continuous f } :=
35
57
{ one_mem := @continuous_const _ _ _ _ 1 ,
36
- mul_mem :=
37
- λ f g fc gc, continuous.comp has_continuous_mul.continuous_mul (continuous.prod_mk fc gc) }.
58
+ mul_mem := λ f g fc gc, continuous.comp
59
+ has_continuous_mul.continuous_mul (continuous.prod_mk fc gc) }.
38
60
39
61
@[to_additive continuous_add_subgroup]
40
- instance continuous_subgroup (α : Type u ) (β : Type v ) [topological_space α] [topological_space β]
62
+ instance continuous_subgroup (α : Type * ) (β : Type * ) [topological_space α] [topological_space β]
41
63
[group β] [topological_group β] : is_subgroup { f : α → β | continuous f } :=
42
64
{ inv_mem := λ f fc, continuous.comp topological_group.continuous_inv fc,
43
65
..continuous_submonoid α β, }.
44
66
45
67
@[to_additive continuous_add_monoid]
46
- instance continuous_monoid {α : Type u } {β : Type v } [topological_space α] [topological_space β]
68
+ instance continuous_monoid {α : Type * } {β : Type * } [topological_space α] [topological_space β]
47
69
[monoid β] [has_continuous_mul β] : monoid { f : α → β | continuous f } :=
48
70
subtype.monoid
49
71
50
72
@[to_additive continuous_add_group]
51
- instance continuous_group {α : Type u } {β : Type v } [topological_space α] [topological_space β]
73
+ instance continuous_group {α : Type * } {β : Type * } [topological_space α] [topological_space β]
52
74
[group β] [topological_group β] : group { f : α → β | continuous f } :=
53
75
subtype.group
54
76
@@ -57,6 +79,48 @@ instance continuous_comm_group {α : Type*} {β : Type*} [topological_space α]
57
79
[comm_group β] [topological_group β] : comm_group { f : α → β | continuous f } :=
58
80
@subtype.comm_group _ _ _ (continuous_subgroup α β) -- infer_instance doesn't work?!
59
81
82
+ end subtype
83
+
84
+ section continuous_map
85
+
86
+ @[to_additive continuous_map_add_semigroup]
87
+ instance continuous_map_semigroup {α : Type *} {β : Type *} [topological_space α] [topological_space β]
88
+ [semigroup β] [has_continuous_mul β] : semigroup C(α, β) :=
89
+ { mul_assoc := λ a b c, by ext; exact mul_assoc _ _ _,
90
+ ..continuous_map.has_mul}
91
+
92
+ @[to_additive continuous_map_add_monoid]
93
+ instance continuous_map_monoid {α : Type *} {β : Type *} [topological_space α] [topological_space β]
94
+ [monoid β] [has_continuous_mul β] : monoid C(α, β) :=
95
+ { one_mul := λ a, by ext; exact one_mul _,
96
+ mul_one := λ a, by ext; exact mul_one _,
97
+ ..continuous_map_semigroup,
98
+ ..continuous_map.has_one }
99
+
100
+ @[to_additive continuous_map_add_comm_monoid]
101
+ instance continuous_map_comm_monoid {α : Type *} {β : Type *} [topological_space α]
102
+ [topological_space β] [comm_monoid β] [has_continuous_mul β] : comm_monoid C(α, β) :=
103
+ { one_mul := λ a, by ext; exact one_mul _,
104
+ mul_one := λ a, by ext; exact mul_one _,
105
+ mul_comm := λ a b, by ext; exact mul_comm _ _,
106
+ ..continuous_map_semigroup,
107
+ ..continuous_map.has_one }
108
+
109
+ @[to_additive continuous_map_add_group]
110
+ instance continuous_map_group {α : Type *} {β : Type *} [topological_space α] [topological_space β]
111
+ [group β] [topological_group β] : group C(α, β) :=
112
+ { inv := λ f, ⟨λ x, (f x)⁻¹, continuous_inv.comp f.continuous⟩,
113
+ mul_left_inv := λ a, by ext; exact mul_left_inv _,
114
+ ..continuous_map_monoid }
115
+
116
+ @[to_additive continuous_map_add_comm_group]
117
+ instance continuous_map_comm_group {α : Type *} {β : Type *} [topological_space α] [topological_space β]
118
+ [comm_group β] [topological_group β] : comm_group C(α, β) :=
119
+ { ..continuous_map_group,
120
+ ..continuous_map_comm_monoid }
121
+
122
+ end continuous_map
123
+
60
124
end group_structure
61
125
62
126
section ring_structure
@@ -68,19 +132,47 @@ In this section we show that continuous functions valued in a topological ring `
68
132
the structure of a ring.
69
133
-/
70
134
71
- instance continuous_subring (α : Type u) (R : Type v) [topological_space α] [topological_space R]
135
+ section subtype
136
+
137
+ instance continuous_subring (α : Type *) (R : Type *) [topological_space α] [topological_space R]
72
138
[ring R] [topological_ring R] : is_subring { f : α → R | continuous f } :=
73
139
{ ..continuous_add_subgroup α R,
74
140
..continuous_submonoid α R }.
75
141
76
- instance continuous_ring {α : Type u } {R : Type v } [topological_space α] [topological_space R]
142
+ instance continuous_ring {α : Type * } {R : Type * } [topological_space α] [topological_space R]
77
143
[ring R] [topological_ring R] : ring { f : α → R | continuous f } :=
78
144
@subtype.ring _ _ _ (continuous_subring α R) -- infer_instance doesn't work?!
79
145
80
- instance continuous_comm_ring {α : Type u } {R : Type v } [topological_space α] [topological_space R]
146
+ instance continuous_comm_ring {α : Type * } {R : Type * } [topological_space α] [topological_space R]
81
147
[comm_ring R] [topological_ring R] : comm_ring { f : α → R | continuous f } :=
82
148
@subtype.comm_ring _ _ _ (continuous_subring α R) -- infer_instance doesn't work?!
83
149
150
+ end subtype
151
+
152
+ section continuous_map
153
+
154
+ instance continuous_map_semiring {α : Type *} {β : Type *} [topological_space α] [topological_space β]
155
+ [semiring β] [topological_semiring β] : semiring C(α, β) :=
156
+ { left_distrib := λ a b c, by ext; exact left_distrib _ _ _,
157
+ right_distrib := λ a b c, by ext; exact right_distrib _ _ _,
158
+ zero_mul := λ a, by ext; exact zero_mul _,
159
+ mul_zero := λ a, by ext; exact mul_zero _,
160
+ ..continuous_map_add_comm_monoid,
161
+ ..continuous_map_monoid }
162
+
163
+ instance continuous_map_ring {α : Type *} {β : Type *} [topological_space α] [topological_space β]
164
+ [ring β] [topological_ring β] : ring C(α, β) :=
165
+ { ..continuous_map_semiring,
166
+ ..continuous_map_add_comm_group, }
167
+
168
+ instance continuous_map_comm_ring {α : Type *} {β : Type *} [topological_space α]
169
+ [topological_space β] [comm_ring β] [topological_ring β] : comm_ring C(α, β) :=
170
+ { ..continuous_map_semiring,
171
+ ..continuous_map_add_comm_group,
172
+ ..continuous_map_comm_monoid,}
173
+
174
+ end continuous_map
175
+
84
176
end ring_structure
85
177
86
178
local attribute [ext] subtype.eq
@@ -94,7 +186,9 @@ In this section we show that continuous functions valued in a topological semimo
94
186
topological semiring `R` inherit the structure of a semimodule.
95
187
-/
96
188
97
- instance continuous_has_scalar {α : Type *} [topological_space α]
189
+ section subtype
190
+
191
+ instance coninuous_has_scalar {α : Type *} [topological_space α]
98
192
(R : Type *) [semiring R] [topological_space R]
99
193
(M : Type *) [topological_space M] [add_comm_group M]
100
194
[semimodule R M] [topological_semimodule R M] :
@@ -113,6 +207,31 @@ instance continuous_semimodule {α : Type*} [topological_space α]
113
207
mul_smul := λ c₁ c₂ f, by ext x; exact mul_smul c₁ c₂ (f x),
114
208
one_smul := λ f, by ext x; exact one_smul R (f x) }
115
209
210
+ end subtype
211
+
212
+ section continuous_map
213
+
214
+ instance continuous_map_has_scalar {α : Type *} [topological_space α]
215
+ (R : Type *) [semiring R] [topological_space R]
216
+ (M : Type *) [topological_space M] [add_comm_monoid M]
217
+ [semimodule R M] [topological_semimodule R M] :
218
+ has_scalar R C(α, M) :=
219
+ ⟨λ r f, ⟨r • f, continuous_const.smul f.continuous⟩⟩
220
+
221
+ instance continuous_map_semimodule {α : Type *} [topological_space α]
222
+ {R : Type *} [semiring R] [topological_space R]
223
+ {M : Type *} [topological_space M] [add_comm_group M] [topological_add_group M]
224
+ [semimodule R M] [topological_semimodule R M] :
225
+ semimodule R C(α, M) :=
226
+ semimodule.of_core $
227
+ { smul := (•),
228
+ smul_add := λ c f g, by ext x; exact smul_add c (f x) (g x),
229
+ add_smul := λ c₁ c₂ f, by ext x; exact add_smul c₁ c₂ (f x),
230
+ mul_smul := λ c₁ c₂ f, by ext x; exact mul_smul c₁ c₂ (f x),
231
+ one_smul := λ f, by ext x; exact one_smul R (f x) }
232
+
233
+ end continuous_map
234
+
116
235
end semimodule_structure
117
236
118
237
section algebra_structure
@@ -125,13 +244,15 @@ In this section we show that continuous functions valued in a topological algebr
125
244
obtained by requiring that `A` be both a `topological_semimodule` and a `topological_semiring`
126
245
(by now we require `topological_ring`: see TODO below).-/
127
246
247
+ section subtype
248
+
128
249
variables {α : Type *} [topological_space α]
129
250
{R : Type *} [comm_semiring R]
130
251
{A : Type *} [topological_space A] [ring A]
131
252
[algebra R A] [topological_ring A]
132
253
133
254
/-- Continuous constant functions as a `ring_hom`. -/
134
- def C : R →+* { f : α → A | continuous f } :=
255
+ def continuous. C : R →+* { f : α → A | continuous f } :=
135
256
{ to_fun := λ c : R, ⟨λ x: α, ((algebra_map R A) c), continuous_const⟩,
136
257
map_one' := by ext x; exact (algebra_map R A).map_one,
137
258
map_mul' := λ c₁ c₂, by ext x; exact (algebra_map R A).map_mul _ _,
@@ -141,7 +262,7 @@ def C : R →+* { f : α → A | continuous f } :=
141
262
variables [topological_space R] [topological_semimodule R A]
142
263
143
264
instance : algebra R { f : α → A | continuous f } :=
144
- { to_ring_hom := C,
265
+ { to_ring_hom := continuous. C,
145
266
commutes' := λ c f, by ext x; exact algebra.commutes' _ _,
146
267
smul_def' := λ c f, by ext x; exact algebra.smul_def' _ _,
147
268
..continuous_semimodule,
@@ -153,7 +274,34 @@ no `is_subsemiring` but only `subsemiring`, and it will make sense to change thi
153
274
file will have no more `is_subobject`s but only `subobject`s. It does not make sense to change
154
275
it yet in this direction as `subring` does not exist yet, so everything is being blocked by
155
276
`subring`: afterwards everything will need to be updated to the new conventions of Mathlib.
156
- Then the instance of `topological_ring` can also be removed. -/
277
+ Then the instance of `topological_ring` can also be removed, as it is below for `continuous_map`. -/
278
+
279
+ end subtype
280
+
281
+ section continuous_map
282
+
283
+ variables {α : Type *} [topological_space α]
284
+ {R : Type *} [comm_semiring R]
285
+ {A : Type *} [topological_space A] [semiring A]
286
+ [algebra R A] [topological_semiring A]
287
+
288
+ /-- Continuous constant functions as a `ring_hom`. -/
289
+ def continuous_map.C : R →+* C(α, A) :=
290
+ { to_fun := λ c : R, ⟨λ x: α, ((algebra_map R A) c), continuous_const⟩,
291
+ map_one' := by ext x; exact (algebra_map R A).map_one,
292
+ map_mul' := λ c₁ c₂, by ext x; exact (algebra_map R A).map_mul _ _,
293
+ map_zero' := by ext x; exact (algebra_map R A).map_zero,
294
+ map_add' := λ c₁ c₂, by ext x; exact (algebra_map R A).map_add _ _ }
295
+
296
+ variables [topological_space R] [topological_semimodule R A]
297
+
298
+ instance : algebra R C(α, A) :=
299
+ { to_ring_hom := continuous_map.C,
300
+ commutes' := λ c f, by ext x; exact algebra.commutes' _ _,
301
+ smul_def' := λ c f, by ext x; exact algebra.smul_def' _ _,
302
+ ..continuous_map_semiring }
303
+
304
+ end continuous_map
157
305
158
306
end algebra_structure
159
307
@@ -165,6 +313,8 @@ section module_over_continuous_functions
165
313
If `M` is a module over `R`, then we show that the space of continuous functions from `α` to `M`
166
314
is naturally a module over the algebra of continuous functions from `α` to `M`. -/
167
315
316
+ section subtype
317
+
168
318
instance continuous_has_scalar' {α : Type *} [topological_space α]
169
319
{R : Type *} [semiring R] [topological_space R]
170
320
{M : Type *} [topological_space M] [add_comm_group M]
@@ -184,4 +334,29 @@ instance continuous_module' {α : Type*} [topological_space α]
184
334
mul_smul := λ c₁ c₂ f, by ext x; exact mul_smul (c₁ x) (c₂ x) (f x),
185
335
one_smul := λ f, by ext x; exact one_smul R (f x) }
186
336
337
+ end subtype
338
+
339
+ section continuous_map
340
+
341
+ instance continuous_map_has_scalar' {α : Type *} [topological_space α]
342
+ {R : Type *} [semiring R] [topological_space R]
343
+ {M : Type *} [topological_space M] [add_comm_group M]
344
+ [semimodule R M] [topological_semimodule R M] :
345
+ has_scalar C(α, R) C(α, M) :=
346
+ ⟨λ f g, ⟨λ x, (f x) • (g x), (continuous.smul f.2 g.2 )⟩⟩
347
+
348
+ instance continuous_map_module' {α : Type *} [topological_space α]
349
+ (R : Type *) [ring R] [topological_space R] [topological_ring R]
350
+ (M : Type *) [topological_space M] [add_comm_group M] [topological_add_group M]
351
+ [module R M] [topological_module R M]
352
+ : module C(α, R) C(α, M) :=
353
+ semimodule.of_core $
354
+ { smul := (•),
355
+ smul_add := λ c f g, by ext x; exact smul_add (c x) (f x) (g x),
356
+ add_smul := λ c₁ c₂ f, by ext x; exact add_smul (c₁ x) (c₂ x) (f x),
357
+ mul_smul := λ c₁ c₂ f, by ext x; exact mul_smul (c₁ x) (c₂ x) (f x),
358
+ one_smul := λ f, by ext x; exact one_smul R (f x) }
359
+
360
+ end continuous_map
361
+
187
362
end module_over_continuous_functions
0 commit comments