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 contains the empty set and 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 \( Interior(A,T) \) to denote the interior of A.
Definition
\( 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 \( ClosedCovers(A,T) \).
Definition
\( ClosedCovers(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
\( Closure(A,T) \equiv \bigcap ClosedCovers(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
\( Boundary(A,T) \equiv Closure(A,T) \cap 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 \( 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 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 A1: \( T \text{ is a topology } \)
shows \( 0 \in T \)proofThe 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 } \)proofWe 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 Interior(A,T) \)
defines \( cl(A) \equiv Closure(A,T) \)
defines \( \partial A \equiv 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 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 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 \)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 \( ClosedCovers(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 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.
lemma (in topology0) cl_is_closed:
assumes \( A \subseteq \bigcup T \)
shows \( cl(A) \text{ is closed in } T \) using assms , Closure_def , Top_3_L3 , ClosedCovers_def , Top_3_L4Closure of a bigger sets is bigger.
lemma (in topology0) top_closure_mono:
assumes A1: \( A \subseteq \bigcup T \), \( 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 two open sets are disjoint, then we can close one of them and they will still be disjoint.
lemma (in topology0) open_disj_cl_disj:
assumes A1: \( U\in T \), \( V\in T \) and A2: \( U\cap V = 0 \)
shows \( cl(U) \cap V = 0 \)proof