reserve a,a1,a2,a3,b,b1,b2,b3,r,s,t,u for Real;
reserve n for Nat;
reserve x0,x,x1,x2,x3,y0,y,y1,y2,y3 for Element of REAL n;
reserve L,L0,L1,L2 for Element of line_of_REAL n;

theorem Th57:
  ex x0 st x0 in L & |.x-x0.|=dist(x,L)
proof
  consider x1,x2 being Element of REAL n such that
A1: L = Line(x1,x2) by Th51;
  {|.x-x9.| where x9 is Element of REAL n : x9 in Line(x1,x2)} = dist_v(x,
  L) by A1;
  then reconsider
  R = {|.x-x9.| where x9 is Element of REAL n : x9 in Line(x1,x2)}
  as Subset of REAL;
  consider x0 being Element of REAL n such that
A2: x0 in Line(x1,x2) & |.x-x0.|=lower_bound R and
  x1-x2,x-x0 are_orthogonal by EUCLID_4:40;
  take x0;
  thus thesis by A1,A2;
end;
