Skip to content

Instantly share code, notes, and snippets.

@k-bx
Created September 24, 2019 17:48
Show Gist options
  • Save k-bx/2d80ff77627d8cc98231db89e6499277 to your computer and use it in GitHub Desktop.
Save k-bx/2d80ff77627d8cc98231db89e6499277 to your computer and use it in GitHub Desktop.
module Topology where
open import Data.Product public using (Σ; Σ-syntax; _×_; _,_; proj₁; proj₂; map₁; map₂)
-- Goal: encode the notion of Topology:
--
-- Let X be a non-empty set. A set τ of subsets of X
-- is said to be a topolgy on X if:
--
-- 1. X and the empty set, Ø, belong to τ
-- 2. The union of any (finite or infinite) number of sets
-- in τ belongs to τ
-- 3. The intersection of any two sets in τ belongs to τ
--
-- The pair (X,τ) is called a topological space.
-- We can express a notion of a set `{ x : A | P(x) }`
-- as `Σ[ x ∈ A ] (P x)` (with notion that P is mere
-- proposition in mind).
-- So first, a set of all subsets of a type is:
allSubsets :
∀ (P : Set → Set)
→ ∀ (X : Set)
→ ∀ (τ : Set₁)
→ (∀ (T : τ) → Σ[ t ∈ T ] (P t))
allSubsets = ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment