Skip to content

Commit c3fa85a

Browse files
authored
Metric properties of real negation, absolute value, addition and maximum (#1398)
This PRs proves the following metric properties of real operations: - `raise-ℝ` is an isometry; - `neg-ℝ` is an isometry; - `abs-ℝ` is a short function; - `add-ℝ` is an isometry from `ℝ` to the metric space of isometries `ℝ → ℝ`; - `max-ℝ` is a short function from `ℝ` to the metric space of short functions `ℝ → ℝ`. It also introduces the following concepts: - the metric space of functions between metric spaces; - the metric space of short functions between metric spaces; - the metric space of isometries between metric spaces.
1 parent a9feb0d commit c3fa85a

19 files changed

+1173
-6
lines changed

src/metric-spaces.lagda.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ open import metric-spaces.metric-space-of-cauchy-approximations-metric-spaces pu
7878
open import metric-spaces.metric-space-of-cauchy-approximations-saturated-complete-metric-spaces public
7979
open import metric-spaces.metric-space-of-convergent-cauchy-approximations-metric-spaces public
8080
open import metric-spaces.metric-space-of-convergent-sequences-metric-spaces public
81+
open import metric-spaces.metric-space-of-functions-metric-spaces public
82+
open import metric-spaces.metric-space-of-isometries-metric-spaces public
8183
open import metric-spaces.metric-space-of-rational-numbers public
8284
open import metric-spaces.metric-space-of-rational-numbers-with-open-neighborhoods public
85+
open import metric-spaces.metric-space-of-short-functions-metric-spaces public
8386
open import metric-spaces.metric-spaces public
8487
open import metric-spaces.metric-structures public
8588
open import metric-spaces.monotonic-premetric-structures public

src/metric-spaces/dependent-products-metric-spaces.lagda.md

Lines changed: 115 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ module metric-spaces.dependent-products-metric-spaces where
88

99
```agda
1010
open import foundation.dependent-pair-types
11+
open import foundation.evaluation-functions
1112
open import foundation.function-extensionality
13+
open import foundation.function-types
1214
open import foundation.propositions
1315
open import foundation.sets
1416
open import foundation.universe-levels
1517
18+
open import metric-spaces.cauchy-approximations-metric-spaces
19+
open import metric-spaces.complete-metric-spaces
20+
open import metric-spaces.convergent-cauchy-approximations-metric-spaces
1621
open import metric-spaces.extensional-premetric-structures
22+
open import metric-spaces.limits-of-cauchy-approximations-premetric-spaces
1723
open import metric-spaces.metric-spaces
1824
open import metric-spaces.metric-structures
1925
open import metric-spaces.monotonic-premetric-structures
@@ -126,14 +132,14 @@ module _
126132
is-short-function-Metric-Space
127133
( Π-Metric-Space A P)
128134
( P a)
129-
( λ f → f a)
135+
( ev a)
130136
is-short-ev-Π-Metric-Space ε x y H = H a
131137
132138
short-ev-Π-Metric-Space :
133139
short-function-Metric-Space
134140
( Π-Metric-Space A P)
135141
( P a)
136-
short-ev-Π-Metric-Space = (λ f → f a) , (is-short-ev-Π-Metric-Space)
142+
short-ev-Π-Metric-Space = (ev a) , (is-short-ev-Π-Metric-Space)
137143
```
138144

139145
### Dependent products of saturated metric spaces are saturated
@@ -149,3 +155,110 @@ module _
149155
is-saturated-Π-is-saturated-Metric-Space ε x y H a =
150156
Π-saturated a ε (x a) (y a) (λ d → H d a)
151157
```
158+
159+
### The partial applications of a Cauchy approximation in a dependent product metric space are Cauchy approximations
160+
161+
```agda
162+
module _
163+
{l l1 l2 : Level} (A : UU l) (P : A → Metric-Space l1 l2)
164+
(f : cauchy-approximation-Metric-Space (Π-Metric-Space A P))
165+
where
166+
167+
ev-cauchy-approximation-Π-Metric-Space :
168+
(x : A) → cauchy-approximation-Metric-Space (P x)
169+
ev-cauchy-approximation-Π-Metric-Space x =
170+
map-short-function-cauchy-approximation-Metric-Space
171+
( Π-Metric-Space A P)
172+
( P x)
173+
( short-ev-Π-Metric-Space A P x)
174+
( f)
175+
```
176+
177+
### A dependent map is the limit of a Cauchy approximation in a dependent product of metric spaces if and only if it is the pointwise limit of its partial applications
178+
179+
```agda
180+
module _
181+
{l l1 l2 : Level} (A : UU l) (P : A → Metric-Space l1 l2)
182+
(f : cauchy-approximation-Metric-Space (Π-Metric-Space A P))
183+
(g : type-Π-Metric-Space A P)
184+
where
185+
186+
is-pointwise-limit-is-limit-cauchy-approximation-Π-Metric-Space :
187+
is-limit-cauchy-approximation-Metric-Space
188+
( Π-Metric-Space A P)
189+
( f)
190+
( g) →
191+
(x : A) →
192+
is-limit-cauchy-approximation-Metric-Space
193+
( P x)
194+
( ev-cauchy-approximation-Π-Metric-Space A P f x)
195+
( g x)
196+
is-pointwise-limit-is-limit-cauchy-approximation-Π-Metric-Space L x ε δ =
197+
L ε δ x
198+
199+
is-limit-is-pointwise-limit-cauchy-approximation-Π-Metric-Space :
200+
( (x : A) →
201+
is-limit-cauchy-approximation-Metric-Space
202+
( P x)
203+
( ev-cauchy-approximation-Π-Metric-Space A P f x)
204+
( g x)) →
205+
is-limit-cauchy-approximation-Metric-Space
206+
( Π-Metric-Space A P)
207+
( f)
208+
( g)
209+
is-limit-is-pointwise-limit-cauchy-approximation-Π-Metric-Space L ε δ x =
210+
L x ε δ
211+
```
212+
213+
### A product of complete metric spaces is complete
214+
215+
```agda
216+
module _
217+
{l l1 l2 : Level} (A : UU l) (P : A → Metric-Space l1 l2)
218+
(Π-complete : (x : A) → is-complete-Metric-Space (P x))
219+
where
220+
221+
limit-cauchy-approximation-Π-is-complete-Metric-Space :
222+
cauchy-approximation-Metric-Space (Π-Metric-Space A P) →
223+
type-Π-Metric-Space A P
224+
limit-cauchy-approximation-Π-is-complete-Metric-Space u x =
225+
limit-cauchy-approximation-Complete-Metric-Space
226+
( P x , Π-complete x)
227+
( ev-cauchy-approximation-Π-Metric-Space A P u x)
228+
229+
is-limit-limit-cauchy-approximation-Π-is-complete-Metric-Space :
230+
(u : cauchy-approximation-Metric-Space (Π-Metric-Space A P)) →
231+
is-limit-cauchy-approximation-Metric-Space
232+
( Π-Metric-Space A P)
233+
( u)
234+
( limit-cauchy-approximation-Π-is-complete-Metric-Space u)
235+
is-limit-limit-cauchy-approximation-Π-is-complete-Metric-Space u ε δ x =
236+
is-limit-limit-cauchy-approximation-Complete-Metric-Space
237+
( P x , Π-complete x)
238+
( ev-cauchy-approximation-Π-Metric-Space A P u x)
239+
( ε)
240+
( δ)
241+
242+
is-complete-Π-Metric-Space :
243+
is-complete-Metric-Space (Π-Metric-Space A P)
244+
is-complete-Π-Metric-Space u =
245+
limit-cauchy-approximation-Π-is-complete-Metric-Space u ,
246+
is-limit-limit-cauchy-approximation-Π-is-complete-Metric-Space u
247+
```
248+
249+
### The complete product of complete metric spaces
250+
251+
```agda
252+
module _
253+
{l l1 l2 : Level} (A : UU l) (C : A → Complete-Metric-Space l1 l2)
254+
where
255+
256+
Π-Complete-Metric-Space : Complete-Metric-Space (l ⊔ l1) (l ⊔ l2)
257+
pr1 Π-Complete-Metric-Space =
258+
Π-Metric-Space A (metric-space-Complete-Metric-Space ∘ C)
259+
pr2 Π-Complete-Metric-Space =
260+
is-complete-Π-Metric-Space
261+
( A)
262+
( metric-space-Complete-Metric-Space ∘ C)
263+
( is-complete-metric-space-Complete-Metric-Space ∘ C)
264+
```

src/metric-spaces/isometries-metric-spaces.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ module _
237237
( λ x → refl)
238238
```
239239

240-
### Associatity of composition of isometries between metric spaces
240+
### Associativity of composition of isometries between metric spaces
241241

242242
```agda
243243
module _
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# The metric space of functions between metric spaces
2+
3+
```agda
4+
module metric-spaces.metric-space-of-functions-metric-spaces where
5+
```
6+
7+
<details><summary>Imports</summary>
8+
9+
```agda
10+
open import elementary-number-theory.positive-rational-numbers
11+
12+
open import foundation.dependent-pair-types
13+
open import foundation.universe-levels
14+
15+
open import metric-spaces.cauchy-approximations-metric-spaces
16+
open import metric-spaces.convergent-cauchy-approximations-metric-spaces
17+
open import metric-spaces.dependent-products-metric-spaces
18+
open import metric-spaces.functions-metric-spaces
19+
open import metric-spaces.isometries-metric-spaces
20+
open import metric-spaces.metric-spaces
21+
```
22+
23+
</details>
24+
25+
## Idea
26+
27+
[Functions](metric-spaces.functions-metric-spaces.md) between
28+
[metric spaces](metric-spaces.metric-spaces.md) inherit the
29+
[product metric structure](metric-spaces.dependent-products-metric-spaces.md) of
30+
their codomain. This defines the
31+
{{#concept "metric space of functions between metric spaces" Agda=metric-space-of-functions-Metric-Space}}.
32+
33+
## Definitions
34+
35+
### The metric space of functions between metric spaces
36+
37+
```agda
38+
module _
39+
{l1 l2 l1' l2' : Level}
40+
(A : Metric-Space l1 l2) (B : Metric-Space l1' l2')
41+
where
42+
43+
metric-space-of-functions-Metric-Space : Metric-Space (l1 ⊔ l1') (l1 ⊔ l2')
44+
metric-space-of-functions-Metric-Space =
45+
Π-Metric-Space (type-Metric-Space A) (λ _ → B)
46+
```
47+
48+
## Properties
49+
50+
### The partial applications of a Cauchy approximation of functions form a Cauchy approximation
51+
52+
```agda
53+
module _
54+
{ l1 l2 l1' l2' : Level}
55+
( A : Metric-Space l1 l2) (B : Metric-Space l1' l2')
56+
( f :
57+
cauchy-approximation-Metric-Space
58+
( metric-space-of-functions-Metric-Space A B))
59+
( x : type-Metric-Space A)
60+
where
61+
62+
ev-cauchy-approximation-function-Metric-Space :
63+
cauchy-approximation-Metric-Space B
64+
ev-cauchy-approximation-function-Metric-Space =
65+
ev-cauchy-approximation-Π-Metric-Space
66+
( type-Metric-Space A)
67+
( λ _ → B)
68+
( f)
69+
( x)
70+
```
71+
72+
### A function is the limit of a Cauchy approximation of functions if and only if it is the pointwise limit of its partial applications
73+
74+
```agda
75+
module _
76+
{ l1 l2 l1' l2' : Level}
77+
( A : Metric-Space l1 l2) (B : Metric-Space l1' l2')
78+
( f :
79+
cauchy-approximation-Metric-Space
80+
( metric-space-of-functions-Metric-Space A B))
81+
( g : map-type-Metric-Space A B)
82+
where
83+
84+
is-pointwise-limit-is-limit-cauchy-approximation-function-Metric-Space :
85+
is-limit-cauchy-approximation-Metric-Space
86+
( metric-space-of-functions-Metric-Space A B)
87+
( f)
88+
( g) →
89+
(x : type-Metric-Space A) →
90+
is-limit-cauchy-approximation-Metric-Space
91+
( B)
92+
( ev-cauchy-approximation-function-Metric-Space A B f x)
93+
( g x)
94+
is-pointwise-limit-is-limit-cauchy-approximation-function-Metric-Space =
95+
is-pointwise-limit-is-limit-cauchy-approximation-Π-Metric-Space
96+
( type-Metric-Space A)
97+
( λ _ → B)
98+
( f)
99+
( g)
100+
101+
is-limit-is-pointwise-limit-cauchy-approximation-function-Metric-Space :
102+
( (x : type-Metric-Space A) →
103+
is-limit-cauchy-approximation-Metric-Space
104+
( B)
105+
( ev-cauchy-approximation-function-Metric-Space A B f x)
106+
( g x)) →
107+
is-limit-cauchy-approximation-Metric-Space
108+
( metric-space-of-functions-Metric-Space A B)
109+
( f)
110+
( g)
111+
is-limit-is-pointwise-limit-cauchy-approximation-function-Metric-Space =
112+
is-limit-is-pointwise-limit-cauchy-approximation-Π-Metric-Space
113+
( type-Metric-Space A)
114+
( λ _ → B)
115+
( f)
116+
( g)
117+
```
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# The metric space of isometries between metric spaces
2+
3+
```agda
4+
module metric-spaces.metric-space-of-isometries-metric-spaces where
5+
```
6+
7+
<details><summary>Imports</summary>
8+
9+
```agda
10+
open import foundation.universe-levels
11+
12+
open import metric-spaces.isometries-metric-spaces
13+
open import metric-spaces.metric-space-of-functions-metric-spaces
14+
open import metric-spaces.metric-spaces
15+
open import metric-spaces.subspaces-metric-spaces
16+
```
17+
18+
</details>
19+
20+
## Idea
21+
22+
[Isometries](metric-spaces.isometries-metric-spaces.md) between
23+
[metric spaces](metric-spaces.metric-spaces.md) inherit the
24+
[metric subspace](metric-spaces.subspaces-metric-spaces.md) structure of the
25+
[function metric space](metric-spaces.metric-space-of-functions-metric-spaces.md).
26+
This defines the
27+
{{#concept "metric space of isometries between metric spaces" Agda=metric-space-of-isometries-Metric-Space}}.
28+
29+
## Definitions
30+
31+
### The metric space of isometries between metric spaces
32+
33+
```agda
34+
module _
35+
{l1 l2 l1' l2' : Level}
36+
(A : Metric-Space l1 l2) (B : Metric-Space l1' l2')
37+
where
38+
39+
metric-space-of-isometries-Metric-Space :
40+
Metric-Space (l1 ⊔ l2 ⊔ l1' ⊔ l2') (l1 ⊔ l2')
41+
metric-space-of-isometries-Metric-Space =
42+
subspace-Metric-Space
43+
( metric-space-of-functions-Metric-Space A B)
44+
( is-isometry-prop-Metric-Space A B)
45+
```
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# The metric space of short functions between metric spaces
2+
3+
```agda
4+
module metric-spaces.metric-space-of-short-functions-metric-spaces where
5+
```
6+
7+
<details><summary>Imports</summary>
8+
9+
```agda
10+
open import foundation.universe-levels
11+
12+
open import metric-spaces.metric-space-of-functions-metric-spaces
13+
open import metric-spaces.metric-spaces
14+
open import metric-spaces.short-functions-metric-spaces
15+
open import metric-spaces.subspaces-metric-spaces
16+
```
17+
18+
</details>
19+
20+
## Idea
21+
22+
[Short functions](metric-spaces.short-functions-metric-spaces.md) between
23+
[metric spaces](metric-spaces.metric-spaces.md) inherit the
24+
[metric subspace](metric-spaces.subspaces-metric-spaces.md) structure of the
25+
[function metric space](metric-spaces.metric-space-of-functions-metric-spaces.md).
26+
This defines the
27+
{{#concept "metric space of short functions between metric spaces" Agda=metric-space-of-short-functions-Metric-Space}}.
28+
29+
## Definitions
30+
31+
### The metric space of short functions between metric spaces
32+
33+
```agda
34+
module _
35+
{l1 l2 l1' l2' : Level}
36+
(A : Metric-Space l1 l2) (B : Metric-Space l1' l2')
37+
where
38+
39+
metric-space-of-short-functions-Metric-Space :
40+
Metric-Space (l1 ⊔ l2 ⊔ l1' ⊔ l2') (l1 ⊔ l2')
41+
metric-space-of-short-functions-Metric-Space =
42+
subspace-Metric-Space
43+
( metric-space-of-functions-Metric-Space A B)
44+
( is-short-function-prop-Metric-Space A B)
45+
```

0 commit comments

Comments
 (0)