 reserve n,m for Nat,
         p,q for Point of TOP-REAL n, r for Real;
reserve M,M1,M2 for non empty TopSpace;

theorem Th7:
  for M be with_boundary locally_euclidean non empty TopSpace
    for p be Point of M, n st
        ex U be a_neighborhood of p st
          M|U,Tdisk(0.TOP-REAL (n+1),1) are_homeomorphic
    holds
      for pF be Point of M|Fr M st p=pF
        ex U being a_neighborhood of pF st
          (M|Fr M) |U,Tball(0.TOP-REAL n,1) are_homeomorphic
proof
  let M be with_boundary locally_euclidean non empty TopSpace;
  let p be Point of M, n such that
A1: ex U be a_neighborhood of p st
    M|U,Tdisk(0.TOP-REAL (n+1),1) are_homeomorphic;
  set n1=n+1;
  set TR=TOP-REAL n1;
  consider W be a_neighborhood of p such that
A2: M|W,Tdisk(0.TR,1) are_homeomorphic by A1;
A3: p in Int W by CONNSP_2:def 1;
  set TR1 = TOP-REAL n;
  set CL=cl_Ball(0.TR,1);
  set S=Sphere(0.TR,1);
  set F=Fr M,MF=M|F;
  let pF be Point of MF such that
A4: p=pF;
A5:[#]MF=F by PRE_TOPC:def 5;
  then consider U be a_neighborhood of p,m be Nat, h be Function of
    M|U,Tdisk(0.TOP-REAL m,1) such that
A6: h is being_homeomorphism
  and
A7: h.p in Sphere(0.TOP-REAL m,1) by A4, Th5;
A8: p in Int U by CONNSP_2:def 1;
  M|U,Tdisk(0.TOP-REAL m,1) are_homeomorphic by A6,T_0TOPSP:def 1;
  then
A9:m=n+1 by A3,A8,XBOOLE_0:3,A2, BROUWER3:14;
  then reconsider h as Function of M|U,Tdisk(0.TR,1);
A10: Int U c= U by TOPS_1:16;
  [#](M|U)=U by PRE_TOPC:def 5;
  then reconsider IU=Int U as Subset of M|U by TOPS_1:16;
  set MU=M|U;
A11:pF in Int U by A4, CONNSP_2:def 1;
  then p in F/\IU by A4,A5,XBOOLE_0:def 4;
  then reconsider FIU=F/\(Int U) as non empty Subset of MU;
A12: [#](M|U)=U by PRE_TOPC:def 5;
  IU is open by TSEP_1:9;
  then h .: IU is open by A9,A6,TOPGRP_1:25;
  then h .: IU in the topology of Tdisk(0.TR,1) by PRE_TOPC:def 2;
  then consider W be Subset of TR such that
A13: W in the topology of TR
  and
A14: h .: IU = W/\ [#]Tdisk(0.TR,1) by PRE_TOPC:def 4;
  reconsider W as open Subset of TR by A13,PRE_TOPC:def 2;
A15: h .: IU = W/\CL by PRE_TOPC:def 5,A14;
A16: dom h =[#](M|U) by A6, TOPS_2:def 5;
  then
A17: h.p in h.:IU by A4,A11,FUNCT_1:def 6;
  then reconsider hp=h.p as Point of TR by A15;
A18: Int W=W by TOPS_1:23;
A19: |. hp - 0.TR.| =1 by A9, A7,TOPREAL9:9;
  reconsider HP=hp as Point of Euclid n1 by EUCLID:67;
  h.p in W by A17,A14,XBOOLE_0:def 4;
  then consider s be Real such that
A20: s>0
  and
A21: Ball(HP,s) c= W by A18,GOBOARD6:5;
  set s2=s/2,m=min(s/2,1/2);
  set V0 = S /\ Ball(hp,m);
  set hV0=h"V0;
A22: m<=s2 by XXREAL_0:17;
  s2 < s by A20,XREAL_1:216;
  then
A23:Ball(hp,m) c= Ball(hp,s) by A22,XXREAL_0:2,JORDAN:18;
A24:Ball(HP,s)=Ball(hp,s) by TOPREAL9:13;
A25: hV0 c= F
  proof
    let x be object;
    assume
A26:  x in hV0;
    then
A27:  h.x in V0 by FUNCT_1:def 7;
A28:x in dom h by A26,FUNCT_1:def 7;
    then reconsider q=x as Point of M by A16,A12;
    reconsider hq=h.q as Point of TR by A27;
    h.q in Ball(hp,m) by A27,XBOOLE_0:def 4;
    then
A29: h.q in Ball(hp,s) by A23;
A30: h.q in Sphere(0.TR,1) by A27,XBOOLE_0:def 4;
    then |. hq -0.TR .| = 1 by TOPREAL9:9;
    then hq in CL;
    then h.q in h.:IU by A15, A29,A21,A24,XBOOLE_0:def 4;
    then consider y be object such that
A31:  y in dom h
    and
A32:  y in IU
    and
A33:  h.y=h.q by FUNCT_1:def 6;
    y=q by A6,A31,A33,A28,FUNCT_1:def 4;
    then U is a_neighborhood of q by A32,CONNSP_2:def 1;
    hence thesis by A9,A6,Th5,A30;
  end;
  reconsider FIU1=FIU as Subset of MF by XBOOLE_1:17,A5;
  Int U in the topology of M by PRE_TOPC:def 2;
  then FIU1 in the topology of M|F by A5,PRE_TOPC:def 4;
  then
A34: FIU1 is open by PRE_TOPC:def 2;
A35: MF|FIU1 = M| (Fr M /\Int U) by XBOOLE_1:17,PRE_TOPC:7;
  set Mfiu=MU|FIU;
A36: F/\U c= U by XBOOLE_1:17;
A37:[#] (TR|CL) = CL by PRE_TOPC:def 5;
  then reconsider hFIU=h.:FIU as Subset of TR by XBOOLE_1:1;
A38:[#](TR|hFIU)=hFIU by PRE_TOPC:def 5;
A39:Tdisk(0.TR,1) | (h.:FIU) = TR|hFIU by A37,PRE_TOPC:7;
  then reconsider hfiu=h|FIU as Function of Mfiu, TR|hFIU by JORDAN24:12;
A40: hfiu is being_homeomorphism by A9,A6,METRIZTS:2,A39;
A41:Ball(0.TR1,1) misses Sphere(0.TR1,1) by TOPREAL9:19;
A42: S c= CL by TOPREAL9:17;
A43: IU = h"(h.:IU) by FUNCT_1:82,A6,FUNCT_1:76,A16;
  V0 c= Ball(hp,m) by XBOOLE_1:17;
  then
A44: V0 c= W by A21,A23,A24;
A45:  V0 c= hFIU
  proof
    let x be object;
    assume
A46: x in S/\ Ball(hp,m);
    then reconsider q=x as Point of TR;
    q in S by A46,XBOOLE_0:def 4;
    then q in h.:IU by A44,A46,A15,A42,XBOOLE_0:def 4;
    then consider w be object such that
A47: w in dom h
    and
A48: w in IU
    and
A49: h.w = q by FUNCT_1:def 6;
    reconsider w as Point of MU by A47;
    w in hV0 by A46,A47,A49,FUNCT_1:def 7;
    then w in FIU by A25,A48,XBOOLE_0:def 4;
    hence thesis by A47,A49,FUNCT_1:def 6;
  end;
A50: V0 c= S by XBOOLE_1:17;
  then V0 c= CL by A42;
  then V0 c= h.:IU by A44,A14,XBOOLE_1:19, A37;
  then
A51: hV0 c= IU by A43,RELAT_1:143;
A52: rng h = [#]Tdisk(0.TR,1) by A9,A6, TOPS_2:def 5;
  then h.:(h"V0) = V0 by FUNCT_1:77, A42,A50,XBOOLE_1:1,A37;
  then
A53: Tdisk(0.TR,1) | (h.:(h"V0)) = TR |V0 by PRE_TOPC:7,A42,A50,XBOOLE_1:1;
A54:CL=S\/Ball(0.TR,1) by TOPREAL9:18;
A55: hFIU /\ Ball(hp,m) c= V0
  proof
    let x be object;
    assume
A56: x in hFIU /\ Ball(hp,m);
    then reconsider q=x as Point of TR;
A57: x in hFIU by A56,XBOOLE_0:def 4;
A58: q in S
    proof
      reconsider Q=q as Point of Euclid n1 by EUCLID:67;
      set WB=W/\Ball(0.TR,1);
A59:  Int WB=WB by TOPS_1:23;
      hFIU c= h.:IU by XBOOLE_1:17,RELAT_1:123;
      then
A60: q in W by A57,A14,XBOOLE_0:def 4;
      assume not q in S;
      then q in Ball(0.TR,1) by A57, A37,A54,XBOOLE_0:def 3;
      then q in WB by A60,XBOOLE_0:def 4;
      then consider w be Real such that
A61:    w>0
      and
A62:    Ball(Q,w) c= WB by A59,GOBOARD6:5;
      set B=Ball(q,w);
A63:  Ball(Q,w)=Ball(q,w) by TOPREAL9:13;
      consider u be object such that
A64:    u in dom h
      and
A65:   u in FIU
      and
A66:   h.u=q by FUNCT_1:def 6,A57;
      reconsider u as Point of M by A65;
A67:  Ball(0.TR,1) c= CL by A54, XBOOLE_1:11;
      WB c= Ball(0.TR,1) by XBOOLE_1:17;
      then
A68:  B c= Ball(0.TR,1) by A62,A63;
      then reconsider BB=B as Subset of Tdisk(0.TR,1) by A67,XBOOLE_1:1,A37;
      reconsider hBB=h"BB as Subset of M by A12,XBOOLE_1:1;
A69:  B in the topology of TR by PRE_TOPC:def 2;
      |.q-q.|=0 by TOPRNS_1:28;
      then q in BB by A61;
      then
A70:  u in hBB by A64,A66,FUNCT_1:def 7;
      BB /\CL =BB by A67,XBOOLE_1:1,A68,XBOOLE_1:28;
      then BB in the topology of Tdisk(0.TR,1) by A69,A37,PRE_TOPC:def 4;
      then BB is open by PRE_TOPC:def 2;
      then
A72:  h"BB is open by TOPGRP_1:26,A9,A6;
      WB c= W by XBOOLE_1:17;
      then BB c= W by A62,A63;
      then BB c= h.:IU by XBOOLE_1:19,A14;
      then h"BB c= Int U by RELAT_1:143,A43;
      then hBB is open by A10,A12,A72,TSEP_1:9;
      then
A73:  Int hBB = hBB by TOPS_1:23;
A74:  Tdisk(0.TR,1) | BB = TR|Ball(q,w) by A37,PRE_TOPC: 7;
      reconsider hBB as a_neighborhood of u by A73,A70,CONNSP_2:def 1;
A75:  h.:hBB =BB by FUNCT_1:77,A52;
A76:  MU|h"BB = M|hBB by A12,PRE_TOPC:7;
      then
      reconsider hB=h|hBB as Function of M|hBB, TR|Ball(q,w)
        by JORDAN24:12,A74,A75;
      hB is being_homeomorphism by A9,A6,A74,A75,A76,METRIZTS:2;
      then
A77:    M|hBB,Tball(q,w) are_homeomorphic by T_0TOPSP:def 1;
      Tball(q,w),Tball(0.TR,1) are_homeomorphic by A61,Th3;
      then M|hBB,Tball(0.TR,1) are_homeomorphic by A77,A61,BORSUK_3:3;
      then
A78:    u in Int M by Def4;
      u in F by A65,XBOOLE_0:def 4;
      then u in [#]M \ Int M by SUBSET_1:def 4;
      hence thesis by XBOOLE_0:def 5,A78;
    end;
    x in Ball(hp,m) by A56,XBOOLE_0:def 4;
    hence thesis by A58,XBOOLE_0:def 4;
  end;
  S/\ Ball(hp,m)/\Ball(hp,m) = S/\ (Ball(hp,m)/\Ball(hp,m)) by XBOOLE_1:16
                            .= V0;
  then
A79: hFIU /\ Ball(hp,m) = V0 by A55,XBOOLE_1:26,A45;
  reconsider v0=V0 as Subset of TR|hFIU by A38,A45;
  Ball(hp,m) in the topology of TR by PRE_TOPC:def 2;
  then v0 in the topology of TR|hFIU by A79,PRE_TOPC:def 4,A38;
  then
A80: v0 is open by PRE_TOPC:def 2;
A81:Ball(0.TR1,1) \/ Sphere(0.TR1,1) = cl_Ball(0.TR1,1) by TOPREAL9:18;
A83: |. hp - 0.TR.| = |. 0.TR - hp.| by TOPRNS_1:27;
A84:m>0 by A20,XXREAL_0:21;
  then
A85: |.0.TR - hp.| < 1+m by A19,A83,XREAL_1:29;
  |.hp-hp.|=0 by TOPRNS_1:28;
  then hp in Ball(hp,m) by A84;
  then
A86:hp in V0 by A9,A7,XBOOLE_0:def 4;
A87: pF in Int U by A4,CONNSP_2:def 1;
  then
A88: pF in hV0 by A16,A10,A12,A4,A86,FUNCT_1:def 7;
  m <= 1/2 by XXREAL_0:17;
  then m < |.0.TR - hp.| by A19,A83,XXREAL_0:2;
  then
  consider g be Function of TR | (S /\ cl_Ball(hp,m)),Tdisk(0.TR1,1) such that
A89: g is being_homeomorphism
  and
A90: g.:(S /\ Sphere(hp,m)) = Sphere(0. TR1,1) by A19,A83,A85,BROUWER3:19;
A91:(g.:S) /\ (g.:Ball(hp,m)) = g.:V0 by A89,FUNCT_1:62;
A92: [#]Mfiu = FIU by PRE_TOPC:def 5;
  then reconsider U0=hV0 as non empty Subset of Mfiu
    by A51,A25,XBOOLE_1:19,A16,A87,A4,A86,FUNCT_1:def 7;
  reconsider U0 = hV0 as Subset of Mfiu by A51,A25,XBOOLE_1:19,A92;
A93:[#](MF|FIU1)=FIU by PRE_TOPC:def 5;
  then reconsider u0=U0 as Subset of MF|FIU1 by A92;
  hfiu"v0 = FIU /\ U0 by FUNCT_1:70;
  then hfiu"v0 = U0 by A51,A25,XBOOLE_1:19,XBOOLE_1:28;
  then
A94: U0 is open by A80,A40,TOPGRP_1:26;
  reconsider FV0=u0 as Subset of MF by XBOOLE_1:1,A92;
A95: F/\(Int U) c= F/\U by XBOOLE_1:26,TOPS_1:16;
  then Mfiu = M| (Fr M /\Int U) by A36,XBOOLE_1:1,PRE_TOPC:7;
  then FV0 is open by A34,A35,A94,TSEP_1:9,A93;
  then pF in Int FV0 by A88,TOPS_1:22;
  then reconsider FV0 as a_neighborhood of pF by CONNSP_2:def 1;
  reconsider MV0=FV0 as Subset of M by A51,XBOOLE_1:1;
  hV0 c= IU/\F by A51,A25,XBOOLE_1:19;
  then FV0 c= F/\U by A95;
  then
A96:MU | (h"V0) = M|MV0 by PRE_TOPC:7,A36,XBOOLE_1:1;
  (S/\Sphere(hp,m)) misses V0 by TOPREAL9:19,XBOOLE_1:76;
  then
A97:Sphere(0. TOP-REAL n,1) misses g.:V0 by A89,A90,FUNCT_1:66;
A98:((g.:S) /\ (g.:Sphere(hp,m))) = g.:(S/\Sphere(hp,m)) by A89,FUNCT_1:62;
A99: [#](TR| (S /\ cl_Ball(hp,m))) = S /\ cl_Ball(hp,m) by PRE_TOPC:def 5;
  then
A100: dom g = S /\ cl_Ball(hp,m) by A89,TOPS_2:def 5;
A101: Ball(hp,m) \/ Sphere(hp,m) = cl_Ball(hp,m) by TOPREAL9:18;
  then reconsider ZV0=V0 as Subset of TR | (S /\ cl_Ball(hp,m))
    by XBOOLE_1:7,26,A99;
A102: g.:cl_Ball(hp,m) = (g.:Ball(hp,m)) \/ (g.:Sphere(hp,m))
    by A101,RELAT_1:120;
A103: [#](Tdisk(0.TR1,1)) = cl_Ball(0.TR1,1) by PRE_TOPC:def 5;
  then rng g = cl_Ball(0.TR1,1) by A89,TOPS_2:def 5;
  then cl_Ball(0.TR1,1) = g.:(S /\ cl_Ball(hp,m)) by A100,RELAT_1:113
                        .= (g.:S) /\ (g.:cl_Ball(hp,m)) by A89,FUNCT_1:62
                        .= (g.:V0) \/ Sphere(0.TOP-REAL n,1)
                           by A102,A98,A91,A90,XBOOLE_1:23;
  then g.:V0 = Ball(0.TR1,1) by A81,A41,A97,XBOOLE_1:71;
  then
A104: Tdisk(0.TR1,1) | (g.:ZV0) = Tball(0.TR1,1) by PRE_TOPC:7,A103;
A105:TR | (S /\ cl_Ball(hp,m)) | ZV0 = TR|V0 by A99,PRE_TOPC:7;
  then reconsider GG=g|ZV0 as Function of TR | V0,Tball(0.TR1,1)
    by A86,JORDAN24:12,A104;
A106: GG is being_homeomorphism by A89,METRIZTS:2,A105,A104;
A107: M|MV0 = MF|FV0 by A5,PRE_TOPC:7;
  then reconsider HH=h|FV0 as Function of MF|FV0,TR|V0
    by A96,A53,JORDAN24:12;
  reconsider GH=GG*HH as Function of MF |FV0,Tball(0.TR1,1) by A86;
  take FV0;
  HH is being_homeomorphism by A9,A6,METRIZTS:2,A96,A53,A107;
  then GH is being_homeomorphism by A86,A106,TOPS_2:57;
  hence thesis by T_0TOPSP:def 1;
end;
