 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 Th8:
  for p st n>0 & p in A & for r st r>0
           ex U be open Subset of (TOP-REAL n) |A st
             p in U & U c= Ball(p,r) &
             for f be Function of (TOP-REAL n) | (A\U),Tunit_circle(n) st
                 f is continuous
               ex h be Function of (TOP-REAL n) |A,Tunit_circle(n) st
                 h is continuous & h| (A\U) = f
  holds p in Fr A
proof
  let p;
  set TRn=TOP-REAL n,cTRn=the carrier of TRn;
  set CL=cl_Ball(0.TRn,1),S=Sphere(0.TRn,1);
  set TS=Tunit_circle(n);
  assume
A1: n > 0;
  cTRn\{0.TRn}={0.TRn}` by SUBSET_1:def 4;
  then reconsider cTR0=cTRn\{0.TRn} as non empty open Subset of TRn by A1;
  set nN=n NormF;
  set TRn0=TRn|cTR0;
A2: Int A c= A by TOPS_1:16;
  set G= transl(p,TRn);
  reconsider I=incl TRn0 as continuous Function of TRn0,TRn by TMAP_1:87;
A3: [#]TRn0=cTR0 by PRE_TOPC:def 5;
A4: nN|TRn0=nN|the carrier of TRn0 by TMAP_1:def 4;
  not 0 in rng(nN|TRn0)
  proof
    assume 0 in rng(nN|TRn0);
    then consider x be object such that
A5:     x in dom(nN|TRn0)
      and
A6:     (nN|TRn0).x=0 by FUNCT_1:def 3;
    x in dom nN by A4,A5,RELAT_1:57;
    then reconsider x as Element of TRn;
    reconsider X=x as Element of REAL n by EUCLID:22;
    0 = nN.x by A4,A5,A6,FUNCT_1:47
     .= |.X.| by JGRAPH_4:def 1;
    then x=0*n by EUCLID:8;
    then x=0.TRn by EUCLID:70;
    then x in {0.TRn} by TARSKI:def 1;
    hence contradiction by A3,A5,XBOOLE_0:def 5;
  end;
  then reconsider nN0=nN|TRn0 as non-empty continuous Function of TRn0,R^1
    by RELAT_1:def 9;
  reconsider b=I</>nN0 as Function of TRn0,TRn by TOPREALC:46;
A7: Int A in the topology of TRn by PRE_TOPC:def 2;
  set En=Euclid n,TM=TopSpaceMetr En;
  assume that
A8:   p in A
    and
A9:   for r st r>0 ex U be open Subset of TRn|A st p in U & U c= Ball(p,r)
      & for f be Function of (TRn) | (A\U),Tunit_circle(n) st f is continuous
      ex h be Function of TRn |A,Tunit_circle(n) st
        h is continuous & h| (A\U) = f;
  reconsider e=p as Point of En by EUCLID:67;
A10:the TopStruct of TRn = TM by EUCLID:def 8;
  then reconsider IA=Int A as Subset of TM;
  TS = Tcircle(0.TRn,1) by TOPREALB:def 7;
  then TS=TRn|S by TOPREALB:def 6;
  then
A11: [#]TS=S by PRE_TOPC:def 5;
  assume
  not p in Fr A;
  then p in A\Fr A by A8,XBOOLE_0:def 5;
  then p in Int A by TOPS_1:40;
  then consider r being Real such that
A12: r > 0
    and
A13: Ball(e,r) c= IA by A7,A10,PRE_TOPC:def 2,TOPMETR:15;
  set r2=r/2;
  consider U be open Subset of TRn|A such that
A14:  p in U
    and
A15:  U c= Ball(p,r2)
    and
A16:  for f be Function of (TRn) | (A\U),TS st f is continuous
        ex h be Function of TRn |A,TS st h is continuous & h| (A\U) = f
    by A12, A9;
  reconsider Sph=Sphere(p,r2) as non empty Subset of TRn by A1, A12;
  consider au be object such that
A17:  au in Sph by XBOOLE_0:def 1;
A18:n in NAT by ORDINAL1:def 12;
A19: Ball(e,r)=Ball(p,r) by TOPREAL9:13;
A20: cl_Ball(p,r2) c= Ball(p,r) by JORDAN:21,A18, A12,XREAL_1:216;
A21: Sph = cl_Ball(p,r2) \ Ball(p,r2) by JORDAN:19,A18;
  then W: au in cl_Ball(p,r2) by A17,XBOOLE_0:def 5;
A22: au in IA by W,A20,A19,A13;
  reconsider r2 as non zero Real by A12;
  reconsider CL2=cl_Ball(p,r2) as non empty Subset of TRn by A12;
A23: Sph c= CL2 by A21,XBOOLE_1:36;
  [#](TRn|CL2)= CL2 by PRE_TOPC:def 5;
  then reconsider sph=Sph as non empty Subset of TRn|CL2 by A21,XBOOLE_1:36;
A24:(TRn|CL2) |sph = TRn|Sph by PRE_TOPC:7, A21,XBOOLE_1:36;
  not au in U by A15, A21,A17,XBOOLE_0:def 5;
  then reconsider AU=A\U as non empty Subset of TRn by A22,A2,XBOOLE_0:def 5;
  set TAU=TRn | AU;
  set t= transl(-p,TRn),T= t| TAU;
A25: [#]TAU = A\U by PRE_TOPC:def 5;
  then
A26: dom T = A\U by FUNCT_2:def 1;
A27: T=t|the carrier of TAU by TMAP_1:def 4;
A28:rng T c= cTR0
  proof
    let y be object;
    assume y in rng T;
    then consider x be object such that
A29:    x in dom T
      and
A30:    T.x=y by FUNCT_1:def 3;
    reconsider x as Point of TRn by A29,A26;
A31: T.x=t.x by A29,A27,FUNCT_1:47;
A32: t.x= x+-p by RLTOPSP1:def 10;
    assume not y in cTR0;
    then T.x in {0.TRn} by A31,XBOOLE_0:def 5,A30;
    then x-p = 0.TRn by TARSKI:def 1,A32,A31;
    then x= p by RLVECT_1:21;
    hence thesis by A29, A25,XBOOLE_0:def 5, A14;
  end;
  then reconsider T0=T as continuous Function of TAU, TRn0
    by A26,FUNCT_2:2,A3,A25,PRE_TOPC:27;
A33: [#](TRn|Sph) = Sph by PRE_TOPC:def 5;
A34:CL2 c= IA by A20,A19,A13;
A35:CL2 c= A by A2,A20,A19,A13;
A36:dom b = cTR0 by A3,FUNCT_2:def 1;
A37: for p be Point of TRn st p in cTR0 holds
       b.p=1/|.p.|*p & |.(1/|.p.|)*p.|=1
  proof
    let p be Point of TRn;
A38: |. 1/|.p.| .|=1/|.p.| by ABSVALUE:def 1;
    assume
A39:  p in cTR0;
    then
A40:  I.p=p by A3,TMAP_1:84;
A41:nN0.p=nN.p by A39,A3,A4,FUNCT_1:49;
    thus b.p = I.p(/)nN0.p by A36,A39,VALUED_2:72
            .= p(/)|.p.| by A41,A40,JGRAPH_4:def 1
            .= 1/|.p.|*p by VALUED_2:def 32;
A42:p<>0.TRn by A39,ZFMISC_1:56;
    thus |.(1/|.p.|)*p.| = |. 1/|.p.| .|*|.p.| by TOPRNS_1:7
                         .= 1 by A38,A42,TOPRNS_1:24,XCMPLX_1:87;
  end;
  rng b c=S
  proof
    let y be object;
    assume y in rng b;
    then consider x be object such that
A43:    x in dom b
      and
A44:    b.x=y by FUNCT_1:def 3;
    reconsider x as Point of TRn by A36,A43;
A45: |.(1/|.x.|)*x.|=1 by A3,A37,A43;
A46: (1/|.x.|)*x-0.TRn=(1/|.x.|)*x by RLVECT_1:13;
    y = 1/|.x.|*x by A3,A37,A43,A44;
    hence thesis by A46,A45;
  end;
  then reconsider B=b as Function of TRn0,TS by A3,A11,A36,FUNCT_2:2;
A47:[#](TRn|CL2|sph )=sph by PRE_TOPC:def 5;
  set m = mlt(r2,TRn), M= m|TS;
  reconsider M= m|TS as continuous Function of TS,TRn by A1;
A48:M=m|the carrier of TS by TMAP_1:def 4;
A49: [#](TRn|A) = A by PRE_TOPC:def 5;
  then reconsider clB= CL2 as Subset of TRn|A by A34,A2,XBOOLE_1:1;
A50:(TRn|A) |clB = TRn|CL2 by PRE_TOPC:7, A34,A2,XBOOLE_1:1;
  B is continuous by PRE_TOPC:27;
  then B*T0 is continuous by TOPS_2:46;
  then consider h be Function of TRn |A,TS such that
A51:  h is continuous
    and
A52:  h| (A\U) = B*T0 by A16;
  M*h is continuous Function of TRn|A,TRn by A1,A51,TOPS_2:46;
  then reconsider GHM=G*(M*h) as continuous Function of TRn|A,TRn
    by TOPS_2:46;
A53:dom h = the carrier of (TRn|A) by A1,FUNCT_2:def 1;
A54: |.r2.|=r2 by A12,ABSVALUE:def 1;
A55:rng GHM c= Sph
  proof
    let y be object;
    assume y in rng GHM;
    then consider q be object such that
A56:    q in dom GHM
      and
A57:    GHM.q=y by FUNCT_1:def 3;
A58:y = G.((M*h).q) by A56,A57,FUNCT_1:12;
A59:q in A by A56,A49;
A60:q in dom (M*h) by A56,FUNCT_1:11;
    then
A61:  q in dom h by FUNCT_1:11;
A62:(M*h).q=M.(h.q) by A60,FUNCT_1:12;
A63:h.q in dom M by A60,FUNCT_1:11;
    reconsider q as Point of TRn by A59;
    h.q in S by A63,A11;
    then reconsider hq=h.q as Point of TRn;
A64:m.(h.q) = r2 * hq by RLTOPSP1:def 13;
    M.(h.q)=m.(h.q) by A63,A48,FUNCT_1:47;
    then
A65:  y = p+(r2*hq) by A58,A62,A64,RLTOPSP1:def 10;
A66:p+(r2*hq) - p = (r2*hq )+(p - p) by RLVECT_1:28
                  .= (r2*hq)+(0.TRn) by RLVECT_1:15
                  .= r2*hq by RLVECT_1:def 4;
A67:h.q in rng h by FUNCT_1:def 3,A61;
    |. r2 * hq.| = |. r2 .| * |. hq .| by EUCLID:11
                .= |.r2.| *1 by A67,A11,TOPREAL9:12;
    hence thesis by A66,A65,A54;
  end;
  dom GHM = A by A49,FUNCT_2:def 1;
  then reconsider ghm=GHM as Function of TRn|A,TRn|Sph
    by A55,A49,A33,FUNCT_2:2;
  ghm is continuous by PRE_TOPC:27;
  then reconsider ghM=ghm| ((TRn|A) |clB ) as continuous
    Function of TRn|CL2,(TRn|CL2) |sph by A8,A50,A24;
A68:dom ghM = the carrier of (TRn|CL2) by FUNCT_2:def 1;
A69:ghM =ghm|the carrier of ((TRn|A) |clB ) by TMAP_1:def 4, A8;
  for w be Point of TRn|CL2 st w in Sph holds ghM.w=w
  proof
    let w be Point of TRn|CL2;
    assume
A70:  w in Sph;
    then reconsider q=w as Point of TRn;
A71:w in CL2 by A70,A23;
     w in A by A35,A70,A23;
    then
A72:  q in dom GHM by A49,FUNCT_2:def 1;
    then
A73:  q in dom (M*h) by FUNCT_1:11;
    then
A74:  (M*h).q=M.(h.q) by FUNCT_1:12;
    not q in U by A70,A21,XBOOLE_0:def 5,A15;
    then
A75:  q in A\U by A71,A35,XBOOLE_0:def 5;
    then q in (A\U) /\ dom h by A71,A35,A53,A49,XBOOLE_0:def 4;
    then
A76:  q in dom (B*T0) by A52,RELAT_1:61;
    then
A77:  (B*T0).q = B.(T0.q) by FUNCT_1:12;
A78:h.q in dom M by A73,FUNCT_1:11;
    then
A79:M.(h.q)=m.(h.q) by A48,FUNCT_1:47;
    t.q = q+-p by RLTOPSP1:def 10;
    then
A80:  T.q=q-p by A26,A27,A75,FUNCT_1:47;
    q in dom T0 by A76,FUNCT_1:11;
    then
A81:  T.q in rng T by FUNCT_1:def 3;
    h.q in S by A78,A11;
    then reconsider hq=h.q as Point of TRn;
    ghM.q=ghm.q by A68,A69, FUNCT_1:47;
    then
A82:  ghM.q = G.((M*h).q) by A72,FUNCT_1:12;
    hq = (B*T0).q by A76,A52,FUNCT_1:47;
    then
A83:  hq=1/|.q-p.|*(q-p) by A80,A77,A37, A81,A28;
    m.(h.q) = r2 * hq by RLTOPSP1:def 13
           .= r2 *(1/r2*(q-p)) by A83, A70,TOPREAL9:9
           .= (r2*(1/r2))*(q-p) by RLVECT_1:def 7
           .= 1 *(q-p) by XCMPLX_1:106
           .= q-p by RLVECT_1:def 8;
    then ghM.w = p+(q-p ) by A82,A74,A79,RLTOPSP1:def 10
              .= q +(-p+p) by RLVECT_1:def 3
              .=q + 0.TRn by RLVECT_1:def 10
              .= q by RLVECT_1:4;
    hence thesis;
  end;
  then
A84:ghM is being_a_retraction by BORSUK_1:def 16,A33,A24;
  Ball(p,r2) c= Int CL2 by TOPREAL9:16,TOPS_1:24;
  then
A85: CL2 is non boundary by A12;
  Fr CL2 = Sph by A12,BROUWER2:5;
  hence
  contradiction by A84,A85,A47,BROUWER2:9,BORSUK_1:def 17;
end;
