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
  not x in A & A <> {} & A is closed implies dist(x,A) > 0
proof
  assume that
A1: not x in A and
A2: A <> {} and
A3: for x st for r st r > 0 ex z st |.z.| < r & x + z in A holds x in A and
A4: dist(x,A) <= 0;
A5: dist(x,A) = 0 by A2,A4,Th113;
  now
    deffunc f(Element of COMPLEX n) = In(|.x - $1.|,REAL);
    deffunc g(Element of COMPLEX n) = |.x - $1.|;
    defpred P[set] means $1 in A;
A6: f(z) = g(z);
A7:  {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(A6);
    reconsider X = {f(z) : P[z]} as Subset of REAL from DOMAIN_1:sch 8;
    let r such that
A8: r > 0;
    consider z such that
A9: z in A by A2,SUBSET_1:4;
A10: X is bounded_below
    proof
      take 0;
      let r be ExtReal;
      assume r in X;
      then ex z st r = |.x - z .| & z in A by A7;
      hence thesis by Th94;
    end;
A11: |.x - z.| in X by A9,A7;
    dist(x,A) = lower_bound X & (0 qua Nat)+r = r by Def17,A7;
    then consider r9 be Real such that
A12: r9 in X and
A13: r9< r by A5,A8,A11,A10,Def2;
    consider z1 such that
A14: r9 = |.x - z1.| & z1 in A by A12,A7;
    take z = z1 - x;
    thus |.z.| < r & x + z in A by A13,A14,Th79,Th103;
  end;
  hence contradiction by A1,A3;
end;
