Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
Zhangir Azerbayev
squashed?
4365a98
raw
history blame
134 kB
(* (c) Copyright, Bill Richter 2013 *)
(* Distributed under the same license as HOL Light *)
(* *)
(* An ongoing readable.ml port of Multivariate/topology.ml with 3 features: *)
(* 1) A topological space will be an ordered pair Ξ± = (X, L), where L is the *)
(* the set of open sets on X. topology.ml defines a topological space to be *)
(* just L, and the topspace X is defined as UNIONS L. *)
(* 2) Result about Connectiveness, limit points, interior and closure are *)
(* first proved for general topological spaces and then specialized to *)
(* Euclidean space. *)
(* 3)All general topology theorems using subtopology Ξ± u have antecedent *)
(* u βŠ‚ topspace Ξ±. *)
(* The math character ━ is used for DIFF. *)
(* This file, together with from_topology.ml, shows that all of *)
(* Multivariate/topology.ml is either ported/modified here, or else run on *)
(* top of this file. *)
(* Thanks to Vince Aravantinos for improving the proofs of OPEN_BALL, *)
(* CONNECTED_OPEN_IN_EQ, CONNECTED_CLOSED_IN_EQ and INTERIOR_EQ. *)
needs "RichterHilbertAxiomGeometry/readable.ml";;
needs "Multivariate/determinants.ml";;
ParseAsInfix("βˆ‰",(11, "right"));;
let NOTIN = NewDefinition `;
βˆ€a l. a βˆ‰ l ⇔ Β¬(a ∈ l)`;;
let DIFF_UNION = theorem `;
βˆ€u s t. u ━ (s βˆͺ t) = (u ━ s) ∩ (u ━ t)
by set`;;
let DIFF_INTER = theorem `;
βˆ€u s t. u ━ (s ∩ t) = (u ━ s) βˆͺ (u ━ t)
by set`;;
let DIFF_REFL = theorem `;
βˆ€u t. t βŠ‚ u β‡’ u ━ (u ━ t) = t
by set`;;
let DIFF_SUBSET = theorem `;
βˆ€u s t. s βŠ‚ t β‡’ s ━ u βŠ‚ t ━ u
by set`;;
let DOUBLE_DIFF_UNION = theorem `;
βˆ€A s t. A ━ s ━ t = A ━ (s βˆͺ t)
by set`;;
let SUBSET_COMPLEMENT = theorem `;
βˆ€s t A. s βŠ‚ A β‡’ (s βŠ‚ A ━ t ⇔ s ∩ t = βˆ…)
by set`;;
let COMPLEMENT_DISJOINT = theorem `;
βˆ€A s t. s βŠ‚ A β‡’ (s βŠ‚ t ⇔ s ∩ (A ━ t) = βˆ…)
by set`;;
let COMPLEMENT_DUALITY = theorem `;
βˆ€A s t. s βŠ‚ A ∧ t βŠ‚ A β‡’ (s = t ⇔ A ━ s = A ━ t)
by set`;;
let COMPLEMENT_DUALITY_UNION = theorem `;
βˆ€A s t. s βŠ‚ A ∧ t βŠ‚ A ∧ u βŠ‚ A β‡’ (s = t βˆͺ u ⇔ A ━ s = (A ━ t) ∩ (A ━ u))
by set`;;
let SUBSET_DUALITY = theorem `;
βˆ€s t u. t βŠ‚ u β‡’ s ━ u βŠ‚ s ━ t
by set`;;
let COMPLEMENT_INTER_DIFF = theorem `;
βˆ€A s t. s βŠ‚ A β‡’ s ━ t = s ∩ (A ━ t)
by set`;;
let INTERS_SUBSET = theorem `;
βˆ€f t. Β¬(f = βˆ…) ∧ (βˆ€s. s ∈ f β‡’ s βŠ‚ t) β‡’ INTERS f βŠ‚ t
by set`;;
let IN_SET_FUNCTION_PREDICATE = theorem `;
βˆ€x f P. x ∈ {f y | P y} ⇔ βˆƒy. x = f y ∧ P y
by set`;;
let INTER_TENSOR = theorem `;
βˆ€s s' t t'. s βŠ‚ s' ∧ t βŠ‚ t' β‡’ s ∩ t βŠ‚ s' ∩ t'
by set`;;
let UNION_TENSOR = theorem `;
βˆ€s s' t t'. s βŠ‚ s' ∧ t βŠ‚ t' β‡’ s βˆͺ t βŠ‚ s' βˆͺ t'
by set`;;
let ExistsTensorInter = theorem `;
βˆ€F G H. (βˆ€x y. F x ∧ G y β‡’ H (x ∩ y)) β‡’
(βˆƒx. F x) ∧ (βˆƒy. G y) β‡’ (βˆƒz. H z)
by fol`;;
let istopology = NewDefinition `;
istopology (X, L) ⇔
(βˆ€U. U ∈ L β‡’ U βŠ‚ X) ∧ βˆ… ∈ L ∧ X ∈ L ∧
(βˆ€s t. s ∈ L ∧ t ∈ L β‡’ s ∩ t ∈ L) ∧ βˆ€k. k βŠ‚ L β‡’ UNIONS k ∈ L`;;
let UnderlyingSpace = NewDefinition `;
UnderlyingSpace Ξ± = FST Ξ±`;;
let OpenSets = NewDefinition `;
OpenSets Ξ± = SND Ξ±`;;
let ExistsTopology = theorem `;
βˆ€X. βˆƒΞ±. istopology Ξ± ∧ UnderlyingSpace Ξ± = X
proof
intro_TAC βˆ€X;
consider L such that L = {U | U βŠ‚ X} [Lexists] by fol;
exists_TAC (X, L);
rewrite istopology IN_ELIM_THM Lexists UnderlyingSpace;
set;
qed;
`;;
let topology_tybij_th = theorem `;
βˆƒt. istopology t
by fol ExistsTopology`;;
let topology_tybij =
new_type_definition "topology" ("mk_topology","dest_topology")
topology_tybij_th;;
let ISTOPOLOGYdest_topology = theorem `;
βˆ€Ξ±. istopology (dest_topology Ξ±)
by fol topology_tybij`;;
let OpenIn = NewDefinition `;
βˆ€Ξ±. open_in Ξ± = OpenSets (dest_topology Ξ±)`;;
let topspace = NewDefinition `;
βˆ€Ξ±. topspace Ξ± = UnderlyingSpace (dest_topology Ξ±)`;;
let TopologyPAIR = theorem `;
βˆ€Ξ±. dest_topology Ξ± = (topspace Ξ±, open_in Ξ±)
by rewrite PAIR_EQ OpenIn topspace UnderlyingSpace OpenSets`;;
let Topology_Eq = theorem `;
βˆ€Ξ± Ξ². topspace Ξ± = topspace Ξ² ∧ (βˆ€U. open_in Ξ± U ⇔ open_in Ξ² U)
⇔ Ξ± = Ξ²
proof
intro_TAC βˆ€Ξ± Ξ²;
eq_tac [Right] by fol;
intro_TAC H1 H2;
dest_topology Ξ± = dest_topology Ξ² [] by simplify TopologyPAIR PAIR_EQ H1 H2 FUN_EQ_THM;
fol - topology_tybij;
qed;
`;;
let OpenInCLAUSES = theorem `;
βˆ€Ξ± X. topspace Ξ± = X β‡’
(βˆ€U. open_in Ξ± U β‡’ U βŠ‚ X) ∧ open_in Ξ± βˆ… ∧ open_in Ξ± X ∧
(βˆ€s t. open_in Ξ± s ∧ open_in Ξ± t β‡’ open_in Ξ± (s ∩ t)) ∧
βˆ€k. (βˆ€s. s ∈ k β‡’ open_in Ξ± s) β‡’ open_in Ξ± (UNIONS k)
proof
intro_TAC βˆ€Ξ± X, H1;
consider L such that L = open_in Ξ± [Ldef] by fol;
istopology (X, L) [] by fol H1 Ldef TopologyPAIR PAIR_EQ ISTOPOLOGYdest_topology;
fol Ldef - istopology IN SUBSET;
qed;
`;;
let OPEN_IN_SUBSET = theorem `;
βˆ€Ξ± s. open_in Ξ± s β‡’ s βŠ‚ topspace Ξ±
by fol OpenInCLAUSES`;;
let OPEN_IN_EMPTY = theorem `;
βˆ€Ξ±. open_in Ξ± βˆ…
by fol OpenInCLAUSES`;;
let OPEN_IN_INTER = theorem `;
βˆ€Ξ± s t. open_in Ξ± s ∧ open_in Ξ± t β‡’ open_in Ξ± (s ∩ t)
by fol OpenInCLAUSES`;;
let OPEN_IN_UNIONS = theorem `;
βˆ€Ξ± k. (βˆ€s. s ∈ k β‡’ open_in Ξ± s) β‡’ open_in Ξ± (UNIONS k)
by fol OpenInCLAUSES`;;
let OpenInTopspace = theorem `;
βˆ€Ξ±. open_in Ξ± (topspace Ξ±)
by fol OpenInCLAUSES`;;
let OPEN_IN_UNION = theorem `;
βˆ€Ξ± s t. open_in Ξ± s ∧ open_in Ξ± t β‡’ open_in Ξ± (s βˆͺ t)
proof
intro_TAC βˆ€Ξ± s t, H;
βˆ€x. x ∈ {s, t} ⇔ x = s ∨ x = t [] by fol IN_INSERT NOT_IN_EMPTY;
fol - UNIONS_2 H OPEN_IN_UNIONS;
qed;
`;;
let OPEN_IN_TOPSPACE = theorem `;
βˆ€Ξ±. open_in Ξ± (topspace Ξ±)
by fol OpenInCLAUSES`;;
let OPEN_IN_INTERS = theorem `;
βˆ€Ξ± s. FINITE s ∧ Β¬(s = βˆ…) ∧ (βˆ€t. t ∈ s β‡’ open_in Ξ± t)
β‡’ open_in Ξ± (INTERS s)
proof
intro_TAC βˆ€Ξ±;
rewrite IMP_CONJ;
MATCH_MP_TAC FINITE_INDUCT;
rewrite INTERS_INSERT NOT_INSERT_EMPTY FORALL_IN_INSERT;
intro_TAC βˆ€x s, H1, xWorks sWorks;
assume Β¬(s = βˆ…) [Nonempty] by simplify INTERS_0 INTER_UNIV xWorks;
fol xWorks Nonempty H1 sWorks OPEN_IN_INTER;
qed;
`;;
let OPEN_IN_SUBOPEN = theorem `;
βˆ€Ξ± s. open_in Ξ± s ⇔ βˆ€x. x ∈ s β‡’ βˆƒt. open_in Ξ± t ∧ x ∈ t ∧ t βŠ‚ s
proof
intro_TAC βˆ€Ξ± s;
eq_tac [Left] by set;
intro_TAC ALLtExist;
consider f such that
βˆ€x. x ∈ s β‡’ open_in Ξ± (f x) ∧ x ∈ f x ∧ f x βŠ‚ s [fExists] by fol ALLtExist SKOLEM_THM_GEN;
s = UNIONS (IMAGE f s) [] by set -;
fol - fExists FORALL_IN_IMAGE OPEN_IN_UNIONS;
qed;
`;;
let closed_in = NewDefinition `;
βˆ€Ξ± s. closed_in Ξ± s ⇔
s βŠ‚ topspace Ξ± ∧ open_in Ξ± (topspace Ξ± ━ s)`;;
let CLOSED_IN_SUBSET = theorem `;
βˆ€Ξ± s. closed_in Ξ± s β‡’ s βŠ‚ topspace Ξ±
by fol closed_in`;;
let CLOSED_IN_EMPTY = theorem `;
βˆ€Ξ±. closed_in Ξ± βˆ…
by fol closed_in EMPTY_SUBSET DIFF_EMPTY OPEN_IN_TOPSPACE`;;
let CLOSED_IN_TOPSPACE = theorem `;
βˆ€Ξ±. closed_in Ξ± (topspace Ξ±)
by fol closed_in SUBSET_REFL DIFF_EQ_EMPTY OPEN_IN_EMPTY`;;
let CLOSED_IN_UNION = theorem `;
βˆ€Ξ± s t. closed_in Ξ± s ∧ closed_in Ξ± t β‡’ closed_in Ξ± (s βˆͺ t)
proof
intro_TAC βˆ€Ξ± s t, Hst;
fol Hst closed_in DIFF_UNION UNION_SUBSET OPEN_IN_INTER;
qed;
`;;
let CLOSED_IN_INTERS = theorem `;
βˆ€Ξ± k. Β¬(k = βˆ…) ∧ (βˆ€s. s ∈ k β‡’ closed_in Ξ± s) β‡’ closed_in Ξ± (INTERS k)
proof
intro_TAC βˆ€Ξ± k, H1 H2;
consider X such that X = topspace Ξ± [Xdef] by fol;
simplify GSYM Xdef closed_in DIFF_INTERS SIMPLE_IMAGE;
fol H1 H2 Xdef INTERS_SUBSET closed_in FORALL_IN_IMAGE OPEN_IN_UNIONS;
qed;
`;;
let CLOSED_IN_FORALL_IN = theorem `;
βˆ€Ξ± P Q. Β¬(P = βˆ…) ∧ (βˆ€a. P a β‡’ closed_in Ξ± {x | Q a x}) β‡’
closed_in Ξ± {x | βˆ€a. P a β‡’ Q a x}
proof
intro_TAC βˆ€Ξ± P Q, Pnonempty H1;
consider f such that f = {{x | Q a x} | P a} [fDef] by fol;
Β¬(f = βˆ…) [fNonempty] by set fDef Pnonempty;
(βˆ€a. P a β‡’ closed_in Ξ± {x | Q a x}) ⇔ (βˆ€s. s ∈ f β‡’ closed_in Ξ± s) [] by simplify fDef FORALL_IN_GSPEC;
closed_in Ξ± (INTERS f) [] by fol fNonempty H1 - CLOSED_IN_INTERS;
MP_TAC -;
{x | βˆ€a. P a β‡’ x ∈ {x | Q a x}} = {x | βˆ€a. P a β‡’ Q a x} [] by set;
simplify fDef INTERS_GSPEC -;
qed;
`;;
let CLOSED_IN_INTER = theorem `;
βˆ€Ξ± s t. closed_in Ξ± s ∧ closed_in Ξ± t β‡’ closed_in Ξ± (s ∩ t)
proof
intro_TAC βˆ€Ξ± s t, Hs Ht;
rewrite GSYM INTERS_2;
MATCH_MP_TAC CLOSED_IN_INTERS;
set Hs Ht;
qed;
`;;
let OPEN_IN_CLOSED_IN_EQ = theorem `;
βˆ€Ξ± s. open_in Ξ± s ⇔ s βŠ‚ topspace Ξ± ∧ closed_in Ξ± (topspace Ξ± ━ s)
proof
intro_TAC βˆ€Ξ± s;
simplify closed_in SUBSET_DIFF OPEN_IN_SUBSET;
fol SET_RULE [X ━ (X ━ s) = X ∩ s ∧ (s βŠ‚ X β‡’ X ∩ s = s)] OPEN_IN_SUBSET;
qed;
`;;
let OPEN_IN_CLOSED_IN = theorem `;
βˆ€s. s βŠ‚ topspace Ξ±
β‡’ (open_in Ξ± s ⇔ closed_in Ξ± (topspace Ξ± ━ s))
by fol OPEN_IN_CLOSED_IN_EQ`;;
let OPEN_IN_DIFF = theorem `;
βˆ€Ξ± s t. open_in Ξ± s ∧ closed_in Ξ± t β‡’ open_in Ξ± (s ━ t)
proof
intro_TAC βˆ€Ξ± s t, H1 H2;
consider X such that X = topspace Ξ± [Xdef] by fol;
fol COMPLEMENT_INTER_DIFF OPEN_IN_SUBSET - H1 H2 closed_in OPEN_IN_INTER;
qed;
`;;
let CLOSED_IN_DIFF = theorem `;
βˆ€Ξ± s t. closed_in Ξ± s ∧ open_in Ξ± t β‡’ closed_in Ξ± (s ━ t)
proof
intro_TAC βˆ€Ξ± s t, H1 H2;
consider X such that X = topspace Ξ± [Xdef] by fol;
fol COMPLEMENT_INTER_DIFF H1 - OPEN_IN_SUBSET SUBSET_DIFF DIFF_REFL H2 closed_in CLOSED_IN_INTER;
qed;
`;;
let CLOSED_IN_UNIONS = theorem `;
βˆ€Ξ± s. FINITE s ∧ (βˆ€t. t ∈ s β‡’ closed_in Ξ± t)
β‡’ closed_in Ξ± (UNIONS s)
proof
intro_TAC βˆ€Ξ±;
rewrite IMP_CONJ;
MATCH_MP_TAC FINITE_INDUCT;
fol UNIONS_INSERT UNIONS_0 CLOSED_IN_EMPTY IN_INSERT CLOSED_IN_UNION;
qed;
`;;
let subtopology = NewDefinition `;
βˆ€Ξ± u. subtopology Ξ± u = mk_topology (u, {s ∩ u | open_in Ξ± s})`;;
let IstopologySubtopology = theorem `;
βˆ€Ξ± u:A->bool. u βŠ‚ topspace Ξ± β‡’ istopology (u, {s ∩ u | open_in Ξ± s})
proof
intro_TAC βˆ€Ξ± u, H1;
βˆ… = βˆ… ∩ u ∧ open_in Ξ± βˆ… [emptysetOpen] by fol INTER_EMPTY OPEN_IN_EMPTY;
u = topspace α ∩ u ∧ open_in α (topspace α) [uOpen] by fol OPEN_IN_TOPSPACE H1 INTER_COMM SUBSET_INTER_ABSORPTION;
βˆ€s' s. open_in Ξ± s' ∧ open_in Ξ± s β‡’ open_in Ξ± (s' ∩ s) ∧
(s' ∩ u) ∩ (s ∩ u) = (s' ∩ s) ∩ u [interOpen]
proof
intro_TAC βˆ€s' s, H1 H2;
set MESON [H1; H2; OPEN_IN_INTER] [open_in α (s' ∩ s)];
qed;
βˆ€k. k βŠ‚ {s | open_in Ξ± s} β‡’ open_in Ξ± (UNIONS k) ∧
UNIONS (IMAGE (λs. s ∩ u) k) = (UNIONS k) ∩ u [unionsOpen]
proof
intro_TAC βˆ€k, kProp;
open_in Ξ± (UNIONS k) [] by fol kProp SUBSET IN_ELIM_THM OPEN_IN_UNIONS;
simplify - UNIONS_IMAGE UNIONS_GSPEC INTER_UNIONS;
qed;
{s ∩ u | open_in α s} = IMAGE (λs. s ∩ u) {s | open_in α s} [] by set;
simplify istopology IN_SET_FUNCTION_PREDICATE LEFT_IMP_EXISTS_THM INTER_SUBSET - FORALL_SUBSET_IMAGE;
fol emptysetOpen uOpen interOpen unionsOpen;
qed;
`;;
let OpenInSubtopology = theorem `;
βˆ€Ξ± u s. u βŠ‚ topspace Ξ± β‡’
(open_in (subtopology Ξ± u) s ⇔ βˆƒt. open_in Ξ± t ∧ s = t ∩ u)
proof
intro_TAC βˆ€Ξ± u s, H1;
open_in (subtopology α u) = OpenSets (u,{s ∩ u | open_in α s}) [] by fol subtopology H1 IstopologySubtopology topology_tybij OpenIn;
rewrite - OpenSets PAIR_EQ SND EXTENSION IN_ELIM_THM;
qed;
`;;
let TopspaceSubtopology = theorem `;
βˆ€Ξ± u. u βŠ‚ topspace Ξ± β‡’ topspace (subtopology Ξ± u) = u
proof
intro_TAC βˆ€Ξ± u , H1;
topspace (subtopology α u) = UnderlyingSpace (u,{s ∩ u | open_in α s}) [] by fol subtopology H1 IstopologySubtopology topology_tybij topspace;
rewrite - UnderlyingSpace PAIR_EQ FST;
fol INTER_COMM H1 SUBSET_INTER_ABSORPTION;
qed;
`;;
let OpenInRefl = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ open_in (subtopology Ξ± s) s
by fol TopspaceSubtopology OPEN_IN_TOPSPACE`;;
let ClosedInRefl = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ closed_in (subtopology Ξ± s) s
by fol TopspaceSubtopology CLOSED_IN_TOPSPACE`;;
let ClosedInSubtopology = theorem `;
βˆ€Ξ± u C. u βŠ‚ topspace Ξ± β‡’
(closed_in (subtopology Ξ± u) C ⇔ βˆƒD. closed_in Ξ± D ∧ C = D ∩ u)
proof
intro_TAC βˆ€Ξ± u C, H1;
consider X such that
X = topspace Ξ± ∧ u βŠ‚ X [Xdef] by fol H1;
closed_in (subtopology Ξ± u) C ⇔
βˆƒt. C βŠ‚ u ∧ t βŠ‚ X ∧ open_in Ξ± t ∧ u ━ C = t ∩ u [] by fol closed_in H1 Xdef OpenInSubtopology OPEN_IN_SUBSET TopspaceSubtopology;
closed_in (subtopology Ξ± u) C ⇔
βˆƒD. C βŠ‚ u ∧ D βŠ‚ X ∧ open_in Ξ± (X ━ D) ∧ u ━ C = (X ━ D) ∩ u []
proof
rewrite -;
eq_tac [Left]
proof
STRIP_TAC; exists_TAC X ━ t;
ASM_SIMP_TAC H1 OPEN_IN_SUBSET DIFF_REFL SUBSET_DIFF;
qed;
STRIP_TAC; exists_TAC X ━ D;
ASM_SIMP_TAC SUBSET_DIFF;
qed;
simplify - GSYM Xdef H1 closed_in;
βˆ€D C. C βŠ‚ u ∧ u ━ C = (X ━ D) ∩ u ⇔ C = D ∩ u [] by set Xdef DIFF_REFL INTER_SUBSET;
fol -;
qed;
`;;
let OPEN_IN_SUBTOPOLOGY_EMPTY = theorem `;
βˆ€Ξ± s. open_in (subtopology Ξ± βˆ…) s ⇔ s = βˆ…
proof
simplify EMPTY_SUBSET OpenInSubtopology INTER_EMPTY;
fol OPEN_IN_EMPTY;
qed;
`;;
let CLOSED_IN_SUBTOPOLOGY_EMPTY = theorem `;
βˆ€Ξ± s. closed_in (subtopology Ξ± βˆ…) s ⇔ s = βˆ…
proof
simplify EMPTY_SUBSET ClosedInSubtopology INTER_EMPTY;
fol CLOSED_IN_EMPTY;
qed;
`;;
let SUBTOPOLOGY_TOPSPACE = theorem `;
βˆ€Ξ±. subtopology Ξ± (topspace Ξ±) = Ξ±
proof
intro_TAC βˆ€Ξ±;
topspace (subtopology Ξ± (topspace Ξ±)) = topspace Ξ± [topXsub] by simplify SUBSET_REFL TopspaceSubtopology;
simplify topXsub GSYM Topology_Eq;
fol MESON [SUBSET_REFL] [topspace Ξ± βŠ‚ topspace Ξ±] OpenInSubtopology OPEN_IN_SUBSET SUBSET_INTER_ABSORPTION;
qed;
`;;
let OpenInImpSubset = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± β‡’
open_in (subtopology Ξ± s) t β‡’ t βŠ‚ s
by fol OpenInSubtopology INTER_SUBSET`;;
let ClosedInImpSubset = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± β‡’
closed_in (subtopology Ξ± s) t β‡’ t βŠ‚ s
by fol ClosedInSubtopology INTER_SUBSET`;;
let OpenInSubtopologyUnion = theorem `;
βˆ€Ξ± s t u. t βŠ‚ topspace Ξ± ∧ u βŠ‚ topspace Ξ± β‡’
open_in (subtopology α t) s ∧ open_in (subtopology α u) s
β‡’ open_in (subtopology Ξ± (t βˆͺ u)) s
proof
intro_TAC βˆ€Ξ± s t u, Ht Hu;
simplify Ht Hu Ht Hu UNION_SUBSET OpenInSubtopology;
intro_TAC sOpenSub_t sOpenSub_u;
consider a b such that
open_in α a ∧ s = a ∩ t ∧
open_in α b ∧ s = b ∩ u [abExist] by fol sOpenSub_t sOpenSub_u;
exists_TAC a ∩ b;
set MESON [abExist; OPEN_IN_INTER] [open_in α (a ∩ b)] abExist;
qed;
`;;
let ClosedInSubtopologyUnion = theorem `;
βˆ€Ξ± s t u. t βŠ‚ topspace Ξ± ∧ u βŠ‚ topspace Ξ± β‡’
closed_in (subtopology α t) s ∧ closed_in (subtopology α u) s
β‡’ closed_in (subtopology Ξ± (t βˆͺ u)) s
proof
intro_TAC βˆ€Ξ± s t u, Ht Hu;
simplify Ht Hu Ht Hu UNION_SUBSET ClosedInSubtopology;
intro_TAC sClosedSub_t sClosedSub_u;
consider a b such that
closed_in α a ∧ s = a ∩ t ∧
closed_in α b ∧ s = b ∩ u [abExist] by fol sClosedSub_t sClosedSub_u;
exists_TAC a ∩ b;
set MESON [abExist; CLOSED_IN_INTER] [closed_in α (a ∩ b)] abExist;
qed;
`;;
let OpenInSubtopologyInterOpen = theorem `;
βˆ€Ξ± s t u. u βŠ‚ topspace Ξ± β‡’
open_in (subtopology α u) s ∧ open_in α t
β‡’ open_in (subtopology Ξ± u) (s ∩ t)
proof
intro_TAC βˆ€Ξ± s t u, H1, sOpenSub_t tOpen;
consider a b such that
open_in α a ∧ s = a ∩ u ∧ b = a ∩ t [aExists] by fol sOpenSub_t H1 OpenInSubtopology;
fol - tOpen OPEN_IN_INTER INTER_ACI H1 OpenInSubtopology;
qed;
`;;
let OpenInOpenInter = theorem `;
βˆ€Ξ± u s. u βŠ‚ topspace Ξ± β‡’ open_in Ξ± s
β‡’ open_in (subtopology Ξ± u) (u ∩ s)
by fol INTER_COMM OpenInSubtopology`;;
let OpenOpenInTrans = theorem `;
βˆ€Ξ± s t. open_in Ξ± s ∧ open_in Ξ± t ∧ t βŠ‚ s
β‡’ open_in (subtopology Ξ± s) t
by fol OPEN_IN_SUBSET SUBSET_INTER_ABSORPTION OpenInSubtopology`;;
let ClosedClosedInTrans = theorem `;
βˆ€Ξ± s t. closed_in Ξ± s ∧ closed_in Ξ± t ∧ t βŠ‚ s
β‡’ closed_in (subtopology Ξ± s) t
by fol CLOSED_IN_SUBSET SUBSET_INTER_ABSORPTION ClosedInSubtopology`;;
let OpenSubset = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± β‡’
s βŠ‚ t ∧ open_in Ξ± s β‡’ open_in (subtopology Ξ± t) s
by fol OpenInSubtopology SUBSET_INTER_ABSORPTION`;;
let ClosedSubsetEq = theorem `;
βˆ€Ξ± u s. u βŠ‚ topspace Ξ± β‡’
closed_in Ξ± s β‡’ (closed_in (subtopology Ξ± u) s ⇔ s βŠ‚ u)
by fol ClosedInSubtopology INTER_SUBSET SUBSET_INTER_ABSORPTION`;;
let ClosedInInterClosed = theorem `;
βˆ€Ξ± s t u. u βŠ‚ topspace Ξ± β‡’
closed_in (subtopology α u) s ∧ closed_in α t
β‡’ closed_in (subtopology Ξ± u) (s ∩ t)
proof
intro_TAC βˆ€Ξ± s t u, H1, sClosedSub_t tClosed;
consider a b such that
closed_in α a ∧ s = a ∩ u ∧ b = a ∩ t [aExists] by fol sClosedSub_t H1 ClosedInSubtopology;
fol - tClosed CLOSED_IN_INTER INTER_ACI H1 ClosedInSubtopology;
qed;
`;;
let ClosedInClosedInter = theorem `;
βˆ€Ξ± u s. u βŠ‚ topspace Ξ± β‡’
closed_in Ξ± s β‡’ closed_in (subtopology Ξ± u) (u ∩ s)
by fol INTER_COMM ClosedInSubtopology`;;
let ClosedSubset = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± β‡’
s βŠ‚ t ∧ closed_in Ξ± s β‡’ closed_in (subtopology Ξ± t) s
by fol ClosedInSubtopology SUBSET_INTER_ABSORPTION`;;
let OpenInSubsetTrans = theorem `;
βˆ€Ξ± s t u. u βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
open_in (subtopology Ξ± u) s ∧ s βŠ‚ t ∧ t βŠ‚ u
β‡’ open_in (subtopology Ξ± t) s
proof
intro_TAC βˆ€Ξ± s t u, uSubset tSubset;
simplify uSubset tSubset OpenInSubtopology;
intro_TAC sOpen_u s_t t_u;
consider a such that
open_in α a ∧ s = a ∩ u [aExists] by fol uSubset sOpen_u OpenInSubtopology;
set aExists s_t t_u;
qed;
`;;
let ClosedInSubsetTrans = theorem `;
βˆ€Ξ± s t u. u βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
closed_in (subtopology Ξ± u) s ∧ s βŠ‚ t ∧ t βŠ‚ u
β‡’ closed_in (subtopology Ξ± t) s
proof
intro_TAC βˆ€Ξ± s t u, uSubset tSubset;
simplify uSubset tSubset ClosedInSubtopology;
intro_TAC sClosed_u s_t t_u;
consider a such that
closed_in α a ∧ s = a ∩ u [aExists] by fol uSubset sClosed_u ClosedInSubtopology;
set aExists s_t t_u;
qed;
`;;
let OpenInTrans = theorem `;
βˆ€Ξ± s t u. t βŠ‚ topspace Ξ± ∧ u βŠ‚ topspace Ξ± β‡’
open_in (subtopology α t) s ∧ open_in (subtopology α u) t
β‡’ open_in (subtopology Ξ± u) s
proof
intro_TAC βˆ€Ξ± s t u, H1 H2;
simplify H1 H2 OpenInSubtopology;
fol H1 H2 OpenInSubtopology OPEN_IN_INTER INTER_ASSOC;
qed;
`;;
let OpenInTransEq = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± ∧ s βŠ‚ topspace Ξ± β‡’
((βˆ€u. open_in (subtopology Ξ± t) u β‡’ open_in (subtopology Ξ± s) t)
⇔ open_in (subtopology Ξ± s) t)
by fol OpenInTrans OpenInRefl`;;
let OpenInOpenTrans = theorem `;
βˆ€Ξ± u s. u βŠ‚ topspace Ξ± β‡’
open_in (subtopology Ξ± u) s ∧ open_in Ξ± u β‡’ open_in Ξ± s
by fol OpenInSubtopology OPEN_IN_INTER`;;
let OpenInSubtopologyTrans = theorem `;
βˆ€Ξ± s t u. t βŠ‚ topspace Ξ± ∧ u βŠ‚ topspace Ξ± β‡’
open_in (subtopology α t) s ∧ open_in (subtopology α u) t
β‡’ open_in (subtopology Ξ± u) s
proof
simplify OpenInSubtopology;
fol OPEN_IN_INTER INTER_ASSOC;
qed;
`;;
let SubtopologyOpenInSubopen = theorem `;
βˆ€Ξ± u s. u βŠ‚ topspace Ξ± β‡’
(open_in (subtopology Ξ± u) s ⇔
s βŠ‚ u ∧ βˆ€x. x ∈ s β‡’ βˆƒt. open_in Ξ± t ∧ x ∈ t ∧ t ∩ u βŠ‚ s)
proof
intro_TAC βˆ€Ξ± u s, H1;
rewriteL OPEN_IN_SUBOPEN;
simplify H1 OpenInSubtopology;
eq_tac [Right] by fol SUBSET IN_INTER;
intro_TAC H2;
conj_tac [Left]
proof simplify SUBSET; fol H2 IN_INTER; qed;
intro_TAC βˆ€x, xs;
consider t such that
open_in Ξ± t ∧ x ∈ t ∩ u ∧ t ∩ u βŠ‚ s [tExists] by fol H2 xs;
fol - IN_INTER;
qed;
`;;
let ClosedInSubtopologyTrans = theorem `;
βˆ€Ξ± s t u. t βŠ‚ topspace Ξ± ∧ u βŠ‚ topspace Ξ± β‡’
closed_in (subtopology α t) s ∧ closed_in (subtopology α u) t
β‡’ closed_in (subtopology Ξ± u) s
proof
simplify ClosedInSubtopology;
fol CLOSED_IN_INTER INTER_ASSOC;
qed;
`;;
let ClosedInSubtopologyTransEq = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± ∧ s βŠ‚ topspace Ξ± β‡’
((βˆ€u. closed_in (subtopology Ξ± t) u β‡’ closed_in (subtopology Ξ± s) t)
⇔ closed_in (subtopology Ξ± s) t)
proof
intro_TAC βˆ€Ξ± s t, H1 H2;
fol H1 H2 ClosedInSubtopologyTrans CLOSED_IN_TOPSPACE;
qed;
`;;
let ClosedInClosedTrans = theorem `;
βˆ€Ξ± s t. u βŠ‚ topspace Ξ± β‡’
closed_in (subtopology Ξ± u) s ∧ closed_in Ξ± u β‡’ closed_in Ξ± s
by fol ClosedInSubtopology CLOSED_IN_INTER`;;
let OpenInSubtopologyInterSubset = theorem `;
βˆ€Ξ± s u v. u βŠ‚ topspace Ξ± ∧ v βŠ‚ topspace Ξ± β‡’
open_in (subtopology Ξ± u) (u ∩ s) ∧ v βŠ‚ u
β‡’ open_in (subtopology Ξ± v) (v ∩ s)
proof
simplify OpenInSubtopology;
set;
qed;
`;;
let OpenInOpenEq = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± β‡’
open_in Ξ± s β‡’ (open_in (subtopology Ξ± s) t ⇔ open_in Ξ± t ∧ t βŠ‚ s)
by fol OpenOpenInTrans OPEN_IN_SUBSET TopspaceSubtopology OpenInOpenTrans`;;
let ClosedInClosedEq = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± β‡’ closed_in Ξ± s β‡’
(closed_in (subtopology Ξ± s) t ⇔ closed_in Ξ± t ∧ t βŠ‚ s)
by fol ClosedClosedInTrans CLOSED_IN_SUBSET TopspaceSubtopology ClosedInClosedTrans`;;
let OpenImpliesSubtopologyInterOpen = theorem `;
βˆ€Ξ± u s. u βŠ‚ topspace Ξ± β‡’
open_in Ξ± s β‡’ open_in (subtopology Ξ± u) (u ∩ s)
by fol OpenInSubtopology INTER_COMM`;;
let OPEN_IN_EXISTS_IN = theorem `;
βˆ€Ξ± P Q. (βˆ€a. P a β‡’ open_in Ξ± {x | Q a x}) β‡’
open_in Ξ± {x | βˆƒa. P a ∧ Q a x}
proof
intro_TAC βˆ€Ξ± P Q, H1;
consider f such that f = {{x | Q a x} | P a} [fDef] by fol;
(βˆ€a. P a β‡’ open_in Ξ± {x | Q a x}) ⇔ (βˆ€s. s ∈ f β‡’ open_in Ξ± s) [] by simplify fDef FORALL_IN_GSPEC;
MP_TAC MESON [H1; -; OPEN_IN_UNIONS] [open_in Ξ± (UNIONS f)];
simplify fDef UNIONS_GSPEC;
set;
qed;
`;;
let Connected_DEF = NewDefinition `;
βˆ€Ξ±. Connected Ξ± ⇔
Β¬(βˆƒe1 e2. open_in Ξ± e1 ∧ open_in Ξ± e2 ∧ topspace Ξ± = e1 βˆͺ e2 ∧
e1 ∩ e2 = βˆ… ∧ Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…))`;;
let ConnectedClosedHelp = theorem `;
βˆ€Ξ± e1 e2. topspace Ξ± = e1 βˆͺ e2 ∧ e1 ∩ e2 = βˆ… β‡’
(closed_in Ξ± e1 ∧ closed_in Ξ± e2 ⇔ open_in Ξ± e1 ∧ open_in Ξ± e2)
proof
intro_TAC βˆ€Ξ± e1 e2, H1 H2;
e1 = topspace Ξ± ━ e2 ∧ e2 = topspace Ξ± ━ e1 [e12Complements] by set H1 H2;
fol H1 SUBSET_UNION e12Complements OPEN_IN_CLOSED_IN_EQ;
qed;
`;;
let ConnectedClosed = theorem `;
βˆ€Ξ±. Connected Ξ± ⇔
Β¬(βˆƒe1 e2. closed_in Ξ± e1 ∧ closed_in Ξ± e2 ∧
topspace Ξ± = e1 βˆͺ e2 ∧ e1 ∩ e2 = βˆ… ∧ Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…))
proof
rewrite Connected_DEF;
fol ConnectedClosedHelp;
qed;
`;;
let ConnectedOpenIn = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Connected (subtopology Ξ± s) ⇔ Β¬(βˆƒe1 e2.
open_in (subtopology α s) e1 ∧ open_in (subtopology α s) e2 ∧
s βŠ‚ e1 βˆͺ e2 ∧ e1 ∩ e2 = βˆ… ∧ Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…)))
proof
simplify Connected_DEF TopspaceSubtopology;
fol SUBSET_REFL OpenInImpSubset UNION_SUBSET SUBSET_ANTISYM;
qed;
`;;
let ConnectedClosedIn = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Connected (subtopology Ξ± s) ⇔ Β¬(βˆƒe1 e2.
closed_in (subtopology α s) e1 ∧ closed_in (subtopology α s) e2 ∧
s βŠ‚ e1 βˆͺ e2 ∧ e1 ∩ e2 = βˆ… ∧ Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…)))
proof
simplify ConnectedClosed TopspaceSubtopology;
fol SUBSET_REFL ClosedInImpSubset UNION_SUBSET SUBSET_ANTISYM;
qed;
`;;
let ConnectedSubtopology = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Connected (subtopology Ξ± s) ⇔
Β¬(βˆƒe1 e2. open_in Ξ± e1 ∧ open_in Ξ± e2 ∧ s βŠ‚ e1 βˆͺ e2 ∧
e1 ∩ e2 ∩ s = βˆ… ∧ Β¬(e1 ∩ s = βˆ…) ∧ Β¬(e2 ∩ s = βˆ…)))
proof
intro_TAC βˆ€Ξ± s, H1;
simplify H1 Connected_DEF OpenInSubtopology TopspaceSubtopology;
AP_TERM_TAC;
eq_tac [Left]
proof
intro_TAC H2;
consider t1 t2 such that
open_in Ξ± t1 ∧ open_in Ξ± t2 ∧ s = (t1 ∩ s) βˆͺ (t2 ∩ s) ∧
(t1 ∩ s) ∩ (t2 ∩ s) = βˆ… ∧ Β¬(t1 ∩ s = βˆ…) ∧ Β¬(t2 ∩ s = βˆ…) [t12Exist] by fol H2;
s βŠ‚ t1 βˆͺ t2 ∧ t1 ∩ t2 ∩ s = βˆ… [] by set t12Exist;
fol t12Exist -;
qed;
rewrite LEFT_IMP_EXISTS_THM;
intro_TAC βˆ€e1 e2, e12Exist;
exists_TAC e1 ∩ s;
exists_TAC e2 ∩ s;
set e12Exist;
qed;
`;;
let ConnectedSubtopology_ALT = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Connected (subtopology Ξ± s) ⇔
βˆ€e1 e2. open_in Ξ± e1 ∧ open_in Ξ± e2 ∧
s βŠ‚ e1 βˆͺ e2 ∧ e1 ∩ e2 ∩ s = βˆ…
β‡’ e1 ∩ s = βˆ… ∨ e2 ∩ s = βˆ…)
proof simplify ConnectedSubtopology; fol; qed;
`;;
let ConnectedClosedSubtopology = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Connected (subtopology Ξ± s) ⇔
Β¬(βˆƒe1 e2. closed_in Ξ± e1 ∧ closed_in Ξ± e2 ∧ s βŠ‚ e1 βˆͺ e2 ∧
e1 ∩ e2 ∩ s = βˆ… ∧ Β¬(e1 ∩ s = βˆ…) ∧ Β¬(e2 ∩ s = βˆ…)))
proof
intro_TAC βˆ€Ξ± s, H1;
simplify H1 ConnectedSubtopology;
AP_TERM_TAC;
eq_tac [Left]
proof
rewrite LEFT_IMP_EXISTS_THM;
intro_TAC βˆ€e1 e2, e12Exist;
exists_TAC topspace Ξ± ━ e2;
exists_TAC topspace Ξ± ━ e1;
simplify OPEN_IN_SUBSET H1 SUBSET_DIFF DIFF_REFL closed_in e12Exist;
set H1 e12Exist;
qed;
rewrite LEFT_IMP_EXISTS_THM;
intro_TAC βˆ€e1 e2, e12Exist;
exists_TAC topspace Ξ± ━ e2;
exists_TAC topspace Ξ± ━ e1;
e1 βŠ‚ topspace Ξ± ∧ e2 βŠ‚ topspace Ξ± [e12Top] by fol closed_in e12Exist;
simplify DIFF_REFL SUBSET_DIFF e12Top OPEN_IN_CLOSED_IN;
set H1 e12Exist;
qed;
`;;
let ConnectedClosedSubtopology_ALT = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Connected (subtopology Ξ± s) ⇔
βˆ€e1 e2. closed_in Ξ± e1 ∧ closed_in Ξ± e2 ∧
s βŠ‚ e1 βˆͺ e2 ∧ e1 ∩ e2 ∩ s = βˆ…
β‡’ e1 ∩ s = βˆ… ∨ e2 ∩ s = βˆ…)
proof simplify ConnectedClosedSubtopology; fol; qed;
`;;
let ConnectedClopen = theorem `;
βˆ€Ξ±. Connected Ξ± ⇔
βˆ€t. open_in Ξ± t ∧ closed_in Ξ± t β‡’ t = βˆ… ∨ t = topspace Ξ±
proof
intro_TAC βˆ€Ξ±;
simplify Connected_DEF closed_in TAUT [(Β¬a ⇔ b) ⇔ (a ⇔ Β¬b)] NOT_FORALL_THM NOT_IMP DE_MORGAN_THM;
eq_tac [Left]
proof
rewrite LEFT_IMP_EXISTS_THM; intro_TAC βˆ€e1 e2, H1 H2 H3 H4 H5 H6;
exists_TAC e1;
e1 βŠ‚ topspace Ξ± ∧ e2 = topspace Ξ± ━ e1 ∧ Β¬(e1 = topspace alpha) [] by set H3 H4 H6;
fol H1 - H2 H5;
qed;
rewrite LEFT_IMP_EXISTS_THM; intro_TAC βˆ€t, H1;
exists_TAC t; exists_TAC topspace Ξ± ━ t;
set H1;
qed;
`;;
let ConnectedClosedSet = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ closed_in Ξ± s β‡’
(Connected (subtopology Ξ± s) ⇔ Β¬(βˆƒe1 e2.
closed_in α e1 ∧ closed_in α e2 ∧
Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…) ∧ e1 βˆͺ e2 = s ∧ e1 ∩ e2 = βˆ…))
proof
intro_TAC βˆ€Ξ± s, H1, H2;
simplify H1 ConnectedClosedSubtopology;
AP_TERM_TAC;
eq_tac [Left]
proof
rewrite LEFT_IMP_EXISTS_THM; intro_TAC βˆ€e1 e2, H3 H4 H5 H6 H7 H8;
exists_TAC e1 ∩ s; exists_TAC e2 ∩ s;
simplify H2 H3 H4 H7 H8 CLOSED_IN_INTER;
set H5 H6;
qed;
rewrite LEFT_IMP_EXISTS_THM; intro_TAC βˆ€e1 e2, H3 H4 H5 H6 H7 H8;
exists_TAC e1; exists_TAC e2;
set H3 H4 H7 H8 H5 H6;
qed;
`;;
let ConnectedOpenSet = theorem `;
βˆ€Ξ± s. open_in Ξ± s β‡’
(Connected (subtopology Ξ± s) ⇔
Β¬(βˆƒe1 e2. open_in Ξ± e1 ∧ open_in Ξ± e2 ∧
Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…) ∧ e1 βˆͺ e2 = s ∧ e1 ∩ e2 = βˆ…))
proof
intro_TAC βˆ€Ξ± s, H1;
simplify H1 OPEN_IN_SUBSET ConnectedSubtopology;
AP_TERM_TAC;
eq_tac [Left]
proof
rewrite LEFT_IMP_EXISTS_THM; intro_TAC βˆ€e1 e2, H3 H4 H5 H6 H7 H8;
exists_TAC e1 ∩ s; exists_TAC e2 ∩ s;
e1 βŠ‚ topspace Ξ± ∧ e2 βŠ‚ topspace Ξ± [e12Subsets] by fol H3 H4 OPEN_IN_SUBSET;
simplify H1 H3 H4 OPEN_IN_INTER H7 H8;
set e12Subsets H5 H6;
qed;
rewrite LEFT_IMP_EXISTS_THM; intro_TAC βˆ€e1 e2, H3 H4 H5 H6 H7 H8;
exists_TAC e1; exists_TAC e2;
set H3 H4 H7 H8 H5 H6;
qed;
`;;
let ConnectedEmpty = theorem `;
βˆ€Ξ±. Connected (subtopology Ξ± βˆ…)
proof
simplify Connected_DEF INTER_EMPTY EMPTY_SUBSET TopspaceSubtopology;
fol UNION_SUBSET SUBSET_EMPTY;
qed;
`;;
let ConnectedSing = theorem `;
βˆ€Ξ± a. a ∈ topspace Ξ± β‡’ Connected (subtopology Ξ± {a})
proof
simplify Connected_DEF SING_SUBSET TopspaceSubtopology;
set;
qed;
`;;
let ConnectedUnions = theorem `;
βˆ€Ξ± P. (βˆ€s. s ∈ P β‡’ s βŠ‚ topspace Ξ±) β‡’
(βˆ€s. s ∈ P β‡’ Connected (subtopology Ξ± s)) ∧ Β¬(INTERS P = βˆ…)
β‡’ Connected (subtopology Ξ± (UNIONS P))
proof
intro_TAC βˆ€Ξ± P, H1;
simplify H1 ConnectedSubtopology UNIONS_SUBSET NOT_EXISTS_THM;
intro_TAC allConnected PnotDisjoint, βˆ€[d/e1] [e/e2];
consider a such that
βˆ€t. t ∈ P β‡’ a ∈ t [aInterP] by fol PnotDisjoint MEMBER_NOT_EMPTY IN_INTERS;
ONCE_REWRITE_TAC TAUT [βˆ€p. Β¬p ⇔ p β‡’ F];
intro_TAC dOpen eOpen Pde deDisjoint dNonempty eNonempty;
a ∈ d ∨ a ∈ e [adORae] by set aInterP Pde dNonempty;
consider s x t y such that
s ∈ P ∧ x ∈ d ∩ s ∧
t ∈ P ∧ y ∈ e ∩ t [xdsANDyet] by set dNonempty eNonempty;
d ∩ e ∩ s = βˆ… ∧ d ∩ e ∩ t = βˆ… [] by set - deDisjoint;
(d ∩ s = βˆ… ∨ e ∩ s = βˆ…) ∧
(d ∩ t = βˆ… ∨ e ∩ t = βˆ…) [] by fol xdsANDyet allConnected dOpen eOpen Pde -;
set adORae xdsANDyet aInterP -;
qed;
`;;
let ConnectedUnion = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± ∧ Β¬(s ∩ t = βˆ…) ∧
Connected (subtopology α s) ∧ Connected (subtopology α t)
β‡’ Connected (subtopology Ξ± (s βˆͺ t))
proof
rewrite GSYM UNIONS_2 GSYM INTERS_2;
intro_TAC βˆ€Ξ± s t, H1 H2 H3 H4 H5;
βˆ€u. u ∈ {s, t} β‡’ u βŠ‚ topspace Ξ± [stEuclidean] by set H1 H2;
βˆ€u. u ∈ {s, t} β‡’ Connected (subtopology Ξ± u) [] by set H4 H5;
fol stEuclidean - H3 ConnectedUnions;
qed;
`;;
let ConnectedDiffOpenFromClosed = theorem `;
βˆ€Ξ± s t u. u βŠ‚ topspace Ξ± β‡’
s βŠ‚ t ∧ t βŠ‚ u ∧ open_in Ξ± s ∧ closed_in Ξ± t ∧
Connected (subtopology Ξ± u) ∧ Connected (subtopology Ξ± (t ━ s))
β‡’ Connected (subtopology Ξ± (u ━ s))
proof
ONCE_REWRITE_TAC TAUT
[βˆ€a b c d e f g. (a ∧ b ∧ c ∧ d ∧ e ∧ f β‡’ g) ⇔
(a ∧ b ∧ c ∧ d β‡’ Β¬g β‡’ f β‡’ Β¬e)];
intro_TAC βˆ€Ξ± s t u, uSubset, st tu sOpen tClosed;
t ━ s βŠ‚ topspace Ξ± ∧ u ━ s βŠ‚ topspace Ξ± [] by fol uSubset sOpen OPEN_IN_SUBSET tClosed closed_in SUBSET_DIFF SUBSET_TRANS;
simplify uSubset - ConnectedSubtopology;
rewrite LEFT_IMP_EXISTS_THM;
intro_TAC βˆ€[v/e1] [w/e2];
intro_TAC vOpen wOpen u_sDisconnected vwDisjoint vNonempty wNonempty;
rewrite NOT_EXISTS_THM;
intro_TAC t_sConnected;
t ━ s βŠ‚ v βˆͺ w ∧ v ∩ w ∩ (t ━ s) = βˆ… [] by set tu u_sDisconnected vwDisjoint;
v ∩ (t ━ s) = βˆ… ∨ w ∩ (t ━ s) = βˆ… [] by fol t_sConnected vOpen wOpen -;
case_split vEmpty | wEmpty by fol -;
suppose v ∩ (t ━ s) = βˆ…;
exists_TAC w βˆͺ s; exists_TAC v ━ t;
simplify vOpen wOpen sOpen tClosed OPEN_IN_UNION OPEN_IN_DIFF;
set st tu u_sDisconnected vEmpty vwDisjoint wNonempty vNonempty;
end;
suppose w ∩ (t ━ s) = βˆ…;
exists_TAC v βˆͺ s; exists_TAC w ━ t;
simplify vOpen wOpen sOpen tClosed OPEN_IN_UNION OPEN_IN_DIFF;
set st tu u_sDisconnected wEmpty vwDisjoint wNonempty vNonempty;
end;
qed;
`;;
let ConnectedDisjointUnionsOpenUniquePart1 = theorem `;
βˆ€Ξ± f f' s t a. pairwise DISJOINT f ∧ pairwise DISJOINT f' ∧
(βˆ€s. s ∈ f β‡’ open_in Ξ± s ∧ Connected (subtopology Ξ± s) ∧ Β¬(s = βˆ…)) ∧
(βˆ€s. s ∈ f' β‡’ open_in Ξ± s ∧ Connected (subtopology Ξ± s) ∧ Β¬(s = βˆ…)) ∧
UNIONS f = UNIONS f' ∧ s ∈ f ∧ t ∈ f' ∧ a ∈ s ∧ a ∈ t
β‡’ s βŠ‚ t
proof
intro_TAC βˆ€Ξ± f f' s t a, pDISJf pDISJf' fConn f'Conn Uf_Uf' sf tf' a_s a_t;
βˆ€s. s ∈ f β‡’ s βŠ‚ topspace Ξ± [fTop] by fol fConn OPEN_IN_SUBSET;
βˆ€s. s ∈ f' β‡’ s βŠ‚ topspace Ξ± [f'Top] by fol f'Conn OPEN_IN_SUBSET;
rewrite SUBSET;
intro_TAC βˆ€[b], bs;
assume ¬(b ∈ t) [Contradiction] by fol;
βˆƒe1 e2. open_in Ξ± e1 ∧ open_in Ξ± e2 ∧ e1 ∩ e2 ∩ s = βˆ… ∧
s βŠ‚ e1 βˆͺ e2 ∧ Β¬(e1 ∩ s = βˆ…) ∧ Β¬(e2 ∩ s = βˆ…) []
proof
exists_TAC t; exists_TAC UNIONS (f' DELETE t);
simplify tf' f'Conn IN_DELETE OPEN_IN_UNIONS;
conj_tac [Right] by set sf Uf_Uf' a_s a_t sf bs Contradiction;
MATCH_MP_TAC SET_RULE [βˆ€s t u. t ∩ u = βˆ… β‡’ t ∩ u ∩ s = βˆ…];
rewrite INTER_UNIONS EMPTY_UNIONS FORALL_IN_GSPEC;
rewrite IN_DELETE GSYM DISJOINT;
fol pDISJf' tf' pairwise;
qed;
fol - sf fTop fConn ConnectedSubtopology;
qed;
`;;
let ConnectedDisjointUnionsOpenUnique = theorem `;
βˆ€Ξ± f f'. pairwise DISJOINT f ∧ pairwise DISJOINT f' ∧
(βˆ€s. s ∈ f β‡’ open_in Ξ± s ∧ Connected (subtopology Ξ± s) ∧ Β¬(s = βˆ…)) ∧
(βˆ€s. s ∈ f' β‡’ open_in Ξ± s ∧ Connected (subtopology Ξ± s) ∧ Β¬(s = βˆ…)) ∧
UNIONS f = UNIONS f'
β‡’ f = f'
proof
MATCH_MP_TAC MESON [SUBSET_ANTISYM]
[(βˆ€Ξ± s t. P Ξ± s t β‡’ P Ξ± t s) ∧ (βˆ€Ξ± s t. P Ξ± s t β‡’ s βŠ‚ t)
β‡’ (βˆ€Ξ± s t. P Ξ± s t β‡’ s = t)];
conj_tac [Left] by fol;
intro_TAC βˆ€Ξ± f f', pDISJf pDISJf' fConn f'Conn Uf_Uf';
rewrite SUBSET;
intro_TAC βˆ€[s], sf;
consider t a such that
t ∈ f' ∧ a ∈ s ∧ a ∈ t [taExist] by set sf fConn Uf_Uf';
MP_TAC ISPECL [Ξ±; f; f'; s; t] ConnectedDisjointUnionsOpenUniquePart1;
MP_TAC ISPECL [Ξ±; f'; f; t; s] ConnectedDisjointUnionsOpenUniquePart1;
fol pDISJf pDISJf' fConn f'Conn Uf_Uf' sf taExist SUBSET_ANTISYM taExist;
qed;
`;;
let ConnectedFromClosedUnionAndInter = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± ∧ closed_in Ξ± s ∧ closed_in Ξ± t ∧
Connected (subtopology Ξ± (s βˆͺ t)) ∧ Connected (subtopology Ξ± (s ∩ t))
β‡’ Connected (subtopology Ξ± s) ∧ Connected (subtopology Ξ± t)
proof
MATCH_MP_TAC MESON [] [(βˆ€Ξ± s t. P Ξ± s t β‡’ P Ξ± t s) ∧
(βˆ€Ξ± s t. P Ξ± s t β‡’ Q Ξ± s) β‡’ βˆ€Ξ± s t. P Ξ± s t β‡’ Q Ξ± s ∧ Q Ξ± t];
conj_tac [Left] by fol UNION_COMM INTER_COMM;
ONCE_REWRITE_TAC TAUT
[βˆ€a b c d e f. a ∧ b ∧ c ∧ d ∧ e β‡’ f ⇔ a ∧ b ∧ c ∧ e ∧ Β¬f β‡’ Β¬d];
intro_TAC βˆ€Ξ± s t, stUnionTop sClosed tClosed stInterConn NOTsConn;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± ∧ s ∩ t βŠ‚ topspace Ξ± [stTop] by fol stUnionTop UNION_SUBSET INTER_SUBSET SUBSET_TRANS;
simplify stUnionTop ConnectedClosedSubtopology;
consider u v such that closed_in α u ∧ closed_in α v ∧
Β¬(u = βˆ…) ∧ Β¬(v = βˆ…) ∧ u βˆͺ v = s ∧ u ∩ v = βˆ… [sDisConn]
proof
MP_TAC ISPECL [Ξ±; s] ConnectedClosedSet;
simplify stTop sClosed NOTsConn;
qed;
s ∩ t βŠ‚ u βˆͺ v ∧ u ∩ v ∩ (s ∩ t) = βˆ… [stuvProps] by set sDisConn;
u ∩ (s ∩ t) = βˆ… ∨ v ∩ (s ∩ t) = βˆ… [] by fol stTop stInterConn sDisConn - ConnectedClosedSubtopology_ALT;
case_split vstEmpty | ustEmpty by fol -;
suppose v ∩ (s ∩ t) = βˆ…;
exists_TAC t βˆͺ u; exists_TAC v;
simplify tClosed sDisConn CLOSED_IN_UNION;
set stuvProps sDisConn vstEmpty;
end;
suppose u ∩ (s ∩ t) = βˆ…;
exists_TAC t βˆͺ v; exists_TAC u;
simplify tClosed sDisConn CLOSED_IN_UNION;
set stuvProps sDisConn ustEmpty;
end;
qed;
`;;
let ConnectedFromOpenUnionAndInter = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± ∧ open_in Ξ± s ∧ open_in Ξ± t ∧
Connected (subtopology Ξ± (s βˆͺ t)) ∧ Connected (subtopology Ξ± (s ∩ t))
β‡’ Connected (subtopology Ξ± s) ∧ Connected (subtopology Ξ± t)
proof
MATCH_MP_TAC MESON [] [(βˆ€Ξ± s t. P Ξ± s t β‡’ P Ξ± t s) ∧
(βˆ€Ξ± s t. P Ξ± s t β‡’ Q Ξ± s) β‡’ βˆ€Ξ± s t. P Ξ± s t β‡’ Q Ξ± s ∧ Q Ξ± t];
conj_tac [Left] by fol UNION_COMM INTER_COMM;
ONCE_REWRITE_TAC TAUT
[βˆ€a b c d e f. a ∧ b ∧ c ∧ d ∧ e β‡’ f ⇔ a ∧ b ∧ c ∧ e ∧ Β¬f β‡’ Β¬d];
intro_TAC βˆ€Ξ± s t, stUnionTop sOpen tOpen stInterConn NOTsConn;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± ∧ s ∩ t βŠ‚ topspace Ξ± [stTop] by fol stUnionTop UNION_SUBSET INTER_SUBSET SUBSET_TRANS;
simplify stUnionTop ConnectedSubtopology;
consider u v such that open_in α u ∧ open_in α v ∧
Β¬(u = βˆ…) ∧ Β¬(v = βˆ…) ∧ u βˆͺ v = s ∧ u ∩ v = βˆ… [sDisConn]
proof
MP_TAC ISPECL [Ξ±; s] ConnectedOpenSet;
simplify stTop sOpen NOTsConn;
qed;
s ∩ t βŠ‚ u βˆͺ v ∧ u ∩ v ∩ (s ∩ t) = βˆ… [stuvProps] by set sDisConn;
u ∩ (s ∩ t) = βˆ… ∨ v ∩ (s ∩ t) = βˆ… [] by fol stTop stInterConn sDisConn - ConnectedSubtopology_ALT;
case_split vstEmpty | ustEmpty by fol -;
suppose v ∩ (s ∩ t) = βˆ…;
exists_TAC t βˆͺ u; exists_TAC v;
simplify tOpen sDisConn OPEN_IN_UNION;
set stuvProps sDisConn vstEmpty;
end;
suppose u ∩ (s ∩ t) = βˆ…;
exists_TAC t βˆͺ v; exists_TAC u;
simplify tOpen sDisConn OPEN_IN_UNION;
set stuvProps sDisConn ustEmpty;
end;
qed;
`;;
let ConnectedInduction = theorem `;
βˆ€Ξ± P Q s. s βŠ‚ topspace Ξ± β‡’ Connected (subtopology Ξ± s) ∧
(βˆ€t a. open_in (subtopology Ξ± s) t ∧ a ∈ t β‡’ βˆƒz. z ∈ t ∧ P z) ∧
(βˆ€a. a ∈ s β‡’ βˆƒt. open_in (subtopology Ξ± s) t ∧ a ∈ t ∧
βˆ€x y. x ∈ t ∧ y ∈ t ∧ P x ∧ P y ∧ Q x β‡’ Q y)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s ∧ P a ∧ P b ∧ Q a β‡’ Q b
proof
intro_TAC βˆ€Ξ± P Q s, sTop, sConn atOpenImplies_ztPz asImplies_atOpen_xytPxPyQxasImpliesQy, βˆ€a b, aINs bINs Pa Pb Qa;
assume Β¬Q b [NotQb] by fol;
Β¬Connected (subtopology Ξ± s) []
proof
simplify sTop ConnectedOpenIn;
exists_TAC
{b | βˆƒt. open_in (subtopology Ξ± s) t ∧ b ∈ t ∧ βˆ€x. x ∈ t ∧ P x β‡’ Q x};
exists_TAC
{b | βˆƒt. open_in (subtopology Ξ± s) t ∧ b ∈ t ∧ βˆ€x. x ∈ t ∧ P x β‡’ Β¬(Q x)};
conj_tac [Left]
proof
ONCE_REWRITE_TAC OPEN_IN_SUBOPEN;
intro_TAC βˆ€[c];
rewrite IN_ELIM_THM;
MATCH_MP_TAC MONO_EXISTS;
set atOpenImplies_ztPz;
qed;
conj_tac [Left]
proof
ONCE_REWRITE_TAC OPEN_IN_SUBOPEN;
intro_TAC βˆ€[c];
rewrite IN_ELIM_THM;
MATCH_MP_TAC MONO_EXISTS;
set atOpenImplies_ztPz;
qed;
conj_tac [Left]
proof
rewrite SUBSET IN_ELIM_THM IN_UNION;
intro_TAC βˆ€[c], cs;
MP_TAC SPECL [c] asImplies_atOpen_xytPxPyQxasImpliesQy;
set cs;
qed;
conj_tac [Right] by set aINs bINs Qa NotQb asImplies_atOpen_xytPxPyQxasImpliesQy Pa Pb;
rewrite EXTENSION IN_INTER NOT_IN_EMPTY IN_ELIM_THM;
intro_TAC βˆ€[c];
ONCE_REWRITE_TAC TAUT [βˆ€p. Β¬p ⇔ p β‡’ F];
intro_TAC Qx NotQx;
consider t such that
open_in (subtopology Ξ± s) t ∧ c ∈ t ∧ (βˆ€x. x ∈ t ∧ P x β‡’ Q x) [tExists] by fol Qx;
consider u such that
open_in (subtopology Ξ± s) u ∧ c ∈ u ∧ (βˆ€x. x ∈ u ∧ P x β‡’ Β¬Q x) [uExists] by fol NotQx;
MP_TAC SPECL [t ∩ u; c] atOpenImplies_ztPz;
simplify tExists uExists OPEN_IN_INTER;
set tExists uExists;
qed;
fol sConn -;
qed;
`;;
let ConnectedEquivalenceRelationGen = theorem `;
βˆ€Ξ± P R s. s βŠ‚ topspace Ξ± β‡’ Connected (subtopology Ξ± s) ∧
(βˆ€x y z. R x y ∧ R y z β‡’ R x z) ∧
(βˆ€t a. open_in (subtopology Ξ± s) t ∧ a ∈ t
β‡’ βˆƒz. z ∈ t ∧ P z) ∧
(βˆ€a. a ∈ s
β‡’ βˆƒt. open_in (subtopology Ξ± s) t ∧ a ∈ t ∧
βˆ€x y. x ∈ t ∧ y ∈ t ∧ P x ∧ P y β‡’ R x y)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s ∧ P a ∧ P b β‡’ R a b
proof
intro_TAC βˆ€Ξ± P R s, sTop, sConn Rtrans atOpenImplies_ztPz asImplies_atOpen_xytPxPyImpliesRxy, βˆ€a b, aINs bINs Pa Pb;
βˆ€a. a ∈ s ∧ P a β‡’ βˆ€b c. b ∈ s ∧ c ∈ s ∧ P b ∧ P c ∧ R a b β‡’ R a c []
proof
intro_TAC βˆ€[p/a], pINs Pp;
MP_TAC ISPECL [Ξ±; P; Ξ»x. R p x; s] ConnectedInduction;
rewrite sTop sConn atOpenImplies_ztPz;
fol asImplies_atOpen_xytPxPyImpliesRxy Rtrans;
qed;
fol aINs Pa bINs Pb asImplies_atOpen_xytPxPyImpliesRxy -;
qed;
`;;
let ConnectedInductionSimple = theorem `;
βˆ€Ξ± P s. s βŠ‚ topspace Ξ± β‡’
Connected (subtopology α s) ∧
(βˆ€a. a ∈ s
β‡’ βˆƒt. open_in (subtopology Ξ± s) t ∧ a ∈ t ∧
βˆ€x y. x ∈ t ∧ y ∈ t ∧ P x β‡’ P y)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s ∧ P a β‡’ P b
proof
intro_TAC βˆ€Ξ± P s, sTop;
MP_TAC ISPECL [α; (λx. T ∨ x ∈ s); P; s] ConnectedInduction;
fol sTop;
qed;
`;;
let ConnectedEquivalenceRelation = theorem `;
βˆ€Ξ± R s. s βŠ‚ topspace Ξ± β‡’ Connected (subtopology Ξ± s)∧
(βˆ€x y. R x y β‡’ R y x) ∧ (βˆ€x y z. R x y ∧ R y z β‡’ R x z) ∧
(βˆ€a. a ∈ s β‡’
βˆƒt. open_in (subtopology Ξ± s) t ∧ a ∈ t ∧ βˆ€x. x ∈ t β‡’ R a x)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s β‡’ R a b
proof
intro_TAC βˆ€Ξ± R s, sTop, sConn Rcomm Rtrans asImplies_atOpen_xtImpliesRax;
βˆ€a. a ∈ s β‡’ βˆ€b c. b ∈ s ∧ c ∈ s ∧ R a b β‡’ R a c []
proof
intro_TAC βˆ€[p/a], pINs;
MP_TAC ISPECL [Ξ±; Ξ»x. R p x; s] ConnectedInductionSimple;
rewrite sTop sConn;
fol asImplies_atOpen_xtImpliesRax Rcomm Rtrans;
qed;
fol asImplies_atOpen_xtImpliesRax -;
qed;
`;;
let LimitPointOf = NewDefinition `;
βˆ€Ξ± s. LimitPointOf Ξ± s = {x | s βŠ‚ topspace Ξ± ∧ x ∈ topspace Ξ± ∧
βˆ€t. x ∈ t ∧ open_in Ξ± t β‡’ βˆƒy. Β¬(y = x) ∧ y ∈ s ∧ y ∈ t}`;;
let IN_LimitPointOf = theorem `;
βˆ€Ξ± s x. s βŠ‚ topspace Ξ± β‡’
(x ∈ LimitPointOf Ξ± s ⇔ x ∈ topspace Ξ± ∧
βˆ€t. x ∈ t ∧ open_in Ξ± t β‡’ βˆƒy. Β¬(y = x) ∧ y ∈ s ∧ y ∈ t)
by simplify IN_ELIM_THM LimitPointOf`;;
let NotLimitPointOf = theorem `;
βˆ€Ξ± s x. s βŠ‚ topspace Ξ± ∧ x ∈ topspace Ξ± β‡’
(x βˆ‰ LimitPointOf Ξ± s ⇔
βˆƒt. x ∈ t ∧ open_in Ξ± t ∧ s ∩ (t ━ {x}) = βˆ…)
proof
ONCE_REWRITE_TAC TAUT [βˆ€a b. (a ⇔ b) ⇔ (Β¬a ⇔ Β¬b)];
simplify βˆ‰ NOT_EXISTS_THM IN_LimitPointOf
TAUT [βˆ€a b. Β¬(a ∧ b ∧ c) ⇔ a ∧ b β‡’ Β¬c] GSYM MEMBER_NOT_EMPTY IN_INTER IN_DIFF IN_SING;
fol;
qed;
`;;
let LimptSubset = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± β‡’
s βŠ‚ t β‡’ LimitPointOf Ξ± s βŠ‚ LimitPointOf Ξ± t
proof
intro_TAC βˆ€Ξ± s t, tTop, st;
s βŠ‚ topspace Ξ± [sTop] by fol tTop st SUBSET_TRANS;
simplify tTop sTop IN_LimitPointOf SUBSET;
fol st SUBSET;
qed;
`;;
let ClosedLimpt = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(closed_in Ξ± s ⇔ LimitPointOf Ξ± s βŠ‚ s)
proof
intro_TAC βˆ€Ξ± s, H1;
simplify H1 closed_in;
ONCE_REWRITE_TAC OPEN_IN_SUBOPEN;
simplify H1 IN_LimitPointOf SUBSET IN_DIFF;
AP_TERM_TAC;
ABS_TAC;
fol OPEN_IN_SUBSET SUBSET;
qed;
`;;
let LimptEmpty = theorem `;
βˆ€Ξ± x. x ∈ topspace Ξ± β‡’ x βˆ‰ LimitPointOf Ξ± βˆ…
by fol EMPTY_SUBSET IN_LimitPointOf OPEN_IN_TOPSPACE NOT_IN_EMPTY βˆ‰`;;
let NoLimitPointImpClosed = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ (βˆ€x. x βˆ‰ LimitPointOf Ξ± s) β‡’ closed_in Ξ± s
by fol ClosedLimpt SUBSET βˆ‰`;;
let LimitPointUnion = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
LimitPointOf Ξ± (s βˆͺ t) = LimitPointOf Ξ± s βˆͺ LimitPointOf Ξ± t
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± [stTop] by fol H1 UNION_SUBSET;
rewrite EXTENSION IN_UNION;
intro_TAC βˆ€x;
assume x ∈ topspace α [xTop] by fol H1 stTop IN_LimitPointOf;
ONCE_REWRITE_TAC TAUT [βˆ€a b. (a ⇔ b) ⇔ (Β¬a ⇔ Β¬b)];
simplify GSYM NOTIN DE_MORGAN_THM H1 stTop NotLimitPointOf xTop;
eq_tac [Left] by set;
MATCH_MP_TAC ExistsTensorInter;
simplify IN_INTER OPEN_IN_INTER;
set;
qed;
`;;
let Interior_DEF = NewDefinition `;
βˆ€Ξ± s. Interior Ξ± s =
{x | s βŠ‚ topspace Ξ± ∧ βˆƒt. open_in Ξ± t ∧ x ∈ t ∧ t βŠ‚ s}`;;
let Interior_THM = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Interior Ξ± s =
{x | s βŠ‚ topspace Ξ± ∧ βˆƒt. open_in Ξ± t ∧ x ∈ t ∧ t βŠ‚ s}
by fol Interior_DEF`;;
let IN_Interior = theorem `;
βˆ€Ξ± s x. s βŠ‚ topspace Ξ± β‡’
(x ∈ Interior Ξ± s ⇔ βˆƒt. open_in Ξ± t ∧ x ∈ t ∧ t βŠ‚ s)
by simplify Interior_THM IN_ELIM_THM`;;
let InteriorEq = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(open_in Ξ± s ⇔ s = Interior Ξ± s)
proof
intro_TAC βˆ€Ξ± s, H1;
rewriteL OPEN_IN_SUBOPEN;
simplify EXTENSION H1 IN_Interior;
set;
qed;
`;;
let InteriorOpen = theorem `;
βˆ€Ξ± s. open_in Ξ± s β‡’ Interior Ξ± s = s
by fol OPEN_IN_SUBSET InteriorEq`;;
let InteriorEmpty = theorem `;
βˆ€Ξ±. Interior Ξ± βˆ… = βˆ…
by fol OPEN_IN_EMPTY EMPTY_SUBSET InteriorOpen`;;
let InteriorUniv = theorem `;
βˆ€Ξ±. Interior Ξ± (topspace Ξ±) = topspace Ξ±
by simplify OpenInTopspace InteriorOpen`;;
let OpenInterior = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ open_in Ξ± (Interior Ξ± s)
proof
ONCE_REWRITE_TAC OPEN_IN_SUBOPEN;
fol IN_Interior SUBSET;
qed;
`;;
let InteriorInterior = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Interior Ξ± (Interior Ξ± s) = Interior Ξ± s
by fol OpenInterior InteriorOpen`;;
let InteriorSubset = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Interior Ξ± s βŠ‚ s
proof
intro_TAC βˆ€Ξ± s, H1;
simplify SUBSET Interior_DEF IN_ELIM_THM;
fol H1 SUBSET;
qed;
`;;
let InteriorTopspace = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Interior Ξ± s βŠ‚ topspace Ξ±
by fol SUBSET_TRANS InteriorSubset`;;
let SubsetInterior = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± β‡’ s βŠ‚ t β‡’
Interior Ξ± s βŠ‚ Interior Ξ± t
by fol SUBSET_TRANS SUBSET IN_Interior SUBSET`;;
let InteriorMaximal = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± β‡’
t βŠ‚ s ∧ open_in Ξ± t β‡’ t βŠ‚ Interior Ξ± s
by fol SUBSET IN_Interior SUBSET`;;
let InteriorMaximalEq = theorem `;
βˆ€s t. t βŠ‚ topspace Ξ± β‡’
open_in Ξ± s β‡’ (s βŠ‚ Interior Ξ± t ⇔ s βŠ‚ t)
by fol InteriorMaximal SUBSET_TRANS InteriorSubset`;;
let InteriorUnique = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± β‡’
t βŠ‚ s ∧ open_in Ξ± t ∧ (βˆ€t'. t' βŠ‚ s ∧ open_in Ξ± t' β‡’ t' βŠ‚ t)
β‡’ Interior Ξ± s = t
by fol SUBSET_ANTISYM InteriorSubset OpenInterior InteriorMaximal`;;
let OpenSubsetInterior = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± β‡’
open_in Ξ± s β‡’ (s βŠ‚ Interior Ξ± t ⇔ s βŠ‚ t)
by fol InteriorMaximal InteriorSubset SUBSET_TRANS`;;
let InteriorInter = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
Interior α (s ∩ t) = Interior α s ∩ Interior α t
proof
intro_TAC βˆ€Ξ± s t, sTop tTop;
rewrite GSYM SUBSET_ANTISYM_EQ SUBSET_INTER;
conj_tac [Left] by fol sTop tTop SubsetInterior INTER_SUBSET;
s ∩ t βŠ‚ topspace Ξ± [] by fol sTop INTER_SUBSET SUBSET_TRANS;
fol - sTop tTop OpenInterior OPEN_IN_INTER InteriorSubset InteriorMaximal INTER_TENSOR;
qed;
`;;
let InteriorFiniteInters = theorem `;
βˆ€Ξ± s. FINITE s β‡’ Β¬(s = βˆ…) β‡’ (βˆ€t. t ∈ s β‡’ t βŠ‚ topspace Ξ±) β‡’
Interior Ξ± (INTERS s) = INTERS (IMAGE (Interior Ξ±) s)
proof
intro_TAC βˆ€Ξ±;
MATCH_MP_TAC FINITE_INDUCT;
rewrite INTERS_INSERT IMAGE_CLAUSES IN_INSERT;
intro_TAC βˆ€x s, sCase, xsNonempty, sSetOfSubsets;
assume Β¬(s = βˆ…) [sNonempty] by simplify INTERS_0 INTER_UNIV IMAGE_CLAUSES;
simplify INTERS_SUBSET sSetOfSubsets InteriorInter sNonempty sSetOfSubsets sCase;
qed;
`;;
let InteriorIntersSubset = theorem `;
βˆ€Ξ± f. Β¬(f = βˆ…) ∧ (βˆ€t. t ∈ f β‡’ t βŠ‚ topspace Ξ±) β‡’
Interior Ξ± (INTERS f) βŠ‚ INTERS (IMAGE (Interior Ξ±) f)
proof
intro_TAC βˆ€Ξ± f, H1 H2;
INTERS f βŠ‚ topspace Ξ± [] by set H1 H2;
simplify SUBSET IN_INTERS FORALL_IN_IMAGE - H2 IN_Interior;
fol;
qed;
`;;
let UnionInteriorSubset = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
Interior Ξ± s βˆͺ Interior Ξ± t βŠ‚ Interior Ξ± (s βˆͺ t)
proof
intro_TAC βˆ€Ξ± s t, sTop tTop;
s βˆͺ t βŠ‚ topspace Ξ± [] by fol sTop tTop UNION_SUBSET;
fol sTop tTop - OpenInterior OPEN_IN_UNION InteriorMaximal UNION_TENSOR InteriorSubset;
qed;
`;;
let InteriorEqEmpty = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Interior Ξ± s = βˆ… ⇔ βˆ€t. open_in Ξ± t ∧ t βŠ‚ s β‡’ t = βˆ…)
by fol InteriorMaximal SUBSET_EMPTY OpenInterior SUBSET_REFL InteriorSubset`;;
let InteriorEqEmptyAlt = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Interior Ξ± s = βˆ… ⇔ βˆ€t. open_in Ξ± t ∧ Β¬(t = βˆ…) β‡’ Β¬(t ━ s = βˆ…))
proof
simplify InteriorEqEmpty;
set;
qed;
`;;
let InteriorUnionsOpenSubsets = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ UNIONS {t | open_in Ξ± t ∧ t βŠ‚ s} = Interior Ξ± s
proof
intro_TAC βˆ€Ξ± s, H1;
consider t such that
t = UNIONS {f | open_in Ξ± f ∧ f βŠ‚ s} [tDef] by fol;
t βŠ‚ s ∧ βˆ€f. f βŠ‚ s ∧ open_in Ξ± f β‡’ f βŠ‚ t [] by set tDef;
simplify H1 tDef - OPEN_IN_UNIONS IN_ELIM_THM InteriorUnique;
qed;
`;;
let InteriorClosedUnionEmptyInterior = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
closed_in Ξ± s ∧ Interior Ξ± t = βˆ… β‡’
Interior Ξ± (s βˆͺ t) = Interior Ξ± s
proof
intro_TAC βˆ€Ξ± s t, H1 H2, H3 H4;
s βˆͺ t βŠ‚ topspace Ξ± [stTop] by fol H1 H2 UNION_SUBSET;
Interior Ξ± (s βˆͺ t) βŠ‚ s []
proof
simplify SUBSET stTop IN_Interior LEFT_IMP_EXISTS_THM;
intro_TAC βˆ€[y] [O], openO yO Os_t;
consider O' such that O' = (topspace Ξ± ━ s) ∩ O [O'def] by fol -;
O' βŠ‚ t [O't] by set O'def Os_t;
assume y βˆ‰ s [yNOTs] by fol βˆ‰;
y ∈ topspace Ξ± ━ s [] by fol openO OPEN_IN_SUBSET yO SUBSET yNOTs IN_DIFF βˆ‰;
y ∈ O' ∧ open_in α O' [] by fol O'def - yO IN_INTER H3 closed_in openO OPEN_IN_INTER;
fol O'def - O't H2 IN_Interior SUBSET MEMBER_NOT_EMPTY H4;
qed;
fol SUBSET_ANTISYM H1 stTop OpenInterior - InteriorMaximal SUBSET_UNION SubsetInterior;
qed;
`;;
let InteriorUnionEqEmpty = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
closed_in α s ∨ closed_in α t
β‡’ (Interior Ξ± (s βˆͺ t) = βˆ… ⇔ Interior Ξ± s = βˆ… ∧ Interior Ξ± t = βˆ…)
proof
intro_TAC βˆ€Ξ± s t, H1, H2;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± [] by fol H1 UNION_SUBSET;
eq_tac [Left] by fol - H1 SUBSET_UNION SubsetInterior SUBSET_EMPTY;
fol UNION_COMM - H2 InteriorClosedUnionEmptyInterior;
qed;
`;;
let Closure_DEF = NewDefinition `;
βˆ€Ξ± s. Closure Ξ± s = s βˆͺ LimitPointOf Ξ± s`;;
let Closure_THM = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Closure Ξ± s = s βˆͺ LimitPointOf Ξ± s
by fol Closure_DEF`;;
let IN_Closure = theorem `;
βˆ€Ξ± s x. s βŠ‚ topspace Ξ± β‡’
(x ∈ Closure Ξ± s ⇔ x ∈ topspace Ξ± ∧
βˆ€t. x ∈ t ∧ open_in Ξ± t β‡’ βˆƒy. y ∈ s ∧ y ∈ t)
proof
intro_TAC βˆ€Ξ± s x, H1;
simplify H1 Closure_THM IN_UNION IN_LimitPointOf;
fol H1 SUBSET;
qed;
`;;
let ClosureSubset = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ s βŠ‚ Closure Ξ± s
by fol SUBSET IN_Closure`;;
let ClosureTopspace = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Closure Ξ± s βŠ‚ topspace Ξ±
by fol SUBSET IN_Closure`;;
let ClosureInterior = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Closure Ξ± s = topspace Ξ± ━ (Interior Ξ± (topspace Ξ± ━ s))
proof
intro_TAC βˆ€Ξ± s, H1;
simplify H1 EXTENSION IN_Closure IN_DIFF IN_Interior SUBSET;
fol OPEN_IN_SUBSET SUBSET;
qed;
`;;
let InteriorClosure = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Interior Ξ± s = topspace Ξ± ━ (Closure Ξ± (topspace Ξ± ━ s))
by fol SUBSET_DIFF InteriorTopspace DIFF_REFL ClosureInterior`;;
let ClosedClosure = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ closed_in Ξ± (Closure Ξ± s)
by fol closed_in ClosureInterior DIFF_REFL SUBSET_DIFF InteriorTopspace OpenInterior`;;
let SubsetClosure = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± β‡’ s βŠ‚ t β‡’ Closure Ξ± s βŠ‚ Closure Ξ± t
proof
intro_TAC βˆ€Ξ± s t, tSubset, st;
s βŠ‚ topspace Ξ± [] by fol tSubset st SUBSET_TRANS;
simplify tSubset - Closure_THM st LimptSubset UNION_TENSOR;
qed;
`;;
let ClosureHull = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Closure Ξ± s = (closed_in Ξ±) hull s
proof
intro_TAC βˆ€Ξ± s, H1;
MATCH_MP_TAC GSYM HULL_UNIQUE;
simplify H1 ClosureSubset ClosedClosure Closure_THM UNION_SUBSET;
fol LimptSubset CLOSED_IN_SUBSET ClosedLimpt SUBSET_TRANS;
qed;
`;;
let ClosureEq = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ (Closure Ξ± s = s ⇔ closed_in Ξ± s)
by fol ClosedClosure ClosedLimpt Closure_THM SUBSET_UNION_ABSORPTION UNION_COMM`;;
let ClosureClosed = theorem `;
βˆ€Ξ± s. closed_in Ξ± s β‡’ Closure Ξ± s = s
by fol closed_in ClosureEq`;;
let ClosureClosure = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Closure Ξ± (Closure Ξ± s) = Closure Ξ± s
by fol ClosureTopspace ClosureHull HULL_HULL`;;
let ClosureUnion = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ±
β‡’ Closure Ξ± (s βˆͺ t) = Closure Ξ± s βˆͺ Closure Ξ± t
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± [stTop] by fol H1 UNION_SUBSET;
simplify H1 stTop Closure_THM LimitPointUnion;
set;
qed;
`;;
let ClosureInterSubset = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
Closure Ξ± (s ∩ t) βŠ‚ Closure Ξ± s ∩ Closure Ξ± t
by fol SUBSET_INTER INTER_SUBSET SubsetClosure`;;
let ClosureIntersSubset = theorem `;
βˆ€Ξ± f. (βˆ€s. s ∈ f β‡’ s βŠ‚ topspace Ξ±) β‡’
Closure Ξ± (INTERS f) βŠ‚ INTERS (IMAGE (Closure Ξ±) f)
proof
intro_TAC βˆ€Ξ± f, H1;
rewrite SET_RULE [s βŠ‚ INTERS f ⇔ βˆ€t. t ∈ f β‡’ s βŠ‚ t] FORALL_IN_IMAGE;
intro_TAC βˆ€[s], sf;
s βŠ‚ topspace Ξ± ∧ INTERS f βŠ‚ s ∧ INTERS f βŠ‚ topspace Ξ± [] by set H1 sf;
fol SubsetClosure -;
qed;
`;;
let ClosureMinimal = theorem `;
βˆ€Ξ± s t. s βŠ‚ t ∧ closed_in Ξ± t β‡’ Closure Ξ± s βŠ‚ t
by fol closed_in SubsetClosure ClosureClosed`;;
let ClosureMinimalEq = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± β‡’
closed_in Ξ± t β‡’ (Closure Ξ± s βŠ‚ t ⇔ s βŠ‚ t)
by fol closed_in SUBSET_TRANS ClosureSubset ClosureMinimal`;;
let ClosureUnique = theorem `;
βˆ€Ξ± s t. s βŠ‚ t ∧ closed_in Ξ± t ∧ (βˆ€u. s βŠ‚ u ∧ closed_in Ξ± u β‡’ t βŠ‚ u)
β‡’ Closure Ξ± s = t
by fol closed_in SUBSET_ANTISYM_EQ ClosureMinimal SUBSET_TRANS ClosureSubset ClosedClosure`;;
let ClosureUniv = theorem `;
βˆ€Ξ±. Closure Ξ± (topspace Ξ±) = topspace Ξ±
by simplify SUBSET_REFL CLOSED_IN_TOPSPACE ClosureEq`;;
let ClosureEmpty = theorem `;
Closure Ξ± βˆ… = βˆ…
by fol EMPTY_SUBSET CLOSED_IN_EMPTY ClosureClosed`;;
let ClosureUnions = theorem `;
βˆ€Ξ± f. FINITE f β‡’ (βˆ€ t. t ∈ f β‡’ t βŠ‚ topspace Ξ±) β‡’
Closure α (UNIONS f) = UNIONS {Closure α t | t ∈ f}
proof
intro_TAC βˆ€Ξ±;
MATCH_MP_TAC FINITE_INDUCT;
rewrite UNIONS_0 SET_RULE [{f x | x ∈ βˆ…} = βˆ…] ClosureEmpty UNIONS_INSERT
SET_RULE [{f x | x ∈ a INSERT t} = (f a) INSERT {f x | x ∈ t}] IN_INSERT;
fol UNION_SUBSET UNIONS_SUBSET IN_UNIONS ClosureUnion;
qed;
`;;
let ClosureEqEmpty = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ (Closure Ξ± s = βˆ… ⇔ s = βˆ…)
by fol ClosureEmpty ClosureSubset SUBSET_EMPTY`;;
let ClosureSubsetEq = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ (Closure Ξ± s βŠ‚ s ⇔ closed_in Ξ± s)
by fol ClosureEq ClosureSubset SUBSET_ANTISYM`;;
let OpenInterClosureEqEmpty = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
open_in Ξ± s β‡’ (s ∩ Closure Ξ± t = βˆ… ⇔ s ∩ t = βˆ…)
proof
intro_TAC βˆ€Ξ± s t, H1 H2, H3;
eq_tac [Left] by fol H2 ClosureSubset INTER_TENSOR SUBSET_REFL SUBSET_EMPTY;
intro_TAC stDisjoint;
s βŠ‚ Interior Ξ± (topspace Ξ± ━ t) [] by fol H2 SUBSET_DIFF H3 H1 H2 stDisjoint SUBSET_COMPLEMENT OpenSubsetInterior;
fol H1 H2 InteriorTopspace - COMPLEMENT_DISJOINT H2 ClosureInterior;
qed;
`;;
let OpenInterClosureSubset = theorem `;
βˆ€Ξ± s t. t βŠ‚ topspace Ξ± β‡’
open_in Ξ± s β‡’ s ∩ Closure Ξ± t βŠ‚ Closure Ξ± (s ∩ t)
proof
intro_TAC βˆ€Ξ± s t, tTop, sOpen;
s βŠ‚ topspace Ξ± [sTop] by fol OPEN_IN_SUBSET sOpen;
s ∩ t βŠ‚ topspace Ξ± [stTop] by fol sTop sTop INTER_SUBSET SUBSET_TRANS;
simplify tTop - Closure_THM UNION_OVER_INTER SUBSET_UNION SUBSET_UNION;
s ∩ LimitPointOf Ξ± t βŠ‚ LimitPointOf Ξ± (s ∩ t) []
proof
simplify SUBSET IN_INTER tTop stTop IN_LimitPointOf;
intro_TAC βˆ€[x], xs xTop xLIMt, βˆ€[O], xO Oopen;
x ∈ O ∩ s ∧ open_in α (O ∩ s) [xOsOpen] by fol xs xO IN_INTER Oopen sOpen OPEN_IN_INTER;
fol xOsOpen xLIMt IN_INTER;
qed;
simplify - UNION_TENSOR SUBSET_REFL;
qed;
`;;
let ClosureOpenInterSuperset = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
open_in Ξ± s ∧ s βŠ‚ Closure Ξ± t β‡’ Closure Ξ± (s ∩ t) = Closure Ξ± s
proof
intro_TAC βˆ€Ξ± s t, sTop tTop, sOpen sSUBtC;
s ∩ t βŠ‚ topspace Ξ± [stTop] by fol INTER_SUBSET sTop SUBSET_TRANS;
MATCH_MP_TAC SUBSET_ANTISYM;
conj_tac [Left] by fol sTop INTER_SUBSET SubsetClosure;
s βŠ‚ Closure Ξ± (s ∩ t) [] by fol tTop sOpen OpenInterClosureSubset SUBSET_REFL sSUBtC SUBSET_INTER SUBSET_TRANS;
fol stTop - ClosedClosure ClosureMinimal;
qed;
`;;
let ClosureComplement = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Closure Ξ± (topspace Ξ± ━ s) = topspace Ξ± ━ Interior Ξ± s
by fol InteriorClosure SUBSET_DIFF ClosureTopspace DIFF_REFL`;;
let InteriorComplement = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Interior Ξ± (topspace Ξ± ━ s) = topspace Ξ± ━ Closure Ξ± s
by fol SUBSET_DIFF InteriorTopspace DIFF_REFL ClosureInterior DIFF_REFL`;;
let ClosureInteriorComplement = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
topspace Ξ± ━ Closure Ξ± (Interior Ξ± s)
= Interior Ξ± (Closure Ξ± (topspace Ξ± ━ s))
by fol InteriorTopspace InteriorComplement ClosureComplement`;;
let InteriorClosureComplement = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
topspace Ξ± ━ Interior Ξ± (Closure Ξ± s)
= Closure Ξ± (Interior Ξ± (topspace Ξ± ━ s))
by fol ClosureTopspace SUBSET_TRANS InteriorComplement ClosureComplement`;;
let ConnectedIntermediateClosure = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± β‡’
Connected (subtopology Ξ± s) ∧ s βŠ‚ t ∧ t βŠ‚ Closure Ξ± s
β‡’ Connected (subtopology Ξ± t)
proof
intro_TAC βˆ€Ξ± s t, sTop, sCon st tCs;
t βŠ‚ topspace Ξ± [tTop] by fol tCs sTop ClosureTopspace SUBSET_TRANS;
simplify tTop ConnectedSubtopology_ALT;
intro_TAC βˆ€[u] [v], uOpen vOpen t_uv uvtEmpty;
u βŠ‚ topspace Ξ± ∧ v βŠ‚ topspace Ξ± [uvTop] by fol uOpen vOpen OPEN_IN_SUBSET;
u ∩ s = βˆ… ∨ v ∩ s = βˆ… [] by fol sTop uvTop uOpen vOpen st t_uv uvtEmpty SUBSET_TRANS SUBSET_REFL INTER_TENSOR SUBSET_EMPTY sCon ConnectedSubtopology_ALT;
s βŠ‚ topspace Ξ± ━ u ∨ s βŠ‚ topspace Ξ± ━ v [] by fol - sTop uvTop INTER_COMM SUBSET_COMPLEMENT;
t βŠ‚ topspace Ξ± ━ u ∨ t βŠ‚ topspace Ξ± ━ v [] by fol SUBSET_DIFF - uvTop uOpen vOpen OPEN_IN_CLOSED_IN ClosureMinimal tCs SUBSET_TRANS;
fol tTop uvTop - SUBSET_COMPLEMENT INTER_COMM;
qed;
`;;
let ConnectedClosure = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Connected (subtopology Ξ± s) β‡’
Connected (subtopology Ξ± (Closure Ξ± s))
by fol ClosureTopspace ClosureSubset SUBSET_REFL ConnectedIntermediateClosure`;;
let ConnectedUnionStrong = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
Connected (subtopology α s) ∧ Connected (subtopology α t) ∧
Β¬(Closure Ξ± s ∩ t = βˆ…)
β‡’ Connected (subtopology Ξ± (s βˆͺ t))
proof
intro_TAC βˆ€Ξ± s t, sTop tTop, H2 H3 H4;
consider p s' such that
p ∈ Closure Ξ± s ∧ p ∈ t ∧ s' = p β•ͺ s [pCst] by fol H4 MEMBER_NOT_EMPTY IN_INTER;
s βŠ‚ s' ∧ s' βŠ‚ Closure Ξ± s [s_ps_Cs] by fol IN_INSERT SUBSET pCst sTop ClosureSubset INSERT_SUBSET;
Connected (subtopology Ξ± (s')) [s'Con] by fol sTop H2 s_ps_Cs ConnectedIntermediateClosure;
s βˆͺ t = s' βˆͺ t ∧ Β¬(s' ∩ t = βˆ…) [] by fol pCst INSERT_UNION IN_INSERT IN_INTER MEMBER_NOT_EMPTY;
fol s_ps_Cs sTop ClosureTopspace SUBSET_TRANS tTop - s'Con H3 ConnectedUnion;
qed;
`;;
let InteriorDiff = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
Interior Ξ± (s ━ t) = Interior Ξ± s ━ Closure Ξ± t
by fol ClosureTopspace InteriorTopspace COMPLEMENT_INTER_DIFF InteriorComplement SUBSET_DIFF InteriorInter`;;
let ClosedInLimpt = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
(closed_in (subtopology Ξ± t) s ⇔
s βŠ‚ t ∧ LimitPointOf Ξ± s ∩ t βŠ‚ s)
proof
intro_TAC βˆ€Ξ± s t, H1 H2;
simplify H2 ClosedInSubtopology;
eq_tac [Right]
proof
intro_TAC sSUBt LIMstSUBs;
exists_TAC Closure Ξ± s;
simplify H1 ClosedClosure Closure_THM INTER_COMM UNION_OVER_INTER;
set sSUBt LIMstSUBs;
qed;
rewrite LEFT_IMP_EXISTS_THM;
intro_TAC βˆ€[D], Dexists;
LimitPointOf Ξ± (D ∩ t) βŠ‚ D [] by fol Dexists CLOSED_IN_SUBSET INTER_SUBSET LimptSubset ClosedLimpt SUBSET_TRANS;
fol Dexists INTER_SUBSET - SUBSET_REFL INTER_TENSOR;
qed;
`;;
let ClosedInLimpt_ALT = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
(closed_in (subtopology Ξ± t) s ⇔
s βŠ‚ t ∧ βˆ€x. x ∈ LimitPointOf Ξ± s ∧ x ∈ t β‡’ x ∈ s)
by simplify SUBSET IN_INTER ClosedInLimpt`;;
let ClosedInInterClosure = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
(closed_in (subtopology Ξ± s) t ⇔ s ∩ Closure Ξ± t = t)
proof simplify Closure_THM ClosedInLimpt; set; qed;
`;;
let InteriorClosureIdemp = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Interior Ξ± (Closure Ξ± (Interior Ξ± (Closure Ξ± s)))
= Interior Ξ± (Closure Ξ± s)
proof
intro_TAC βˆ€Ξ± s, H1;
consider IC CIC such that
IC = Interior α (Closure α s) ∧ CIC = Closure α IC [CICdef] by fol;
Closure Ξ± s βŠ‚ topspace Ξ± [Ctop] by fol H1 ClosureTopspace;
IC βŠ‚ topspace Ξ± [ICtop] by fol CICdef - H1 InteriorTopspace;
CIC βŠ‚ topspace Ξ± [CICtop] by fol CICdef - ClosureTopspace;
IC βŠ‚ CIC [ICsubCIC] by fol CICdef ICtop ClosureSubset;
βˆ€u. u βŠ‚ CIC ∧ open_in Ξ± u β‡’ u βŠ‚ IC [] by fol CICdef Ctop InteriorSubset SubsetClosure H1 ClosureClosure SUBSET_TRANS OpenSubsetInterior;
fol CICdef CICtop ICsubCIC Ctop OpenInterior - InteriorUnique;
qed;
`;;
let InteriorClosureIdemp = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Interior Ξ± (Closure Ξ± (Interior Ξ± (Closure Ξ± s)))
= Interior Ξ± (Closure Ξ± s)
proof
intro_TAC βˆ€Ξ± s, H1;
Closure Ξ± s βŠ‚ topspace Ξ± [Ctop] by fol H1 ClosureTopspace;
consider IC CIC such that
IC = Interior α (Closure α s) ∧ CIC = Closure α IC [ICdefs] by fol;
IC βŠ‚ topspace Ξ± [] by fol - Ctop H1 InteriorTopspace;
CIC βŠ‚ topspace Ξ± ∧ IC βŠ‚ CIC ∧ βˆ€u. u βŠ‚ CIC ∧ open_in Ξ± u β‡’ u βŠ‚ IC [] by fol ICdefs Ctop - ClosureTopspace ClosureSubset InteriorSubset SubsetClosure H1 ClosureClosure SUBSET_TRANS OpenSubsetInterior;
fol ICdefs - Ctop OpenInterior InteriorUnique;
qed;
`;;
let ClosureInteriorIdemp = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Closure Ξ± (Interior Ξ± (Closure Ξ± (Interior Ξ± s)))
= Closure Ξ± (Interior Ξ± s)
proof
intro_TAC βˆ€Ξ± s, H1;
consider t such that t = topspace Ξ± ━ s [tDef] by fol;
t βŠ‚ topspace Ξ± ∧ s = topspace Ξ± ━ t [tProps] by fol - H1 SUBSET_DIFF DIFF_REFL;
Interior Ξ± (Closure Ξ± t) βŠ‚ topspace Ξ± [] by fol - ClosureTopspace InteriorTopspace;
simplify tProps - GSYM InteriorClosureComplement InteriorClosureIdemp;
qed;
`;;
let InteriorClosureDiffSpaceEmpty = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Interior Ξ± (Closure Ξ± s ━ s) = βˆ…
proof
intro_TAC βˆ€Ξ± s, H1;
Closure Ξ± s ━ s βŠ‚ topspace Ξ± [Cs_sTop] by fol H1 ClosureTopspace SUBSET_DIFF SUBSET_TRANS;
assume Β¬(Interior Ξ± (Closure Ξ± s ━ s) = βˆ…) [Contradiction] by fol;
consider x such that
x ∈ (Interior Ξ± (Closure Ξ± s ━ s)) [xExists] by fol - MEMBER_NOT_EMPTY;
consider t such that
open_in Ξ± t ∧ x ∈ t ∧ t βŠ‚ (s βˆͺ LimitPointOf Ξ± s) ━ s [tProps] by fol - Cs_sTop IN_Interior Closure_DEF;
t βŠ‚ LimitPointOf Ξ± s ∧ s ∩ (t ━ {x}) = βˆ… [tSubLIMs] by set -;
x ∈ LimitPointOf Ξ± s ∧ x βˆ‰ s [xLims] by fol tProps - SUBSET IN_DIFF βˆ‰;
fol H1 xLims IN_LimitPointOf tProps tSubLIMs NotLimitPointOf βˆ‰;
qed;
`;;
let NowhereDenseUnion = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
(Interior Ξ± (Closure Ξ± (s βˆͺ t)) = βˆ… ⇔
Interior Ξ± (Closure Ξ± s) = βˆ… ∧ Interior Ξ± (Closure Ξ± t) = βˆ…)
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± [] by fol H1 UNION_SUBSET;
simplify H1 - ClosureUnion ClosureTopspace UNION_SUBSET ClosedClosure InteriorUnionEqEmpty;
qed;
`;;
let NowhereDense = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(Interior Ξ± (Closure Ξ± s) = βˆ… ⇔
βˆ€t. open_in Ξ± t ∧ Β¬(t = βˆ…) β‡’
βˆƒu. open_in Ξ± u ∧ Β¬(u = βˆ…) ∧ u βŠ‚ t ∧ u ∩ s = βˆ…)
proof
intro_TAC βˆ€Ξ± s, H1;
simplify H1 ClosureTopspace InteriorEqEmptyAlt;
eq_tac [Left]
proof
intro_TAC H2, βˆ€[t], tOpen tNonempty;
exists_TAC t ━ Closure Ξ± s;
fol tOpen H1 ClosedClosure OPEN_IN_DIFF tOpen tNonempty H2 SUBSET_DIFF H1 ClosureSubset
SET_RULE [βˆ€s t A. s βŠ‚ t β‡’ (A ━ t) ∩ s = βˆ…];
qed;
intro_TAC H2, βˆ€[t], tOpen tNonempty;
consider u such that
open_in Ξ± u ∧ Β¬(u = βˆ…) ∧ u βŠ‚ t ∧ u ∩ s = βˆ… [uExists] by simplify tOpen tNonempty H2;
MP_TAC ISPECL [Ξ±; u; s] OpenInterClosureEqEmpty;
simplify uExists OPEN_IN_SUBSET H1;
set uExists;
qed;
`;;
let InteriorClosureInterOpen = theorem `;
βˆ€Ξ± s t. open_in Ξ± s ∧ open_in Ξ± t β‡’
Interior α (Closure α (s ∩ t)) =
Interior α (Closure α s) ∩ Interior α (Closure α t)
proof
intro_TAC βˆ€Ξ± s t, sOpen tOpen;
s βŠ‚ topspace Ξ± [sTop] by fol sOpen OPEN_IN_SUBSET;
t βŠ‚ topspace Ξ± [tTop] by fol tOpen OPEN_IN_SUBSET;
rewrite SET_RULE [βˆ€s t u. u = s ∩ t ⇔ s ∩ t βŠ‚ u ∧ u βŠ‚ s ∧ u βŠ‚ t];
simplify sTop tTop INTER_SUBSET SubsetClosure ClosureTopspace SubsetInterior;
s ∩ t βŠ‚ topspace Ξ± [stTop] by fol INTER_SUBSET sTop SUBSET_TRANS;
Closure Ξ± s βŠ‚ topspace Ξ± ∧ Closure Ξ± t βŠ‚ topspace Ξ± [CsCtTop] by fol sTop tTop ClosureTopspace;
Closure Ξ± s ∩ Closure Ξ± t βŠ‚ topspace Ξ± [CsIntCtTop] by fol - INTER_SUBSET SUBSET_TRANS;
Closure Ξ± s ━ s βˆͺ Closure Ξ± t ━ t βŠ‚ topspace Ξ± [Cs_sUNIONCt_tTop] by fol CsCtTop SUBSET_DIFF UNION_SUBSET SUBSET_TRANS;
simplify CsCtTop GSYM InteriorInter;
Interior Ξ± (Closure Ξ± s ∩ Closure Ξ± t) βŠ‚ Closure Ξ± (s ∩ t) []
proof
simplify CsIntCtTop InteriorTopspace ISPECL [topspace Ξ±] COMPLEMENT_DISJOINT stTop ClosureTopspace GSYM ClosureComplement GSYM InteriorComplement CsIntCtTop SUBSET_DIFF GSYM InteriorInter;
closed_in Ξ± (Closure Ξ± s ━ s) ∧ closed_in Ξ± (Closure Ξ± t ━ t) [] by fol sTop tTop ClosedClosure sOpen tOpen CLOSED_IN_DIFF;
Interior Ξ± (Closure Ξ± s ━ s βˆͺ Closure Ξ± t ━ t) = βˆ… [IntEmpty] by fol Cs_sUNIONCt_tTop - sTop tTop InteriorClosureDiffSpaceEmpty InteriorUnionEqEmpty;
Closure Ξ± s ∩ Closure Ξ± t ∩ (topspace Ξ± ━ (s ∩ t)) βŠ‚
Closure Ξ± s ━ s βˆͺ Closure Ξ± t ━ t [] by set;
fol Cs_sUNIONCt_tTop - SubsetInterior IntEmpty INTER_ACI SUBSET_EMPTY;
qed;
fol stTop ClosureTopspace - CsIntCtTop OpenInterior InteriorMaximal;
qed;
`;;
let ClosureInteriorUnionClosed = theorem `;
βˆ€Ξ± s t. closed_in Ξ± s ∧ closed_in Ξ± t β‡’
Closure Ξ± (Interior Ξ± (s βˆͺ t)) =
Closure Ξ± (Interior Ξ± s) βˆͺ Closure Ξ± (Interior Ξ± t)
proof
rewrite closed_in;
intro_TAC βˆ€Ξ± s t, sClosed tClosed;
simplify sClosed tClosed ClosureTopspace UNION_SUBSET InteriorTopspace ISPECL [topspace Ξ±] COMPLEMENT_DUALITY_UNION;
simplify sClosed tClosed UNION_SUBSET ClosureTopspace InteriorTopspace ClosureInteriorComplement DIFF_UNION SUBSET_DIFF InteriorClosureInterOpen;
qed;
`;;
let RegularOpenInter = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
Interior α (Closure α s) = s ∧ Interior α (Closure α t) = t
β‡’ Interior Ξ± (Closure Ξ± (s ∩ t)) = s ∩ t
by fol ClosureTopspace OpenInterior InteriorClosureInterOpen`;;
let RegularClosedUnion = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
Closure α (Interior α s) = s ∧ Closure α (Interior α t) = t
β‡’ Closure Ξ± (Interior Ξ± (s βˆͺ t)) = s βˆͺ t
by fol InteriorTopspace ClosureInteriorUnionClosed ClosedClosure`;;
let DiffClosureSubset = theorem `;
βˆ€Ξ± s t. s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± β‡’
Closure Ξ± s ━ Closure Ξ± t βŠ‚ Closure Ξ± (s ━ t)
proof
intro_TAC βˆ€Ξ± s t, sTop tTop;
Closure Ξ± s ━ Closure Ξ± t βŠ‚ Closure Ξ± (s ━ Closure Ξ± t) [] by fol sTop ClosureTopspace tTop ClosedClosure tTop closed_in OpenInterClosureSubset INTER_COMM COMPLEMENT_INTER_DIFF;
fol - tTop ClosureSubset SUBSET_DUALITY sTop SUBSET_DIFF SUBSET_TRANS SubsetClosure;
qed;
`;;
let Frontier_DEF = NewDefinition `;
βˆ€Ξ± s. Frontier Ξ± s = Closure Ξ± s ━ Interior Ξ± s`;;
let Frontier_THM = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Frontier Ξ± s = Closure Ξ± s ━ Interior Ξ± s
by fol Frontier_DEF`;;
let FrontierTopspace = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Frontier Ξ± s βŠ‚ topspace Ξ±
by fol Frontier_THM SUBSET_DIFF ClosureTopspace SUBSET_TRANS`;;
let FrontierClosed = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ closed_in Ξ± (Frontier Ξ± s)
by simplify Frontier_THM ClosedClosure OpenInterior CLOSED_IN_DIFF`;;
let FrontierClosures = theorem `;
βˆ€s. s βŠ‚ topspace Ξ± β‡’
Frontier Ξ± s = (Closure Ξ± s) ∩ (Closure Ξ± (topspace Ξ± ━ s))
by simplify SET_RULE [βˆ€A s t. s βŠ‚ A ∧ t βŠ‚ A β‡’ s ━ (A ━ t) = s ∩ t] Frontier_THM InteriorClosure ClosureTopspace SUBSET_DIFF`;;
let FrontierStraddle = theorem `;
βˆ€Ξ± a s. s βŠ‚ topspace Ξ± β‡’ (a ∈ Frontier Ξ± s ⇔
a ∈ topspace Ξ± ∧ βˆ€t. open_in Ξ± t ∧ a ∈ t β‡’
(βˆƒx. x ∈ s ∧ x ∈ t) ∧ (βˆƒx. Β¬(x ∈ s) ∧ x ∈ t))
proof
simplify SUBSET_DIFF FrontierClosures IN_INTER SUBSET_DIFF IN_Closure IN_DIFF;
fol OPEN_IN_SUBSET SUBSET;
qed;
`;;
let FrontierSubsetClosed = theorem `;
βˆ€Ξ± s. closed_in Ξ± s β‡’ (Frontier Ξ± s) βŠ‚ s
by fol closed_in Frontier_THM ClosureClosed SUBSET_DIFF`;;
let FrontierEmpty = theorem `;
βˆ€Ξ±. Frontier Ξ± βˆ… = βˆ…
by fol Frontier_THM EMPTY_SUBSET ClosureEmpty EMPTY_DIFF`;;
let FrontierUniv = theorem `;
βˆ€Ξ±. Frontier Ξ± (topspace Ξ±) = βˆ…
by fol Frontier_DEF ClosureUniv InteriorUniv DIFF_EQ_EMPTY`;;
let FrontierSubsetEq = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ ((Frontier Ξ± s) βŠ‚ s ⇔ closed_in Ξ± s)
proof
intro_TAC βˆ€Ξ± s, sTop;
eq_tac [Right] by fol FrontierSubsetClosed;
simplify sTop Frontier_THM ;
fol sTop InteriorSubset SET_RULE [βˆ€s t u. s ━ t βŠ‚ u ∧ t βŠ‚ u β‡’ s βŠ‚ u] ClosureSubsetEq;
qed;
`;;
let FrontierComplement = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Frontier Ξ± (topspace Ξ± ━ s) = Frontier Ξ± s
proof
intro_TAC βˆ€Ξ± s, sTop;
simplify sTop SUBSET_DIFF Frontier_THM ClosureComplement InteriorComplement;
fol sTop InteriorTopspace ClosureTopspace SET_RULE [βˆ€ Top Int Clo.
Int βŠ‚ Top ∧ Clo βŠ‚ Top β‡’ Top ━ Int ━ (Top ━ Clo) = Clo ━ Int];
qed;
`;;
let FrontierComplement = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Frontier Ξ± (topspace Ξ± ━ s) = Frontier Ξ± s
proof
intro_TAC βˆ€Ξ± s, sTop;
simplify sTop SUBSET_DIFF Frontier_THM ClosureComplement InteriorComplement;
fol sTop InteriorTopspace ClosureTopspace SET_RULE [βˆ€ Top Int Clo.
Int βŠ‚ Top ∧ Clo βŠ‚ Top β‡’ Top ━ Int ━ (Top ━ Clo) = Clo ━ Int];
qed;
`;;
let FrontierDisjointEq = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ ((Frontier Ξ± s) ∩ s = βˆ… ⇔ open_in Ξ± s)
proof
intro_TAC βˆ€Ξ± s, sTop;
topspace Ξ± ━ s βŠ‚ topspace Ξ± [COMPsTop] by fol sTop SUBSET_DIFF;
simplify sTop GSYM FrontierComplement OPEN_IN_CLOSED_IN;
fol COMPsTop GSYM FrontierSubsetEq FrontierTopspace SUBSET_COMPLEMENT;
qed;
`;;
let FrontierInterSubset = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’ Frontier Ξ± (s ∩ t) βŠ‚ Frontier Ξ± s βˆͺ Frontier Ξ± t
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± ∧ s ∩ t βŠ‚ topspace Ξ± [] by fol H1 SUBSET_UNION INTER_SUBSET SUBSET_TRANS;
simplify - Frontier_THM InteriorInter DIFF_INTER INTER_SUBSET SubsetClosure DIFF_SUBSET UNION_TENSOR;
qed;
`;;
let FrontierUnionSubset = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
Frontier Ξ± (s βˆͺ t) βŠ‚ Frontier Ξ± s βˆͺ Frontier Ξ± t
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± [stTop] by fol H1 SUBSET_UNION SUBSET_TRANS;
simplify H1 - GSYM FrontierComplement DIFF_UNION;
topspace Ξ± ━ s βˆͺ topspace Ξ± ━ t βŠ‚ topspace Ξ± [] by fol SUBSET_DIFF UNION_SUBSET SUBSET_TRANS;
fol - FrontierInterSubset;
qed;
`;;
let FrontierInteriors = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
Frontier Ξ± s = topspace Ξ± ━ Interior Ξ± s ━ Interior Ξ± (topspace Ξ± ━ s)
by simplify Frontier_THM ClosureInterior DOUBLE_DIFF_UNION UNION_COMM`;;
let FrontierFrontierSubset = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Frontier Ξ± (Frontier Ξ± s) βŠ‚ Frontier Ξ± s
by fol FrontierTopspace Frontier_THM FrontierClosed ClosureClosed SUBSET_DIFF`;;
let InteriorFrontier = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Interior Ξ± (Frontier Ξ± s) =
Interior Ξ± (Closure Ξ± s) ━ Closure Ξ± (Interior Ξ± s)
proof
intro_TAC βˆ€Ξ± s, sTop;
Frontier Ξ± s = Closure Ξ± s ∩ (topspace Ξ± ━ Interior Ξ± s) [] by fol sTop Frontier_THM ClosureTopspace COMPLEMENT_INTER_DIFF;
Interior Ξ± (Frontier Ξ± s) =
Interior Ξ± (Closure Ξ± s) ∩ (topspace Ξ± ━ Closure Ξ± (Interior Ξ± s)) [] by fol - sTop ClosureTopspace InteriorTopspace SUBSET_DIFF InteriorInter InteriorComplement;
fol - sTop ClosureTopspace InteriorTopspace COMPLEMENT_INTER_DIFF;
qed;
`;;
let InteriorFrontierEmpty = theorem `;
βˆ€Ξ± s. open_in Ξ± s ∨ closed_in Ξ± s β‡’ Interior Ξ± (Frontier Ξ± s) = βˆ…
by fol InteriorFrontier SET_RULE [βˆ€s t. s ━ t = βˆ… ⇔ s βŠ‚ t] OPEN_IN_SUBSET closed_in
InteriorOpen ClosureTopspace InteriorSubset
ClosureClosed InteriorTopspace ClosureSubset`;;
let FrontierFrontier = theorem `;
βˆ€Ξ± s. open_in Ξ± s ∨ closed_in Ξ± s β‡’
Frontier Ξ± (Frontier Ξ± s) = Frontier Ξ± s
proof
intro_TAC βˆ€Ξ± s, openORclosed;
s βŠ‚ topspace Ξ± [sTop] by fol openORclosed OPEN_IN_SUBSET closed_in;
Frontier Ξ± (Frontier Ξ± s) = Closure Ξ± (Frontier Ξ± s) [] by fol sTop FrontierTopspace Frontier_THM openORclosed InteriorFrontierEmpty DIFF_EMPTY;
fol - sTop FrontierClosed ClosureClosed;
qed;
`;;
let UnionFrontierPart1 = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
Frontier Ξ± s ∩ Interior Ξ± t βŠ‚ Frontier Ξ± (s ∩ t)
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± ∧ s ∩ t βŠ‚ topspace Ξ± [stTop] by fol H1 SUBSET_UNION INTER_SUBSET SUBSET_TRANS;
rewrite SUBSET IN_INTER;
intro_TAC βˆ€[a], aFs aIt;
consider O such that
open_in Ξ± O ∧ a ∈ O ∧ O βŠ‚ t [aOs] by fol aIt stTop IN_Interior;
a ∈ topspace α [] by fol stTop aFs FrontierTopspace SUBSET;
simplify stTop FrontierStraddle -;
intro_TAC βˆ€[P], Popen aP;
a ∈ O ∩ P ∧ open_in α (O ∩ P) [aOPopen] by fol aOs aP IN_INTER Popen OPEN_IN_INTER;
consider x y such that
x ∈ s ∧ x ∈ O ∩ P ∧ ¬(y ∈ s) ∧ y ∈ O ∩ P [xExists] by fol aOs Popen OPEN_IN_INTER aOPopen stTop aFs FrontierStraddle;
fol xExists aOs IN_INTER SUBSET;
qed;
`;;
let UnionFrontierPart2 = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
Frontier Ξ± s ━ Frontier Ξ± t βŠ‚
Frontier Ξ± (s ∩ t) βˆͺ Frontier Ξ± (s βˆͺ t)
proof
intro_TAC βˆ€Ξ± s t, stTop;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± [] by fol stTop SUBSET_UNION INTER_SUBSET SUBSET_TRANS;
Frontier Ξ± s ━ Frontier Ξ± t = Frontier Ξ± s ∩ Interior Ξ± t βˆͺ
Frontier Ξ± (topspace Ξ± ━ s) ∩ Interior Ξ± (topspace Ξ± ━ t) [] by fol - FrontierTopspace FrontierInteriors FrontierComplement
SET_RULE [βˆ€A s t u. s βŠ‚ A β‡’ s ━ (A ━ t ━ u) = s ∩ t βˆͺ s ∩ u];
Frontier Ξ± s ━ Frontier Ξ± t βŠ‚
Frontier Ξ± (s ∩ t) βˆͺ Frontier Ξ± (topspace Ξ± ━ (s βˆͺ t)) [] by simplify - stTop UnionFrontierPart1 UNION_TENSOR SUBSET_DIFF UNION_SUBSET DIFF_UNION;
fol - stTop FrontierComplement;
qed;
`;;
let UnionFrontierPart3 = theorem `;
βˆ€Ξ± s t a. s βˆͺ t βŠ‚ topspace Ξ± β‡’
a ∈ Frontier Ξ± s ∧ a βˆ‰ Frontier Ξ± t β‡’
a ∈ Frontier Ξ± (s ∩ t) ∨ a ∈ Frontier Ξ± (s βˆͺ t)
proof
intro_TAC βˆ€Ξ± s t a, H1;
rewrite βˆ‰ GSYM IN_INTER GSYM IN_DIFF GSYM IN_UNION;
fol H1 UnionFrontierPart2 SUBSET;
qed;
`;;
let UnionFrontier = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
Frontier Ξ± s βˆͺ Frontier Ξ± t =
Frontier Ξ± (s βˆͺ t) βˆͺ Frontier Ξ± (s ∩ t) βˆͺ Frontier Ξ± s ∩ Frontier Ξ± t
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± [stTop] by fol H1 SUBSET_UNION INTER_SUBSET SUBSET_TRANS;
rewrite GSYM SUBSET_ANTISYM_EQ;
conj_tac [Right] by fol SET_RULE [βˆ€s t. s ∩ t βŠ‚ s βˆͺ t] stTop FrontierUnionSubset UNION_SUBSET FrontierInterSubset;
rewrite SUBSET IN_INTER IN_UNION;
fol H1 UnionFrontierPart3 INTER_COMM UNION_COMM βˆ‰;
qed;
`;;
let ConnectedInterFrontier = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
Connected (subtopology Ξ± s) ∧ Β¬(s ∩ t = βˆ…) ∧ Β¬(s ━ t = βˆ…)
β‡’ Β¬(s ∩ Frontier Ξ± t = βˆ…)
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± [stTop] by fol H1 SUBSET_UNION SUBSET_TRANS;
ONCE_REWRITE_TAC TAUT [βˆ€a b c d. a ∧ b ∧ c β‡’ Β¬d ⇔ b ∧ c ∧ d β‡’ Β¬a];
intro_TAC sINTERtNonempty sDIFFtNonempty sInterFtEmpty;
simplify stTop ConnectedOpenIn;
exists_TAC s ∩ Interior α t;
exists_TAC s ∩ Interior Ξ± (topspace Ξ± ━ t);
simplify stTop SUBSET_DIFF OpenInterior OpenInOpenInter;
Interior Ξ± t βŠ‚ t ∧ Interior Ξ± (topspace Ξ± ━ t) βŠ‚ topspace Ξ± ━ t [IntSubs] by fol stTop SUBSET_DIFF InteriorSubset;
s βŠ‚ Interior Ξ± t βˆͺ Interior Ξ± (topspace Ξ± ━ t) [] by fol stTop sInterFtEmpty FrontierInteriors DOUBLE_DIFF_UNION COMPLEMENT_DISJOINT;
set sDIFFtNonempty sINTERtNonempty IntSubs -;
qed;
`;;
let InteriorClosedEqEmptyAsFrontier = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’
(closed_in Ξ± s ∧ Interior Ξ± s = βˆ… ⇔ βˆƒt. open_in Ξ± t ∧ s = Frontier Ξ± t)
proof
intro_TAC βˆ€Ξ± s, sTop;
eq_tac [Right] by fol OPEN_IN_SUBSET FrontierClosed InteriorFrontierEmpty;
intro_TAC sClosed sEmptyInt;
exists_TAC topspace Ξ± ━ s;
fol sClosed closed_in sTop FrontierComplement Frontier_THM sEmptyInt DIFF_EMPTY ClosureClosed;
qed;
`;;
let ClosureUnionFrontier = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Closure Ξ± s = s βˆͺ Frontier Ξ± s
proof
intro_TAC βˆ€Ξ± s, sTop;
simplify sTop Frontier_THM;
s βŠ‚ Closure Ξ± s ∧ Interior Ξ± s βŠ‚ s [] by fol sTop ClosureSubset InteriorSubset;
set -;
qed;
`;;
let FrontierInteriorSubset = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Frontier Ξ± (Interior Ξ± s) βŠ‚ Frontier Ξ± s
by simplify InteriorTopspace Frontier_THM InteriorInterior InteriorSubset SubsetClosure DIFF_SUBSET`;;
let FrontierClosureSubset = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ Frontier Ξ± (Closure Ξ± s) βŠ‚ Frontier Ξ± s
by simplify ClosureTopspace Frontier_THM ClosureClosure ClosureTopspace ClosureSubset SubsetInterior SUBSET_DUALITY`;;
let SetDiffFrontier = theorem `;
βˆ€Ξ± s. s βŠ‚ topspace Ξ± β‡’ s ━ Frontier Ξ± s = Interior Ξ± s
proof
intro_TAC βˆ€Ξ± s, sTop;
simplify sTop Frontier_THM;
s βŠ‚ Closure Ξ± s ∧ Interior Ξ± s βŠ‚ s [] by fol sTop ClosureSubset InteriorSubset;
set -;
qed;
`;;
let FrontierInterSubsetInter = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’
Frontier Ξ± (s ∩ t) βŠ‚
Closure Ξ± s ∩ Frontier Ξ± t βˆͺ Frontier Ξ± s ∩ Closure Ξ± t
proof
intro_TAC βˆ€Ξ± s t, H1;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± ∧ s ∩ t βŠ‚ topspace Ξ± [stTop] by fol H1 SUBSET_UNION INTER_SUBSET SUBSET_TRANS;
simplify H1 stTop Frontier_THM InteriorInter;
Closure Ξ± (s ∩ t) βŠ‚ Closure Ξ± s ∩ Closure Ξ± t [] by fol stTop ClosureInterSubset;
set -;
qed;
`;;
let FrontierUnionPart1 = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’ Closure Ξ± s ∩ Closure Ξ± t = βˆ…
β‡’ Frontier Ξ± s ∩ Interior Ξ± (s βˆͺ t) = βˆ…
proof
intro_TAC βˆ€Ξ± s t, H1, CsCtDisjoint;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± ∧ s ∩ t βŠ‚ topspace Ξ± [stTop] by fol H1 SUBSET_UNION INTER_SUBSET SUBSET_TRANS;
Frontier Ξ± s ∩ Interior Ξ± (s βˆͺ t) βŠ‚ topspace Ξ± [FIstTop] by fol stTop FrontierTopspace INTER_SUBSET SUBSET_TRANS;
Frontier Ξ± s ∩ Interior Ξ± (s βˆͺ t) ∩ (topspace Ξ± ━ Closure Ξ± t) = βˆ… []
proof
simplify stTop GSYM InteriorComplement H1 SUBSET_DIFF InteriorInter Frontier_THM;
Interior Ξ± (s βˆͺ t) ∩ Interior Ξ± (topspace Ξ± ━ t) βŠ‚ Interior Ξ± s [] by
fol SET_RULE [βˆ€A s t. s βŠ‚ A β‡’ (s βˆͺ t) ∩ (A ━ t) = s ━ t] H1 SUBSET_DIFF InteriorInter stTop SubsetInterior;
set -;
qed;
Frontier Ξ± s ∩ Interior Ξ± (s βˆͺ t) βŠ‚ Closure Ξ± t [] by fol H1 CsCtDisjoint - FIstTop COMPLEMENT_DISJOINT INTER_ACI;
fol SET_RULE [βˆ€ s t F I. s ∩ t = βˆ… ∧ F βŠ‚ s ∧ F ∩ I βŠ‚ t β‡’ F ∩ I = βˆ…] CsCtDisjoint stTop Frontier_THM SUBSET_DIFF -;
qed;
`;;
let FrontierUnion = theorem `;
βˆ€Ξ± s t. s βˆͺ t βŠ‚ topspace Ξ± β‡’ Closure Ξ± s ∩ Closure Ξ± t = βˆ…
β‡’ Frontier Ξ± (s βˆͺ t) = Frontier Ξ± s βˆͺ Frontier Ξ± t
proof
intro_TAC βˆ€Ξ± s t, H1, CsCtDisjoint;
s βŠ‚ topspace Ξ± ∧ t βŠ‚ topspace Ξ± ∧ s ∩ t βŠ‚ topspace Ξ± [stTop] by fol H1 SUBSET_UNION INTER_SUBSET SUBSET_TRANS;
MATCH_MP_TAC SUBSET_ANTISYM;
simplify H1 FrontierUnionSubset Frontier_THM;
Frontier Ξ± s ∩ Interior Ξ± (s βˆͺ t) = βˆ… ∧
Frontier Ξ± t ∩ Interior Ξ± (s βˆͺ t) = βˆ… [usePart1] by fol H1 CsCtDisjoint FrontierUnionPart1 INTER_COMM UNION_COMM;
Frontier Ξ± s βŠ‚ Closure Ξ± (s βˆͺ t) ∧ Frontier Ξ± t βŠ‚ Closure Ξ± (s βˆͺ t) [] by fol stTop Frontier_THM SUBSET_DIFF H1 SUBSET_UNION SubsetClosure SUBSET_TRANS;
set usePart1 -;
qed;
`;;
(* ------------------------------------------------------------------------- *)
(* The universal Euclidean versions are what we use most of the time. *)
(* ------------------------------------------------------------------------- *)
let open_def = NewDefinition `;
open s ⇔ βˆ€x. x ∈ s β‡’ βˆƒe. &0 < e ∧ βˆ€x'. dist(x',x) < e β‡’ x' ∈ s`;;
let closed = NewDefinition `;
closed s ⇔ open (UNIV ━ s)`;;
let euclidean = new_definition
`euclidean = mk_topology (UNIV, open)`;;
let OPEN_EMPTY = theorem `;
open βˆ…
by rewrite open_def NOT_IN_EMPTY`;;
let OPEN_UNIV = theorem `;
open UNIV
by fol open_def IN_UNIV REAL_LT_01`;;
let OPEN_INTER = theorem `;
βˆ€s t. open s ∧ open t β‡’ open (s ∩ t)
proof
intro_TAC βˆ€s t, sOpen tOpen;
rewrite open_def IN_INTER;
intro_TAC βˆ€x, xs xt;
consider d1 such that
&0 < d1 ∧ βˆ€x'. dist (x',x) < d1 β‡’ x' ∈ s [d1Exists] by fol sOpen xs open_def;
consider d2 such that
&0 < d2 ∧ βˆ€x'. dist (x',x) < d2 β‡’ x' ∈ t [d2Exists] by fol tOpen xt open_def;
consider e such that &0 < e /\ e < d1 /\ e < d2 [eExists] by fol d1Exists d2Exists REAL_DOWN2;
fol - d1Exists d2Exists REAL_LT_TRANS;
qed;
`;;
let OPEN_UNIONS = theorem `;
(βˆ€s. s ∈ f β‡’ open s) β‡’ open (UNIONS f)
by fol open_def IN_UNIONS`;;
let IstopologyEuclidean = theorem `;
istopology (UNIV, open)
by simplify istopology IN IN_UNIV SUBSET OPEN_EMPTY OPEN_UNIV OPEN_INTER OPEN_UNIONS`;;
let OPEN_IN = theorem `;
open = open_in euclidean
by fol euclidean topology_tybij IstopologyEuclidean TopologyPAIR PAIR_EQ`;;
let TOPSPACE_EUCLIDEAN = theorem `;
topspace euclidean = UNIV
by fol euclidean IstopologyEuclidean topology_tybij TopologyPAIR PAIR_EQ`;;
let OPEN_EXISTS_IN = theorem `;
βˆ€P Q. (βˆ€a. P a β‡’ open {x | Q a x}) β‡’ open {x | βˆƒa. P a ∧ Q a x}
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN OPEN_IN_EXISTS_IN`;;
let OPEN_EXISTS = theorem `;
βˆ€Q. (βˆ€a. open {x | Q a x}) β‡’ open {x | βˆƒa. Q a x}
proof
intro_TAC βˆ€Q;
(βˆ€a. T β‡’ open {x | Q a x}) β‡’ open {x | βˆƒa. T ∧ Q a x} [] by simplify OPEN_EXISTS_IN;
MP_TAC -;
fol;
qed;
`;;
let TOPSPACE_EUCLIDEAN_SUBTOPOLOGY = theorem `;
βˆ€s. topspace (subtopology euclidean s) = s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN TopspaceSubtopology`;;
let OPEN_IN_REFL = theorem `;
βˆ€s. open_in (subtopology euclidean s) s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenInRefl`;;
let CLOSED_IN_REFL = theorem `;
βˆ€s. closed_in (subtopology euclidean s) s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN ClosedInRefl`;;
let CLOSED_IN = theorem `;
βˆ€s. closed = closed_in euclidean
by fol closed closed_in TOPSPACE_EUCLIDEAN OPEN_IN SUBSET_UNIV EXTENSION IN`;;
let OPEN_UNION = theorem `;
βˆ€s t. open s ∧ open t β‡’ open(s βˆͺ t)
by fol OPEN_IN OPEN_IN_UNION`;;
let OPEN_SUBOPEN = theorem `;
βˆ€s. open s ⇔ βˆ€x. x ∈ s β‡’ βˆƒt. open t ∧ x ∈ t ∧ t βŠ‚ s
by fol OPEN_IN OPEN_IN_SUBOPEN`;;
let CLOSED_EMPTY = theorem `;
closed βˆ…
by fol CLOSED_IN CLOSED_IN_EMPTY`;;
let CLOSED_UNIV = theorem `;
closed UNIV
by fol CLOSED_IN TOPSPACE_EUCLIDEAN CLOSED_IN_TOPSPACE`;;
let CLOSED_UNION = theorem `;
βˆ€s t. closed s ∧ closed t β‡’ closed(s βˆͺ t)
by fol CLOSED_IN CLOSED_IN_UNION`;;
let CLOSED_INTER = theorem `;
βˆ€s t. closed s ∧ closed t β‡’ closed(s ∩ t)
by fol CLOSED_IN CLOSED_IN_INTER`;;
let CLOSED_INTERS = theorem `;
βˆ€f. (βˆ€s. s ∈ f β‡’ closed s) β‡’ closed (INTERS f)
by fol CLOSED_IN CLOSED_IN_INTERS INTERS_0 CLOSED_UNIV`;;
let CLOSED_FORALL_IN = theorem `;
βˆ€P Q. (βˆ€a. P a β‡’ closed {x | Q a x})
β‡’ closed {x | βˆ€a. P a β‡’ Q a x}
proof
intro_TAC βˆ€P Q;
case_split Pnonempty | Pempty by fol;
suppose Β¬(P = βˆ…);
simplify CLOSED_IN Pnonempty CLOSED_IN_FORALL_IN;
end;
suppose P = βˆ…;
{x | βˆ€a. P a β‡’ Q a x} = UNIV [] by set Pempty;
simplify - CLOSED_UNIV;
end;
qed;
`;;
let CLOSED_FORALL = theorem `;
βˆ€Q. (βˆ€a. closed {x | Q a x}) β‡’ closed {x | βˆ€a. Q a x}
proof
intro_TAC βˆ€Q;
(βˆ€a. T β‡’ closed {x | Q a x}) β‡’ closed {x | βˆ€a. T β‡’ Q a x} [] by simplify CLOSED_FORALL_IN;
MP_TAC -;
fol;
qed;
`;;
let OPEN_CLOSED = theorem `;
βˆ€s. open s ⇔ closed(UNIV ━ s)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN CLOSED_IN OPEN_IN_CLOSED_IN`;;
let OPEN_DIFF = theorem `;
βˆ€s t. open s ∧ closed t β‡’ open(s ━ t)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN CLOSED_IN OPEN_IN_DIFF`;;
let CLOSED_DIFF = theorem `;
βˆ€s t. closed s ∧ open t β‡’ closed (s ━ t)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN CLOSED_IN CLOSED_IN_DIFF`;;
let OPEN_INTERS = theorem `;
βˆ€s. FINITE s ∧ (βˆ€t. t ∈ s β‡’ open t) β‡’ open (INTERS s)
by fol OPEN_IN OPEN_IN_INTERS INTERS_0 OPEN_UNIV`;;
let CLOSED_UNIONS = theorem `;
βˆ€s. FINITE s ∧ (βˆ€t. t ∈ s β‡’ closed t) β‡’ closed (UNIONS s)
by fol CLOSED_IN CLOSED_IN_UNIONS`;;
(* ------------------------------------------------------------------------- *)
(* Open and closed balls and spheres. *)
(* ------------------------------------------------------------------------- *)
let ball = new_definition
`ball(x,e) = {y | dist(x,y) < e}`;;
let cball = new_definition
`cball(x,e) = {y | dist(x,y) <= e}`;;
let IN_BALL = theorem `;
βˆ€x y e. y ∈ ball(x,e) ⇔ dist(x,y) < e
by rewrite ball IN_ELIM_THM`;;
let IN_CBALL = theorem `;
βˆ€x y e. y ∈ cball(x, e) ⇔ dist(x, y) <= e
by rewrite cball IN_ELIM_THM`;;
let BALL_SUBSET_CBALL = theorem `;
βˆ€x e. ball (x,e) βŠ‚ cball (x, e)
proof
rewrite IN_BALL IN_CBALL SUBSET;
real_arithmetic;
qed;
`;;
let OPEN_BALL = theorem `;
βˆ€x e. open (ball (x,e))
proof
rewrite open_def ball IN_ELIM_THM;
fol DIST_SYM REAL_SUB_LT REAL_LT_SUB_LADD REAL_ADD_SYM REAL_LET_TRANS DIST_TRIANGLE;
qed;
`;;
let CENTRE_IN_BALL = theorem `;
βˆ€x e. x ∈ ball(x,e) ⇔ &0 < e
by fol IN_BALL DIST_REFL`;;
let OPEN_CONTAINS_BALL = theorem `;
βˆ€s. open s ⇔ βˆ€x. x ∈ s β‡’ βˆƒe. &0 < e ∧ ball(x,e) βŠ‚ s
by rewrite open_def SUBSET IN_BALL DIST_SYM`;;
let HALF_CBALL_IN_BALL = theorem `;
βˆ€e. &0 < e β‡’ &0 < e/ &2 ∧ e / &2 < e ∧ cball (x, e/ &2) βŠ‚ ball (x, e)
proof
intro_TAC βˆ€e, H1;
&0 < e/ &2 ∧ e / &2 < e [] by real_arithmetic H1;
fol - SUBSET IN_CBALL IN_BALL REAL_LET_TRANS;
qed;
`;;
let OPEN_IN_CONTAINS_CBALL_LEMMA = theorem `;
βˆ€t s x. x ∈ s β‡’
((βˆƒe. &0 < e ∧ ball (x, e) ∩ t βŠ‚ s) ⇔
(βˆƒe. &0 < e ∧ cball (x, e) ∩ t βŠ‚ s))
by fol BALL_SUBSET_CBALL HALF_CBALL_IN_BALL INTER_TENSOR SUBSET_REFL SUBSET_TRANS`;;
(* ------------------------------------------------------------------------- *)
(* Basic "localization" results are handy for connectedness. *)
(* ------------------------------------------------------------------------- *)
let OPEN_IN_OPEN = theorem `;
βˆ€s u. open_in (subtopology euclidean u) s ⇔ βˆƒt. open t ∧ (s = u ∩ t)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN OpenInSubtopology INTER_COMM`;;
let OPEN_IN_INTER_OPEN = theorem `;
βˆ€s t u. open_in (subtopology euclidean u) s ∧ open t
β‡’ open_in (subtopology euclidean u) (s ∩ t)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN OpenInSubtopologyInterOpen`;;
let OPEN_IN_OPEN_INTER = theorem `;
βˆ€u s. open s β‡’ open_in (subtopology euclidean u) (u ∩ s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN OpenInOpenInter`;;
let OPEN_OPEN_IN_TRANS = theorem `;
βˆ€s t. open s ∧ open t ∧ t βŠ‚ s
β‡’ open_in (subtopology euclidean s) t
by fol OPEN_IN OpenOpenInTrans`;;
let OPEN_SUBSET = theorem `;
βˆ€s t. s βŠ‚ t ∧ open s β‡’ open_in (subtopology euclidean t) s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN OpenSubset`;;
let CLOSED_IN_CLOSED = theorem `;
βˆ€s u.
closed_in (subtopology euclidean u) s ⇔ βˆƒt. closed t ∧ (s = u ∩ t)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN ClosedInSubtopology INTER_COMM`;;
let CLOSED_SUBSET_EQ = theorem `;
βˆ€u s. closed s β‡’ (closed_in (subtopology euclidean u) s ⇔ s βŠ‚ u)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN ClosedSubsetEq`;;
let CLOSED_IN_INTER_CLOSED = theorem `;
βˆ€s t u. closed_in (subtopology euclidean u) s ∧ closed t
β‡’ closed_in (subtopology euclidean u) (s ∩ t)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN ClosedInInterClosed`;;
let CLOSED_IN_CLOSED_INTER = theorem `;
βˆ€u s. closed s β‡’ closed_in (subtopology euclidean u) (u ∩ s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN ClosedInClosedInter`;;
let CLOSED_SUBSET = theorem `;
βˆ€s t. s βŠ‚ t ∧ closed s β‡’ closed_in (subtopology euclidean t) s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN ClosedSubset`;;
let OPEN_IN_SUBSET_TRANS = theorem `;
βˆ€s t u. open_in (subtopology euclidean u) s ∧ s βŠ‚ t ∧ t βŠ‚ u
β‡’ open_in (subtopology euclidean t) s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN OpenInSubsetTrans`;;
let CLOSED_IN_SUBSET_TRANS = theorem `;
βˆ€s t u. closed_in (subtopology euclidean u) s ∧ s βŠ‚ t ∧ t βŠ‚ u
β‡’ closed_in (subtopology euclidean t) s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN ClosedInSubsetTrans`;;
let OPEN_IN_CONTAINS_BALL_LEMMA = theorem `;
βˆ€t s x. x ∈ s β‡’
((βˆƒE. open E ∧ x ∈ E ∧ E ∩ t βŠ‚ s) ⇔
(βˆƒe. &0 < e ∧ ball (x,e) ∩ t βŠ‚ s))
proof
intro_TAC βˆ€ t s x, xs;
eq_tac [Right] by fol CENTRE_IN_BALL OPEN_BALL;
intro_TAC H2;
consider a such that
open a ∧ x ∈ a ∧ a ∩ t βŠ‚ s [aExists] by fol H2;
consider e such that
&0 < e ∧ ball(x,e) βŠ‚ a [eExists] by fol - OPEN_CONTAINS_BALL;
fol aExists - INTER_SUBSET GSYM SUBSET_INTER SUBSET_TRANS;
qed;
`;;
let OPEN_IN_CONTAINS_BALL = theorem `;
βˆ€s t. open_in (subtopology euclidean t) s ⇔
s βŠ‚ t ∧ βˆ€x. x ∈ s β‡’ βˆƒe. &0 < e ∧ ball(x,e) ∩ t βŠ‚ s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN SubtopologyOpenInSubopen GSYM OPEN_IN GSYM OPEN_IN_CONTAINS_BALL_LEMMA`;;
let OPEN_IN_CONTAINS_CBALL = theorem `;
βˆ€s t. open_in (subtopology euclidean t) s ⇔
s βŠ‚ t ∧ βˆ€x. x ∈ s β‡’ βˆƒe. &0 < e ∧ cball(x,e) ∩ t βŠ‚ s
by fol OPEN_IN_CONTAINS_BALL OPEN_IN_CONTAINS_CBALL_LEMMA`;;
let open_in = theorem `;
βˆ€u s. open_in (subtopology euclidean u) s ⇔
s βŠ‚ u ∧
βˆ€x. x ∈ s β‡’ βˆƒe. &0 < e ∧
βˆ€x'. x' ∈ u ∧ dist(x',x) < e β‡’ x' ∈ s
by rewrite OPEN_IN_CONTAINS_BALL IN_INTER SUBSET IN_BALL CONJ_SYM DIST_SYM`;;
(* ------------------------------------------------------------------------- *)
(* These "transitivity" results are handy too. *)
(* ------------------------------------------------------------------------- *)
let OPEN_IN_TRANS = theorem `;
βˆ€s t u. open_in (subtopology euclidean t) s ∧
open_in (subtopology euclidean u) t
β‡’ open_in (subtopology euclidean u) s
proof
intro_TAC βˆ€s t u;
t βŠ‚ topspace euclidean ∧ u βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - OPEN_IN OpenInTrans;
qed;
`;;
let OPEN_IN_TRANS_EQ = theorem `;
βˆ€s t. (βˆ€u. open_in (subtopology euclidean t) u
β‡’ open_in (subtopology euclidean s) t)
⇔ open_in (subtopology euclidean s) t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenInTransEq`;;
let OPEN_IN_OPEN_TRANS = theorem `;
βˆ€u s. open_in (subtopology euclidean u) s ∧ open u β‡’ open s
proof
intro_TAC βˆ€u s, H1;
u βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - H1 OPEN_IN OpenInOpenTrans;
qed;
`;;
let CLOSED_IN_TRANS = theorem `;
βˆ€s t u. closed_in (subtopology euclidean t) s ∧
closed_in (subtopology euclidean u) t
β‡’ closed_in (subtopology euclidean u) s
proof
intro_TAC βˆ€s t u;
t βŠ‚ topspace euclidean ∧ u βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - ClosedInSubtopologyTrans;
qed;
`;;
let CLOSED_IN_TRANS_EQ = theorem `;
βˆ€s t.
(βˆ€u. closed_in (subtopology euclidean t) u β‡’ closed_in (subtopology euclidean s) t)
⇔ closed_in (subtopology euclidean s) t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN ClosedInSubtopologyTransEq`;;
let CLOSED_IN_CLOSED_TRANS = theorem `;
βˆ€s u. closed_in (subtopology euclidean u) s ∧ closed u β‡’ closed s
proof
intro_TAC βˆ€u s;
u βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - CLOSED_IN ClosedInClosedTrans;
qed;
`;;
let OPEN_IN_SUBTOPOLOGY_INTER_SUBSET = theorem `;
βˆ€s u v. open_in (subtopology euclidean u) (u ∩ s) ∧ v βŠ‚ u
β‡’ open_in (subtopology euclidean v) (v ∩ s)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenInSubtopologyInterSubset`;;
let OPEN_IN_OPEN_EQ = theorem `;
βˆ€s t. open s β‡’ (open_in (subtopology euclidean s) t ⇔ open t ∧ t βŠ‚ s)
by fol OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenInOpenEq`;;
let CLOSED_IN_CLOSED_EQ = theorem `;
βˆ€s t. closed s β‡’
(closed_in (subtopology euclidean s) t ⇔ closed t ∧ t βŠ‚ s)
by fol CLOSED_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN ClosedInClosedEq`;;
(* ------------------------------------------------------------------------- *)
(* Also some invariance theorems for relative topology. *)
(* ------------------------------------------------------------------------- *)
let OPEN_IN_INJECTIVE_LINEAR_IMAGE = theorem `;
βˆ€f s t. linear f ∧ (βˆ€x y. f x = f y β‡’ x = y) β‡’
(open_in (subtopology euclidean (IMAGE f t)) (IMAGE f s) ⇔
open_in (subtopology euclidean t) s)
proof
rewrite open_in FORALL_IN_IMAGE IMP_CONJ SUBSET;
intro_TAC βˆ€f s t, H1, H2;
βˆ€x s. f x ∈ IMAGE f s ⇔ x ∈ s [fInjMap] by set H2;
rewrite -;
βˆ€x y. f x - f y = f (x - y) [fSubLinear] by fol H1 LINEAR_SUB;
consider B1 such that
&0 < B1 ∧ βˆ€x. norm (f x) <= B1 * norm x [B1exists] by fol H1 LINEAR_BOUNDED_POS;
consider B2 such that
&0 < B2 ∧ βˆ€x. norm x * B2 <= norm (f x) [B2exists] by fol H1 H2 LINEAR_INJECTIVE_BOUNDED_BELOW_POS;
AP_TERM_TAC;
eq_tac [Left]
proof
intro_TAC H3, βˆ€x, xs;
consider e such that
&0 < e ∧ βˆ€x'. x' ∈ t β‡’ dist (f x',f x) < e β‡’ x' ∈ s [eExists] by fol H3 xs;
exists_TAC e / B1;
simplify REAL_LT_DIV eExists B1exists;
intro_TAC βˆ€x', x't;
βˆ€x. norm(f x) <= B1 * norm(x) ∧ norm(x) * B1 < e β‡’ norm(f x) < e [normB1] by real_arithmetic;
simplify fSubLinear B1exists H3 eExists x't normB1 dist REAL_LT_RDIV_EQ;
qed;
intro_TAC H3, βˆ€x, xs;
consider e such that
&0 < e ∧ βˆ€x'. x' ∈ t β‡’ dist (x',x) < e β‡’ x' ∈ s [eExists] by fol H3 xs;
exists_TAC e * B2;
simplify REAL_LT_MUL eExists B2exists;
intro_TAC βˆ€x', x't;
βˆ€x. norm x <= norm (f x) / B2 ∧ norm(f x) / B2 < e β‡’ norm x < e [normB2] by real_arithmetic;
simplify fSubLinear B2exists H3 eExists x't normB2 dist REAL_LE_RDIV_EQ REAL_LT_LDIV_EQ;
qed;
`;;
add_linear_invariants [OPEN_IN_INJECTIVE_LINEAR_IMAGE];;
let CLOSED_IN_INJECTIVE_LINEAR_IMAGE = theorem `;
βˆ€f s t. linear f ∧ (βˆ€x y. f x = f y β‡’ x = y) β‡’
(closed_in (subtopology euclidean (IMAGE f t)) (IMAGE f s) ⇔
closed_in (subtopology euclidean t) s)
proof
rewrite closed_in TOPSPACE_EUCLIDEAN_SUBTOPOLOGY;
GEOM_TRANSFORM_TAC[];
qed;
`;;
add_linear_invariants [CLOSED_IN_INJECTIVE_LINEAR_IMAGE];;
(* ------------------------------------------------------------------------- *)
(* Subspace topology results only proved for Euclidean space. *)
(* ------------------------------------------------------------------------- *)
(* ISTOPLOGY_SUBTOPOLOGY can not be proved, as the definition of topology *)
(* there is different from the one here. *)
let OPEN_IN_SUBTOPOLOGY = theorem `;
βˆ€u s. open_in (subtopology euclidean u) s ⇔
βˆƒt. open_in euclidean t ∧ s = t ∩ u
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenInSubtopology`;;
let TOPSPACE_SUBTOPOLOGY = theorem `;
βˆ€u. topspace(subtopology euclidean u) = topspace euclidean ∩ u
proof
intro_TAC βˆ€u;
u βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - TopspaceSubtopology INTER_COMM SUBSET_INTER_ABSORPTION;
qed;
`;;
let CLOSED_IN_SUBTOPOLOGY = theorem `;
βˆ€u s. closed_in (subtopology euclidean u) s ⇔
βˆƒt. closed_in euclidean t ∧ s = t ∩ u
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closed_in ClosedInSubtopology`;;
let OPEN_IN_SUBTOPOLOGY_REFL = theorem `;
βˆ€u. open_in (subtopology euclidean u) u ⇔ u βŠ‚ topspace euclidean
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN OPEN_IN_REFL`;;
let CLOSED_IN_SUBTOPOLOGY_REFL = theorem `;
βˆ€u. closed_in (subtopology euclidean u) u ⇔ u βŠ‚ topspace euclidean
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN_REFL`;;
let SUBTOPOLOGY_UNIV = theorem `;
subtopology euclidean UNIV = euclidean
proof
rewrite GSYM Topology_Eq;
conj_tac [Left] by fol TOPSPACE_EUCLIDEAN TOPSPACE_EUCLIDEAN_SUBTOPOLOGY;
rewrite GSYM OPEN_IN OPEN_IN_OPEN INTER_UNIV;
fol;
qed;
`;;
let SUBTOPOLOGY_SUPERSET = theorem `;
βˆ€s. topspace euclidean βŠ‚ s β‡’ subtopology euclidean s = euclidean
by simplify TOPSPACE_EUCLIDEAN UNIV_SUBSET SUBTOPOLOGY_UNIV`;;
let OPEN_IN_IMP_SUBSET = theorem `;
βˆ€s t. open_in (subtopology euclidean s) t β‡’ t βŠ‚ s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenInImpSubset`;;
let CLOSED_IN_IMP_SUBSET = theorem `;
βˆ€s t. closed_in (subtopology euclidean s) t β‡’ t βŠ‚ s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN ClosedInImpSubset`;;
let OPEN_IN_SUBTOPOLOGY_UNION = theorem `;
βˆ€s t u. open_in (subtopology euclidean t) s ∧
open_in (subtopology euclidean u) s
β‡’ open_in (subtopology euclidean (t βˆͺ u)) s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenInSubtopologyUnion`;;
let CLOSED_IN_SUBTOPOLOGY_UNION = theorem `;
βˆ€s t u. closed_in (subtopology euclidean t) s ∧
closed_in (subtopology euclidean u) s
β‡’ closed_in (subtopology euclidean (t βˆͺ u)) s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN ClosedInSubtopologyUnion`;;
(* ------------------------------------------------------------------------- *)
(* Connectedness. *)
(* ------------------------------------------------------------------------- *)
let connected_DEF = NewDefinition `;
connected s ⇔ Connected (subtopology euclidean s)`;;
let connected = theorem `;
βˆ€s. connected s ⇔ Β¬(βˆƒe1 e2.
open e1 ∧ open e2 ∧ s βŠ‚ e1 βˆͺ e2 ∧
e1 ∩ e2 ∩ s = βˆ… ∧ Β¬(e1 ∩ s = βˆ…) ∧ Β¬(e2 ∩ s = βˆ…))
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN connected_DEF OPEN_IN ConnectedSubtopology`;;
let CONNECTED_CLOSED = theorem `;
βˆ€s. connected s ⇔
Β¬(βˆƒe1 e2. closed e1 ∧ closed e2 ∧ s βŠ‚ e1 βˆͺ e2 ∧
e1 ∩ e2 ∩ s = βˆ… ∧ Β¬(e1 ∩ s = βˆ…) ∧ Β¬(e2 ∩ s = βˆ…))
by simplify connected_DEF CLOSED_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN connected_DEF CLOSED_IN ConnectedClosedSubtopology`;;
let CONNECTED_OPEN_IN = theorem `;
βˆ€s. connected s ⇔ Β¬(βˆƒe1 e2.
open_in (subtopology euclidean s) e1 ∧
open_in (subtopology euclidean s) e2 ∧
s βŠ‚ e1 βˆͺ e2 ∧ e1 ∩ e2 = βˆ… ∧ Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…))
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN connected_DEF OPEN_IN ConnectedOpenIn`;;
let CONNECTED_OPEN_IN_EQ = theorem `;
βˆ€s. connected s ⇔ Β¬(βˆƒe1 e2.
open_in (subtopology euclidean s) e1 ∧
open_in (subtopology euclidean s) e2 ∧
e1 βˆͺ e2 = s ∧ e1 ∩ e2 = βˆ… ∧
Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…))
by simplify connected_DEF Connected_DEF SUBSET_UNIV TOPSPACE_EUCLIDEAN TopspaceSubtopology EQ_SYM_EQ`;;
let CONNECTED_CLOSED_IN = theorem `;
βˆ€s. connected s ⇔ Β¬(βˆƒe1 e2.
closed_in (subtopology euclidean s) e1 ∧
closed_in (subtopology euclidean s) e2 ∧
s βŠ‚ e1 βˆͺ e2 ∧ e1 ∩ e2 = βˆ… ∧ Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…))
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN connected_DEF CLOSED_IN ConnectedClosedIn`;;
let CONNECTED_CLOSED_IN_EQ = theorem `;
βˆ€s. connected s ⇔ Β¬(βˆƒe1 e2.
closed_in (subtopology euclidean s) e1 ∧
closed_in (subtopology euclidean s) e2 ∧
e1 βˆͺ e2 = s ∧ e1 ∩ e2 = βˆ… ∧ Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…))
by simplify connected_DEF ConnectedClosed SUBSET_UNIV TOPSPACE_EUCLIDEAN TopspaceSubtopology EQ_SYM_EQ`;;
let CONNECTED_CLOPEN = theorem `;
βˆ€s. connected s ⇔
βˆ€t. open_in (subtopology euclidean s) t ∧
closed_in (subtopology euclidean s) t β‡’ t = βˆ… ∨ t = s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN connected_DEF ConnectedClopen TopspaceSubtopology`;;
let CONNECTED_CLOSED_SET = theorem `;
βˆ€s. closed s β‡’
(connected s ⇔
Β¬(βˆƒe1 e2. closed e1 ∧ closed e2 ∧
Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…) ∧ e1 βˆͺ e2 = s ∧ e1 ∩ e2 = βˆ…))
by simplify connected_DEF CLOSED_IN closed_in ConnectedClosedSet`;;
let CONNECTED_OPEN_SET = theorem `;
βˆ€s. open s β‡’
(connected s ⇔
Β¬(βˆƒe1 e2. open e1 ∧ open e2 ∧
Β¬(e1 = βˆ…) ∧ Β¬(e2 = βˆ…) ∧ e1 βˆͺ e2 = s ∧ e1 ∩ e2 = βˆ…))
by simplify connected_DEF OPEN_IN ConnectedOpenSet`;;
let CONNECTED_EMPTY = theorem `;
connected βˆ…
by rewrite connected_DEF ConnectedEmpty`;;
let CONNECTED_SING = theorem `;
βˆ€a. connected {a}
proof
intro_TAC βˆ€a;
a ∈ topspace euclidean [] by fol IN_UNIV TOPSPACE_EUCLIDEAN;
fol - ConnectedSing connected_DEF;
qed;
`;;
let CONNECTED_UNIONS = theorem `;
βˆ€P. (βˆ€s. s ∈ P β‡’ connected s) ∧ Β¬(INTERS P = βˆ…)
β‡’ connected(UNIONS P)
proof
intro_TAC βˆ€P;
βˆ€s. s ∈ P β‡’ s βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - connected_DEF ConnectedUnions;
qed;
`;;
let CONNECTED_UNION = theorem `;
βˆ€s t. connected s ∧ connected t ∧ Β¬(s ∩ t = βˆ…)
β‡’ connected (s βˆͺ t)
proof
intro_TAC βˆ€s t;
s βŠ‚ topspace euclidean ∧ t βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - connected_DEF ConnectedUnion;
qed;
`;;
let CONNECTED_DIFF_OPEN_FROM_CLOSED = theorem `;
βˆ€s t u. s βŠ‚ t ∧ t βŠ‚ u ∧ open s ∧ closed t ∧
connected u ∧ connected(t ━ s)
β‡’ connected(u ━ s)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN connected_DEF OPEN_IN CLOSED_IN ConnectedDiffOpenFromClosed`;;
let CONNECTED_DISJOINT_UNIONS_OPEN_UNIQUE = theorem `;
βˆ€f f'. pairwise DISJOINT f ∧ pairwise DISJOINT f' ∧
(βˆ€s. s ∈ f β‡’ open s ∧ connected s ∧ Β¬(s = βˆ…)) ∧
(βˆ€s. s ∈ f' β‡’ open s ∧ connected s ∧ Β¬(s = βˆ…)) ∧
UNIONS f = UNIONS f'
β‡’ f = f'
by rewrite connected_DEF OPEN_IN ConnectedDisjointUnionsOpenUnique`;;
let CONNECTED_FROM_CLOSED_UNION_AND_INTER = theorem `;
βˆ€s t. closed s ∧ closed t ∧ connected (s βˆͺ t) ∧ connected (s ∩ t)
β‡’ connected s ∧ connected t
proof
intro_TAC βˆ€s t;
s βˆͺ t βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - connected_DEF CLOSED_IN ConnectedFromClosedUnionAndInter;
qed;
`;;
let CONNECTED_FROM_OPEN_UNION_AND_INTER = theorem `;
βˆ€s t. open s ∧ open t ∧ connected (s βˆͺ t) ∧ connected (s ∩ t)
β‡’ connected s ∧ connected t
proof
intro_TAC βˆ€s t;
s βˆͺ t βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
fol - connected_DEF OPEN_IN ConnectedFromOpenUnionAndInter;
qed;
`;;
(* ------------------------------------------------------------------------- *)
(* Sort of induction principle for connected sets. *)
(* ------------------------------------------------------------------------- *)
let CONNECTED_INDUCTION = theorem `;
βˆ€P Q s. connected s ∧
(βˆ€t a. open_in (subtopology euclidean s) t ∧ a ∈ t β‡’ βˆƒz. z ∈ t ∧ P z) ∧
(βˆ€a. a ∈ s β‡’ βˆƒt. open_in (subtopology euclidean s) t ∧ a ∈ t ∧
βˆ€x y. x ∈ t ∧ y ∈ t ∧ P x ∧ P y ∧ Q x β‡’ Q y)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s ∧ P a ∧ P b ∧ Q a β‡’ Q b
proof
intro_TAC βˆ€P Q s;
s βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
MP_TAC -;
rewrite connected_DEF ConnectedInduction;
qed;
`;;
let CONNECTED_EQUIVALENCE_RELATION_GEN_LEMMA = theorem `;
βˆ€P R s.
connected s ∧
(βˆ€x y z. R x y ∧ R y z β‡’ R x z) ∧
(βˆ€t a. open_in (subtopology euclidean s) t ∧ a ∈ t
β‡’ βˆƒz. z ∈ t ∧ P z) ∧
(βˆ€a. a ∈ s
β‡’ βˆƒt. open_in (subtopology euclidean s) t ∧ a ∈ t ∧
βˆ€x y. x ∈ t ∧ y ∈ t ∧ P x ∧ P y β‡’ R x y)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s ∧ P a ∧ P b β‡’ R a b
proof
intro_TAC βˆ€P R s;
s βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
MP_TAC -;
rewrite connected_DEF ConnectedEquivalenceRelationGen;
qed;
`;;
let CONNECTED_EQUIVALENCE_RELATION_GEN = theorem `;
βˆ€P R s.
connected s ∧
(βˆ€x y. R x y β‡’ R y x) ∧
(βˆ€x y z. R x y ∧ R y z β‡’ R x z) ∧
(βˆ€t a. open_in (subtopology euclidean s) t ∧ a ∈ t
β‡’ βˆƒz. z ∈ t ∧ P z) ∧
(βˆ€a. a ∈ s
β‡’ βˆƒt. open_in (subtopology euclidean s) t ∧ a ∈ t ∧
βˆ€x y. x ∈ t ∧ y ∈ t ∧ P x ∧ P y β‡’ R x y)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s ∧ P a ∧ P b β‡’ R a b
proof
intro_TAC βˆ€P R s;
MP_TAC ISPECL [P; R; s] CONNECTED_EQUIVALENCE_RELATION_GEN_LEMMA;
fol;
qed;
`;;
let CONNECTED_INDUCTION_SIMPLE = theorem `;
βˆ€P s. connected s ∧ (βˆ€a. a ∈ s
β‡’ βˆƒt. open_in (subtopology euclidean s) t ∧ a ∈ t ∧
βˆ€x y. x ∈ t ∧ y ∈ t ∧ P x β‡’ P y)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s ∧ P a β‡’ P b
proof
intro_TAC βˆ€P s;
s βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
MP_TAC -;
rewrite connected_DEF ConnectedInductionSimple;
qed;
`;;
let CONNECTED_EQUIVALENCE_RELATION = theorem `;
βˆ€R s. connected s ∧
(βˆ€x y. R x y β‡’ R y x) ∧ (βˆ€x y z. R x y ∧ R y z β‡’ R x z) ∧
(βˆ€a. a ∈ s
β‡’ βˆƒt. open_in (subtopology euclidean s) t ∧ a ∈ t ∧ βˆ€x. x ∈ t β‡’ R a x)
β‡’ βˆ€a b. a ∈ s ∧ b ∈ s β‡’ R a b
proof
intro_TAC βˆ€R s;
s βŠ‚ topspace euclidean [] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN;
MP_TAC -;
rewrite connected_DEF ConnectedEquivalenceRelation;
qed;
`;;
(* ------------------------------------------------------------------------- *)
(* Limit points. *)
(* ------------------------------------------------------------------------- *)
parse_as_infix ("limit_point_of",(12,"right"));;
let limit_point_of_DEF = NewDefinition `;
x limit_point_of s ⇔ x ∈ LimitPointOf euclidean s`;;
let limit_point_of = theorem `;
x limit_point_of s ⇔
βˆ€t. x ∈ t ∧ open t β‡’ βˆƒy. Β¬(y = x) ∧ y ∈ s ∧ y ∈ t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN IN_UNIV IN_LimitPointOf limit_point_of_DEF OPEN_IN`;;
let LIMPT_SUBSET = theorem `;
βˆ€x s t. x limit_point_of s ∧ s βŠ‚ t β‡’ x limit_point_of t
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN limit_point_of_DEF LimptSubset SUBSET`;;
let CLOSED_LIMPT = theorem `;
βˆ€s. closed s ⇔ βˆ€x. x limit_point_of s β‡’ x ∈ s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN IN_UNIV limit_point_of_DEF CLOSED_IN ClosedLimpt SUBSET`;;
let LIMPT_EMPTY = theorem `;
βˆ€x. Β¬(x limit_point_of βˆ…)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN IN_UNIV limit_point_of_DEF GSYM βˆ‰ LimptEmpty`;;
let NO_LIMIT_POINT_IMP_CLOSED = theorem `;
βˆ€s. Β¬(βˆƒx. x limit_point_of s) β‡’ closed s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN IN_UNIV limit_point_of_DEF CLOSED_IN NoLimitPointImpClosed NOT_EXISTS_THM βˆ‰`;;
let LIMIT_POINT_UNION = theorem `;
βˆ€s t x. x limit_point_of (s βˆͺ t) ⇔
x limit_point_of s ∨ x limit_point_of t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN IN_UNIV limit_point_of_DEF LimitPointUnion EXTENSION IN_UNION`;;
let LimitPointOf_euclidean = theorem `;
βˆ€s. LimitPointOf euclidean s = {x | x limit_point_of s}
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN IN_UNIV limit_point_of_DEF LimitPointOf IN_ELIM_THM EXTENSION`;;
(* ------------------------------------------------------------------------- *)
(* Interior of a set. *)
(* ------------------------------------------------------------------------- *)
let interior_DEF = NewDefinition `;
interior = Interior euclidean`;;
let interior = theorem `;
βˆ€s. interior s = {x | βˆƒt. open t ∧ x ∈ t ∧ t βŠ‚ s}
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF Interior_DEF OPEN_IN`;;
let INTERIOR_EQ = theorem `;
βˆ€s. interior s = s ⇔ open s
by simplify interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorEq EQ_SYM_EQ`;;
let INTERIOR_OPEN = theorem `;
βˆ€s. open s β‡’ interior s = s
by fol interior_DEF OPEN_IN InteriorOpen`;;
let INTERIOR_EMPTY = theorem `;
interior βˆ… = βˆ…
by fol interior_DEF OPEN_IN InteriorEmpty`;;
let INTERIOR_UNIV = theorem `;
interior UNIV = UNIV
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF InteriorUniv`;;
let OPEN_INTERIOR = theorem `;
βˆ€s. open (interior s)
by simplify interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenInterior`;;
let INTERIOR_INTERIOR = theorem `;
βˆ€s. interior (interior s) = interior s
by simplify interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorInterior`;;
let INTERIOR_SUBSET = theorem `;
βˆ€s. interior s βŠ‚ s
by simplify interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorSubset`;;
let SUBSET_INTERIOR = theorem `;
βˆ€s t. s βŠ‚ t β‡’ interior s βŠ‚ interior t
by simplify interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN SubsetInterior`;;
let INTERIOR_MAXIMAL = theorem `;
βˆ€s t. t βŠ‚ s ∧ open t β‡’ t βŠ‚ interior s
by simplify interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorMaximal`;;
let INTERIOR_MAXIMAL_EQ = theorem `;
βˆ€s t. open s β‡’ (s βŠ‚ interior t ⇔ s βŠ‚ t)
by simplify interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorMaximalEq`;;
let INTERIOR_UNIQUE = theorem `;
βˆ€s t. t βŠ‚ s ∧ open t ∧ (βˆ€t'. t' βŠ‚ s ∧ open t' β‡’ t' βŠ‚ t)
β‡’ interior s = t
by simplify interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorUnique`;;
let IN_INTERIOR = theorem `;
βˆ€x s. x ∈ interior s ⇔ βˆƒe. &0 < e ∧ ball(x,e) βŠ‚ s
proof
simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF IN_Interior GSYM OPEN_IN;
fol OPEN_CONTAINS_BALL SUBSET_TRANS CENTRE_IN_BALL OPEN_BALL;
qed;
`;;
let OPEN_SUBSET_INTERIOR = theorem `;
βˆ€s t. open s β‡’ (s βŠ‚ interior t ⇔ s βŠ‚ t)
by fol interior_DEF OPEN_IN SUBSET_UNIV TOPSPACE_EUCLIDEAN OpenSubsetInterior`;;
let INTERIOR_INTER = theorem `;
βˆ€s t. interior (s ∩ t) = interior s ∩ interior t
by simplify interior_DEF SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorInter`;;
let INTERIOR_FINITE_INTERS = theorem `;
βˆ€s. FINITE s β‡’ interior (INTERS s) = INTERS (IMAGE interior s)
proof
intro_TAC βˆ€s, H1;
assume Β¬(s = βˆ…) [sNonempty] by simplify INTERS_0 IMAGE_CLAUSES INTERIOR_UNIV;
simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN H1 sNonempty interior_DEF InteriorFiniteInters;
qed;
`;;
let INTERIOR_FINITE_INTERS = theorem `;
βˆ€s. FINITE s β‡’ interior (INTERS s) = INTERS (IMAGE interior s)
proof
intro_TAC βˆ€s, H1;
assume s = βˆ… [sEmpty] by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN H1 interior_DEF InteriorFiniteInters;
rewrite INTERS_0 IMAGE_CLAUSES sEmpty INTERIOR_UNIV;
qed;
`;;
let INTERIOR_INTERS_SUBSET = theorem `;
βˆ€f. interior (INTERS f) βŠ‚ INTERS (IMAGE interior f)
proof
intro_TAC βˆ€f;
assume f = βˆ… [fEmpty] by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF InteriorIntersSubset;
rewrite INTERS_0 IMAGE_CLAUSES - INTERIOR_UNIV SUBSET_REFL;
qed;
`;;
let UNION_INTERIOR_SUBSET = theorem `;
βˆ€s t. interior s βˆͺ interior t βŠ‚ interior(s βˆͺ t)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF UnionInteriorSubset`;;
let INTERIOR_EQ_EMPTY = theorem `;
βˆ€s. interior s = βˆ… ⇔ βˆ€t. open t ∧ t βŠ‚ s β‡’ t = βˆ…
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF OPEN_IN InteriorEqEmpty`;;
let INTERIOR_EQ_EMPTY_ALT = theorem `;
βˆ€s. interior s = βˆ… ⇔ βˆ€t. open t ∧ Β¬(t = βˆ…) β‡’ Β¬(t ━ s = βˆ…)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF OPEN_IN InteriorEqEmptyAlt`;;
let INTERIOR_UNIONS_OPEN_SUBSETS = theorem `;
βˆ€s. UNIONS {t | open t ∧ t βŠ‚ s} = interior s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF OPEN_IN InteriorUnionsOpenSubsets`;;
(* ------------------------------------------------------------------------- *)
(* Closure of a set. *)
(* ------------------------------------------------------------------------- *)
let closure_DEF = NewDefinition `;
closure = Closure euclidean`;;
let closure = theorem `;
βˆ€s. closure s = s UNION {x | x limit_point_of s}
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF LimitPointOf_euclidean Closure_THM`;;
let CLOSURE_INTERIOR = theorem `;
βˆ€s. closure s = UNIV ━ interior (UNIV ━ s)
proof
rewrite closure_DEF GSYM TOPSPACE_EUCLIDEAN interior_DEF;
simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN ClosureInterior;
qed;
`;;
let INTERIOR_CLOSURE = theorem `;
βˆ€s. interior s = UNIV ━ (closure (UNIV ━ s))
proof
rewrite closure_DEF GSYM TOPSPACE_EUCLIDEAN interior_DEF;
simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorClosure;
qed;
`;;
let CLOSED_CLOSURE = theorem `;
βˆ€s. closed (closure s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosedClosure`;;
let CLOSURE_SUBSET = theorem `;
βˆ€s. s βŠ‚ closure s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosureSubset`;;
let SUBSET_CLOSURE = theorem `;
βˆ€s t. s βŠ‚ t β‡’ closure s βŠ‚ closure t
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF SubsetClosure`;;
let CLOSURE_HULL = theorem `;
βˆ€s. closure s = closed hull s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosureHull`;;
let CLOSURE_EQ = theorem `;
βˆ€s. closure s = s ⇔ closed s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosureEq`;;
let CLOSURE_CLOSED = theorem `;
βˆ€s. closed s β‡’ closure s = s
by fol CLOSED_IN closure_DEF ClosureClosed`;;
let CLOSURE_CLOSURE = theorem `;
βˆ€s. closure (closure s) = closure s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosureClosure`;;
let CLOSURE_UNION = theorem `;
βˆ€s t. closure (s βˆͺ t) = closure s βˆͺ closure t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosureUnion`;;
let CLOSURE_INTER_SUBSET = theorem `;
βˆ€s t. closure (s ∩ t) βŠ‚ closure s ∩ closure t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosureInterSubset`;;
let CLOSURE_INTERS_SUBSET = theorem `;
βˆ€f. closure (INTERS f) βŠ‚ INTERS (IMAGE closure f)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosureIntersSubset`;;
let CLOSURE_MINIMAL = theorem `;
βˆ€s t. s βŠ‚ t ∧ closed t β‡’ closure s βŠ‚ t
by fol CLOSED_IN closure_DEF ClosureMinimal`;;
let CLOSURE_MINIMAL_EQ = theorem `;
βˆ€s t. closed t β‡’ (closure s βŠ‚ t ⇔ s βŠ‚ t)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN closure_DEF ClosureMinimalEq`;;
let CLOSURE_UNIQUE = theorem `;
βˆ€s t. s βŠ‚ t ∧ closed t ∧ (βˆ€t'. s βŠ‚ t' ∧ closed t' β‡’ t βŠ‚ t')
β‡’ closure s = t
by fol CLOSED_IN closure_DEF ClosureUnique`;;
let CLOSURE_EMPTY = theorem `;
closure βˆ… = βˆ…
by fol closure_DEF ClosureEmpty`;;
let CLOSURE_UNIV = theorem `;
closure UNIV = UNIV
by fol TOPSPACE_EUCLIDEAN closure_DEF ClosureUniv`;;
let CLOSURE_UNIONS = theorem `;
βˆ€f. FINITE f β‡’ closure (UNIONS f) = UNIONS {closure s | s ∈ f}
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF ClosureUnions`;;
let CLOSURE_EQ_EMPTY = theorem `;
βˆ€s. closure s = βˆ… ⇔ s = βˆ…
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF ClosureEqEmpty`;;
let CLOSURE_SUBSET_EQ = theorem `;
βˆ€s. closure s βŠ‚ s ⇔ closed s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF CLOSED_IN ClosureSubsetEq`;;
let OPEN_INTER_CLOSURE_EQ_EMPTY = theorem `;
βˆ€s t. open s β‡’ (s ∩ closure t = βˆ… ⇔ s ∩ t = βˆ…)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF OPEN_IN OpenInterClosureEqEmpty`;;
let OPEN_INTER_CLOSURE_SUBSET = theorem `;
βˆ€s t. open s β‡’ s ∩ closure t βŠ‚ closure (s ∩ t)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF OPEN_IN OpenInterClosureSubset`;;
let CLOSURE_OPEN_INTER_SUPERSET = theorem `;
βˆ€s t. open s ∧ s βŠ‚ closure t β‡’ closure (s ∩ t) = closure s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF OPEN_IN ClosureOpenInterSuperset`;;
let CLOSURE_COMPLEMENT = theorem `;
βˆ€s. closure (UNIV ━ s) = UNIV ━ interior s
proof
rewrite closure_DEF GSYM TOPSPACE_EUCLIDEAN interior_DEF;
simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN ClosureComplement;
qed;
`;;
let INTERIOR_COMPLEMENT = theorem `;
βˆ€s. interior (UNIV ━ s) = UNIV ━ closure s
proof
rewrite closure_DEF GSYM TOPSPACE_EUCLIDEAN interior_DEF;
simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN InteriorComplement;
qed;
`;;
let CONNECTED_INTERMEDIATE_CLOSURE = theorem `;
βˆ€s t. connected s ∧ s βŠ‚ t ∧ t βŠ‚ closure s β‡’ connected t
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF connected_DEF ConnectedIntermediateClosure`;;
let CONNECTED_CLOSURE = theorem `;
βˆ€s. connected s β‡’ connected (closure s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF connected_DEF ConnectedClosure`;;
let CONNECTED_UNION_STRONG = theorem `;
βˆ€s t. connected s ∧ connected t ∧ Β¬(closure s ∩ t = βˆ…)
β‡’ connected (s βˆͺ t)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF connected_DEF ConnectedUnionStrong`;;
let INTERIOR_DIFF = theorem `;
βˆ€s t. interior (s ━ t) = interior s ━ closure t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF interior_DEF InteriorDiff`;;
let CLOSED_IN_LIMPT = theorem `;
βˆ€s t. closed_in (subtopology euclidean t) s ⇔
s βŠ‚ t ∧ βˆ€x. x limit_point_of s ∧ x ∈ t β‡’ x ∈ s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF limit_point_of_DEF ClosedInLimpt_ALT`;;
let CLOSED_IN_INTER_CLOSURE = theorem `;
βˆ€s t. closed_in (subtopology euclidean s) t ⇔ s ∩ closure t = t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF limit_point_of_DEF ClosedInInterClosure`;;
let INTERIOR_CLOSURE_IDEMP = theorem `;
βˆ€s. interior (closure (interior (closure s))) = interior (closure s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF interior_DEF InteriorClosureIdemp`;;
let CLOSURE_INTERIOR_IDEMP = theorem `;
βˆ€s. closure (interior (closure (interior s))) = closure (interior s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF interior_DEF ClosureInteriorIdemp`;;
let INTERIOR_CLOSED_UNION_EMPTY_INTERIOR = theorem `;
βˆ€s t. closed s ∧ interior t = βˆ… β‡’ interior (s βˆͺ t) = interior s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN interior_DEF InteriorClosedUnionEmptyInterior`;;
let INTERIOR_UNION_EQ_EMPTY = theorem `;
βˆ€s t. closed s ∨ closed t
β‡’ (interior (s βˆͺ t) = βˆ… ⇔ interior s = βˆ… ∧ interior t = βˆ…)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN interior_DEF InteriorUnionEqEmpty`;;
let NOWHERE_DENSE_UNION = theorem `;
βˆ€s t. interior (closure (s βˆͺ t)) = βˆ… ⇔
interior (closure s) = βˆ… ∧ interior (closure t) = βˆ…
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF interior_DEF NowhereDenseUnion`;;
let NOWHERE_DENSE = theorem `;
βˆ€s. interior (closure s) = βˆ… ⇔
βˆ€t. open t ∧ Β¬(t = βˆ…) β‡’ βˆƒu. open u ∧ Β¬(u = βˆ…) ∧ u βŠ‚ t ∧ u ∩ s = βˆ…
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF closure_DEF OPEN_IN NowhereDense`;;
let INTERIOR_CLOSURE_INTER_OPEN = theorem `;
βˆ€s t. open s ∧ open t β‡’
interior (closure (s ∩ t)) = interior(closure s) ∩ interior (closure t)
by simplify interior_DEF closure_DEF OPEN_IN InteriorClosureInterOpen`;;
let CLOSURE_INTERIOR_UNION_CLOSED = theorem `;
βˆ€s t. closed s ∧ closed t β‡’
closure (interior (s βˆͺ t)) = closure (interior s) βˆͺ closure (interior t)
by simplify interior_DEF closure_DEF CLOSED_IN ClosureInteriorUnionClosed`;;
let REGULAR_OPEN_INTER = theorem `;
βˆ€s t. interior (closure s) = s ∧ interior (closure t) = t
β‡’ interior (closure (s ∩ t)) = s ∩ t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF closure_DEF RegularOpenInter`;;
let REGULAR_CLOSED_UNION = theorem `;
βˆ€s t. closure (interior s) = s ∧ closure (interior t) = t
β‡’ closure (interior (s βˆͺ t)) = s βˆͺ t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF closure_DEF RegularClosedUnion`;;
let DIFF_CLOSURE_SUBSET = theorem `;
βˆ€s t. closure s ━ closure t βŠ‚ closure (s ━ t)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF DiffClosureSubset`;;
(* ------------------------------------------------------------------------- *)
(* Frontier (aka boundary). *)
(* ------------------------------------------------------------------------- *)
let frontier_DEF = NewDefinition `;
frontier = Frontier euclidean`;;
let frontier = theorem `;
βˆ€s. frontier s = (closure s) DIFF (interior s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF closure_DEF interior_DEF Frontier_THM`;;
let FRONTIER_CLOSED = theorem `;
βˆ€s. closed (frontier s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF CLOSED_IN FrontierClosed`;;
let FRONTIER_CLOSURES = theorem `;
βˆ€s. frontier s = (closure s) ∩ (closure (UNIV ━ s))
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF closure_DEF FrontierClosures`;;
let FRONTIER_STRADDLE = theorem `;
βˆ€a s. a ∈ frontier s ⇔ βˆ€e. &0 < e β‡’
(βˆƒx. x ∈ s ∧ dist(a,x) < e) ∧ (βˆƒx. Β¬(x ∈ s) ∧ dist(a,x) < e)
proof
simplify SUBSET_UNIV IN_UNIV TOPSPACE_EUCLIDEAN frontier_DEF closure_DEF FrontierStraddle GSYM OPEN_IN;
fol IN_BALL SUBSET OPEN_CONTAINS_BALL CENTRE_IN_BALL OPEN_BALL;
qed;
`;;
let FRONTIER_SUBSET_CLOSED = theorem `;
βˆ€s. closed s β‡’ (frontier s) βŠ‚ s
by fol frontier_DEF CLOSED_IN FrontierSubsetClosed`;;
let FRONTIER_EMPTY = theorem `;
frontier βˆ… = βˆ…
by fol frontier_DEF FrontierEmpty`;;
let FRONTIER_UNIV = theorem `;
frontier UNIV = βˆ…
by fol frontier_DEF TOPSPACE_EUCLIDEAN FrontierUniv`;;
let FRONTIER_SUBSET_EQ = theorem `;
βˆ€s. (frontier s) βŠ‚ s ⇔ closed s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF CLOSED_IN FrontierSubsetEq`;;
let FRONTIER_COMPLEMENT = theorem `;
βˆ€s. frontier (UNIV ━ s) = frontier s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF FrontierComplement`;;
let FRONTIER_DISJOINT_EQ = theorem `;
βˆ€s. (frontier s) ∩ s = βˆ… ⇔ open s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF OPEN_IN FrontierDisjointEq`;;
let FRONTIER_INTER_SUBSET = theorem `;
βˆ€s t. frontier (s ∩ t) βŠ‚ frontier s βˆͺ frontier t
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF FrontierInterSubset`;;
let FRONTIER_UNION_SUBSET = theorem `;
βˆ€s t. frontier (s βˆͺ t) βŠ‚ frontier s βˆͺ frontier t
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF FrontierUnionSubset`;;
let FRONTIER_INTERIORS = theorem `;
frontier s = UNIV ━ interior(s) ━ interior(UNIV ━ s)
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF interior_DEF FrontierInteriors`;;
let FRONTIER_FRONTIER_SUBSET = theorem `;
βˆ€s. frontier (frontier s) βŠ‚ frontier s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF FrontierFrontierSubset`;;
let INTERIOR_FRONTIER = theorem `;
βˆ€s. interior (frontier s) = interior (closure s) ━ closure (interior s)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN interior_DEF frontier_DEF closure_DEF InteriorFrontier`;;
let INTERIOR_FRONTIER_EMPTY = theorem `;
βˆ€s. open s ∨ closed s β‡’ interior (frontier s) = βˆ…
by fol OPEN_IN CLOSED_IN interior_DEF frontier_DEF InteriorFrontierEmpty`;;
let UNION_FRONTIER = theorem `;
βˆ€s t. frontier s βˆͺ frontier t =
frontier (s βˆͺ t) βˆͺ frontier (s ∩ t) βˆͺ frontier s ∩ frontier t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF UnionFrontier`;;
let CONNECTED_INTER_FRONTIER = theorem `;
βˆ€s t. connected s ∧ Β¬(s ∩ t = βˆ…) ∧ Β¬(s ━ t = βˆ…)
β‡’ Β¬(s ∩ frontier t = βˆ…)
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN connected_DEF frontier_DEF ConnectedInterFrontier`;;
let INTERIOR_CLOSED_EQ_EMPTY_AS_FRONTIER = theorem `;
βˆ€s. closed s ∧ interior s = βˆ… ⇔ βˆƒt. open t ∧ s = frontier t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN CLOSED_IN interior_DEF OPEN_IN frontier_DEF InteriorClosedEqEmptyAsFrontier`;;
let FRONTIER_UNION = theorem `;
βˆ€s t. closure s ∩ closure t = βˆ…
β‡’ frontier (s βˆͺ t) = frontier s βˆͺ frontier t
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF closure_DEF FrontierUnion`;;
let CLOSURE_UNION_FRONTIER = theorem `;
βˆ€s. closure s = s βˆͺ frontier s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN closure_DEF frontier_DEF ClosureUnionFrontier`;;
let FRONTIER_INTERIOR_SUBSET = theorem `;
βˆ€s. frontier (interior s) βŠ‚ frontier s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF interior_DEF FrontierInteriorSubset`;;
let FRONTIER_CLOSURE_SUBSET = theorem `;
βˆ€s. frontier (closure s) βŠ‚ frontier s
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF closure_DEF FrontierClosureSubset`;;
let SET_DIFF_FRONTIER = theorem `;
βˆ€s. s ━ frontier s = interior s
by simplify SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF interior_DEF SetDiffFrontier`;;
let FRONTIER_INTER_SUBSET_INTER = theorem `;
βˆ€s t. frontier (s ∩ t) βŠ‚ closure s ∩ frontier t βˆͺ frontier s ∩ closure t
by fol SUBSET_UNIV TOPSPACE_EUCLIDEAN frontier_DEF closure_DEF FrontierInterSubsetInter`;;