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 Th74:
  |[-1,0]|,|[1,0]| realize-max-dist-in P implies
  P /\ rectangle(-1,1,-3,3) = {|[-1,0]|,|[1,0]|}
proof
  assume
A1: a,b realize-max-dist-in P;
  then
A2: a in P;
A3: b in P by A1;
  thus P /\ dR c= {a,b}
  proof
    let x be object;
    assume
A4: x in P /\ dR;
    then
A5: x in P by XBOOLE_0:def 4;
    x in dR by A4,XBOOLE_0:def 4;
    then
A6: x in LSeg(ld,lg) \/ LSeg(lg,pg) or
    x in LSeg(pg,pd) \/ LSeg(pd,ld) by Lm36,XBOOLE_0:def 3;
    reconsider x as Point of T2 by A4;
    per cases by A6,XBOOLE_0:def 3;
    suppose
A7:   x in LSeg(ld,lg);
      ld in LSeg(ld,lg) by RLTOPSP1:68;
      then
A8:   x`1 = rl by A7,Lm26,Lm45;
      per cases;
      suppose x`2 = 0;
        then x = a by A8,Lm16,Lm18,TOPREAL3:6;
        hence thesis by TARSKI:def 2;
      end;
      suppose x`2 <> 0;
        then
A9:     x`2^2 > 0 by SQUARE_1:12;
A10:    dist(b,x) = sqrt ((rp-rl)^2 + (0-x`2)^2) by A8,Lm17,Lm19,TOPREAL6:92
          .= sqrt (4 + x`2^2);
        0+4 < x`2^2+4 by A9,XREAL_1:6;
        then 2 < sqrt(x`2^2+4) by SQUARE_1:20,27;
        hence thesis by A1,A5,A10,Lm66;
      end;
    end;
    suppose x in LSeg(lg,pg);
      then LSeg(lg,pg) meets P by A5,XBOOLE_0:3;
      hence thesis by A1,Th72;
    end;
    suppose
A11:  x in LSeg(pg,pd);
      pd in LSeg(pd,pg) by RLTOPSP1:68;
      then
A12:  x`1 = rp by A11,Lm30,Lm46;
      per cases;
      suppose x`2 = 0;
        then x = b by A12,Lm17,Lm19,TOPREAL3:6;
        hence thesis by TARSKI:def 2;
      end;
      suppose x`2 <> 0;
        then
A13:    x`2^2 > 0 by SQUARE_1:12;
A14:    dist(x,a) = sqrt ((x`1-a`1)^2 + (x`2-a`2)^2) by TOPREAL6:92
          .= sqrt (4 + x`2^2) by A12,Lm16,Lm18;
        0+4 < x`2^2+4 by A13,XREAL_1:6;
        then 2 < sqrt(x`2^2+4) by SQUARE_1:20,27;
        hence thesis by A1,A5,A14,Lm66;
      end;
    end;
    suppose x in LSeg(pd,ld);
      then LSeg(pd,ld) meets P by A5,XBOOLE_0:3;
      hence thesis by A1,Th73;
    end;
  end;
  let x be object;
  assume x in {a,b};
  then
A15: x = a or x = b by TARSKI:def 2;
A16: a in dR by Lm16,Lm18,Lm61;
  b in dR by Lm17,Lm19,Lm61;
  hence thesis by A2,A3,A15,A16,XBOOLE_0:def 4;
end;
