reserve n,k,k1,m,m1,n1,n2,l for Nat;
reserve r,r1,r2,p,p1,g,g1,g2,s,s1,s2,t for Real;
reserve seq,seq1,seq2 for Real_Sequence;
reserve Nseq for increasing sequence of NAT;
reserve x for set;
reserve X,Y for Subset of REAL;
reserve k,n for Nat,
  r,r9,r1,r2 for Real,
  c,c9,c1,c2,c3 for Element of COMPLEX;
reserve z,z1,z2 for FinSequence of COMPLEX;
reserve x,z,z1,z2,z3 for Element of COMPLEX n,
  A,B for Subset of COMPLEX n;

theorem Th115:
  x in A implies dist(x,A) = 0
proof
  defpred P[set] means $1 in A;
  deffunc f(Element of COMPLEX n) = In(|.x - $1.|,REAL);
  deffunc g(Element of COMPLEX n) = |.x - $1.|;
  reconsider X = {f(z): P[z]} as Subset of REAL from DOMAIN_1:sch 8;
A1: f(z) = g(z);
A2:  {f(z1) where z1 is Element of COMPLEX n: P[z1]}

   = {g(z2)  where z2 is Element of COMPLEX n: P[z2]}
    from FRAENKEL:sch 5(A1);
  assume
A3: x in A;
  then
A4: |.x - x.| in X by A2;
A5: now
    reconsider r = |.x - x.| as Real;
    let r1 be Real such that
A6: 0<r1;
    take r;
    thus r in X by A3,A2;
    thus r<(0 qua Nat)+r1 by A6,Th101;
  end;
A7: now
    let r be Real;
    assume r in X;
    then ex z st r = |.x - z .| & z in A by A2;
    hence 0<=r by Th94;
  end;
A8: X is bounded_below
  proof
    take 0;
    let x be ExtReal;
    thus thesis by A7;
  end;
  thus dist(x,A) = lower_bound X by Def17,A2
    .= 0 by A4,A7,A8,A5,Def2;
end;
