reserve GX,GY for non empty TopSpace,
  x,y for Point of GX,
  r,s for Real;
reserve Q,P1,P2 for Subset of TOP-REAL 2;
reserve P for Subset of TOP-REAL 2;
reserve w1,w2 for Point of TOP-REAL 2;
reserve pa,pb for Point of TOP-REAL 2,
  s1,t1,s2,t2,s,t,s3,t3,s4,t4,s5,t5,s6,t6, l,sa,sd,ta,td for Real;
reserve s1a,t1a,s2a,t2a,s3a,t3a,sb,tb,sc,tc for Real;

theorem Th8:
  for s1,t1,s2,t2,P st P = {|[ s,t ]|:s1<s & s<s2 & t1<t & t<t2}
  holds P is convex
proof
  let s1,t1,s2,t2,P;
  assume
A1: P = { |[ s,t ]|:s1<s & s<s2 & t1<t & t<t2};
  let w1,w2 such that
A2: w1 in P and
A3: w2 in P;
  let x be object such that
A4: x in LSeg(w1,w2);
  consider s3,t3 such that
A5: |[ s3,t3 ]|=w1 and
A6: s1<s3 and
A7: s3<s2 and
A8: t1<t3 and
A9: t3<t2 by A1,A2;
A10: w1`1=s3 by A5,EUCLID:52;
A11: w1`2=t3 by A5,EUCLID:52;
  consider s4,t4 such that
A12: |[ s4,t4 ]|=w2 and
A13: s1<s4 and
A14: s4<s2 and
A15: t1<t4 and
A16: t4<t2 by A1,A3;
A17: w2`1=s4 by A12,EUCLID:52;
A18: w2`2=t4 by A12,EUCLID:52;
  consider l such that
A19: x = (1-l)*w1 + l*w2 and
A20: 0 <= l and
A21: l <= 1 by A4;
  set w = (1-l)*w1 + l*w2;
A22: w = |[((1-l)*w1)`1+(l*w2)`1,((1-l)*w1)`2+ (l*w2)`2]| by EUCLID:55;
A23: (1-l)*w1=|[ (1-l)*w1`1 ,(1-l)*w1`2 ]| by EUCLID:57;
A24: l*w2=|[ l*w2`1 ,l*w2`2 ]| by EUCLID:57;
A25: ((1-l)*w1)`1= (1-l)*w1`1 by A23,EUCLID:52;
A26: ((1-l)*w1)`2= (1-l)*w1`2 by A23,EUCLID:52;
A27: (l*w2)`1=l*w2`1 by A24,EUCLID:52;
A28: (l*w2)`2=l*w2`2 by A24,EUCLID:52;
A29: w`1=(1-l)* w1`1+ l* w2`1 by A22,A25,A27,EUCLID:52;
A30: w`2=(1-l)* w1`2+ l* w2`2 by A22,A26,A28,EUCLID:52;
A31: s1< w`1 by A6,A10,A13,A17,A20,A21,A29,XREAL_1:175;
A32: w`1<s2 by A7,A10,A14,A17,A20,A21,A29,XREAL_1:176;
A33: t1< w`2 by A8,A11,A15,A18,A20,A21,A30,XREAL_1:175;
A34: w`2<t2 by A9,A11,A16,A18,A20,A21,A30,XREAL_1:176;
  w = |[w`1, w`2]| by EUCLID:53;
  hence thesis by A1,A19,A31,A32,A33,A34;
end;
