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
  dist(A,B) = dist(B,A)
proof
  defpred R[set,set] means $1 in B & $2 in A;
  deffunc f(Element of COMPLEX n,Element of COMPLEX n) = In(|.$1 - $2.|,REAL);
  deffunc f1(Element of COMPLEX n,Element of COMPLEX n) = |.$1 - $2.|;
  reconsider Y = {f(z,z1) where z,z1 is Element of COMPLEX n: R[z,z1]}
    as Subset of REAL from DOMAIN_1:sch 9;
  defpred P[set,set] means $1 in A & $2 in B;
  reconsider X = {f(z1,z) where z1,z is Element of COMPLEX n: P[z1,z]}
    as Subset of REAL from DOMAIN_1:sch 9;
A1: now
    let r be Element of REAL;
A2: now
      given z,z1 such that
A3:   r =f(z,z1) & z in B & z1 in A;
      take z1,z;
      thus r =f(z1,z) & z1 in A & z in B by A3,Th103;
    end;
    now
      given z1,z such that
A4:   r =f(z1,z) & z1 in A & z in B;
      take z,z1;
      thus r =f(z,z1) & z in B & z1 in A by A4,Th103;
    end;
    hence r in X iff r in Y by A2;
  end;
A5: f(z,z1) = f1(z,z1);
A6: {f(z,z1) where z,z1 is Element of COMPLEX n: R[z,z1]}
   = {f1(z,z1) where z,z1 is Element of COMPLEX n: R[z,z1]}
      from FRAENKEL:sch 7(A5);
   {f(z1,z) where z1,z is Element of COMPLEX n: P[z1,z]}
   = {f1(z1,z) where z1,z is Element of COMPLEX n: P[z1,z]}
      from FRAENKEL:sch 7(A5);
  then dist(A,B) = lower_bound X & dist(B,A) = lower_bound Y by Def19,A6;
  hence thesis by A1,SUBSET_1:3;
end;
