 reserve x,X for set,
         n, m, i for Nat,
         p, q for Point of TOP-REAL n,
         A, B for Subset of TOP-REAL n,
         r, s for Real;
reserve N for non zero Nat,
        u,t for Point of TOP-REAL(N+1);

theorem Th2:
  for Sp,Sn be Subset of TOP-REAL n st
      Sp = {s where s is Point of TOP-REAL n: s.n >= 0 & |.s.| = 1} &
      Sn = {t where t is Point of TOP-REAL n: t.n <= 0 & |.t.| = 1}
    holds Sp is closed & Sn is closed
proof
  let Sp,Sn be Subset of TOP-REAL n such that
A1:   Sp = {s where s is Point of TOP-REAL n: s.n>=0 & |.s.|=1}
    and
A2:   Sn= {t where t is Point of TOP-REAL n: t.n<=0 & |.t.|=1};
  set Tn=TOP-REAL n;
  per cases;
    suppose
A4:     n=0;
A5:   Sn={}
      proof
        assume Sn<>{};
        then consider x be object such that
A6:       x in Sn by XBOOLE_0:def 1;
        ex p be Point of Tn st x=p & p.n<=0 & |.p.|=1 by A2,A6;
        hence contradiction by A4;
      end;
      Sp = {}
      proof
        assume Sp<>{};
        then consider x be object such that
A7:       x in Sp by XBOOLE_0:def 1;
        ex p be Point of Tn st x=p & p.n>=0 & |.p.|=1 by A1,A7;
        hence contradiction by A4;
      end;
      hence thesis by A5;
    end;
    suppose
A8:     n>0;
      set P2={ p where p is Point of Tn: 0<p/.n };
      set P1={ p where p is Point of Tn: 0>p/.n };
A9:   P1 c= the carrier of Tn
      proof
        let x be object;
        assume x in P1;
        then ex p be Point of Tn st p=x & 0>p/.n;
        hence thesis;
      end;
      P2 c= the carrier of Tn
      proof
        let x be object;
        assume x in P2;
        then ex p be Point of Tn st p=x & 0<p/.n;
        hence thesis;
      end;
      then reconsider P1,P2 as Subset of Tn by A9;
      n in Seg n by FINSEQ_1:3,A8;
      then reconsider P1,P2 as open Subset of Tn by JORDAN2B:13,12;
      set S2=P2` /\ Sphere(0.Tn,1);
A10:  Sn c= S2
      proof
        let xx be object;
        assume xx in Sn;
        then consider p be Point of Tn such that
A11:        xx=p
          and
A12:        p.n<=0
          and
A13:        |.p.|=1 by A2;
        p-0.Tn=p by RLVECT_1:13;
        then
A14:      p in Sphere(0.Tn,1) by A13;
        len p =n by CARD_1:def 7;
        then
A15:      dom p = Seg n by FINSEQ_1:def 3;
A16:    not p in P2
        proof
          assume p in P2;
          then ex q be Point of Tn st p=q & 0<q/.n;
          hence thesis by A15,PARTFUN1:def 6, FINSEQ_1:3,A8,A12;
        end;
        P2` = [#]Tn\P2 by SUBSET_1:def 4;
        then p in P2` by A16,XBOOLE_0:def 5;
        hence thesis by A14,XBOOLE_0:def 4,A11;
      end;
A17:  S2 c= Sn
      proof
        let xx be object;
A18:    P2`=[#]Tn\P2 by SUBSET_1:def 4;
        assume
A19:      xx in S2;
        then reconsider p=xx as Point of Tn;
        len p =n by CARD_1:def 7;
        then dom p = Seg n by FINSEQ_1:def 3;
        then
A20:    p/.n =p.n by PARTFUN1:def 6, FINSEQ_1:3,A8;
A21:    p in P2` by A19,XBOOLE_0:def 4;
A22:    p.n <= 0
        proof
          assume p.n >0;
          then p in P2 by A20;
          hence thesis by A21,A18,XBOOLE_0:def 5;
        end;
        p in Sphere(0.Tn,1) by A19,XBOOLE_0:def 4;
        then |.p.|=1 by TOPREAL9:12;
        hence thesis by A22,A2;
      end;
      set S1=P1` /\ Sphere(0.Tn,1);
A23:  S1 c= Sp
      proof
        let xx be object;
A24:    P1`=[#]Tn\P1 by SUBSET_1:def 4;
        assume
A25:      xx in S1;
        then reconsider p=xx as Point of Tn;
        len p =n by CARD_1:def 7;
        then dom p = Seg n by FINSEQ_1:def 3;
        then
A26:      p/.n =p.n by PARTFUN1:def 6, FINSEQ_1:3,A8;
A27:    p in P1` by A25,XBOOLE_0:def 4;
A28:    p.n >= 0
        proof
          assume p.n <0;
          then p in P1 by A26;
          hence thesis by A27,A24,XBOOLE_0:def 5;
        end;
        p in Sphere(0.Tn,1) by A25,XBOOLE_0:def 4;
        then |.p.|=1 by TOPREAL9:12;
        hence thesis by A28,A1;
      end;
      Sp c= S1
      proof
        let xx be object;
        assume xx in Sp;
        then consider p be Point of Tn such that
A29:        xx=p
          and
A30:        p.n>=0
          and
A31:        |.p.|=1 by A1;
        p-0.Tn=p by RLVECT_1:13;
        then
A32:      p in Sphere(0.Tn,1) by A31;
        len p =n by CARD_1:def 7;
        then
A33:      dom p = Seg n by FINSEQ_1:def 3;
A34:    not p in P1
        proof
          assume p in P1;
          then ex q be Point of Tn st p=q & 0>q/.n;
          hence thesis by A33,PARTFUN1:def 6, FINSEQ_1:3,A8,A30;
        end;
        P1` = [#]Tn\P1 by SUBSET_1:def 4;
        then p in P1` by A34,XBOOLE_0:def 5;
        hence thesis by A32,XBOOLE_0:def 4,A29;
      end;
      hence thesis by A10,A17,XBOOLE_0:def 10,A23;
    end;
end;
