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 Th71:
  |[-1,0]|,|[1,0]| realize-max-dist-in P implies
  P c= closed_inside_of_rectangle(-1,1,-3,3)
proof
  assume that
A1: a in P and
A2: b in P and
A3: for x, y being Point of TOP-REAL 2 st x in P & y in P holds
  dist(a,b) >= dist(x,y);
  let p be object;
  assume
A4: p in P;
  then reconsider p as Point of TOP-REAL 2;
A5: dist(a,p) = sqrt((rl-p`1)^2 + (0-p`2)^2) by Lm16,Lm18,TOPREAL6:92
    .= sqrt((rl-p`1)^2 + p`2^2);
A6: now
    assume 9 < p`2^2;
    then 0+9 < (rl-p`1)^2+p`2^2 by XREAL_1:8;
    then 3 < sqrt((rl-p`1)^2+p`2^2) by Lm65,SQUARE_1:27;
    then 2 < sqrt((rl-p`1)^2+p`2^2) by XXREAL_0:2;
    hence contradiction by A1,A3,A4,A5,Lm66;
  end;
A7: now
    assume
A8: rl > p`1;
    then LSeg(p,b) meets Vertical_Line(rl) by Lm17,Th8;
    then consider x being object such that
A9: x in LSeg(p,b) and
A10: x in Vertical_Line(rl) by XBOOLE_0:3;
    reconsider x as Point of T2 by A9;
A11: x`1 = rl by A10,JORDAN6:31;
A12: dist(p,b) = dist(p,x)+dist(x,b) by A9,JORDAN1K:29;
A13: dist(x,b) = sqrt((x`1-b`1)^2 + (x`2-b`2)^2) by TOPREAL6:92
      .= sqrt((-2)^2 + (x`2-0)^2) by A11,Lm17,EUCLID:52
      .= sqrt(4 + x`2^2);
    now
      assume dist(x,b) < dist(a,b);
      then 4 + x`2^2 < 4 + 0 by A13,Lm66,SQUARE_1:20,26;
      hence contradiction by XREAL_1:6;
    end;
    then dist(p,b) + 0 > dist(a,b) + 0 by A8,A11,A12,JORDAN1K:22,XREAL_1:8;
    hence contradiction by A2,A3,A4;
  end;
A14: now
    assume
A15: p`1 > rp;
    then LSeg(p,a) meets Vertical_Line(rp) by Lm16,Th8;
    then consider x being object such that
A16: x in LSeg(p,a) and
A17: x in Vertical_Line(rp) by XBOOLE_0:3;
    reconsider x as Point of T2 by A16;
A18: x`1 = rp by A17,JORDAN6:31;
A19: dist(p,a) = dist(p,x)+dist(x,a) by A16,JORDAN1K:29;
A20: dist(x,a) = sqrt((x`1-a`1)^2 + (x`2-a`2)^2) by TOPREAL6:92
      .= sqrt(4 + x`2^2) by A18,Lm16,Lm18;
    now
      assume dist(x,a) < dist(a,b);
      then 4 + x`2^2 < 4 + 0 by A20,Lm66,SQUARE_1:20,26;
      hence contradiction by XREAL_1:6;
    end;
    then dist(p,a) + 0 > dist(a,b) + 0 by A15,A18,A19,JORDAN1K:22,XREAL_1:8;
    hence contradiction by A1,A3,A4;
  end;
A21: now
    assume rd > p`2;
    then p`2^2 > rd^2 by SQUARE_1:44;
    hence contradiction by A6;
  end;
  rg >= p`2 by A6,Lm64,SQUARE_1:16;
  hence thesis by A7,A14,A21;
end;
