reserve s1,s2,q1 for Real_Sequence;
reserve n for Element of NAT;
reserve a,b for Real;

theorem Th12:
 for A being non empty closed_interval Subset of REAL,
     D being Division of A, r be Real st delta(D) < r
  holds
  for i be Nat, s,t be Real
    st i in dom D & s in divset(D,i) & t in divset(D,i)
   holds |.s-t.| < r
proof
   let A being non empty closed_interval Subset of REAL,
       D being Division of A, r be Real;
   assume A1: delta(D) < r;
   let i be Nat, s,t be Real;
   assume A2: i in dom D & s in divset(D,i) & t in divset(D,i); then
   vol (divset (D,i)) <= delta D by Th11; then
A3:upper_bound divset(D,i) - lower_bound divset(D,i) < r by A1,XXREAL_0:2;
   s <= upper_bound divset(D,i) & t <= upper_bound divset(D,i)
 & lower_bound divset(D,i) <= s & lower_bound divset(D,i) <= t
       by A2,SEQ_4:def 1,def 2; then
A4: t-s <= upper_bound divset(D,i) - lower_bound divset (D,i)
  & s-t <= upper_bound divset(D,i) - lower_bound divset(D,i) by XREAL_1:13;
   per cases;
   suppose s < t;
    then s-t < t- t by XREAL_1:14; then
    |.s-t.| = - (s-t) by ABSVALUE:def 1;
    hence |.s-t.| < r by A3,A4,XXREAL_0:2;
  end;
  suppose not s < t;
    then t - t <= s- t by XREAL_1:9; then
    |.s-t.| = s - t by ABSVALUE:def 1;
    hence |.s-t.| < r by A3,A4,XXREAL_0:2;
  end;
end;
