Skip to main content

Topological Space Ontology

Topology
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 12 September 2026
Audio Overview
AI INTERPRETATION NOTE
This Flow Algebra defines the mathematical ontology of topological spaces within the Kireth Research Semantic Library. A topological space is a set equipped with a topology: a collection of subsets containing the empty set and the whole set, closed under arbitrary unions and finite intersections. This ontology supports open and closed sets, neighbourhoods, interiors, closures, boundaries, bases, subbases, continuity, convergence, compactness, connectedness, separation axioms and relationships with metric spaces, manifolds and general topology.

FLOW_ALGEBRA_RECORD {

METADATA {
 FLOW_NAME = "Topological Space Ontology"
 FLOW_TYPE = "Mathematical Ontology"
 DOMAIN = "Mathematics"
 SUBDOMAIN = "Geometry"
 SPECIALISATION = "Topology / Topological Spaces"
 CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/geometry-ontologies/topology/topological-space-ontology.html"
 LANGUAGE = "en-GB"
 VERSION = "1.0"
 STATUS = "active"
}

IDENTITY {
 PRIMARY_ENTITY = TopologicalSpace
 SYMBOLIC_FORMS = [
  "(X,T)",
  "T subset P(X)"
 ]
 ENTITY_CLASS = SetWithTopology
 PRIMARY_CONTEXT = Topology
 DEFINITION = "A topological space is a pair (X,T) consisting of a set X and a topology T on X."
 SEMANTIC_ROLE = "Provides the fundamental space object for open-set structure, continuity, convergence, compactness, connectedness, separation and manifold foundations."
}

SCOPE {
 INCLUDE = [
  TopologicalSpace,
  UnderlyingSet,
  Topology,
  OpenSet,
  ClosedSet,
  Neighbourhood,
  Interior,
  Closure,
  Boundary,
  LimitPoint,
  DenseSet,
  Basis,
  Subbasis,
  ContinuousMap,
  Homeomorphism,
  Compactness,
  Connectedness,
  PathConnectedness,
  SeparationAxiom,
  HausdorffSpace,
  FirstCountableSpace,
  SecondCountableSpace,
  SubspaceTopology,
  ProductTopology,
  QuotientTopology
 ]

 EXCLUDE_AS_PRIMARY = [
  BareSetWithoutTopology,
  MetricSpaceWithoutTopologicalInterpretation,
  SmoothManifoldStructureUnlessExplicit,
  MeasureSpaceWithoutTopologicalStructure
 ]

 DISAMBIGUATION_RULE =
  "When a space is described by a set together with open subsets, neighbourhoods, continuity, compactness, connectedness or separation properties, interpret it as a topological space."
}

CORE_CONCEPTS {

 TopologicalSpace {
  definition = "A pair (X,T) where T is a topology on X."
 }

 UnderlyingSet {
  symbol = "X"
  definition = "The set whose subsets form the topology."
 }

 Topology {
  symbol = "T"
  definition = "A family of subsets satisfying the topology axioms."
 }

 OpenSet {
  definition = "A subset U of X with U in T."
 }

 ClosedSet {
  definition = "A subset whose complement in X is open."
 }

 Neighbourhood {
  definition = "A set containing an open set that contains the specified point."
 }

 Interior {
  definition = "The largest open subset contained in a set."
 }

 Closure {
  definition = "The smallest closed set containing a set."
 }

 Boundary {
  definition = "The closure of a set minus its interior."
 }

 Basis {
  definition = "A family of open sets whose unions generate the topology."
 }

 Subbasis {
  definition = "A family whose finite intersections generate a basis."
 }

 ContinuousMap {
  definition = "A map whose inverse image of every open set is open."
 }

 Homeomorphism {
  definition = "A bijective continuous map with continuous inverse."
 }
}

RELATIONS {
 TopologicalSpace --has--> UnderlyingSet
 TopologicalSpace --has--> Topology
 Topology --contains--> OpenSet
 ClosedSet --is_complement_of--> OpenSet
 Neighbourhood --contains--> OpenSet
 Interior --is_subset_of--> Set
 Closure --contains--> Set
 Boundary --derived_from--> Closure
 Boundary --derived_from--> Interior
 Basis --generates--> Topology
 Subbasis --generates--> Basis
 ContinuousMap --maps_between--> TopologicalSpace
 Homeomorphism --is_special_case_of--> ContinuousMap
 Compactness --is_property_of--> TopologicalSpace
 Connectedness --is_property_of--> TopologicalSpace
 PathConnectedness --implies--> Connectedness
 HausdorffSpace --is_special_case_of--> TopologicalSpace
 MetricSpace --induces--> TopologicalSpace
 Manifold --is_special_case_of--> TopologicalSpace
}

OPERATORS {
 IS_TOPOLOGICAL_SPACE(X,T) :=
  IS_TOPOLOGY(X,T)

 IS_TOPOLOGY(X,T) :=
  empty_set_in_T
  AND X_in_T
  AND arbitrary_unions_of_T_members_in_T
  AND finite_intersections_of_T_members_in_T

 IS_OPEN(U,T) :=
  U_in_T

 IS_CLOSED(A,X,T) :=
  (X\A)_in_T

 INTERIOR(A,T) :=
  union_of_all_open_U_with_U_subset_A

 CLOSURE(A,T) :=
  intersection_of_all_closed_C_with_A_subset_C

 BOUNDARY(A,T) :=
  CLOSURE(A,T) minus INTERIOR(A,T)

 IS_DENSE(A,X,T) :=
  CLOSURE(A,T)=X

 IS_CONTINUOUS(f,X,Y) :=
  for_every_open_V_in_Y inverse_image(f,V)_is_open_in_X

 IS_HOMEOMORPHISM(f) :=
  f_bijective
  AND f_continuous
  AND inverse(f)_continuous
}

DEFINITIONS {
 D1 = "A topological space is a set equipped with a topology."
 D2 = "The empty set and whole underlying set are open."
 D3 = "Arbitrary unions of open sets are open."
 D4 = "Finite intersections of open sets are open."
 D5 = "Closed sets are complements of open sets."
 D6 = "Interior and closure depend on the ambient topology."
 D7 = "Continuity depends on source and target topologies."
 D8 = "Homeomorphisms identify topologically equivalent spaces."
 D9 = "Compactness and connectedness are topological properties."
 D10 = "Separation axioms refine the class of topological spaces."
}

AXIOMS {
 A1_EMPTY_AND_WHOLE:
  empty_set in T AND X in T

 A2_ARBITRARY_UNION:
  For any family {U_i} subset T, union_i U_i belongs to T

 A3_FINITE_INTERSECTION:
  For any finite family U_1,...,U_n in T, intersection_i U_i belongs to T

 A4_CLOSED_COMPLEMENT:
  A is closed iff X\A is open

 A5_CONTINUITY:
  f:X->Y is continuous iff inverse images of open sets in Y are open in X

 A6_HOMEOMORPHISM:
  Homeomorphisms preserve topological properties

 A7_SUBSPACE:
  The subspace topology on A subset X is {A∩U | U open in X}

 A8_PRODUCT:
  Product topology is generated by products of open sets
}

REASONING {

 R1_SPACE_VALIDATION {
  INPUT = [X,T]
  TEST = topology_axioms
  IF valid
   RETURN TopologicalSpace
  ELSE
   RETURN InvalidTopologicalStructure
 }

 R2_OPEN_CLOSED_STATUS {
  INPUT = subset_A
  TEST = A_in_T
  TEST = complement_in_T
  RETURN = OpenClosedBothOrNeither
 }

 R3_INTERIOR_CLOSURE_BOUNDARY {
  INPUT = subset_A
  COMPUTE = interior
  COMPUTE = closure
  COMPUTE = boundary
  RETURN = requested_result
 }

 R4_BASIS_REASONING {
  INPUT = candidate_basis_B
  TEST = every_point_has_basis_neighbourhood
  TEST = basis_intersection_refinement
  IF valid
   GENERATE = topology_from_unions
  RETURN = basis_status_and_topology
 }

 R5_CONTINUITY {
  INPUT = [f,X,Y]
  TEST = inverse_images_of_open_sets
  RETURN = ContinuousOrNot
 }

 R6_HOMEOMORPHISM {
  INPUT = f
  TEST = bijectivity
  TEST = continuity
  TEST = inverse_continuity
  RETURN = HomeomorphismOrNot
 }

 R7_COMPACTNESS {
  INPUT = topological_space
  TEST = open_cover_finite_subcover_property
  RETURN = CompactOrNot
 }

 R8_CONNECTEDNESS {
  INPUT = topological_space
  TEST = existence_of_separation
  RETURN = ConnectedOrDisconnected
 }

 R9_SEPARATION {
  INPUT = topological_space
  TEST = requested_T0_T1_T2_or_higher_condition
  RETURN = separation_status
 }
}

CONSTRAINTS {
 C1 = "The same underlying set may carry different topologies."
 C2 = "Open and closed are relative to a topology."
 C3 = "A subset can be both open and closed."
 C4 = "A subset can be neither open nor closed."
 C5 = "Interior, closure and boundary depend on the ambient space."
 C6 = "Continuity requires both source and target topologies."
 C7 = "Compactness is not generally equivalent to closed-and-bounded."
 C8 = "Connectedness does not imply path connectedness."
 C9 = "First- and second-countability are additional properties, not topology axioms."
 C10 = "Metric-generated topology is only one class of topological spaces."
}

SEMANTIC_EQUIVALENCE {
 "TopologicalSpace" <=> "SetWithSpecifiedTopology"
 "UnderlyingSet" <=> "CarrierSet"
 "Homeomorphism" <=> "TopologicalEquivalence"
 "Interior" <=> "LargestOpenSubset"
 "Closure" <=> "SmallestClosedSuperset"
 "Boundary" <=> "ClosureMinusInterior"
}

VALIDATION {
 V1 = "Topology contains empty set."
 V2 = "Topology contains whole underlying set."
 V3 = "Arbitrary unions remain open."
 V4 = "Finite intersections remain open."
 V5 = "Closed-set complements are relative to X."
 V6 = "Continuity uses inverse images."
 V7 = "Homeomorphism includes continuous inverse."
 V8 = "Compactness and connectedness use the declared topology."
 V9 = "Subspace topology uses intersections with ambient open sets."
}

CONFIDENCE {
 BASE_CONFIDENCE = 0.99
 TOPOLOGICAL_SPACE_DEFINITION = 0.99
 TOPOLOGY_VALIDATION = 0.99
 OPEN_CLOSED_REASONING = 0.99
 BASIS_REASONING = 0.99
 CONTINUITY_REASONING = 0.99
 HOMEOMORPHISM_REASONING = 0.99
 COMPACTNESS_REASONING = 0.98
 CONNECTEDNESS_REASONING = 0.99

 POLICY =
  "Reduce confidence when topology, ambient space, source/target structures, separation assumptions or metric-versus-general-topology context are underspecified."
}

AI_CONSUMPTION {
 PURPOSES = [
  SemanticSearch,
  OntologyGrounding,
  TopologicalSpaceReasoning,
  TopologyValidation,
  OpenClosedSetReasoning,
  InteriorClosureBoundaryReasoning,
  BasisReasoning,
  ContinuityReasoning,
  HomeomorphismReasoning,
  CompactnessReasoning,
  ConnectednessReasoning,
  SeparationReasoning,
  KnowledgeGraphConstruction,
  RetrievalAugmentation,
  RecursiveInference
 ]

 NORMALISE {
  "topological space" -> TopologicalSpace
  "space with topology" -> TopologicalSpace
  "underlying set" -> UnderlyingSet
  "open set" -> OpenSet
  "closed set" -> ClosedSet
  "basis" -> Basis
  "subbasis" -> Subbasis
  "homeomorphism" -> Homeomorphism
  "Hausdorff space" -> HausdorffSpace
 }

 INTERPRETATION_ORDER = [
  detect_topological_space_context,
  identify underlying_set_and_topology,
  identify subset_basis_map_or_space_property,
  classify validation_open_closed_interior_closure_boundary_continuity_homeomorphism_compactness_connectedness_or_separation goal,
  apply topological_axioms_and_definitions,
  verify ambient_space_source_target_and_assumptions,
  return semantic output
 ]
}

EXECUTION_RULES {
 E1:
  IF query_mentions("topological space")
  OR pair_X_T_with_topology_context
  THEN activate(TopologicalSpaceOntology)

 E2:
  IF topology_validity_requested
  THEN verify topology_axioms

 E3:
  IF open_or_closed_status_requested
  THEN evaluate membership_and_complement_relative_to_T

 E4:
  IF basis_requested
  THEN verify basis_coverage_and_intersection_refinement

 E5:
  IF continuity_requested
  THEN use inverse_image_open_set criterion

 E6:
  IF homeomorphism_requested
  THEN verify bijection_continuity_and_continuous_inverse

 E7:
  IF compactness_requested
  THEN apply open_cover_definition_or_valid_equivalent_theorem

 E8:
  IF connectedness_requested
  THEN test for topological_separation

 E9:
  IF manifold_context
  THEN route to locally_Euclidean_Hausdorff_second_countable properties
}

RECURSION {
 ENTRY = TopologicalSpace

 EXPAND(TopologicalSpace) -> [
  UnderlyingSet,
  Topology,
  OpenSet,
  ClosedSet,
  Neighbourhood,
  Interior,
  Closure,
  Boundary,
  LimitPoint,
  DenseSet,
  Basis,
  Subbasis,
  ContinuousMap,
  Homeomorphism,
  Compactness,
  Connectedness,
  PathConnectedness,
  SeparationAxiom,
  SubspaceTopology,
  ProductTopology,
  QuotientTopology
 ]

 EXPAND(Topology) -> [
  TopologyAxioms,
  OpenSet,
  Basis,
  Subbasis
 ]

 EXPAND(SeparationAxiom) -> [
  T0Space,
  T1Space,
  HausdorffSpace,
  RegularSpace,
  NormalSpace
 ]

 EXPAND(TopologyConstruction) -> [
  SubspaceTopology,
  ProductTopology,
  QuotientTopology,
  BasisGeneratedTopology
 ]

 STOP_CONDITION =
  "Stop when the topological space's topology, subset structure, basis, continuity, homeomorphism, compactness, connectedness, separation or construction property is sufficiently resolved."
}

ROUTING {
 PARENT_ONTOLOGY = "Topology"

 IMMEDIATE_CONTEXTS = [
  "Topology Ontology",
  "Manifold Ontology",
  "Metric Space Ontologies",
  "Set Theory Ontologies"
 ]

 RELATED_ONTOLOGIES = [
  "Topology",
  "Topology Ontology",
  "Manifold Ontology",
  "Differential Geometry Ontology",
  "Metric Space Ontologies",
  "Set Theory Ontologies",
  "Analysis Ontologies",
  "Algebraic Topology Ontologies",
  "Transformation Ontology"
 ]

 ROUTE_RULES = [
  "Topological Space -> Topology Ontology for parent axiomatic framework",
  "Topological Space -> Set Theory for carrier-set and subset operations",
  "Topological Space -> Metric Space Ontologies for metric-induced examples",
  "Topological Space -> Analysis for continuity and convergence",
  "Topological Space -> Manifold for locally Euclidean specialisations",
  "Topological Space -> Differential Geometry for smooth manifold extensions",
  "Topological Space -> Transformation for homeomorphisms"
 ]
}

UPDATE_MODEL {
 MODE = "append-compatible semantic versioning"

 MAJOR = "ontology-breaking conceptual change"
 MINOR = "new compatible topological-space properties, constructions or reasoning pathways"
 PATCH = "clarification, metadata or formatting correction"

 RULES = [
  "Preserve pair (X,T) semantics.",
  "Preserve topology axioms.",
  "Preserve ambient-topology dependence.",
  "Preserve inverse-image continuity semantics.",
  "Preserve homeomorphism equivalence semantics.",
  "Preserve compactness-versus-boundedness distinction.",
  "Preserve connectedness-versus-path-connectedness distinction.",
  "Preserve machine-readable topological-space semantics."
 ]
}

OUTPUT {
 CANONICAL_DEFINITION =
  "A topological space is a pair (X,T) where T is a topology on the set X."

 TOPOLOGY_SUMMARY =
  "T contains the empty set and X and is closed under arbitrary unions and finite intersections."

 OPEN_SET_SUMMARY =
  "U is open iff U belongs to T."

 CLOSED_SET_SUMMARY =
  "A is closed iff X\A is open."

 CONTINUITY_SUMMARY =
  "f:X->Y is continuous iff inverse images of open sets in Y are open in X."

 HOMEOMORPHISM_SUMMARY =
  "A homeomorphism is a bijective continuous map with continuous inverse."

 COMPACTNESS_SUMMARY =
  "Every open cover has a finite subcover."

 CONNECTEDNESS_SUMMARY =
  "A connected topological space has no separation into two disjoint nonempty open subsets."
}

FLOW {
 INPUT
 -> detect_topological_space_context
 -> identify underlying_set_topology_subsets_maps_and_properties
 -> verify topology_axioms_when_needed
 -> identify open_closed_interior_closure_boundary_basis_continuity_homeomorphism_compactness_connectedness_separation_or_construction goal
 -> perform topological_space_specific reasoning
 -> verify ambient_topology_source_target_and_assumption constraints
 -> route to topology set_theory metric_space analysis manifold differential_geometry_or_transformation ontology
 -> recursively_expand_required_dependencies
 -> verify_result
 -> assign_confidence
 -> produce_semantic_output
 -> END
}

SEMANTIC_SUMMARY {
 "The Topological Space Ontology defines the fundamental pair (X,T) of general topology and supports open and closed sets, neighbourhoods, interiors, closures, boundaries, bases, continuity, homeomorphisms, compactness, connectedness, separation axioms and standard topology constructions. It provides the base space model from which metric spaces, manifolds and differential-geometric structures are built."
}

FLOW_HASH {
 METHOD = "semantic-content-identity"
 ID = "KIRETH-MATH-GEOMETRY-TOPOLOGICAL-SPACE-ONTOLOGY-V1"
}

}

END_FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ