reserve p,p1,p2,p3,q,q1,q2 for Point of TOP-REAL 2,
  i for Nat,
  lambda for Real;

theorem Th50:
  for a,b,c,d being Real st a < b & c < d
  holds rectangle(a,b,c,d) is being_simple_closed_curve
proof
  let a,b,c,d be Real;
  assume that
A1: a < b and
A2: c < d;
  set P=rectangle(a,b,c,d);
  set p1=|[a,c]|,p2=|[b,d]|;
  reconsider f1=<*|[a,c]|,|[a,d]|,|[b,d]|*> as FinSequence of TOP-REAL 2;
  reconsider f2=<*|[a,c]|,|[b,c]|,|[b,d]|*> as FinSequence of TOP-REAL 2;
  set P1=L~f1,P2=L~f2;
A3: a < b & c < d &
  P={p: p`1=a & c <=p`2 & p`2<=d or p`2=d & a<=p`1 & p`1<=b or
  p`1=b & c <=p`2 & p`2<=d or p`2=c & a<=p`1 & p`1<=b} &
  p1=|[a,c]| & p2=|[b,d]| & f1=<*|[a,c]|,|[a,d]|,|[b,d]|*>
  & f2=<*|[a,c]|,|[b,c]|,|[b,d]|*> & P1=L~f1 & P2=L~f2
  implies P1 is_an_arc_of p1,p2 & P2 is_an_arc_of p1,p2
  & P1 is non empty & P2 is non empty &
  P = P1 \/ P2 & P1 /\ P2 = {p1,p2} by Th49;
  (|[a,c]|)`1=a by EUCLID:52;
  then
A4: p1<>p2 by A1,EUCLID:52;
  p1 in P1 /\ P2 by A1,A2,A3,Lm15,TARSKI:def 2;
  then p1 in P1 by XBOOLE_0:def 4;
  then
A5: p1 in P by A1,A2,A3,Lm15,XBOOLE_0:def 3;
  p2 in P1 /\ P2 by A1,A2,A3,Lm15,TARSKI:def 2;
  then p2 in P1 by XBOOLE_0:def 4;
  then p2 in P by A1,A2,A3,Lm15,XBOOLE_0:def 3;
  hence thesis by A1,A2,A3,A4,A5,Lm15,TOPREAL2:6;
end;
