\begin{code}
{-# OPTIONS --without-K #-}
module UsingNotNotFunext.Space.Space where
open import Preliminaries.SetsAndFunctions hiding (_+_)
open import Preliminaries.NaturalNumber
open import Preliminaries.Boolean
open import Preliminaries.Sequence
open import Continuity.UniformContinuity
open import UsingNotNotFunext.Space.Coverage
open import UsingNotNotFunext.NotNot
\end{code}
\begin{code}
probe-axioms : (X : Set) → Subset(₂ℕ → X) → Set
probe-axioms X P =
(∀(x : X) → (λ α → x) ∈ P)
× (∀(t : ₂ℕ → ₂ℕ) → t ∈ C → ∀(p : ₂ℕ → X) → p ∈ P → p ∘ t ∈ P)
× (∀(p : ₂ℕ → X) → (Σ \(n : ℕ) → ∀(s : ₂Fin n) → (p ∘ (cons s)) ∈ P) → p ∈ P)
× (∀(p p' : ₂ℕ → X) → p ∈ P → (∀(α : ₂ℕ) → ¬¬ p α ≡ p' α) → p' ∈ P)
TopologyOn : Set → Set₁
TopologyOn X = Σ \(P : Subset(₂ℕ → X)) → probe-axioms X P
Space : Set₁
Space = Σ \(X : Set) → TopologyOn X
U : Space → Set
U = pr₁
Probe : (X : Space) → Subset(₂ℕ → U X)
Probe X = pr₁ (pr₂ X)
cond₀ : (X : Space) →
∀(x : U X) → (λ α → x) ∈ Probe X
cond₀ (_ , _ , c₀ , _) = c₀
cond₁ : (X : Space) →
∀(t : ₂ℕ → ₂ℕ) → t ∈ C → ∀(p : ₂ℕ → U X) → p ∈ Probe X →
p ∘ t ∈ Probe X
cond₁ (_ , _ , _ , c₁ , _) = c₁
cond₂ : (X : Space) →
∀(p : ₂ℕ → U X) → (Σ \(n : ℕ) → ∀(s : ₂Fin n) → p ∘ (cons s) ∈ Probe X) →
p ∈ Probe X
cond₂ (_ , _ , _ , _ , c₂ , _) = c₂
cond₃ : (X : Space) →
∀(p p' : ₂ℕ → U X) → p ∈ Probe X → (∀ α → ¬¬ p α ≡ p' α) → p' ∈ Probe X
cond₃ (_ , _ , _ , _ , _ , c₃) = c₃
\end{code}
\begin{code}
continuous : (X Y : Space) → (U X → U Y) → Set
continuous X Y f = ∀ p → p ∈ Probe X → f ∘ p ∈ Probe Y
Map : Space → Space → Set
Map X Y = Σ \(f : U X → U Y) → continuous X Y f
Mapto : (Y : Space) → Set₁
Mapto Y = Σ \(X : Space) → Map X Y
id-is-continuous : ∀{X : Space} → continuous X X id
id-is-continuous p pinP = pinP
∘-preserves-continuity : (X Y Z : Space) →
∀(f : U X → U Y) → continuous X Y f →
∀(g : U Y → U Z) → continuous Y Z g →
continuous X Z (g ∘ f)
∘-preserves-continuity X Y Z f cf g cg p pP = cg (f ∘ p) (cf p pP)
continuous-constant : (X Y : Space) → U Y → Map X Y
continuous-constant X Y y = (λ _ → y) , (λ _ _ → cond₀ Y y)
⟪_,_,_⟫_○_ : (X Y Z : Space) → Map Y Z → Map X Y → Map X Z
⟪ X , Y , Z ⟫ (g , cg) ○ (f , cf) = (g ∘ f) , λ p pP → cg (f ∘ p) (cf p pP)
\end{code}