
theorem Th6:
  for M being MetrStruct st (for a, b, c being Element of M holds
  (dist(a,b) = 0 iff a=b) &
  dist(a,b) = dist(b,a) &
  dist(a,c) <= dist(a,b) + dist(b,c)) holds M is MetrSpace
proof
  let M be MetrStruct;
  assume
A1: for a,b,c being Element of M holds (dist(a,b) = 0 iff a=b) &
   dist(a,b) = dist(b,a) & dist(a,c)<=dist(a,b)+dist(b,c);
A2: the distance of M is symmetric
  proof
    let a, b be Element of M;
    (the distance of M).(a,b) = dist(a,b) .= dist(b,a) by A1
      .= (the distance of M).(b,a);
    hence thesis;
  end;
A3: the distance of M is triangle
  proof
    let a, b, c be Element of M;
A4: (the distance of M).(b,c) = dist(b,c);
    (the distance of M).(a,c) = dist(a,c) &
    (the distance of M).(a,b) = dist(a,b);
    hence thesis by A1,A4;
  end;
A5: the distance of M is discerning
  proof
    let a, b be Element of M;
    assume (the distance of M).(a,b) = 0;
    then dist(a,b) = 0;
    hence thesis by A1;
  end;
  the distance of M is Reflexive
  proof
    let a be Element of M;
    (the distance of M).(a,a) = dist(a,a) .= 0 by A1;
    hence thesis;
  end;
  hence thesis by A5,A2,A3,Def6,Def7,Def8,Def9;
end;
