definition example

Let be a Set and its Power Set. A topology on is a subset , whose elements are called open sets, such that

(a) whole set: ; (b) binary intersections: ; (c) arbitrary unions: for any family of opens, ; with this says .

If we say covers (an open cover). A topological space is a pair . A continuous function is a function with for every . Spaces and continuous maps form the category .

Sources: 7 Sketches §7.3.2, Definition 7.25, Examples 7.26, 7.28, 7.30, Exercises 7.27, 7.29, 7.31, 7.32, 7.34, Remark 7.33; CTfS §3.4.4.8 (basic open sets, Example 3.4.4.9, Exercises 3.4.4.10–3.4.4.12), Example 4.2.3.1, Exercise 4.2.3.2, Example 4.2.3.3

Examples

  • Metric spaces (Example 7.26): in (or any Metric Space) the -ball is ; is open iff every has some . On : ; and cover ; is an infinite cover (7S Exercise 7.27).
  • Coarse and discrete (Example 7.28): has the fewest opens; the most — the discrete space, from which every function is continuous (7S Exercise 7.29).
  • Sierpiński space (Example 7.30): with (or the isomorphic ); the two remaining topologies on are coarse and discrete. See Sierpinski Space.
  • Subspace topology (7S Exercise 7.32): for , is open iff for some ; the inclusion is then continuous.
  • The Interval Domain , the site of the Topos of Behavior Types.

Spaces in Category Theory for Scientists

CTfS introduces open sets through basic open sets — interiors of closed curves such as circles, ellipses or kidney beans — and unions of them: the half-plane is the union of the open unit squares with upper-left corner , (CTfS Example 3.4.4.9). “On the earth one could define a basic open set to be the interior of any region one can draw a circle around.” A topology is a sub-order closed under finite meets and arbitrary joins; continuity says preimage restricts to , so “looking at points” is a functor while “looking at open sets” is a functor (CTfS Exercise 4.2.3.2). Assigning to each region the interval of recorded temperatures is a monotone map preserving joins but not meets (Join); a functor from the topological monoid to is a continuous dynamical system (CTfS Example 4.2.3.3); paths up to homotopy form the fundamental Groupoid.

The preorder of open sets

is a Preorder (indeed a Partial Order), hence a Category: one morphism iff . A Presheaf on assigns sets of sections to opens with restriction maps; a Sheaf is a presheaf respecting covers. Moreover is a Quantale (Remark 7.33) and a Heyting Algebra: a -enriched category has “size restrictions” like bridges a truck must fit under (7S Exercise 7.34).

Docs: ThThinCategory (GATlab) · Theories & presentations

# a finite topology as a set of BitSets, and the axioms checked by brute force
X = 1:2
Op1 = Set([BitSet(), BitSet([1]), BitSet([1, 2])])        # Sierpiński
istopology(X, Op) = BitSet(X) in Op && BitSet() in Op &&
  all(union(U, V) in Op && intersect(U, V) in Op for U in Op, V in Op)
istopology(X, Op1)                                        # true
istopology(X, Set([BitSet(), BitSet([1]), BitSet([2])]))  # false: missing the whole set

Catlab version (run in a fresh Julia session — Catlab exports its own compose, id, FinFunction, …):

# in Catlab the poset Op is a thin category; e.g. Sierpiński as a FreePreorder presentation
using Catlab
@present Op1Cat(FreePreorder) begin (∅, U, X)::El; a::Leq(∅, U); b::Leq(U, X) end
import Mathlib
#check @TopologicalSpace              -- class: IsOpen, isOpen_univ, isOpen_inter, isOpen_sUnion
#check @Continuous                    -- ∀ U, IsOpen U → IsOpen (f ⁻¹' U)
#check @TopologicalSpace.Opens        -- the poset (frame) of open sets
#check @sierpinskiSpace               -- TopologicalSpace Prop
#check @instTopologicalSpaceSubtype   -- subspace topology
#check @Metric.isOpen_iff             -- ε-ball characterization
import qualified Data.Set as S
type Topology a = S.Set (S.Set a)
isTopology :: Ord a => S.Set a -> Topology a -> Bool
isTopology x op = S.member x op && S.member S.empty op
  && and [ S.member (S.union u v) op && S.member (S.intersection u v) op | u <- S.toList op, v <- S.toList op ]