reserve a, b, c, d, r, s for Real,
  n for Element of NAT,
  p, p1, p2 for Point of TOP-REAL 2,
  x, y for Point of TOP-REAL n,
  C for Simple_closed_curve,
  A, B, P for Subset of TOP-REAL 2,
  U, V for Subset of (TOP-REAL 2)|C`,
  D for compact with_the_max_arc Subset of TOP-REAL 2;

theorem Th66:
  for o, p being Point of TOP-REAL 2,
  r being positive Real st p in Ball(o,r) holds
  RotateCircle(o,r,p) is continuous
proof
  let o, p be Point of TOP-REAL 2;
  let r be positive Real such that
A1: p in Ball(o,r);
  set D = Tdisk(o,r);
  set cB = cl_Ball(o,r);
  set Bp = Sphere(o,r);
  set OK = [:{p},Bp:];
  set D1 = T2|{p};
  set D2 = T2|Bp;
  set S1 = Tcircle(o,r);
A2: D2 = S1 by TOPREALB:def 6;
A3: Ball(o,r) misses Sphere(o,r) by TOPREAL9:19;
A4: p in {p} by TARSKI:def 1;
A5: Bp c= cB by TOPREAL9:17;
A6: Ball(o,r) c= cB by TOPREAL9:16;
A7: the carrier of D = cB by BROUWER:3;
A8: the carrier of D1 = {p} by PRE_TOPC:8;
A9: the carrier of D2 = Bp by PRE_TOPC:8;
  set TD = [:T2,T2:] | OK;
  set gg = RotateCircle(o,r,p);
  set xo = diffX2_1(o);
  set yo = diffX2_2(o);
  set dx = diffX1_X2_1;
  set dy = diffX1_X2_2;
  set fx2 = Proj2_1;
  set fy2 = Proj2_2;
  reconsider rr = r^2 as Element of REAL by XREAL_0:def 1;
  set f1 = (the carrier of [:T2,T2:]) --> rr;
  reconsider f1 as continuous RealMap of [:T2,T2:] by Lm6;
  set Zf1 = f1 | OK;
  set Zfx2 = fx2 | OK;
  set Zfy2 = fy2 | OK;
  set Zdx = dx | OK;
  set Zdy = dy | OK;
  set Zxo = xo | OK;
  set Zyo = yo | OK;
  set xx = Zxo(#)Zdx;
  set yy = Zyo(#)Zdy;
  set m = Zdx(#)Zdx + Zdy(#)Zdy;
A10: the carrier of TD = OK by PRE_TOPC:8;
  A11: for
 y being Point of D1, z being Point of D2 holds Zdx. [y,z] = dx. [y,z]
  proof
    let y be Point of D1;
    let z be Point of D2;
    [y,z] in OK by A8,A9,ZFMISC_1:def 2;
    hence thesis by FUNCT_1:49;
  end;
  A12: for
 y being Point of D1, z being Point of D2 holds Zdy. [y,z] = dy. [y,z]
  proof
    let y be Point of D1;
    let z be Point of D2;
    [y,z] in OK by A8,A9,ZFMISC_1:def 2;
    hence thesis by FUNCT_1:49;
  end;
  A13: for
 y being Point of D1, z being Point of D2 holds Zfx2. [y,z] = fx2. [y,z]
  proof
    let y be Point of D1;
    let z be Point of D2;
    [y,z] in OK by A8,A9,ZFMISC_1:def 2;
    hence thesis by FUNCT_1:49;
  end;
  A14: for
 y being Point of D1, z being Point of D2 holds Zfy2. [y,z] = fy2. [y,z]
  proof
    let y be Point of D1;
    let z be Point of D2;
    [y,z] in OK by A8,A9,ZFMISC_1:def 2;
    hence thesis by FUNCT_1:49;
  end;
  A15: for
 y being Point of D1, z being Point of D2 holds Zf1. [y,z] = f1. [y,z]
  proof
    let y be Point of D1;
    let z be Point of D2;
    [y,z] in OK by A8,A9,ZFMISC_1:def 2;
    hence thesis by FUNCT_1:49;
  end;
  A16: for
 y being Point of D1, z being Point of D2 holds Zxo. [y,z] = xo. [y,z]
  proof
    let y be Point of D1;
    let z be Point of D2;
    [y,z] in OK by A8,A9,ZFMISC_1:def 2;
    hence thesis by FUNCT_1:49;
  end;
  A17: for
 y being Point of D1, z being Point of D2 holds Zyo. [y,z] = yo. [y,z]
  proof
    let y be Point of D1;
    let z be Point of D2;
    [y,z] in OK by A8,A9,ZFMISC_1:def 2;
    hence thesis by FUNCT_1:49;
  end;
  now
    let b be Real;
    assume b in rng m;
    then consider a being object such that
A18: a in dom m and
A19: m.a = b by FUNCT_1:def 3;
    consider y, z being object such that
A20: y in {p} and
A21: z in Bp and
A22: a = [y,z] by A18,ZFMISC_1:def 2;
A23: y = p by A20,TARSKI:def 1;
    reconsider y, z as Point of T2 by A20,A21;
A24: y <> z by A1,A3,A21,A23,XBOOLE_0:3;
A25: dx. [y,z] = [y,z]`1`1 - [y,z]`2`1 by Def3;
A26: dy. [y,z] = [y,z]`1`2 - [y,z]`2`2 by Def4;
    set r1 = y`1-z`1;
    set r2 = y`2-z`2;
A27: Zdx. [y,z] = dx. [y,z] by A8,A9,A11,A20,A21;
A28: Zdy. [y,z] = dy. [y,z] by A8,A9,A12,A20,A21;
  dom m c= the carrier of TD by RELAT_1:def 18;
  then
 a in the carrier of TD by A18;
  then
A29: m. [y,z] = (Zdx(#)Zdx). [y,z] + (Zdy(#)Zdy). [y,z] by A22,VALUED_1:1
      .= Zdx. [y,z] * Zdx. [y,z] + (Zdy(#)Zdy). [y,z] by VALUED_1:5
      .= r1^2+r2^2 by A25,A26,A27,A28,VALUED_1:5;
    now
      assume
A30:  r1^2+r2^2 = 0;
      then
A31:  r1 = 0 by COMPLEX1:1;
      r2 = 0 by A30,COMPLEX1:1;
      hence contradiction by A24,A31,TOPREAL3:6;
    end;
    hence 0 < b by A19,A22,A29;
  end;
  then reconsider m as positive-yielding continuous RealMap of TD
  by PARTFUN3:def 1;
  set p1 = (xx+yy)(#)(xx+yy);
  set p2 = Zxo(#)Zxo + Zyo(#)Zyo - Zf1;
A32: dom p2 = the carrier of TD by FUNCT_2:def 1;
  now
    let b be Real;
    assume b in rng p2;
    then consider a being object such that
A33: a in dom p2 and
A34: p2.a = b by FUNCT_1:def 3;
    consider y, z being object such that
A35: y in {p} and
A36: z in Bp and
A37: a = [y,z] by A33,ZFMISC_1:def 2;
    reconsider y, z as Point of T2 by A35,A36;
    set r3 = z`1-o`1, r4 = z`2-o`2;
A38: Zf1. [y,z] = f1. [y,z] by A8,A9,A15,A35,A36;
A39: Zxo. [y,z] = xo. [y,z] by A8,A9,A16,A35,A36;
A40: Zyo. [y,z] = yo. [y,z] by A8,A9,A17,A35,A36;
A41: xo. [y,z] = [y,z]`2`1 - o`1 by Def1;
A42: yo. [y,z] = [y,z]`2`2 - o`2 by Def2;
  dom p2 c= the carrier of TD by RELAT_1:def 18;
  then
A43: a in the carrier of TD by A33;
A44: p2. [y,z] = (Zxo(#)Zxo + Zyo(#)Zyo). [y,z] - Zf1. [y,z]
    by A33,A37,VALUED_1:13
      .= (Zxo(#)Zxo + Zyo(#)Zyo). [y,z] - r^2 by A38,FUNCOP_1:7
      .= (Zxo(#)Zxo). [y,z] + (Zyo(#)Zyo). [y,z] - r^2 by A37,A43,VALUED_1:1
      .= Zxo. [y,z] * Zxo. [y,z] + (Zyo(#)Zyo). [y,z] - r^2 by VALUED_1:5
      .= r3^2+r4^2-r^2 by A39,A40,A41,A42,VALUED_1:5;
    |. z-o .| <= r by A5,A36,TOPREAL9:8;
    then
A45: |. z-o .|^2 <= r^2 by SQUARE_1:15;
    |. z-o .|^2 = ((z-o)`1)^2+((z-o)`2)^2 by JGRAPH_1:29
      .= r3^2+((z-o)`2)^2 by TOPREAL3:3
      .= r3^2+r4^2 by TOPREAL3:3;
    then r3^2+r4^2-r^2 <= r^2-r^2 by A45,XREAL_1:9;
    hence 0 >= b by A34,A37,A44;
  end;
  then reconsider p2 as nonpositive-yielding continuous RealMap of TD
  by PARTFUN3:def 3;
  set pp = p1 - m(#)p2;
  set k = (-(xx+yy) + sqrt(pp)) / m;
  set x3 = Zfx2 + k(#)Zdx;
  set y3 = Zfy2 + k(#)Zdy;
  reconsider X3 = x3, Y3 = y3 as Function of TD,R^1 by TOPMETR:17;
  set F = <:X3,Y3:>;
  set R = R2Homeomorphism;
A46: for x being Point of D2 holds gg.x = (R*F). [p,x]
  proof
    let x be Point of D2;
    consider y being Point of T2 such that
A47: x = y and
A48: gg.x = HC(y,p,o,r) by A1,A2,Def8;
A49: x <> p by A1,A3,A9,XBOOLE_0:3;
A50: [p,y] in OK by A4,A9,A47,ZFMISC_1:def 2;
    set r1 = p`1-y`1, r2 = p`2-y`2, r3 = y`1-o`1, r4 = y`2-o`2;
    set l = (-(r3*r1+r4*r2)+sqrt((r3*r1+r4*r2)^2-(r1^2+r2^2)*(r3^2+r4^2-r^2)))
    / (r1^2+r2^2);
A51: fx2. [p,y] = [p,y]`2`1 by Def5;
A52: fy2. [p,y] = [p,y]`2`2 by Def6;
A53: dx. [p,y] = [p,y]`1`1 - [p,y]`2`1 by Def3;
A54: dy. [p,y] = [p,y]`1`2 - [p,y]`2`2 by Def4;
A55: xo. [p,y] = [p,y]`2`1 - o`1 by Def1;
A56: yo. [p,y] = [p,y]`2`2 - o`2 by Def2;
A57: dom X3 = the carrier of TD by FUNCT_2:def 1;
A58: dom Y3 = the carrier of TD by FUNCT_2:def 1;
A59: dom pp = the carrier of TD by FUNCT_2:def 1;
A60: p is Point of D1 by A8,TARSKI:def 1;
    then
A61: Zdx. [p,y] = dx. [p,y] by A11,A47;
A62: Zdy. [p,y] = dy. [p,y] by A12,A47,A60;
A63: Zf1. [p,y] = f1. [p,y] by A15,A47,A60;
A64: Zxo. [p,y] = xo. [p,y] by A16,A47,A60;
A65: Zyo. [p,y] = yo. [p,y] by A17,A47,A60;
A66: m. [p,y] = (Zdx(#)Zdx). [p,y] + (Zdy(#)Zdy). [p,y] by A10,A50,VALUED_1:1
      .= Zdx. [p,y] * Zdx. [p,y] + (Zdy(#)Zdy). [p,y] by VALUED_1:5
      .= r1^2+r2^2 by A53,A54,A61,A62,VALUED_1:5;
A67: xx. [p,y] = Zxo. [p,y] * Zdx. [p,y] by VALUED_1:5;
A68: yy. [p,y] = Zyo. [p,y] * Zdy. [p,y] by VALUED_1:5;
A69: (xx+yy). [p,y] = xx. [p,y] + yy. [p,y] by A10,A50,VALUED_1:1;
    then
A70: p1. [p,y] = (r3*r1+r4*r2)^2
    by A53,A54,A55,A56,A61,A62,A64,A65,A67,A68,VALUED_1:5;
A71: p2. [p,y] = (Zxo(#)Zxo + Zyo(#)Zyo). [p,y] - Zf1. [p,y]
    by A10,A32,A50,VALUED_1:13
      .= (Zxo(#)Zxo + Zyo(#)Zyo). [p,y] - r^2 by A63,FUNCOP_1:7
      .= (Zxo(#)Zxo). [p,y] + (Zyo(#)Zyo). [p,y] - r^2 by A10,A50,VALUED_1:1
      .= Zxo. [p,y] * Zxo. [p,y] + (Zyo(#)Zyo). [p,y] - r^2 by VALUED_1:5
      .= r3^2+r4^2-r^2 by A55,A56,A64,A65,VALUED_1:5;
    dom sqrt pp = the carrier of TD by FUNCT_2:def 1;
    then
A72: sqrt(pp). [p,y] = sqrt(pp. [p,y]) by A10,A50,PARTFUN3:def 5
      .= sqrt(p1. [p,y] - (m(#)p2). [p,y]) by A10,A50,A59,VALUED_1:13
      .= sqrt((r3*r1+r4*r2)^2-(r1^2+r2^2)*(r3^2+r4^2-r^2))
    by A66,A70,A71,VALUED_1:5;
    dom k = the carrier of TD by FUNCT_2:def 1;
    then
A73: k. [p,y] = (-(xx+yy) + sqrt(pp)). [p,y] * (m. [p,y])" by A10,A50,
RFUNCT_1:def 1
      .= (-(xx+yy) + sqrt(pp)). [p,y] / m. [p,y] by XCMPLX_0:def 9
      .= ((-(xx+yy)). [p,y] + sqrt(pp). [p,y]) / (r1^2+r2^2)
    by A10,A50,A66,VALUED_1:1
      .= l by A53,A54,A55,A56,A61,A62,A64,A65,A67,A68,A69,A72,VALUED_1:8;
A74: X3. [p,y] = Zfx2. [p,y] + (k(#)Zdx). [p,y] by A10,A50,VALUED_1:1
      .= y`1 + (k(#)Zdx). [p,y] by A13,A47,A51,A60
      .= y`1+l*r1 by A53,A61,A73,VALUED_1:5;
A75: Y3. [p,y] = Zfy2. [p,y] + (k(#)Zdy). [p,y] by A10,A50,VALUED_1:1
      .= y`2 + (k(#)Zdy). [p,y] by A14,A47,A52,A60
      .= y`2+l*r2 by A54,A62,A73,VALUED_1:5;
    y in the carrier of D2 by A47;
    hence gg.x = |[ y`1+l*r1, y`2+l*r2 ]| by A1,A5,A6,A7,A9,A47,A48,A49,
BROUWER:8
      .= R. [X3. [p,y], Y3. [p,y]] by A74,A75,TOPREALA:def 2
      .= R.(F. [p,y]) by A10,A50,A57,A58,FUNCT_3:49
      .= (R*F). [p,x] by A10,A47,A50,FUNCT_2:15;
  end;
A76: X3 is continuous by JORDAN5A:27;
  Y3 is continuous by JORDAN5A:27;
  then reconsider F as continuous Function of TD,[:R^1,R^1:] by A76,YELLOW12:41
;
  for pp being Point of D2, V being Subset of S1
  st gg.pp in V & V is open holds
  ex W being Subset of D2 st pp in W & W is open & gg.:W c= V
  proof
    let pp be Point of D2, V be Subset of S1 such that
A77: gg.pp in V and
A78: V is open;
    reconsider p1 = pp, fp = p as Point of T2 by PRE_TOPC:25;
A79: [p,pp] in OK by A4,A9,ZFMISC_1:def 2;
    consider V1 being Subset of T2 such that
A80: V1 is open and
A81: V1 /\ [#]S1 = V by A78,TOPS_2:24;
A82: gg.pp = (R*F). [p,pp] by A46;
    R" is being_homeomorphism by TOPREALA:34,TOPS_2:56;
    then
A83: R" .:V1 is open by A80,TOPGRP_1:25;
A84: dom F = the carrier of [:T2,T2:] | OK by FUNCT_2:def 1;
A85: dom R = the carrier of [:R^1,R^1:] by FUNCT_2:def 1;
    then
A86: rng F c= dom R;
    then
A87: dom (R*F) = dom F by RELAT_1:27;
A88: rng R = [#]T2 by TOPREALA:34,TOPS_2:def 5;
A89: R"*(R*F) = R"*R*F by RELAT_1:36
      .= id dom R*F by A88,TOPREALA:34,TOPS_2:52;
    dom id dom R = dom R;
    then
A90: dom (id dom R*F) = dom F by A86,RELAT_1:27;
    for x being object st x in dom F holds (id dom R*F).x = F.x
    proof
      let x be object such that
A91:  x in dom F;
A92:  F.x in rng F by A91,FUNCT_1:def 3;
      thus (id dom R*F).x = id dom R.(F.x) by A91,FUNCT_1:13
        .= F.x by A85,A92,FUNCT_1:18;
    end;
    then
A93: id dom R*F = F by A90,FUNCT_1:2;
    (R*F). [fp,p1] in V1 by A77,A81,A82,XBOOLE_0:def 4;
    then R" .((R*F). [fp,p1]) in R" .:V1 by FUNCT_2:35;
    then (R"*(R*F)). [fp,p1] in R" .:V1 by A10,A79,A84,A87,FUNCT_1:13;
    then consider W being Subset of TD such that
A94: [fp,p1] in W and
A95: W is open and
A96: F.:W c= R" .:V1 by A10,A79,A83,A89,A93,JGRAPH_2:10;
    consider WW being Subset of [:T2,T2:] such that
A97: WW is open and
A98: WW /\ [#]TD = W by A95,TOPS_2:24;
    consider SF being Subset-Family of [:T2,T2:] such that
A99: WW = union SF and
A100: for e being set st e in SF
    ex X1 being Subset of T2, Y1 being Subset of T2 st
    e = [:X1,Y1:] & X1 is open & Y1 is open by A97,BORSUK_1:5;
    [fp,p1] in WW by A94,A98,XBOOLE_0:def 4;
    then consider Z being set such that
A101: [fp,p1] in Z and
A102: Z in SF by A99,TARSKI:def 4;
    consider X1, Y1 being Subset of T2 such that
A103: Z = [:X1,Y1:] and X1 is open and
A104: Y1 is open by A100,A102;
    set ZZ = Z /\ [#]TD;
    reconsider XX = Y1 /\ [#]D2 as open Subset of D2 by A104,TOPS_2:24;
    take XX;
    pp in Y1 by A101,A103,ZFMISC_1:87;
    hence pp in XX by XBOOLE_0:def 4;
    thus XX is open;
    let b be object;
    assume b in gg.:XX;
    then consider a being Point of D2 such that
A105: a in XX and
A106: b = gg.a by A2,FUNCT_2:65;
    reconsider a1 = a, fa = fp as Point of T2 by PRE_TOPC:25;
A107: a in Y1 by A105,XBOOLE_0:def 4;
A108: [p,a] in OK by A4,A9,ZFMISC_1:def 2;
    fa in X1 by A101,A103,ZFMISC_1:87;
    then [fa,a] in Z by A103,A107,ZFMISC_1:def 2;
    then [fa,a] in ZZ by A10,A108,XBOOLE_0:def 4;
    then
A109: F. [fa,a1] in F.:ZZ by FUNCT_2:35;
A110: R qua Function" = R" by TOPREALA:34,TOPS_2:def 4;
A111: dom(R") = [#]T2 by A88,TOPREALA:34,TOPS_2:49;
A112: gg.a1 in the carrier of S1 by A2,FUNCT_2:5;
    Z c= WW by A99,A102,ZFMISC_1:74;
    then ZZ c= WW /\ [#]TD by XBOOLE_1:27;
    then F.:ZZ c= F.:W by A98,RELAT_1:123;
    then F. [fa,a1] in F.:W by A109;
    then R.(F. [fa,a1]) in R.:(R" .:V1) by A96,FUNCT_2:35;
    then (R*F). [fa,a1] in R.:(R" .:V1) by A10,A108,FUNCT_2:15;
    then (R*F). [fa,a1] in V1 by A110,A111,PARTFUN3:1,TOPREALA:34;
    then gg.a in V1 by A46;
    hence thesis by A81,A106,A112,XBOOLE_0:def 4;
  end;
  hence thesis by A2,JGRAPH_2:10;
end;
