reserve a, b for Real,
  r for Real,
  rr for Real,
  i, j, n for Nat,
  M for non empty MetrSpace,
  p, q, s for Point of TOP-REAL 2,
  e for Point of Euclid 2,
  w for Point of Euclid n,
  z for Point of M,
  A, B for Subset of TOP-REAL n,
  P for Subset of TOP-REAL 2,
  D for non empty Subset of TOP-REAL 2;
reserve a, b for Real;
reserve a, b for Real;
reserve r for Real;
reserve r1,r2,s1,s2 for Real;

theorem
  for x1, x2, y1, y2 being Real, a, b being Point of TOP-REAL 2
  st x1 <= a`1 & a`1 <= x2 & y1 <= a`2 & a`2 <= y2 & x1 <= b`1 & b`1 <= x2 & y1
  <= b`2 & b`2 <= y2 holds dist(a,b) <= (x2-x1) + (y2-y1)
proof
  let x1, x2, y1, y2 be Real, a, b be Point of TOP-REAL 2 such that
A1: x1 <= a`1 and
A2: a`1 <= x2 and
A3: y1 <= a`2 and
A4: a`2 <= y2 and
A5: x1 <= b`1 and
A6: b`1 <= x2 and
A7: y1 <= b`2 and
A8: b`2 <= y2;
A9: |.a`2-b`2.| <= y2 - y1 by A3,A4,A7,A8,JGRAPH_1:27;
A10: (a`1-b`1)^2 >= 0 by XREAL_1:63;
A11: (a`2-b`2)^2 >= 0 by XREAL_1:63;
  dist(a,b) = sqrt ((a`1-b`1)^2 + (a`2-b`2)^2) by Th85;
  then dist(a,b) <= sqrt(a`1-b`1)^2 + sqrt(a`2-b`2)^2
    by A10,A11,SQUARE_1:59;
  then dist(a,b) <= |.a`1-b`1.| + sqrt(a`2-b`2)^2 by COMPLEX1:72;
  then
A12: dist(a,b) <= |.a`1-b`1.| + |.a`2-b`2.| by COMPLEX1:72;
  |.a`1-b`1.| <= x2 - x1 by A1,A2,A5,A6,JGRAPH_1:27;
  then |.a`1-b`1.| + |.a`2-b`2.| <= (x2 - x1) + (y2 - y1) by A9,XREAL_1:7;
  hence thesis by A12,XXREAL_0:2;
end;
