reserve p1, p2 for Point of TOP-REAL 2,
  C for Simple_closed_curve,
  P for Subset of TOP-REAL 2;

theorem
  ex f being Homeomorphism of TOP-REAL 2 st |[-1,0]|,|[1,0]|
  realize-max-dist-in f.:C
proof
  reconsider z=0 as Element of COMPLEX by XCMPLX_0:def 2;
  consider x,y being Point of TOP-REAL 2 such that
A1: x<>y and
A2: x in C & y in C by TOPREAL2:4;
A3: dist(x,y) > 0 by A1,JORDAN1K:22;
  consider p1,p2 such that
A4: p1,p2 realize-max-dist-in C by Th1;
  reconsider g=AffineMap(1,-p1`1,1,-p1`2) as being_homeomorphism Function of
  TOP-REAL 2,TOP-REAL 2 by JGRAPH_7:50;
  set D=g.:C,q1=g.p1,q2=g.p2;
  set arg=Arg(q2`1+q2`2 * <i>);
  reconsider qq=q2`1+(q2`2)*<i> as Element of COMPLEX by XCMPLX_0:def 2;
  set h=Rotate(-arg);
A5: h=Rotate(2*PI-arg) by Th6;
  q1,q2 realize-max-dist-in D by A4,Th3;
  then
A6: (Rotate(2*PI-arg)).q1,(Rotate(2*PI-arg)).q2 realize-max-dist-in (Rotate
  (2*PI-arg)).:D by Th4;
  reconsider h0=h as onto isometric Function of TopSpaceMetr Euclid 2,
  TopSpaceMetr Euclid 2 by Lm1,Th2;
A7: Rotate(z,-arg) = 0 by COMPLEX2:52;
  h0 is being_homeomorphism;
  then reconsider
  h as being_homeomorphism Function of TOP-REAL 2,TOP-REAL 2 by Lm1,Lm4;
  set F=h.:D,s1=h.q1,s2=h.q2;
  q1 = |[1 * (p1`1)+-p1`1,1 * (p1`2)+-p1`2]| by JGRAPH_2:def 2
    .= |[0,0]|;
  then
A8: s1 = |[Re Rotate(|[0,0]|`1+(|[0,0]|`2)*<i>,-arg), Im Rotate(|[0,0]|`1+(
  |[0,0]|`2)*<i>,-arg)]| by Def3
    .= |[Re Rotate(0+(|[0,0]|`2) * <i>,-arg), Im Rotate(|[0,0]|`1+(|[0,0]|`2
  )*<i>,-arg)]| by EUCLID:52
    .= |[Re Rotate(0+0 * <i>,-arg), Im Rotate(|[0,0]|`1+(|[0,0]|`2)*<i>,-arg
  )]| by EUCLID:52
    .= |[Re Rotate(0+0 * <i>,-arg), Im Rotate(0+(|[0,0]|`2)*<i>,-arg)]| by
EUCLID:52
    .= |[0,0]| by A7,COMPLEX1:4,EUCLID:52;
  Rotate(qq,-arg) = |.(q2`1+(q2`2)*<i>).|+0 * <i> by COMPLEX2:55;
  then
A9: s2 = |[Re (|.(q2`1+(q2`2)*<i>).|+0 *<i>), Im (|.(q2`1+(q2`2)*<i>) .|+0
  *<i>)]| by Def3
    .= |[|.(q2`1+(q2`2)*<i>).|,Im (|.(q2`1+(q2`2)*<i>).|+0 * <i>)]| by
COMPLEX1:12
    .= |[|.(q2`1+(q2`2)*<i>).|,0]| by COMPLEX1:12;
  then
A10: s2`2 = 0 by EUCLID:52;
  dist(p1,p2)>=dist(x,y) by A4,A2;
  then
A11: p1<>p2 by A3,TOPREAL6:93;
A12: now
    dom g = the carrier of TOP-REAL 2 by FUNCT_2:def 1;
    then
A13: q1<>q2 by A11,FUNCT_1:def 4;
    assume
A14: s2`1=0;
    dom h = the carrier of TOP-REAL 2 by FUNCT_2:def 1;
    then s1<>s2 by A13,FUNCT_1:def 4;
    hence contradiction by A8,A9,A14,EUCLID:52;
  end;
  s2`1 = |.(q2`1+(q2`2)*<i>).| by A9,EUCLID:52;
  then s2`1>=0 by COMPLEX1:46;
  then reconsider j=AffineMap(2/(s2`1),-1,2/(s2`1),0) as being_homeomorphism
  Function of TOP-REAL 2,TOP-REAL 2 by A12,JGRAPH_7:50;
  set E=j.:F,r1=j.s1,r2=j.s2;
A15: r2=|[2/(s2`1)*s2`1+-1,2/(s2`1)*s2`2+0]| by JGRAPH_2:def 2
    .=|[2+-1,2/(s2`1)*s2`2+0]| by A12,XCMPLX_1:87
    .=b by A10;
  set f=j*(h*g);
  h*g is being_homeomorphism by TOPS_2:57;
  then f is being_homeomorphism by TOPS_2:57;
  then reconsider f as Homeomorphism of TOP-REAL 2 by TOPGRP_1:def 4;
  take f;
  (h*g).:C=F by RELAT_1:126;
  then
A16: f.:C=E by RELAT_1:126;
  r1=|[2/(s2`1)*s1`1+-1,2/(s2`1)*s1`2+0]| by JGRAPH_2:def 2
    .= |[2/(s2`1)*0+-1,2/(s2`1)*s1`2+0]| by A8,EUCLID:52
    .= a by A8,EUCLID:52;
  hence thesis by A5,A15,A16,A6,Th3;
end;
