reserve n for Nat,
        p,q,u,w for Point of TOP-REAL n,
        S for Subset of TOP-REAL n,
        A, B for convex Subset of TOP-REAL n,
        r for Real;

theorem Th6:
  for n be Element of NAT
  for A be convex Subset of TOP-REAL n st A is compact non boundary
  ex h be Function of(TOP-REAL n) |A,Tdisk(0.TOP-REAL n,1) st
    h is being_homeomorphism & h.:Fr A = Sphere(0.TOP-REAL n,1)
proof
  let n be Element of NAT;
  set TRn=TOP-REAL n;
  let A be convex Subset of TRn such that
A1: A is compact non boundary;
  Int A<>{} by A1,TOPS_1:48;
  then consider p be object such that
A2: p in Int A by XBOOLE_0:def 1;
  set TRnA=TRn|A;
  reconsider p as Point of TRn by A2;
A3: Int A c=A by TOPS_1:16;
A4: A is non empty by A2;
  per cases;
    suppose
A5:     n=0;
      set T=Tdisk(0.TRn,1);
A6:   {0.TRn} = the carrier of TRn by A5,EUCLID:22,77;
      then
A7:     A={0.TRn} by A4,ZFMISC_1:33;
      then reconsider I=id(TRn|A) as Function of TRn|A,T by A6,ZFMISC_1:33;
      take I;
A8:   Fr A=A\Int A by A5,TOPS_1:43;
A9:   Sphere(0.TRn,1)={}
        proof
          assume Sphere(0.TRn,1)<>{};
          then Sphere(0.TRn,1)=A by A6,A7,ZFMISC_1:33;
          then |.0.TRn.|=1 by A6,A7,TOPREAL9:12;
          hence contradiction by TOPRNS_1:23;
        end;
      Int A=A by A2,A3,A7,ZFMISC_1:33;
      then
A10:    Fr A={} by A8,XBOOLE_1:37;
      T=TRn|A by A6,A7,ZFMISC_1:33;
      hence thesis by A10,A9;
    end;
    suppose
A11:    n>0;
      set T=transl(-p,TRn);
      set TA=T.:A;
A12:    TA=-p+A by RLTOPSP1:33;
      then
A13:    0.TRn=0*n & TA is convex by CONVEX1:7,EUCLID:70;
      reconsider TT=T|A as Function of TRnA,TRn|TA by JORDAN24:12;
A14:    TT.:Int A=T.:Int A by RELAT_1:129,TOPS_1:16;
      0.TRn=-p+p by RLVECT_1:5;
      then
A15:    0.TRn in {-p+q where q is Element of TRn:q in Int A} by A2;
      Int TA=-p+Int A by A12,RLTOPSP1:37;
      then 0.TRn in Int TA by A15,RUSUB_4:def 8;
      then consider h be Function of TRn|TA,Tdisk(0.TRn,1) such that
A16:    h is being_homeomorphism and
A17:    h.:Fr TA=Sphere(0.TRn,1) by A1,A11,A12,A13,Lm4;
      reconsider hTT=h*TT as Function of TRn|A,Tdisk(0.TRn,1) by A4;
      take hTT;
A18:  Int TA = -p+Int A by A12,RLTOPSP1:37
            .= T.:Int A by RLTOPSP1:33;
A19:  TT is being_homeomorphism by JORDAN24:14;
      then dom TT=[#]TRnA by TOPS_2:def 5;
      then
A20:    dom TT=A by PRE_TOPC:def 5;
      thus hTT is being_homeomorphism by A4,A16,A19,TOPS_2:57;
      rng TT=[#](TRn|TA) by A19,TOPS_2:def 5;
      then A21: rng TT=TA by PRE_TOPC:def 5;
      Fr A=A\Int A by A1,TOPS_1:43;
      then
A22:    TT.:Fr A=(TT.:A)\TT.:(Int A) by A19,FUNCT_1:64;
      Fr TA = TA\Int TA by A1,A12,TOPS_1:43
           .= TT.:Fr A by A18,A22,A20,A21,A14,RELAT_1:113;
      hence hTT.:Fr A= Sphere(0.TRn,1) by A17,RELAT_1:126;
    end;
end;
