begin
definition
let D be
set ;
let f be
Function of
[:D,D:],
REAL;
pred f is_metric_of D means :
Def6:
for
a,
b,
c being
Element of
D holds
( (
f . (
a,
b)
= 0 implies
a = b ) & (
a = b implies
f . (
a,
b)
= 0 ) &
f . (
a,
b)
= f . (
b,
a) &
f . (
a,
c)
<= (f . (a,b)) + (f . (b,c)) );
end;
::
deftheorem Def6 defines
is_metric_of PCOMPS_1:def 6 :
for D being set
for f being Function of [:D,D:],REAL holds
( f is_metric_of D iff for a, b, c being Element of D holds
( ( f . (a,b) = 0 implies a = b ) & ( a = b implies f . (a,b) = 0 ) & f . (a,b) = f . (b,a) & f . (a,c) <= (f . (a,b)) + (f . (b,c)) ) );