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

theorem Th45:
  for a,b,c,d being Real st a<=b & c <=d
  holds E-most rectangle(a,b,c,d) = LSeg(|[b,c]|,|[b,d]|)
proof
  let a,b,c,d be Real;
  set K = rectangle(a,b,c,d);
  assume that
A1: a<=b and
A2: c <=d;
  K= LSeg(|[ a,c ]|, |[ a,d ]|) \/ LSeg(|[ a,d ]|, |[ b,d ]|)
  \/ (LSeg(|[ a,c ]|, |[ b,c ]|) \/ LSeg(|[ b,c ]|, |[ b,d ]|))
  by SPPOL_2:def 3;
  then
A3: LSeg(|[ a,c ]|, |[ b,c ]|) \/ LSeg(|[ b,c ]|, |[ b,d ]|) c= K
  by XBOOLE_1:7;
A4: LSeg(|[b,c]|,|[b,d]|) c=
  LSeg(|[ a,c ]|, |[ b,c ]|) \/ LSeg(|[ b,c ]|, |[ b,d ]|) by XBOOLE_1:7;
A5: SE-corner K= |[E-bound K, S-bound K]| by PSCOMP_1:def 14;
A6: NE-corner K = |[b,d]| by A1,A2,Th41;
A7: E-bound K=b by A1,A2,Th38;
A8: S-bound K= c by A1,A2,Th39;
  thus E-most K = LSeg(SE-corner K, NE-corner K)/\K by PSCOMP_1:def 17
    .= LSeg(|[b,c]|,|[b,d]|) by A3,A4,A5,A6,A7,A8,XBOOLE_1:1,28;
end;
