reserve X for set,
  Y for non empty set;
reserve n for Nat;
reserve r for Real,
  M for non empty MetrSpace;
reserve n for Nat,
  p,q,q1,q2 for Point of TOP-REAL 2,
  r,s1,s2,t1,t2 for Real,
  x,y for Point of Euclid 2;

theorem Th29:
  p in LSeg(q1,q2) implies dist(q1,p) + dist(p,q2) = dist(q1,q2)
proof
  assume p in LSeg(q1,q2);
  then consider r such that
A1: p = (1-r)*q1+r*q2 & 0<=r & r<=1;
  dist(q1,p) = r*dist(q1,q2) & dist(q2,p) = (1-r)*dist(q1,q2) by A1,Th27,Th28;
  hence thesis;
end;
