 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 Th11:
  B is closed & p in Int A implies
   for h be Function of (TOP-REAL n) |A,(TOP-REAL n) |B st
     h is being_homeomorphism holds h.p in Int B
proof
  set TRn=TOP-REAL n,T=Tunit_circle(n);
  assume that
A1:   B is closed
    and
A2:   p in Int A;
A3: Int A c= A by TOPS_1:16;
A4: the TopStruct of TRn=TopSpaceMetr Euclid n by EUCLID:def 8;
  let h be Function of TRn|A,TRn|B such that
A5: h is being_homeomorphism;
  A6: h" is continuous by A5,TOPS_2:def 5;
  A7: [#](TRn|A) = A by PRE_TOPC:def 5;
  then A8: dom h = A by A5,TOPS_2:def 5;
  A9: [#](TRn|B) = B by PRE_TOPC:def 5;
  then A10: rng h = B by A5,TOPS_2:def 5;
  per cases;
    suppose n=0;
      hence thesis by Lm3,A2,A5;
    end;
    suppose
A11:    n>0;
A12:  h.p in rng h by A2,A3,A8,FUNCT_1:def 3;
      then reconsider hp=h.p as Point of TRn by A10;
      ex r st r>0 & for U be open Subset of TRn |B st
        hp in U & U c= Ball(hp,r) ex f be Function of TRn | (B\U),T st
        f is continuous & for h be Function of TRn |B,T
         st h is continuous holds h| (B\U) <> f
      proof
        reconsider hP =hp as Point of Euclid n by A4, TOPMETR:12;
        not p in Fr A by A2, TOPS_1:39,XBOOLE_0:3;
        then consider r such that
A14:        r>0
          and
A15:        for U be open Subset of TRn |A st p in U & U c= Ball(p,r)
              ex f be Function of TRn | (A\U),T st f is continuous &
              for h be Function of TRn |A,T st h is continuous holds
              h| (A\U) <> f by A11, A2,A3,Th8;
        reconsider BA=Ball(p,r) /\A as Subset of TRn|A by A7,XBOOLE_1: 17;
        Ball(p,r) in the topology of TRn by PRE_TOPC:def 2;
        then BA in the topology of (TRn|A) by A7,PRE_TOPC:def 4;
        then reconsider BA as open Subset of TRn|A by PRE_TOPC:def 2;
        h.:BA is open by A5,A2,A3,A12, TOPGRP_1:25;
        then h.:BA in the topology of TRn|B by PRE_TOPC:def 2;
        then consider U be Subset of TRn such that
A16:        U in the topology of TRn
          and
A17:        h.:BA = U/\[#](TRn|B) by PRE_TOPC :def 4;
        reconsider U as open Subset of TRn by A16,PRE_TOPC:def 2;
A18:    Int U = U by TOPS_1:23;
        p is Element of REAL n by EUCLID:22;
        then |. p-p .|=0;
        then p in Ball(p,r) by A14;
        then p in BA by A2,A3,XBOOLE_0:def 4;
        then hp in h.:BA by A7,A8,FUNCT_1:def 6;
        then hp in U by A17,XBOOLE_0:def 4;
        then consider s be Real such that
A19:        s>0
          and
A20:        Ball(hP,s) c= U by A18,GOBOARD6:5;
        take s;
        thus s>0 by A19;
        let W be open Subset of TRn |B such that
A21:        hp in W
          and
A22:        W c= Ball(hp,s);
A23:    W/\B=W by A9,XBOOLE_1:28;
        Ball(hp,s)=Ball(hP,s) by TOPREAL9:13;
        then W c= U by A22,A20;
        then
A24:      W c= U/\B by A23, XBOOLE_1:27;
        h"(U/\B) = h"(h.:BA ) by A17, PRE_TOPC:def 5
                .= BA by FUNCT_1:94, XBOOLE_1:17,A8, A5;
        then
A25:      h"W c= BA by A24,RELAT_1:143;
        reconsider hW=h"W as open Subset of TRn|A by TOPS_2:43,A5,A9,A12;
A26:    BA c= Ball(p,r) by XBOOLE_1:17;
        set BW=B\W;
        reconsider bw=BW as Subset of TRn|B by XBOOLE_1:36,A9;
A27:    [#](TRn | (A\hW))=A\hW by PRE_TOPC:def 5;
        p in h"W by A8,A2,A3,A21,FUNCT_1:def 7;
        then consider F be Function of TRn | (A\hW),T such that
A28:        F is continuous
          and
A29:        for h be Function of TRn |A,T st h is continuous holds
              h| (A\hW) <> F by A15, A25,A26,XBOOLE_1:1;
A30:    BW c= B by XBOOLE_1:36;
        then
A31:      h".:BW = h"BW by TOPS_2:55,A9,A10, A5
                .= (h"B) \ hW by FUNCT_1:69
                .=A\hW by RELAT_1:134,A8,A10;
        per cases;
          suppose
A32:          A\hW is empty;
            reconsider n1=n-1 as Element of NAT by NAT_1:20, A11;
            set h = the continuous Function of TRn |A,Tunit_circle(n1+1);
            reconsider H=h as Function of TRn |A,T;
A33:          H| (A\hW) = {} by A32;
            H| (A\hW) <> F by A29;
            hence thesis by A33, A32;
          end;
          suppose
A34:          A\hW is non empty;
            reconsider hbw=(h") | (B\W) as Function of
              (TRn |B) | bw, (TRn|A) | (h".:BW) by A2,A3,A12,JORDAN24:12;
A35:        (TRn |B) | bw = TRn |BW by PRE_TOPC:7, XBOOLE_1:36;
A36:        (TRn|A) | (h".:BW) = TRn | (A\hW) by A31, PRE_TOPC:7,A7;
            then reconsider HBW =hbw as Function of TRn |BW, TRn | (A\hW)
              by A35;
            reconsider fhW=F*HBW as Function of TRn | BW,Tunit_circle(n)
              by A34;
            take fhW;
            thus fhW is continuous by A34,JORDAN24:13,
              A6,A2,A3,A12,A36,A35,A28,TOPS_2:46;
            let g be Function of TRn |B,T such that
A37:          g is continuous;
            reconsider gh=g*h as Function of TRn |A,T by A12;
A38:        gh is continuous by A5, A12,A37,TOPS_2:46;
            assume
A39:          g| BW = fhW;
A40:        dom F = A\hW by FUNCT_2:def 1, A11,A27;
A41:        rng (h| (A\hW)) = h.:(A\hW) by RELAT_1:115
                           .=h.:(h"BW) by TOPS_2:55,A9,A10,A31, A5,A30
                           .=BW by FUNCT_1:77,A10, XBOOLE_1:36;
            gh| (A\hW) = g*(h| (A\hW)) by RELAT_1:83
                      .=g*((id BW)*(h| (A\hW))) by A41,RELAT_1:53
                      .=(g*(id BW))*(h| (A\hW)) by RELAT_1:36
                      .=(g|BW)*(h| (A\hW)) by RELAT_1:65
                      .=F*(((h") | (B\W)) * (h| (A\hW))) by A39, RELAT_1:36
                      .=F*(((h") *id BW) * (h| (A\hW))) by RELAT_1:65
                      .=F*((h") *(id BW * (h| (A\hW)))) by RELAT_1:36
                      .=F*((h") * (h| (A\hW))) by A41,RELAT_1:53
                      .=F*((h" * h) | (A\hW)) by RELAT_1:83
                      .=(F*(h" * h)) | (A\hW) by RELAT_1:83
                      .=(F*(id A)) | (A\hW) by TOPS_2:52,A8,A10, A5,A9
                      .=F | dom F by A40, XBOOLE_1:36,RELAT_1:51
                      .=F;
            hence contradiction by A38,A29;
          end;
      end;
      then not hp in Fr B by A1,Th9;
      then hp in B\Fr B by A12,A9,XBOOLE_0:def 5;
      hence thesis by TOPS_1:40;
    end;
end;
