This theory file provides basic definitions and properties of topology, open and closed sets, closure and boundary.
A typical textbook defines a topology on a set \(X\) as a collection \(T\) of subsets of \(X\) such that \(X\in T\), \(\emptyset \in T\) and \(T\) is closed with respect to arbitrary unions and intersection of two sets. One can notice here that since we always have \(\bigcup T = X\), the set on which the topology is defined (the "carrier" of the topology) can always be constructed from the topology itself and is superfluous in the definition. Moreover, as Marnix Klooster pointed out to me, the fact that the empty set is open can also be proven from other axioms. Hence, we define a topology as a collection of sets that is closed under arbitrary unions and intersections of two sets, without any mention of the set on which the topology is defined. Recall that \( Pow(T) \) is the powerset of \(T\), so that if \(M\in\) \( Pow(T) \) then \(M\) is a subset of \(T\). The sets that belong to a topology \(T\) will be sometimes called ''open in'' \(T\) or just ''open'' if the topology is clear from the context.
Topology is a collection of sets that is closed under arbitrary unions and intersections of two sets.
definition
\( T \text{ is a topology } \equiv ( \forall M \in Pow(T).\ \bigcup M \in T ) \wedge \) \( ( \forall U\in T.\ \forall V\in T.\ U\cap V \in T) \)
We define interior of a set \(A\) as the union of all open sets contained in \(A\). We use \( \text{Interior}(A,T) \) to denote the interior of A.
definition
\( \text{Interior}(A,T) \equiv \bigcup \{U\in T.\ U \subseteq A\} \)
A set is closed if it is contained in the carrier of topology and its complement is open.
definition
\( D \text{ is closed in } T \equiv (D \subseteq \bigcup T \wedge \bigcup T - D \in T) \)
To prove various properties of closure we will often use the collection of closed sets that contain a given set \(A\). Such collection does not have a separate name in informal math. We will call it \( Closed \text{Covers}(A,T) \).
definition
\( Closed \text{Covers}(A,T) \equiv \{D \in Pow(\bigcup T).\ D \text{ is closed in } T \wedge A\subseteq D\} \)
The closure of a set \(A\) is defined as the intersection of the collection of closed sets that contain \(A\).
definition
\( \text{Closure}(A,T) \equiv \bigcap Closed \text{Covers}(A,T) \)
We also define boundary of a set as the intersection of its closure with the closure of the complement (with respect to the carrier).
definition
\( \text{Boundary}(A,T) \equiv \text{Closure}(A,T) \cap \text{Closure}(\bigcup T - A,T) \)
A set \(K\) is compact if for every collection of open sets that covers \(K\) we can choose a finite one that still covers the set. Recall that \( \text{FinPow}(M) \) is the collection of finite subsets of \(M\) (finite powerset of \(M\)), defined in IsarMathLib's Finite_ZF theory.
definition
\( K \text{ is compact in } T \equiv (K \subseteq \bigcup T \wedge \) \( (\forall M\in Pow(T).\ K \subseteq \bigcup M \longrightarrow (\exists N \in \text{FinPow}(M).\ K \subseteq \bigcup N))) \)
A basic example of a topology: the powerset of any set is a topology.
lemma Pow_is_top:
shows \( Pow(X) \text{ is a topology } \)proofEmpty set is open.
lemma empty_open:
assumes \( T \text{ is a topology } \)
shows \( 0 \in T \)proofThe carrier is open.
lemma carr_open:
assumes \( T \text{ is a topology } \)
shows \( (\bigcup T) \in T \) using assms, IsATopology_defUnion of a collection of open sets is open.
lemma union_open:
assumes \( T \text{ is a topology } \) and \( \forall A\in \mathcal{A} .\ A \in T \)
shows \( (\bigcup \mathcal{A} ) \in T \) using assms, IsATopology_defUnion of a indexed family of open sets is open.
lemma union_indexed_open:
assumes A1: \( T \text{ is a topology } \) and A2: \( \forall i\in I.\ P(i) \in T \)
shows \( (\bigcup i\in I.\ P(i)) \in T \) using assms, union_openThe intersection of any nonempty collection of topologies on a set \(X\) is a topology.
lemma Inter_tops_is_top:
assumes A1: \( \mathcal{M} \neq 0 \) and A2: \( \forall T\in \mathcal{M} .\ T \text{ is a topology } \)
shows \( (\bigcap \mathcal{M} ) \text{ is a topology } \)proofSingletons are compact. Interestingly we do not have to assume that \(T\) is a topology for this. Note singletons do not have to be closed, we need the the space to be \(T_1\) for that (see \( Topology\_ZF\_1) \).
lemma singl_compact:
assumes \( x\in \bigcup T \)
shows \( \{x\} \text{ is compact in } T \) using assms, singleton_in_finpow unfolding IsCompact_defWe will now introduce some notation. In Isar, this is done by definining a "locale". Locale is kind of a context that holds some assumptions and notation used in all theorems proven in it. In the locale (context) below called topology0 we assume that \(T\) is a topology. The interior of the set \(A\) (with respect to the topology in the context) is denoted \( int(A) \). The closure of a set \(A\subseteq \bigcup T\) is denoted \( cl(A) \) and the boundary is \( \partial A \).
locale topology0
assumes topSpaceAssum: \( T \text{ is a topology } \)
defines \( int(A) \equiv \text{Interior}(A,T) \)
defines \( cl(A) \equiv \text{Closure}(A,T) \)
defines \( \partial A \equiv \text{Boundary}(A,T) \)
Intersection of a finite nonempty collection of open sets is open.
lemma (in topology0) fin_inter_open_open:
assumes \( N\neq 0 \), \( N \in \text{FinPow}(T) \)
shows \( \bigcap N \in T \) using topSpaceAssum, assms, IsATopology_def, inter_two_inter_finHaving a topology \(T\) and a set \(X\) we can define the induced topology as the one consisting of the intersections of \(X\) with sets from \(T\). The notion of a collection restricted to a set is defined in ZF1.thy.
lemma (in topology0) Top_1_L4:
shows \( (T \text{ restricted to } X) \text{ is a topology } \)proofIn this section we show basic properties of the interior of a set.
Interior of a set \(A\) is contained in \(A\).
lemma (in topology0) Top_2_L1:
shows \( int(A) \subseteq A \) using Interior_defInterior is open.
lemma (in topology0) Top_2_L2:
shows \( int(A) \in T \)proofA set is open iff it is equal to its interior.
lemma (in topology0) Top_2_L3:
shows \( U\in T \longleftrightarrow int(U) = U \)proofInterior of the interior is the interior.
lemma (in topology0) Top_2_L4:
shows \( int(int(A)) = int(A) \)proofInterior of a bigger set is bigger.
lemma (in topology0) interior_mono:
assumes A1: \( A\subseteq B \)
shows \( int(A) \subseteq int(B) \)proofAn open subset of any set is a subset of the interior of that set.
lemma (in topology0) Top_2_L5:
assumes \( U\subseteq A \) and \( U\in T \)
shows \( U \subseteq int(A) \) using assms, Interior_defIf a point of a set has an open neighboorhood contained in the set, then the point belongs to the interior of the set.
lemma (in topology0) Top_2_L6:
assumes \( \exists U\in T.\ (x\in U \wedge U\subseteq A) \)
shows \( x \in int(A) \) using assms, Interior_defA set is open iff its every point has a an open neighbourhood contained in the set. We will formulate this statement as two lemmas (implication one way and the other way). The lemma below shows that if a set is open then every point has a an open neighbourhood contained in the set.
lemma (in topology0) open_open_neigh:
assumes A1: \( V\in T \)
shows \( \forall x\in V.\ \exists U\in T.\ (x\in U \wedge U\subseteq V) \)proofIf every point of a set has a an open neighbourhood contained in the set then the set is open.
lemma (in topology0) open_neigh_open:
assumes A1: \( \forall x\in V.\ \exists U\in T.\ (x\in U \wedge U\subseteq V) \)
shows \( V\in T \)proofThe intersection of interiors is a equal to the interior of intersections.
lemma (in topology0) int_inter_int:
shows \( int(A) \cap int(B) = int(A\cap B) \)proofThis section is devoted to closed sets and properties of the closure and boundary operators.
The carrier of the space is closed.
lemma (in topology0) Top_3_L1:
shows \( (\bigcup T) \text{ is closed in } T \)proofEmpty set is closed.
lemma (in topology0) Top_3_L2:
shows \( 0 \text{ is closed in } T \) using topSpaceAssum, IsATopology_def, IsClosed_defThe collection of closed covers of a subset of the carrier of topology is never empty. This is good to know, as we want to intersect this collection to get the closure.
lemma (in topology0) Top_3_L3:
assumes A1: \( A \subseteq \bigcup T \)
shows \( Closed \text{Covers}(A,T) \neq 0 \)proofIntersection of a nonempty family of closed sets is closed.
lemma (in topology0) Top_3_L4:
assumes A1: \( K\neq 0 \) and A2: \( \forall D\in K.\ D \text{ is closed in } T \)
shows \( (\bigcap K) \text{ is closed in } T \)proofThe union and intersection of two closed sets are closed.
lemma (in topology0) Top_3_L5:
assumes A1: \( D_1 \text{ is closed in } T \), \( D_2 \text{ is closed in } T \)
shows \( (D_1\cap D_2) \text{ is closed in } T \), \( (D_1\cup D_2) \text{ is closed in } T \)proofFinite union of closed sets is closed. To understand the proof recall that \(D\in\)\( Pow(\bigcup T) \) means that \(D\) is a subset of the carrier of the topology.
lemma (in topology0) fin_union_cl_is_cl:
assumes A1: \( N \in \text{FinPow}(\{D\in Pow(\bigcup T).\ D \text{ is closed in } T\}) \)
shows \( (\bigcup N) \text{ is closed in } T \)proofClosure of a set is closed, hence the complement of the closure is open.
lemma (in topology0) cl_is_closed:
assumes \( A \subseteq \bigcup T \)
shows \( cl(A) \text{ is closed in } T \) and \( \bigcup T - cl(A) \in T \) using assms, Top_3_L3, Top_3_L4, Closure_def, ClosedCovers_def, IsClosed_defClosure of a bigger sets is bigger.
lemma (in topology0) top_closure_mono:
assumes A1: \( B \subseteq \bigcup T \) and A2: \( A\subseteq B \)
shows \( cl(A) \subseteq cl(B) \)proofBoundary of a set is closed.
lemma (in topology0) boundary_closed:
assumes A1: \( A \subseteq \bigcup T \)
shows \( \partial A \text{ is closed in } T \)proofA set is closed iff it is equal to its closure.
lemma (in topology0) Top_3_L8:
assumes A1: \( A \subseteq \bigcup T \)
shows \( A \text{ is closed in } T \longleftrightarrow cl(A) = A \)proofComplement of an open set is closed.
lemma (in topology0) Top_3_L9:
assumes A1: \( A\in T \)
shows \( (\bigcup T - A) \text{ is closed in } T \)proofA set is contained in its closure.
lemma (in topology0) cl_contains_set:
assumes \( A \subseteq \bigcup T \)
shows \( A \subseteq cl(A) \) using assms, Top_3_L1, ClosedCovers_def, Top_3_L3, Closure_defClosure of a subset of the carrier is a subset of the carrier and closure of the complement is the complement of the interior.
lemma (in topology0) Top_3_L11:
assumes A1: \( A \subseteq \bigcup T \)
shows \( cl(A) \subseteq \bigcup T \), \( cl(\bigcup T - A) = \bigcup T - int(A) \)proofBoundary of a set is the closure of the set minus the interior of the set.
lemma (in topology0) Top_3_L12:
assumes A1: \( A \subseteq \bigcup T \)
shows \( \partial A = cl(A) - int(A) \)proofIf a set \(A\) is contained in a closed set \(B\), then the closure of \(A\) is contained in \(B\).
lemma (in topology0) Top_3_L13:
assumes A1: \( B \text{ is closed in } T \), \( A\subseteq B \)
shows \( cl(A) \subseteq B \)proofIf a set is disjoint with an open set, then we can close it and it will still be disjoint.
lemma (in topology0) disj_open_cl_disj:
assumes A1: \( A \subseteq \bigcup T \), \( V\in T \) and A2: \( A\cap V = 0 \)
shows \( cl(A) \cap V = 0 \)proofA reformulation of disj_open_cl_disj: If a point belongs to the closure of a set, then we can find a point from the set in any open neighboorhood of the point.
lemma (in topology0) cl_inter_neigh:
assumes \( A \subseteq \bigcup T \) and \( U\in T \) and \( x \in cl(A) \cap U \)
shows \( A\cap U \neq 0 \) using assms, disj_open_cl_disjA reverse of cl_inter_neigh: if every open neiboorhood of a point has a nonempty intersection with a set, then that point belongs to the closure of the set.
lemma (in topology0) inter_neigh_cl:
assumes A1: \( A \subseteq \bigcup T \) and A2: \( x\in \bigcup T \) and A3: \( \forall U\in T.\ x\in U \longrightarrow U\cap A \neq 0 \)
shows \( x \in cl(A) \)proofassumes \( T \text{ is a topology } \) and \( \forall A\in \mathcal{A} .\ A \in T \)
shows \( (\bigcup \mathcal{A} ) \in T \)assumes \( x \in X \)
shows \( \{x\} \in \text{FinPow}(X) \)assumes \( \forall V\in T.\ \forall W\in T.\ V \cap W \in T \) and \( N \neq 0 \) and \( N \in \text{FinPow}(T) \)
shows \( (\bigcap N \in T) \)assumes \( \exists U\in T.\ (x\in U \wedge U\subseteq A) \)
shows \( x \in int(A) \)assumes \( U\subseteq A \) and \( U\in T \)
shows \( U \subseteq int(A) \)assumes \( A\subseteq B \)
shows \( int(A) \subseteq int(B) \)assumes \( K\neq 0 \) and \( \forall D\in K.\ D \text{ is closed in } T \)
shows \( (\bigcap K) \text{ is closed in } T \)assumes \( D_1 \text{ is closed in } T \), \( D_2 \text{ is closed in } T \)
shows \( (D_1\cap D_2) \text{ is closed in } T \), \( (D_1\cup D_2) \text{ is closed in } T \)assumes \( 0 \in C \) and \( \forall A\in C.\ \forall B\in C.\ A\cup B \in C \) and \( N \in \text{FinPow}(C) \)
shows \( \bigcup N \in C \)assumes \( A \subseteq \bigcup T \)
shows \( Closed \text{Covers}(A,T) \neq 0 \)assumes \( A \subseteq \bigcup T \)
shows \( cl(A) \text{ is closed in } T \) and \( \bigcup T - cl(A) \in T \)assumes \( B \subseteq \bigcup T \) and \( A\subseteq B \)
shows \( cl(A) \subseteq cl(B) \)assumes \( A\in T \)
shows \( (\bigcup T - A) \text{ is closed in } T \)assumes \( A \subseteq \bigcup T \)
shows \( A \text{ is closed in } T \longleftrightarrow cl(A) = A \)assumes \( A \subseteq \bigcup T \)
shows \( A \subseteq cl(A) \)assumes \( A \subseteq \bigcup T \)
shows \( cl(A) \subseteq \bigcup T \), \( cl(\bigcup T - A) = \bigcup T - int(A) \)assumes \( B \text{ is closed in } T \), \( A\subseteq B \)
shows \( cl(A) \subseteq B \)assumes \( A \subseteq \bigcup T \), \( V\in T \) and \( A\cap V = 0 \)
shows \( cl(A) \cap V = 0 \)