-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continuity of functions between metric spaces #1375
base: master
Are you sure you want to change the base?
Changes from all commits
2ad7f83
ddef440
51c1776
be2f877
4f18f03
9f79b8b
31c01ce
65508c3
9e240b9
10fb3cb
1bd5ca4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,70 @@ | ||||||
# Continuous functions between metric spaces | ||||||
|
||||||
```agda | ||||||
module metric-spaces.continuous-functions-metric-spaces where | ||||||
``` | ||||||
|
||||||
<details><summary>Imports</summary> | ||||||
|
||||||
```agda | ||||||
open import elementary-number-theory.positive-rational-numbers | ||||||
|
||||||
open import foundation.dependent-pair-types | ||||||
open import foundation.existential-quantification | ||||||
open import foundation.inhabited-subtypes | ||||||
open import foundation.propositional-truncations | ||||||
open import foundation.propositions | ||||||
open import foundation.subtypes | ||||||
open import foundation.universe-levels | ||||||
|
||||||
open import metric-spaces.functions-metric-spaces | ||||||
open import metric-spaces.metric-spaces | ||||||
``` | ||||||
|
||||||
</details> | ||||||
|
||||||
## Idea | ||||||
|
||||||
A [function](metric-spaces.functions-metric-spaces.md) `f` between | ||||||
[metric spaces](metric-spaces.metric-spaces.md) `X` and `Y` is | ||||||
{{#concept "continuous" WDID=Q170058 WD="continuous function"}} at a point `x` | ||||||
if there exists a function `m : ℚ⁺ → ℚ⁺` such that whenever `x'` is in an | ||||||
`m ε`-neighborhood of `x`, `f x'` is in an `ε`-neighborhood of `f x`. `m` is | ||||||
called a modulus of continuity of `f` at `x`. | ||||||
|
||||||
## Definitions | ||||||
|
||||||
```agda | ||||||
module _ | ||||||
{l1 l2 l3 l4 : Level} (X : Metric-Space l1 l2) (Y : Metric-Space l3 l4) | ||||||
(f : map-type-Metric-Space X Y) | ||||||
where | ||||||
|
||||||
modulus-of-continuity-at-point-Metric-Space-Prop : | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
(x : type-Metric-Space X) → (ℚ⁺ → ℚ⁺) → Prop (l1 ⊔ l2 ⊔ l4) | ||||||
modulus-of-continuity-at-point-Metric-Space-Prop x m = | ||||||
Π-Prop | ||||||
( ℚ⁺) | ||||||
( λ ε → | ||||||
Π-Prop | ||||||
( type-Metric-Space X) | ||||||
( λ x' → | ||||||
structure-Metric-Space X (m ε) x x' ⇒ | ||||||
structure-Metric-Space Y ε (f x) (f x'))) | ||||||
|
||||||
modulus-of-continuity-at-point-Metric-Space : | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
(x : type-Metric-Space X) → UU (l1 ⊔ l2 ⊔ l4) | ||||||
modulus-of-continuity-at-point-Metric-Space x = | ||||||
type-subtype (modulus-of-continuity-at-point-Metric-Space-Prop x) | ||||||
|
||||||
continuous-at-point-Metric-Space-Prop : | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
(x : type-Metric-Space X) → Prop (l1 ⊔ l2 ⊔ l4) | ||||||
continuous-at-point-Metric-Space-Prop x = | ||||||
is-inhabited-subtype-Prop | ||||||
(modulus-of-continuity-at-point-Metric-Space-Prop x) | ||||||
|
||||||
is-continuous-at-point-Metric-Space : | ||||||
(x : type-Metric-Space X) → UU (l1 ⊔ l2 ⊔ l4) | ||||||
is-continuous-at-point-Metric-Space x = | ||||||
type-Prop (continuous-at-point-Metric-Space-Prop x) | ||||||
``` |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be productive to define the concepts of continuity also for premetric spaces. Maybe @malarbol has an opinion on the extent to which premetrics are relevant aside from as a predecessor concept to metrics? |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,111 @@ | ||||||||||||||||||||||||||
# Uniformly continuous functions between metric spaces | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```agda | ||||||||||||||||||||||||||
module metric-spaces.uniformly-continuous-functions-metric-spaces where | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
<details><summary>Imports</summary> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```agda | ||||||||||||||||||||||||||
open import elementary-number-theory.positive-rational-numbers | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
open import foundation.dependent-pair-types | ||||||||||||||||||||||||||
open import foundation.existential-quantification | ||||||||||||||||||||||||||
open import foundation.function-types | ||||||||||||||||||||||||||
open import foundation.inhabited-subtypes | ||||||||||||||||||||||||||
open import foundation.propositional-truncations | ||||||||||||||||||||||||||
open import foundation.propositions | ||||||||||||||||||||||||||
open import foundation.subtypes | ||||||||||||||||||||||||||
open import foundation.universe-levels | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
open import metric-spaces.continuous-functions-metric-spaces | ||||||||||||||||||||||||||
open import metric-spaces.functions-metric-spaces | ||||||||||||||||||||||||||
open import metric-spaces.metric-spaces | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
</details> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Idea | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
A [function](metric-spaces.functions-metric-spaces.md) `f` between | ||||||||||||||||||||||||||
[metric spaces](metric-spaces.metric-spaces.md) `X` and `Y` is | ||||||||||||||||||||||||||
{{#concept "uniformly continuous" WDID=Q170058 WD="continuous function"}} if | ||||||||||||||||||||||||||
there exists a function `m : ℚ⁺ → ℚ⁺` such that for any `x : X`, whenever `x'` | ||||||||||||||||||||||||||
is in an `m ε`-neighborhood of `x`, `f x'` is in an `ε`-neighborhood of `f x`. | ||||||||||||||||||||||||||
The function `m` is called a modulus of uniform continuity of `f`. | ||||||||||||||||||||||||||
Comment on lines
+30
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this instance there was a more accurate wikidata identifier to assign to the concept.
Suggested change
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Definitions | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```agda | ||||||||||||||||||||||||||
module _ | ||||||||||||||||||||||||||
{l1 l2 l3 l4 : Level} (X : Metric-Space l1 l2) (Y : Metric-Space l3 l4) | ||||||||||||||||||||||||||
(f : map-type-Metric-Space X Y) | ||||||||||||||||||||||||||
where | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
modulus-of-uniform-continuity-Metric-Space-Prop : | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The naming convention you're using here is outdated and we now prefer the following.
Suggested change
See #793 for details. |
||||||||||||||||||||||||||
(ℚ⁺ → ℚ⁺) → Prop (l1 ⊔ l2 ⊔ l4) | ||||||||||||||||||||||||||
modulus-of-uniform-continuity-Metric-Space-Prop m = | ||||||||||||||||||||||||||
Π-Prop | ||||||||||||||||||||||||||
( type-Metric-Space X) | ||||||||||||||||||||||||||
( λ x → modulus-of-continuity-at-point-Metric-Space-Prop X Y f x m) | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
uniformly-continuous-Metric-Space-Prop : Prop (l1 ⊔ l2 ⊔ l4) | ||||||||||||||||||||||||||
uniformly-continuous-Metric-Space-Prop = | ||||||||||||||||||||||||||
is-inhabited-subtype-Prop modulus-of-uniform-continuity-Metric-Space-Prop | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
is-uniformly-continuous-map-Metric-Space : UU (l1 ⊔ l2 ⊔ l4) | ||||||||||||||||||||||||||
is-uniformly-continuous-map-Metric-Space = | ||||||||||||||||||||||||||
type-Prop uniformly-continuous-Metric-Space-Prop | ||||||||||||||||||||||||||
Comment on lines
+52
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
is-continuous-at-point-is-uniformly-continuous-map-Metric-Space : | ||||||||||||||||||||||||||
is-uniformly-continuous-map-Metric-Space → (x : type-Metric-Space X) → | ||||||||||||||||||||||||||
is-continuous-at-point-Metric-Space X Y f x | ||||||||||||||||||||||||||
is-continuous-at-point-is-uniformly-continuous-map-Metric-Space H x = | ||||||||||||||||||||||||||
do | ||||||||||||||||||||||||||
m , is-modulus-uniform-m ← H | ||||||||||||||||||||||||||
intro-exists m (is-modulus-uniform-m x) | ||||||||||||||||||||||||||
where | ||||||||||||||||||||||||||
open do-syntax-trunc-Prop (continuous-at-point-Metric-Space-Prop X Y f x) | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Properties | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
### The identity function is uniformly continuous | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```agda | ||||||||||||||||||||||||||
module _ | ||||||||||||||||||||||||||
{l1 l2 : Level} (X : Metric-Space l1 l2) | ||||||||||||||||||||||||||
where | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
uniformly-continuous-id-Metric-Space : | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
is-uniformly-continuous-map-Metric-Space X X id | ||||||||||||||||||||||||||
uniformly-continuous-id-Metric-Space = intro-exists id (λ _ _ _ → id) | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
### The composition of uniformly continuous functions is uniformly continuous | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```agda | ||||||||||||||||||||||||||
module _ | ||||||||||||||||||||||||||
{l1 l2 l3 l4 l5 l6 : Level} | ||||||||||||||||||||||||||
(X : Metric-Space l1 l2) (Y : Metric-Space l3 l4) (Z : Metric-Space l5 l6) | ||||||||||||||||||||||||||
(f : map-type-Metric-Space Y Z) (g : map-type-Metric-Space X Y) | ||||||||||||||||||||||||||
where | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
uniformly-continuous-comp-uniformly-continuous-Metric-Space : | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
is-uniformly-continuous-map-Metric-Space Y Z f → | ||||||||||||||||||||||||||
is-uniformly-continuous-map-Metric-Space X Y g → | ||||||||||||||||||||||||||
is-uniformly-continuous-map-Metric-Space X Z (f ∘ g) | ||||||||||||||||||||||||||
uniformly-continuous-comp-uniformly-continuous-Metric-Space H K = | ||||||||||||||||||||||||||
do | ||||||||||||||||||||||||||
mf , is-modulus-uniform-mf ← H | ||||||||||||||||||||||||||
mg , is-modulus-uniform-mg ← K | ||||||||||||||||||||||||||
intro-exists | ||||||||||||||||||||||||||
( mg ∘ mf) | ||||||||||||||||||||||||||
( λ x ε x' → | ||||||||||||||||||||||||||
is-modulus-uniform-mf (g x) ε (g x') ∘ | ||||||||||||||||||||||||||
is-modulus-uniform-mg x (mf ε) x') | ||||||||||||||||||||||||||
where | ||||||||||||||||||||||||||
open | ||||||||||||||||||||||||||
do-syntax-trunc-Prop | ||||||||||||||||||||||||||
( uniformly-continuous-Metric-Space-Prop X Z (f ∘ g)) | ||||||||||||||||||||||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wikidata id is for general continuous functions though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks, that was meant for a disambiguation