Theory Topology_ZF_5

(* 
    This file is a part of IsarMathLib - 
    a library of formalized mathematics written for Isabelle/Isar.

    Copyright (C) 2012-2013 Daniel de la Concepcion

    This program is free software; Redistribution and use in source and binary forms, 
    with or without modification, are permitted provided that the following conditions are met:

   1. Redistributions of source code must retain the above copyright notice, 
   this list of conditions and the following disclaimer.
   2. Redistributions in binary form must reproduce the above copyright notice, 
   this list of conditions and the following disclaimer in the documentation and/or 
   other materials provided with the distribution.
   3. The name of the author may not be used to endorse or promote products 
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *)

section Topology 5

theory Topology_ZF_5 imports Topology_ZF_properties Topology_ZF_examples_1 Topology_ZF_4
begin

subsectionSome results for separation axioms

textFirst we will give a global characterization of $T_1$-spaces; which is interesting
because it involves the cardinal $\mathbb{N}$.

lemma (in topology0)  T1_cocardinal_coarser:
  shows "(T {is T1})  (CoFinite (T))T"
proof
  {
    assume AS:"T {is T1}"
    {
      fix x assume p:"xT"
      {
        fix y assume "y(T)-{x}"
        with AS p obtain U where "UT" "yU" "xU" using isT1_def by blast
        then have "UT" "yU" "U(T)-{x}" by auto
        then have "UT. yU  U(T)-{x}" by auto
      }
      then have "y(T)-{x}. UT. yU  U(T)-{x}" by auto
      then have "T-{x}T" using open_neigh_open by auto
      with p have "{x} {is closed in}T" using IsClosed_def by auto
    }
    then have pointCl:"xT. {x} {is closed in} T" by auto
    {
      fix A
      assume AS2:"AFinPow(T)"
      let ?p="{x,{x}. xA}"
      have "?pA{{x}. xA}" using Pi_def unfolding function_def by auto
      then have "?p:bij(A,{{x}. xA})" unfolding bij_def inj_def surj_def using apply_equality
        by auto
      then have "A{{x}. xA}" unfolding eqpoll_def by auto
      with AS2 have "Finite({{x}. xA})" unfolding FinPow_def using eqpoll_imp_Finite_iff by auto
      then have "{{x}. xA}FinPow({D  Pow(T) . D {is closed in} T})" using AS2 pointCl unfolding FinPow_def
      by (safe, blast+) 
      then have "({{x}. xA}) {is closed in} T" using fin_union_cl_is_cl by auto
      moreover
      have "{{x}. xA}=A" by auto
      ultimately have "A {is closed in} T" by simp
    }
    then have reg:"AFinPow(T). A {is closed in} T" by auto
    {
      fix U
      assume AS2:"U  CoCardinal(T,nat)"
      then have "UPow(T)" "U=0  ((T)-U)nat" using CoCardinal_def by auto
      then have "UPow(T)" "U=0  Finite(T-U)" using lesspoll_nat_is_Finite by auto
      then have "UPow(T)" "UT(T-U) {is closed in} T" using empty_open topSpaceAssum
        reg unfolding FinPow_def by auto
      then have "UPow(T)" "UT(T-(T-U))T" using IsClosed_def by auto
      moreover
      then have "(T-(T-U))=U" by blast
      ultimately have "UT" by auto
    }
    then show "(CoFinite (T))T" using Cofinite_def by auto
  }
  {
    assume "(CoFinite (T))T"
    then have AS:"CoCardinal(T,nat)  T" using Cofinite_def by auto
    {
      fix x y
      assume AS2:"xT" "yT""xy"
      have "Finite({y})" by auto
      then obtain n where "{y}n" "nnat" using Finite_def by auto
      then have "{y}nat" using n_lesspoll_nat eq_lesspoll_trans by auto
      then have "{y} {is closed in} CoCardinal(T,nat)" using closed_sets_cocardinal
        AS2(2) by auto
      then have "(T)-{y}CoCardinal(T,nat)" using union_cocardinal IsClosed_def by auto
      with AS have "(T)-{y}T" by auto
      moreover
      with AS2(1,3) have "x((T)-{y})  y((T)-{y})" by auto
      ultimately have "VT. xVyV" by(safe,auto)
    }
    then show "T {is T1}" using isT1_def by auto
  }
qed

textIn the previous proof, it is obvious that we don't need to check
if ever cofinite set is open. It is enough to check if every singleton is closed.

corollary(in topology0) T1_iff_singleton_closed:
  shows "(T {is T1})  (xT. {x}{is closed in}T)"
proof
  assume AS:"T {is T1}"
  {
    fix x assume p:"xT"
    {
      fix y assume "y(T)-{x}"
      with AS p obtain U where "UT" "yU" "xU" using isT1_def by blast
      then have "UT" "yU" "U(T)-{x}" by auto
      then have "UT. yU  U(T)-{x}" by auto
    }
    then have "y(T)-{x}. UT. yU  U(T)-{x}" by auto
    then have "T-{x}T" using open_neigh_open by auto
    with p have "{x} {is closed in}T" using IsClosed_def by auto
  }
  then show pointCl:"xT. {x} {is closed in} T" by auto
next
  assume pointCl:"xT. {x} {is closed in} T"
  {
    fix A
    assume AS2:"AFinPow(T)"
    let ?p="{x,{x}. xA}"
    have "?pA{{x}. xA}" using Pi_def unfolding function_def by auto
    then have "?p:bij(A,{{x}. xA})" unfolding bij_def inj_def surj_def using apply_equality
      by auto
    then have "A{{x}. xA}" unfolding eqpoll_def by auto
    with AS2 have "Finite({{x}. xA})" unfolding FinPow_def using eqpoll_imp_Finite_iff by auto
    then have "{{x}. xA}FinPow({D  Pow(T) . D {is closed in} T})" using AS2 pointCl unfolding FinPow_def
    by (safe, blast+) 
    then have "({{x}. xA}) {is closed in} T" using fin_union_cl_is_cl by auto
    moreover
    have "{{x}. xA}=A" by auto
    ultimately have "A {is closed in} T" by simp
  }
  then have reg:"AFinPow(T). A {is closed in} T" by auto
  {
    fix U
    assume AS2:"UCoCardinal(T,nat)"
    then have "UPow(T)" "U=0  ((T)-U)nat" using CoCardinal_def by auto
    then have "UPow(T)" "U=0  Finite(T-U)" using lesspoll_nat_is_Finite by auto
    then have "UPow(T)" "UT(T-U) {is closed in} T" using empty_open topSpaceAssum
      reg unfolding FinPow_def by auto
    then have "UPow(T)" "UT(T-(T-U))T" using IsClosed_def by auto
    moreover
    then have "(T-(T-U))=U" by blast
    ultimately have "UT" by auto
  }
  then have "(CoFinite (T))T" using Cofinite_def by auto
  then show "T {is T1}" using T1_cocardinal_coarser by auto
qed

textSecondly, let's show that the CoCardinal X Q›
topologies for different sets $Q$ are all ordered
as the partial order of sets. (The order is linear when considering only cardinals)

lemma order_cocardinal_top:
  fixes X
  assumes "Q1Q2"
  shows "CoCardinal(X,Q1)  CoCardinal(X,Q2)"
proof
  fix x
  assume "x  CoCardinal(X,Q1)"
  then have "xPow(X)" "x=0(X-x)Q1" using CoCardinal_def by auto
  with assms have "xPow(X)" "x=0(X-x)Q2" using lesspoll_trans2 by auto
  then show "xCoCardinal(X,Q2)" using CoCardinal_def by auto
qed

corollary cocardinal_is_T1:
  fixes X K
  assumes "InfCard(K)"
  shows "CoCardinal(X,K) {is T1}"
proof-
  have "natK" using InfCard_def assms by auto
  then have "natK" using le_imp_subset by auto
  then have "natK" "K0"using subset_imp_lepoll by auto
  then have "CoCardinal(X,nat)  CoCardinal(X,K)" "CoCardinal(X,K)=X" using order_cocardinal_top 
    union_cocardinal by auto
  then show ?thesis using topology0.T1_cocardinal_coarser topology0_CoCardinal assms Cofinite_def
    by auto
qed

textIn $T_2$-spaces, filters and nets have at most one limit point.

lemma (in topology0) T2_imp_unique_limit_filter:
  assumes "T {is T2}" "𝔉 {is a filter on}T" "𝔉 F x" "𝔉 F y"
  shows "x=y"
proof-
  {
    assume "xy"
    from assms(3,4) have "xT" "yT" using FilterConverges_def assms(2)
      by auto
    with xy have "UT. VT. xU  yV  UV=0" using assms(1) isT2_def by auto
    then obtain U V where "xU" "yV" "UV=0" "UT" "VT" by auto
    then have "U{APow(T). xInterior(A,T)}" "V{APow(T). yInterior(A,T)}" using Top_2_L3 by auto
    then have "U𝔉" "V𝔉" using FilterConverges_def assms(2) assms(3,4)
      by auto
    then have "UV𝔉" using IsFilter_def assms(2) by auto
    with UV=0 have "0𝔉" by auto
    then have "False" using IsFilter_def assms(2) by auto
  }
  then show ?thesis by auto
qed

lemma (in topology0) T2_imp_unique_limit_net:
  assumes "T {is T2}" "N {is a net on}T" "N N x" "N N y"
  shows "x=y"
proof-
  have "(Filter N..(T)) {is a filter on} (T)" "(Filter N..(T)) F x" "(Filter N..(T)) F y"
    using filter_of_net_is_filter(1) net_conver_filter_of_net_conver assms(2)
    assms(3,4) by auto
  with assms(1) show ?thesis using T2_imp_unique_limit_filter by auto
qed
    
textIn fact, $T_2$-spaces are characterized by this property. For this proof we build
a filter containing the union of two filters.

lemma (in topology0) unique_limit_filter_imp_T2:
  assumes "xT. yT. 𝔉. ((𝔉 {is a filter on}T)  (𝔉 F x)  (𝔉 F y))  x=y"
  shows "T {is T2}"
proof-
  {
    fix x y
    assume "xT" "yT" "xy"
    {
      assume "UT. VT. (xU  yV)  UV0"
      let ?Ux="{APow(T). xint(A)}"
      let ?Uy="{APow(T). yint(A)}"
      let ?FF="?Ux  ?Uy  {AB. A,B?Ux × ?Uy}"
      have sat:"?FF {satisfies the filter base condition}"
      proof-
        {
          fix A B
          assume "A?FF" "B?FF"
          {
            assume "A?Ux" 
            {
              assume "B?Ux"
              with xT A?Ux have "AB?Ux" using neigh_filter(1) IsFilter_def by auto
              then have "AB?FF" by auto
            }
            moreover
            {
              assume "B?Uy"
              with A?Ux have "AB?FF" by auto
            }
            moreover
            {
              assume "B{AB. A,B?Ux × ?Uy}"
              then obtain AA BB where "B=AABB" "AA?Ux" "BB?Uy" by auto
              with xT A?Ux have "AB=(AAA)BB" "AAA?Ux" using neigh_filter(1) IsFilter_def by auto
              with BB?Uy have "AB{AB. A,B?Ux × ?Uy}" by auto
              then have "AB?FF" by auto
            }
            ultimately have "AB?FF" using B?FF by auto
          }
          moreover
          {
            assume "A?Uy" 
            {
              assume "B?Uy"
              with yT A?Uy have "AB?Uy" using neigh_filter(1) IsFilter_def by auto
              then have "AB?FF" by auto
            }
            moreover
            {
              assume "B?Ux"
              with A?Uy have "BA?FF" by auto
              moreover have "AB=BA" by auto
              ultimately have "AB?FF" by auto
            }
            moreover
            {
              assume "B{AB. A,B?Ux × ?Uy}"
              then obtain AA BB where "B=AABB" "AA?Ux" "BB?Uy" by auto
              with yT A?Uy have "AB=AA(ABB)" "ABB?Uy" using neigh_filter(1) IsFilter_def by auto
              with AA?Ux have "AB{AB. A,B?Ux × ?Uy}" by auto
              then have "AB?FF" by auto
            }
            ultimately have "AB?FF" using B?FF by auto
          }
          moreover
          {
            assume "A{AB. A,B?Ux × ?Uy}"
            then obtain AA BB where "A=AABB" "AA?Ux" "BB?Uy" by auto
            {
              assume "B?Uy"
              with BB?Uy yT have "BBB?Uy" using neigh_filter(1) IsFilter_def by auto
              moreover from A=AABB have "AB=AA(BBB)" by auto
              ultimately have "AB?FF" using AA?Ux BBB?Uy by auto
            }
            moreover
            {
              assume "B?Ux"
              with AA?Ux xT have "BAA?Ux" using neigh_filter(1) IsFilter_def by auto
              moreover from A=AABB have "AB=(BAA)BB" by auto
              ultimately have "AB?FF" using BAA?Ux BB?Uy by auto
            }
            moreover
            {
              assume "B{AB. A,B?Ux × ?Uy}"
              then obtain AA2 BB2 where "B=AA2BB2" "AA2?Ux" "BB2?Uy" by auto
              from B=AA2BB2 A=AABB have "AB=(AAAA2)(BBBB2)" by auto
              moreover
              from AA?UxAA2?UxxT have "AAAA2?Ux" using neigh_filter(1) IsFilter_def by auto
              moreover
              from BB?UyBB2?UyyT have "BBBB2?Uy" using neigh_filter(1) IsFilter_def by auto
              ultimately have "AB?FF" by auto
            }
            ultimately have "AB?FF" using B?FF by auto
          }
          ultimately have "AB?FF" using A?FF by auto
          then have "D?FF. DAB" unfolding Bex_def by auto
        }
        then have "A?FF. B?FF. D?FF. DAB" by force
        moreover
        have "T?Ux" using xT neigh_filter(1) IsFilter_def by auto
        then have "?FF0" by auto
        moreover
        {
          assume "0?FF"
          moreover
          have "0?Ux" using xT neigh_filter(1) IsFilter_def by auto
          moreover
          have "0?Uy" using yT neigh_filter(1) IsFilter_def by auto
          ultimately have "0{AB. A,B?Ux × ?Uy}" by auto
          then obtain A B where "0=AB" "A?Ux""B?Uy" by auto
          then have "xint(A)""yint(B)" by auto
          moreover
          with 0=AB have "int(A)int(B)=0" using Top_2_L1 by auto
          moreover
          have "int(A)T""int(B)T" using Top_2_L2 by auto
          ultimately have "False" using UT. VT. xUyV  UV0 by auto
        }
        then have "0?FF" by auto
        ultimately show ?thesis using SatisfiesFilterBase_def by auto
      qed
      moreover
      have "?FFPow(T)" by auto
      ultimately have bas:"?FF {is a base filter} {APow(T). D?FF. DA}" "{APow(T). D?FF. DA}=T" 
        using base_unique_filter_set2[of "?FF"] by auto
      then have fil:"{APow(T). D?FF. DA} {is a filter on} T" using basic_filter sat by auto
      have "UPow(T). xint(U)  (D?FF. DU)" by auto
      then have "{APow(T). D?FF. DA} F x" using convergence_filter_base2[OF fil bas(1) _ xT] by auto
      moreover
      then have "UPow(T). yint(U)  (D?FF. DU)" by auto
      then have "{APow(T). D?FF. DA} F y" using convergence_filter_base2[OF fil bas(1) _ yT] by auto
      ultimately have "x=y" using assms fil xTyT by blast
      with xy have "False" by auto
    }
    then have "UT. VT. xU  yV  UV=0" by blast
  }
  then show ?thesis using isT2_def by auto
qed

lemma (in topology0) unique_limit_net_imp_T2:
  assumes "xT. yT. N. ((N {is a net on}T)  (N N x)  (N N y))  x=y"
  shows "T {is T2}"
proof-
  {
    fix x y 𝔉
    assume "xT" "yT""𝔉 {is a filter on}T""𝔉 F x""𝔉 F y"
    then have "(Net(𝔉)) {is a net on} T""(Net 𝔉) N x""(Net 𝔉) N y"
      using filter_conver_net_of_filter_conver net_of_filter_is_net by auto
    with  xT yT have "x=y" using assms by blast
  }
  then have "xT. yT. 𝔉. ((𝔉 {is a filter on}T)  (𝔉 F x)  (𝔉 F y))  x=y" by auto
  then show ?thesis using unique_limit_filter_imp_T2 by auto
qed

textThis results make easy to check if a space is $T_2$.

textThe topology
which comes from a filter as in @{thm "top_of_filter"} is not $T_2$ generally.
  We will see in this file later on, that the exceptions are a consequence of the spectrum.

corollary filter_T2_imp_card1:
  assumes "(𝔉{0}) {is T2}" "𝔉 {is a filter on} 𝔉" "x𝔉"
  shows "𝔉={x}"
proof-
  {
    fix y assume "y𝔉"
    then have "𝔉 F y {in} (𝔉{0})" using lim_filter_top_of_filter assms(2) by auto
    moreover
    have "𝔉 F x {in} (𝔉{0})" using lim_filter_top_of_filter assms(2,3) by auto
    moreover
    have "𝔉=(𝔉{0})" by auto
    ultimately
    have "y=x" using topology0.T2_imp_unique_limit_filter[OF topology0_filter[OF assms(2)] assms(1)] assms(2)
      by auto
  }
  then have "𝔉{x}" by auto
  with assms(3) show ?thesis by auto
qed

textThere are more separation axioms that just $T_0$, $T_1$ or $T_2$

definition
  isT3 ("_{is T3}" 90)
  where "T{is T3}  (T{is T1})  (T{is regular})"

definition
  IsNormal ("_{is normal}" 90)
  where "T{is normal}  A. A{is closed in}T  (B. B{is closed in}T  AB=0 
  (UT. VT. AUBVUV=0))"

definition
  isT4 ("_{is T4}" 90)
  where "T{is T4}  (T{is T1})  (T{is normal})"

lemma (in topology0) T4_is_T3:
  assumes "T{is T4}" shows "T{is T3}"
proof-
  from assms have nor:"T{is normal}" using isT4_def by auto
  from assms have "T{is T1}" using isT4_def by auto
  then have "Cofinite (T)T" using T1_cocardinal_coarser by auto
  {
    fix A
    assume AS:"A{is closed in}T"
    {
      fix x
      assume "xT-A"
      have "Finite({x})" by auto
      then obtain n where "{x}n" "nnat" unfolding Finite_def by auto
      then have "{x}n" "nnat" using eqpoll_imp_lepoll by auto
      then have "{x}nat" using n_lesspoll_nat lesspoll_trans1 by auto
      with xT-A have "{x} {is closed in} (Cofinite (T))" using Cofinite_def 
        closed_sets_cocardinal by auto
      then have "T-{x}Cofinite(T)" unfolding IsClosed_def using union_cocardinal Cofinite_def
        by auto
      with Cofinite (T)T have "T-{x}T" by auto
      with xT-A have "{x}{is closed in}T" "A{x}=0" using IsClosed_def by auto
      with nor AS have "UT. VT. AU{x}VUV=0" unfolding IsNormal_def by blast
      then have "UT. VT. AU xVUV=0" by auto
    }
    then have "xT-A. UT. VT. AU xVUV=0" by auto
  }
  then have "T{is regular}" using IsRegular_def by blast
  with T{is T1} show ?thesis using isT3_def by auto
qed

lemma (in topology0) T3_is_T2:
  assumes "T{is T3}" shows "T{is T2}"
proof-
  from assms have "T{is regular}" using isT3_def by auto
  from assms have "T{is T1}" using isT3_def by auto
  then have "Cofinite (T)T" using T1_cocardinal_coarser by auto
  {
    fix x y
    assume "xT""yT""xy"
    have "Finite({x})" by auto
    then obtain n where "{x}n" "nnat" unfolding Finite_def by auto
    then have "{x}n" "nnat" using eqpoll_imp_lepoll by auto
    then have "{x}nat" using n_lesspoll_nat lesspoll_trans1 by auto
    with xT have "{x} {is closed in} (Cofinite (T))" using Cofinite_def 
      closed_sets_cocardinal by auto
    then have "T-{x}Cofinite(T)" unfolding IsClosed_def using union_cocardinal Cofinite_def
       by auto
    with Cofinite (T)T have "T-{x}T" by auto
    with xTyTxy have "{x}{is closed in}T" "yT-{x}" using IsClosed_def by auto
    with T{is regular} have "UT. VT. {x}UyVUV=0" unfolding IsRegular_def by force
    then have "UT. VT. xUyVUV=0" by auto
  }
  then show ?thesis using isT2_def by auto
qed

textRegularity can be rewritten in terms of existence of certain neighboorhoods.

lemma (in topology0) regular_imp_exist_clos_neig:
  assumes "T{is regular}" and "UT" and "xU"
  shows "VT. xV  cl(V)U"
proof-
  from assms(2) have "(T-U){is closed in}T" using Top_3_L9 by auto moreover
  from assms(2,3) have "xT" by auto moreover
  note assms(1,3) ultimately obtain A B where "AT" and "BT" and "AB=0" and "(T-U)A" and "xB"
    unfolding IsRegular_def by blast
  from AB=0 BT have "BT-A" by auto
  with AT have "cl(B)T-A" using Top_3_L9 Top_3_L13 by auto
  moreover from (T-U)A assms(3) have "T-AU" by auto
  moreover note xB BT
  ultimately have "BT  xB  cl(B)U" by auto
  then show ?thesis by auto
qed

lemma (in topology0) exist_clos_neig_imp_regular:
  assumes "xT. UT. xU  (VT. xV cl(V)U)"
  shows "T{is regular}"
proof-
  {
    fix F
    assume "F{is closed in}T" 
    {
      fix x assume "xT-F"
      with F{is closed in}T have "xT" "T-FT" "FT" unfolding IsClosed_def by auto
      with assms xT-F have "VT. xV  cl(V)T-F" by auto
      then obtain V where "VT" "xV" "cl(V)T-F" by auto
      from cl(V)T-F FT have "FT-cl(V)" by auto
      moreover from VT have "T-(T-V)=V" by auto
      then have "cl(V)=T-int(T-V)" using Top_3_L11(2)[of "T-V"] by auto
      ultimately have "Fint(T-V)" by auto moreover
      have "int(T-V)T-V" using Top_2_L1 by auto
      then have "V(int(T-V))=0" by auto moreover
      note xVVT ultimately
      have "VT" "int(T-V)T" "Fint(T-V)  xV  (int(T-V))V=0" using Top_2_L2
        by auto
      then have "UT. VT. FU  xV  UV=0" by auto
    }
    then have "xT-F. UT. VT. FU  xV  UV=0" by auto
  }
  then show ?thesis using IsRegular_def by blast
qed

lemma (in topology0) regular_eq:
  shows "T{is regular}  (xT. UT. xU  (VT. xV cl(V)U))"
  using regular_imp_exist_clos_neig exist_clos_neig_imp_regular by force

textA Hausdorff space separates compact spaces from points.

theorem (in topology0) T2_compact_point:
  assumes "T{is T2}" "A{is compact in}T" "xT" "xA"
  shows "UT. VT. AU  xV  UV=0"
proof-
  {
    assume "A=0"
    then have "A0xT(0(T)=0)" using assms(3) by auto 
    then have ?thesis using empty_open topSpaceAssum unfolding IsATopology_def by auto
  }
  moreover
  {
    assume noEmpty:"A0"
    let ?U="{U,VT×T. xUUV=0}"
    {
      fix y assume "yA"
      with xA assms(4) have "xy" by auto
      moreover from yA have "xT""yT" using assms(2,3) unfolding IsCompact_def by auto
      ultimately obtain U V where "UT""VT""UV=0""xU""yV" using assms(1) unfolding isT2_def by blast
      then have "U,V?U. yV" by auto
    }
    then have "yA. U,V?U. yV" by auto
    then have "A{snd(B). B?U}" by auto
    moreover have "{snd(B). B?U}Pow(T)" by auto
    ultimately have "NFinPow({snd(B). B?U}). AN" using assms(2) unfolding IsCompact_def by auto
    then obtain N where ss:"NFinPow({snd(B). B?U})" "AN" by auto
    with {snd(B). B?U}Pow(T) have "AN" "NPow(T)" unfolding FinPow_def by auto
    then have NN:"AN" "NT" using topSpaceAssum unfolding IsATopology_def by auto
    from ss have "Finite(N)""N{snd(B). B?U}" unfolding FinPow_def by auto
    then obtain n where "nnat" "Nn" unfolding Finite_def by auto
    then have "Nn" using eqpoll_imp_lepoll by auto
    from noEmpty AN have NnoEmpty:"N0" by auto
    let ?QQ="{n,{fst(B). B{A?U. snd(A)=n}}. nN}"
    have QQPi:"?QQ:N{{fst(B). B{A?U. snd(A)=n}}. nN}" unfolding Pi_def function_def domain_def by auto
    {
      fix n assume "nN"
      with N{snd(B). B?U} obtain B where "n=snd(B)" "B?U" by auto
      then have "fst(B){fst(B). B{A?U. snd(A)=n}}" by auto
      then have "{fst(B). B{A?U. snd(A)=n}}0" by auto moreover
      from nN have "n,{fst(B). B{A?U. snd(A)=n}}?QQ" by auto
      with QQPi have "?QQ`n={fst(B). B{A?U. snd(A)=n}}" using apply_equality by auto
      ultimately have "?QQ`n0" by auto
    }
    then have "nN. ?QQ`n0" by auto
    with nnat Nn have "f. fPi(N,λt. ?QQ`t)  (tN. f`t?QQ`t)" using finite_choice unfolding AxiomCardinalChoiceGen_def
      by auto
    then obtain f where fPI:"fPi(N,λt. ?QQ`t)" "(tN. f`t?QQ`t)" by auto
    from fPI(1) NnoEmpty have "range(f)0" unfolding Pi_def range_def domain_def converse_def by (safe,blast)
    {
      fix t assume "tN"
      then have "f`t?QQ`t" using fPI(2) by auto
      with tN have "f`t(?QQ``N)" "?QQ`t(?QQ``N)" using func_imagedef QQPi by auto
    }
    then have reg:"tN. f`t(?QQ``N)"  "tN. ?QQ`t(?QQ``N)" by auto
    {
      fix tt assume "ttf"
      with fPI(1) have "ttSigma(N, (`)(?QQ))" unfolding Pi_def by auto
      then have "tt(xaN. y?QQ`xa. {xa,y})" unfolding Sigma_def by auto
      then obtain xa y where "xaN" "y?QQ`xa" "tt=xa,y" by auto
      with reg(2) have "y(?QQ``N)" by blast
      with tt=xa,y xaN have "tt(xaN. y(?QQ``N). {xa,y})" by auto
      then have "ttN×((?QQ``N))" unfolding Sigma_def by auto
    }
    then have ffun:"f:N(?QQ``N)"  using fPI(1) unfolding Pi_def by auto
    then have "fsurj(N,range(f))" using fun_is_surj by auto
    with Nn nnat have "range(f)N" using surj_fun_inv_2 nat_into_Ord by auto
    with Nn have "range(f)n" using lepoll_trans by blast
    with nnat have "Finite(range(f))" using n_lesspoll_nat lesspoll_nat_is_Finite lesspoll_trans1 by auto
    moreover from ffun have rr:"range(f)(?QQ``N)" unfolding Pi_def by auto
    then have "range(f)T" by auto
    ultimately have "range(f)FinPow(T)" unfolding FinPow_def by auto
    then have "range(f)T" using fin_inter_open_open range(f)0 by auto moreover
    {
      fix S assume "Srange(f)"
      with rr have "S(?QQ``N)" by blast
      then have "B(?QQ``N). S  B" using Union_iff by auto
      then obtain B where "B(?QQ``N)" "SB" by auto
      then have "rrN. rr,B?QQ" unfolding image_def by auto
      then have "rrN. B={fst(B). B{A?U. snd(A)=rr}}" by auto
      with SB obtain rr where "S,rr?U" by auto
      then have "xS" by auto
    }
    then have "xrange(f)" using range(f)0 by auto moreover
    {
      fix y assume "y(N)(range(f))"
      then have reg:"(Srange(f). yS)(tN. yt)" by auto
      then obtain t where "tN" "yt" by auto
      then have "t, {fst(B). B{A?U. snd(A)=t}}?QQ" by auto
      then have "f`trange(f)" using apply_rangeI ffun by auto
      with reg have yft:"yf`t" by auto
      with tN fPI(2) have "f`t?QQ`t" by auto
      with tN have "f`t{fst(B). B{A?U. snd(A)=t}}" using apply_equality QQPi by auto
      then have "f`t,t?U" by auto
      then have "f`tt=0" by auto
      with yt yft have "False" by auto
    }
    then have "(N)(range(f))=0" by blast moreover
    note NN
    ultimately have ?thesis by auto
  }
  ultimately show ?thesis by auto
qed

textA Hausdorff space separates compact spaces from other compact spaces.

theorem (in topology0) T2_compact_compact:
  assumes "T{is T2}" "A{is compact in}T" "B{is compact in}T" "AB=0"
  shows "UT. VT. AU  BV  UV=0"
proof-
 {
    assume "B=0"
    then have "ATB0((T)0=0)" using assms(2) unfolding IsCompact_def by auto moreover
    have "0T" using empty_open topSpaceAssum by auto moreover
    have "TT" using topSpaceAssum unfolding IsATopology_def by auto ultimately
    have ?thesis by auto
  }
  moreover
  {
    assume noEmpty:"B0"
    let ?U="{U,VT×T. AU  UV=0}"
    {
      fix y assume "yB"
      then have "yT" using assms(3) unfolding IsCompact_def by auto
      with yB have "UT. VT. AU  yV  UV=0" using T2_compact_point assms(1,2,4) by auto
      then have "U,V?U. yV" by auto
    }
    then have "yB. U,V?U. yV" by auto
    then have "B{snd(B). B?U}" by auto
    moreover have "{snd(B). B?U}Pow(T)" by auto
    ultimately have "NFinPow({snd(B). B?U}). BN" using assms(3) unfolding IsCompact_def by auto
    then obtain N where ss:"NFinPow({snd(B). B?U})" "BN" by auto
    with {snd(B). B?U}Pow(T) have "BN" "NPow(T)" unfolding FinPow_def by auto
    then have NN:"BN" "NT" using topSpaceAssum unfolding IsATopology_def by auto
    from ss have "Finite(N)""N{snd(B). B?U}" unfolding FinPow_def by auto
    then obtain n where "nnat" "Nn" unfolding Finite_def by auto
    then have "Nn" using eqpoll_imp_lepoll by auto
    from noEmpty BN have NnoEmpty:"N0" by auto
    let ?QQ="{n,{fst(B). B{A?U. snd(A)=n}}. nN}"
    have QQPi:"?QQ:N{{fst(B). B{A?U. snd(A)=n}}. nN}" unfolding Pi_def function_def domain_def by auto
    {
      fix n assume "nN"
      with N{snd(B). B?U} obtain B where "n=snd(B)" "B?U" by auto
      then have "fst(B){fst(B). B{A?U. snd(A)=n}}" by auto
      then have "{fst(B). B{A?U. snd(A)=n}}0" by auto moreover
      from nN have "n,{fst(B). B{A?U. snd(A)=n}}?QQ" by auto
      with QQPi have "?QQ`n={fst(B). B{A?U. snd(A)=n}}" using apply_equality by auto
      ultimately have "?QQ`n0" by auto
    }
    then have "nN. ?QQ`n0" by auto
    with nnat Nn have "f. fPi(N,λt. ?QQ`t)  (tN. f`t?QQ`t)" using finite_choice unfolding AxiomCardinalChoiceGen_def
      by auto
    then obtain f where fPI:"fPi(N,λt. ?QQ`t)" "(tN. f`t?QQ`t)" by auto
    from fPI(1) NnoEmpty have "range(f)0" unfolding Pi_def range_def domain_def converse_def by (safe,blast)
    {
      fix t assume "tN"
      then have "f`t?QQ`t" using fPI(2) by auto
      with tN have "f`t(?QQ``N)" "?QQ`t(?QQ``N)" using func_imagedef QQPi by auto
    }
    then have reg:"tN. f`t(?QQ``N)"  "tN. ?QQ`t(?QQ``N)" by auto
    {
      fix tt assume "ttf"
      with fPI(1) have "ttSigma(N, (`)(?QQ))" unfolding Pi_def by auto
      then have "tt(xaN. y?QQ`xa. {xa,y})" unfolding Sigma_def by auto
      then obtain xa y where "xaN" "y?QQ`xa" "tt=xa,y" by auto
      with reg(2) have "y(?QQ``N)" by blast
      with tt=xa,y xaN have "tt(xaN. y(?QQ``N). {xa,y})" by auto
      then have "ttN×((?QQ``N))" unfolding Sigma_def by auto
    }
    then have ffun:"f:N(?QQ``N)"  using fPI(1) unfolding Pi_def by auto
    then have "fsurj(N,range(f))" using fun_is_surj by auto
    with Nn nnat have "range(f)N" using surj_fun_inv_2 nat_into_Ord by auto
    with Nn have "range(f)n" using lepoll_trans by blast
    with nnat have "Finite(range(f))" using n_lesspoll_nat lesspoll_nat_is_Finite lesspoll_trans1 by auto
    moreover from ffun have rr:"range(f)(?QQ``N)" unfolding Pi_def by auto
    then have "range(f)T" by auto
    ultimately have "range(f)FinPow(T)" unfolding FinPow_def by auto
    then have "range(f)T" using fin_inter_open_open range(f)0 by auto moreover
    {
      fix S assume "Srange(f)"
      with rr have "S(?QQ``N)" by blast
      then have "B(?QQ``N). S  B" using Union_iff by auto
      then obtain B where "B(?QQ``N)" "SB" by auto
      then have "rrN. rr,B?QQ" unfolding image_def by auto
      then have "rrN. B={fst(B). B{A?U. snd(A)=rr}}" by auto
      with SB obtain rr where "S,rr?U" by auto
      then have "AS" by auto
    }
    then have "Arange(f)" using range(f)0 by auto moreover
    {
      fix y assume "y(N)(range(f))"
      then have reg:"(Srange(f). yS)(tN. yt)" by auto
      then obtain t where "tN" "yt" by auto
      then have "t, {fst(B). B{A?U. snd(A)=t}}?QQ" by auto
      then have "f`trange(f)" using apply_rangeI ffun by auto
      with reg have yft:"yf`t" by auto
      with tN fPI(2) have "f`t?QQ`t" by auto
      with tN have "f`t{fst(B). B{A?U. snd(A)=t}}" using apply_equality QQPi by auto
      then have "f`t,t?U" by auto
      then have "f`tt=0" by auto
      with yt yft have "False" by auto
    }
    then have "(range(f))(N)=0" by blast moreover
    note NN
    ultimately have ?thesis by auto
  }
  ultimately show ?thesis by auto
qed

textA compact Hausdorff space is normal.

corollary (in topology0) T2_compact_is_normal:
  assumes "T{is T2}" "(T){is compact in}T"
  shows "T{is normal}" unfolding IsNormal_def
proof-
  from assms(2) have car_nat:"(T){is compact of cardinal}nat{in}T" using Compact_is_card_nat by auto
  {
    fix A B assume "A{is closed in}T" "B{is closed in}T""AB=0"
    then have com:"((T)A){is compact of cardinal}nat{in}T" "((T)B){is compact of cardinal}nat{in}T" using compact_closed[OF car_nat] 
      by auto
    from A{is closed in}TB{is closed in}T have "(T)A=A""(T)B=B" unfolding IsClosed_def by auto
    with com have "A{is compact of cardinal}nat{in}T" "B{is compact of cardinal}nat{in}T" by auto
    then have "A{is compact in}T""B{is compact in}T" using Compact_is_card_nat by auto
    with AB=0 have "UT. VT. AU  BV  UV=0" using T2_compact_compact assms(1) by auto
  }
  then show " A. A {is closed in} T  (B. B {is closed in} T  A  B = 0  (UT. VT. A  U  B  V  U  V = 0))"
    by auto
qed

subsectionHereditability

textA topological property is hereditary if whenever a space has it, 
every subspace also has it.

definition IsHer ("_{is hereditary}" 90)
  where "P {is hereditary}  T. T{is a topology}  P(T)  (APow(T). P(T{restricted to}A))"

lemma subspace_of_subspace:
  assumes "AB""BT"
  shows "T{restricted to}A=(T{restricted to}B){restricted to}A"
proof
  from assms have S:"ST. A(BS)=AS" by auto
  then show "T {restricted to} A  T {restricted to} B {restricted to} A" unfolding RestrictedTo_def
    by auto
  from S show "T {restricted to} B {restricted to} A  T {restricted to} A" unfolding RestrictedTo_def
    by auto
qed
 
textThe separation properties $T_0$, $T_1$, $T_2$ y $T_3$ are hereditary.

theorem regular_here:
  assumes "T{is regular}" "APow(T)" shows "(T{restricted to}A){is regular}"
proof-
  {
    fix C
    assume A:"C{is closed in}(T{restricted to}A)"
    {fix y assume "y(T{restricted to}A)""yC"
    with A have "((T{restricted to}A))-C(T{restricted to}A)""C(T{restricted to}A)" "y(T{restricted to}A)""yC" unfolding IsClosed_def
      by auto
    moreover
    with assms(2) have "(T{restricted to}A)=A" unfolding RestrictedTo_def by auto
    ultimately have "A-CT{restricted to}A" "yA""yC""CPow(A)" by auto
    then obtain S where "ST" "AS=A-C" "yA""yC" unfolding RestrictedTo_def by auto
    then have "yA-C""AS=A-C" by auto
    with CPow(A) have "yAS""C=A-AS" by auto
    then have "yS" "C=A-S" by auto
    with assms(2) have "yS" "CT-S" by auto
    moreover
    from ST have "T-(T-S)=S" by auto
    moreover
    with ST have "(T-S) {is closed in}T" using IsClosed_def by auto
    ultimately have "yT-(T-S)" "(T-S) {is closed in}T" by auto
    with assms(1) have "yT-(T-S). UT. VT. (T-S)UyVUV=0" unfolding IsRegular_def by auto
    with yT-(T-S) have "UT. VT. (T-S)UyVUV=0" by auto
    then obtain U V where "UT""VT" "T-SU""yV""UV=0" by auto
    then have "AU(T{restricted to}A)""AV(T{restricted to}A)" "CU""yV""(AU)(AV)=0"
      unfolding RestrictedTo_def  using CT-S by auto
    moreover
    with CPow(A)yA have "CAU""yAV" by auto
    ultimately have "U(T{restricted to}A). V(T{restricted to}A). CUyVUV=0" by auto
  }
    then have "x(T{restricted to}A)-C. U(T{restricted to}A). V(T{restricted to}A). CUxVUV=0" by auto
  }
  then have "C. C{is closed in}(T{restricted to}A)  (x(T{restricted to}A)-C. U(T{restricted to}A). V(T{restricted to}A). CUxVUV=0)"
   by blast
  then show ?thesis using IsRegular_def by auto
qed

corollary here_regular:
  shows "IsRegular {is hereditary}" using regular_here IsHer_def by auto

theorem T1_here:
  assumes "T{is T1}" "APow(T)" shows "(T{restricted to}A){is T1}"
proof-
  from assms(2) have un:"(T{restricted to}A)=A" unfolding RestrictedTo_def by auto
  {
    fix x y
    assume "xA""yA""xy"
    with APow(T) have "xT""yT""xy" by auto
    then have "UT. xUyU" using assms(1) isT1_def by auto
    then obtain U where "UT""xU""yU" by auto
    with xA have "AU(T{restricted to}A)" "xAU" "yAU" unfolding RestrictedTo_def by auto
    then have "U(T{restricted to}A). xUyU" by blast
  }
  with un have "x y. x(T{restricted to}A)  y(T{restricted to}A)  xy  (U(T{restricted to}A). xUyU)"
    by auto
  then show ?thesis using isT1_def by auto
qed

corollary here_T1:
  shows "isT1 {is hereditary}" using T1_here IsHer_def by auto

lemma here_and:
  assumes "P {is hereditary}" "Q {is hereditary}"
  shows "(λT. P(T)  Q(T)) {is hereditary}" using assms unfolding IsHer_def by auto

corollary here_T3:
  shows "isT3 {is hereditary}" using here_and[OF here_T1 here_regular] unfolding IsHer_def isT3_def.

lemma T2_here:
  assumes "T{is T2}" "APow(T)" shows "(T{restricted to}A){is T2}"
proof-
  from assms(2) have un:"(T{restricted to}A)=A" unfolding RestrictedTo_def by auto
  {
    fix x y
    assume "xA""yA""xy"
    with APow(T) have "xT""yT""xy" by auto
    then have "UT. VT. xUyVUV=0" using assms(1) isT2_def by auto
    then obtain U V where "UT" "VT""xU""yV""UV=0" by auto
    with xAyA have "AU(T{restricted to}A)""AV(T{restricted to}A)" "xAU" "yAV" "(AU)(AV)=0"unfolding RestrictedTo_def by auto
    then have "U(T{restricted to}A). V(T{restricted to}A). xUyVUV=0" unfolding Bex_def by auto
  }
  with un have "x y. x(T{restricted to}A)  y(T{restricted to}A)  xy  (U(T{restricted to}A). V(T{restricted to}A). xUyVUV=0)"
    by auto
  then show ?thesis using isT2_def by auto
qed

corollary here_T2:
  shows "isT2 {is hereditary}" using T2_here IsHer_def by auto

lemma T0_here:
  assumes "T{is T0}" "APow(T)" shows "(T{restricted to}A){is T0}"
proof-
  from assms(2) have un:"(T{restricted to}A)=A" unfolding RestrictedTo_def by auto
  {
    fix x y
    assume "xA""yA""xy"
    with APow(T) have "xT""yT""xy" by auto
    then have "UT. (xUyU)(yUxU)" using assms(1) isT0_def by auto
    then obtain U where "UT" "(xUyU)(yUxU)" by auto
    with xAyA have "AU(T{restricted to}A)" "(xAUyAU)(yAUxAU)" unfolding RestrictedTo_def by auto
    then have "U(T{restricted to}A). (xUyU)(yUxU)" unfolding Bex_def by auto
  }
  with un have "x y. x(T{restricted to}A)  y(T{restricted to}A)  xy  (U(T{restricted to}A). (xUyU)(yUxU))"
    by auto
  then show ?thesis using isT0_def by auto
qed

corollary here_T0:
  shows "isT0 {is hereditary}" using T0_here IsHer_def by auto

subsectionSpectrum and anti-properties

textThe spectrum of a topological property is a class of
sets such that all topologies defined over that set have that property.

textThe spectrum of a property gives us the list of sets for which the property doesn't give
any topological information. Being in the spectrum of a topological property is an invariant
in the category of sets and function; mening that equipollent sets are in the same
spectra.
      
definition Spec ("_ {is in the spectrum of} _" 99)
  where "Spec(K,P)  T. ((T{is a topology}  TK)  P(T))"

lemma equipollent_spect:
  assumes "AB" "B {is in the spectrum of} P"
  shows  "A {is in the spectrum of} P"
proof-
  from assms(2) have "T. ((T{is a topology}  TB)  P(T))" using Spec_def by auto
  then have "T. ((T{is a topology}  TA)  P(T))" using eqpoll_trans[OF _ assms(1)] by auto
  then show ?thesis using Spec_def by auto
qed

theorem eqpoll_iff_spec:
  assumes "AB"
  shows "(B {is in the spectrum of} P)  (A {is in the spectrum of} P)"
proof
  assume "B {is in the spectrum of} P"
  with assms equipollent_spect show "A {is in the spectrum of} P" by auto
next
  assume "A {is in the spectrum of} P"
  moreover
  from assms have "BA" using eqpoll_sym by auto
  ultimately show "B {is in the spectrum of} P" using equipollent_spect by auto
qed

textFrom the previous statement, we see that the spectrum could be formed only by
representative of clases of sets. If \emph{AC} holds, this means that the spectrum
can be taken as a set or class of cardinal numbers.

textHere is an example of the spectrum. The proof lies in the indiscrite filter {A}›
that can be build for any set. In this proof, we see that without choice,
there is no way to define the sepctrum of a property with cardinals because if a set is not 
comparable with any ordinal, its cardinal is defined as 0› without the set being
empty.

theorem T4_spectrum:
  shows "(A {is in the spectrum of} isT4)  A  1"
proof
  assume "A {is in the spectrum of} isT4"
  then have reg:"T. ((T{is a topology}  TA)  (T {is T4}))" using Spec_def by auto
  {
    assume "A0"
    then obtain x where "xA" by auto
    then have "x{A}" by auto
    moreover
    then have "{A} {is a filter on}{A}" using IsFilter_def by auto
    moreover
    then have "({A}{0}) {is a topology}  ({A}{0})=A" using top_of_filter by auto
    then have top:"({A}{0}) {is a topology}" "({A}{0})A" using eqpoll_refl by auto
    then have "({A}{0}) {is T4}" using reg by auto
    then have "({A}{0}) {is T2}" using topology0.T3_is_T2 topology0.T4_is_T3 topology0_def top by auto
    ultimately have "{A}={x}" using filter_T2_imp_card1[of "{A}""x"] by auto
    then have "A={x}" by auto
    then have "A1" using singleton_eqpoll_1 by auto
  }
  moreover
  have "A=0  A0" by auto
  ultimately have "A1A0" by blast
  then show "A1" using empty_lepollI eqpoll_imp_lepoll eq_lepoll_trans by auto
next
  assume "A1"
  have "A=0A0" by auto
  then obtain E where "A=0EA" by auto
  then have "A0EA" by auto
  with A1 have "A0A={E}" using lepoll_1_is_sing by auto
  then have "A0A1" using singleton_eqpoll_1 by auto
  {
    fix T
    assume AS:"T{is a topology}""TA"
    {
      assume "A0"
      with AS have "T{is a topology}" and empty:"T=0" using eqpoll_trans eqpoll_0_is_0 by auto
      then have "T{is T2}" using isT2_def by auto
      then have "T{is T1}" using T2_is_T1 by auto
      moreover
      from empty have "T{0}" by auto
      with AS(1) have "T={0}" using empty_open by auto
      from empty have rr:"A. A{is closed in}T  A=0" using IsClosed_def by auto
      have "UT. VT. 0U0VUV=0" using empty_open AS(1) by auto
      with rr have "A. A{is closed in}T  (B. B{is closed in}T  AB=0  (UT. VT. AUBVUV=0))"
        by blast
      then have "T{is normal}" using IsNormal_def by auto
      with T{is T1} have "T{is T4}" using isT4_def by auto
    }
    moreover
    {
      assume "A1"
      with AS have "T{is a topology}" and NONempty:"T1" using eqpoll_trans[of "T""A""1"] by auto
      then have "T1" using eqpoll_imp_lepoll by auto
      moreover
      {
        assume "T=0"
        then have "0T" by auto
        with NONempty have "01" using eqpoll_trans by blast
        then have "0=1" using eqpoll_0_is_0 eqpoll_sym by auto
        then have "False" by auto
      }
      then have "T0" by auto
      then obtain R where "RT" by blast
      ultimately have "T={R}" using lepoll_1_is_sing by auto
      {
        fix x y
        assume "x{is closed in}T""y{is closed in}T" "xy=0"
        then have "xT""yT" using IsClosed_def by auto
        then have "x=0y=0" using xy=0 T={R} by force
        {
          assume "x=0"
          then have "x0""yT" using yT by auto
          moreover
          have "0T""TT" using AS(1) IsATopology_def empty_open by auto
          ultimately have "UT. VT. xUyVUV=0" by auto
        }
        moreover
        {
          assume "x0"
          with x=0y=0 have "y=0" by auto
          then have "xT""y0" using xT by auto
          moreover
          have "0T""TT" using AS(1) IsATopology_def empty_open by auto
          ultimately have "UT. VT. xUyVUV=0" by auto
        }
        ultimately
        have "(UT. VT. x  U  y  V  U  V = 0)" by blast
      }
      then have "T{is normal}" using IsNormal_def by auto
      moreover
      {
        fix x y
        assume "xT""yT""xy"
        with T={R} have "False" by auto
        then have "UT. xUyU" by auto
      }
      then have "T{is T1}" using isT1_def by auto
      ultimately have "T{is T4}" using isT4_def by auto
    }
    ultimately have "T{is T4}" using A0A1 by auto
  }
  then have "T. (T{is a topology}  T  A)  (T{is T4})" by auto
  then show "A {is in the spectrum of} isT4" using Spec_def by auto
qed

textIf the topological properties are related, then so are the spectra.
    
lemma P_imp_Q_spec_inv:
  assumes "T. T{is a topology}  (Q(T)  P(T))"  "A {is in the spectrum of} Q"
  shows "A {is in the spectrum of} P"
proof-
  from assms(2) have "T. T{is a topology}  T  A  Q(T)" using Spec_def by auto
  with assms(1) have "T. T{is a topology}  T  A  P(T)" by auto
  then show ?thesis using Spec_def by auto
qed

textSince we already now the spectrum of $T_4$; if we now the spectrum of $T_0$,
it should be easier to compute the spectrum of $T_1$, $T_2$ and $T_3$.

theorem T0_spectrum:
  shows "(A {is in the spectrum of} isT0)  A  1"
proof
  assume "A {is in the spectrum of} isT0"
  then have reg:"T. ((T{is a topology}  TA)  (T {is T0}))" using Spec_def by auto
  {
    assume "A0"
    then obtain x where "xA" by auto
    then have "x{A}" by auto
    moreover
    then have "{A} {is a filter on}{A}" using IsFilter_def by auto
    moreover
    then have "({A}{0}) {is a topology}  ({A}{0})=A" using top_of_filter by auto
    then have "({A}{0}) {is a topology}  ({A}{0})A" using eqpoll_refl by auto
    then have "({A}{0}) {is T0}" using reg by auto
    {
      fix y
      assume "yA""xy"
      with ({A}{0}) {is T0} obtain U where "U({A}{0})" and dis:"(x  U  y  U)  (y  U  x  U)" using isT0_def by auto
      then have "U=A" by auto
      with dis yA x{A} have "False" by auto
    }
    then have "yA. y=x" by auto
    with x{A} have "A={