Article METRIC_2, MML version 4.99.1005

:: METRIC_2:prednot 1 => METRIC_2:pred 1
definition
  let a1 be non empty MetrStruct;
  let a2, a3 be Element of the carrier of a1;
  pred A2 tolerates A3 means
    dist(a2,a3) = 0;
end;

:: METRIC_2:dfs 1
definiens
  let a1 be non empty MetrStruct;
  let a2, a3 be Element of the carrier of a1;
To prove
     a2 tolerates a3
it is sufficient to prove
  thus dist(a2,a3) = 0;

:: METRIC_2:def 1
theorem
for b1 being non empty MetrStruct
for b2, b3 being Element of the carrier of b1 holds
   b2 tolerates b3
iff
   dist(b2,b3) = 0;

:: METRIC_2:prednot 2 => METRIC_2:pred 2
definition
  let a1 be non empty Reflexive MetrStruct;
  let a2, a3 be Element of the carrier of a1;
  redefine pred a2 tolerates a3;
  reflexivity;
::  for a1 being non empty Reflexive MetrStruct
::  for a2 being Element of the carrier of a1 holds
::     a2 tolerates a2;
end;

:: METRIC_2:prednot 3 => METRIC_2:pred 3
definition
  let a1 be non empty symmetric MetrStruct;
  let a2, a3 be Element of the carrier of a1;
  redefine pred a2 tolerates a3;
  symmetry;
::  for a1 being non empty symmetric MetrStruct
::  for a2, a3 being Element of the carrier of a1
::        st a2 tolerates a3
::     holds a3 tolerates a2;
end;

:: METRIC_2:funcnot 1 => METRIC_2:func 1
definition
  let a1 be non empty MetrStruct;
  let a2 be Element of the carrier of a1;
  func A2 -neighbour -> Element of bool the carrier of a1 equals
    {b1 where b1 is Element of the carrier of a1: a2 tolerates b1};
end;

:: METRIC_2:def 2
theorem
for b1 being non empty MetrStruct
for b2 being Element of the carrier of b1 holds
   b2 -neighbour = {b3 where b3 is Element of the carrier of b1: b2 tolerates b3};

:: METRIC_2:modenot 1 => METRIC_2:mode 1
definition
  let a1 be non empty MetrStruct;
  mode equivalence_class of A1 -> Element of bool the carrier of a1 means
    ex b1 being Element of the carrier of a1 st
       it = b1 -neighbour;
end;

:: METRIC_2:dfs 3
definiens
  let a1 be non empty MetrStruct;
  let a2 be Element of bool the carrier of a1;
To prove
     a2 is equivalence_class of a1
it is sufficient to prove
  thus ex b1 being Element of the carrier of a1 st
       a2 = b1 -neighbour;

:: METRIC_2:def 3
theorem
for b1 being non empty MetrStruct
for b2 being Element of bool the carrier of b1 holds
      b2 is equivalence_class of b1
   iff
      ex b3 being Element of the carrier of b1 st
         b2 = b3 -neighbour;

:: METRIC_2:th 6
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3, b4 being Element of the carrier of b1
      st b2 tolerates b3 & b3 tolerates b4
   holds b2 tolerates b4;

:: METRIC_2:th 7
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of the carrier of b1 holds
   b3 in b2 -neighbour
iff
   b3 tolerates b2;

:: METRIC_2:th 8
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3, b4 being Element of the carrier of b1
      st b3 in b2 -neighbour & b4 in b2 -neighbour
   holds b3 tolerates b4;

:: METRIC_2:th 9
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being Element of the carrier of b1 holds
   b2 in b2 -neighbour;

:: METRIC_2:th 10
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of the carrier of b1
      st b2 in b3 -neighbour
   holds b3 in b2 -neighbour;

:: METRIC_2:th 11
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3, b4 being Element of the carrier of b1
      st b2 in b3 -neighbour & b3 tolerates b4
   holds b2 in b4 -neighbour;

:: METRIC_2:th 12
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of the carrier of b1
      st b3 in b2 -neighbour
   holds b2 -neighbour = b3 -neighbour;

:: METRIC_2:th 13
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of the carrier of b1 holds
   b2 -neighbour = b3 -neighbour
iff
   b2 tolerates b3;

:: METRIC_2:th 14
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of the carrier of b1 holds
   b2 -neighbour meets b3 -neighbour
iff
   b2 tolerates b3;

:: METRIC_2:th 16
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being equivalence_class of b1 holds
   b2 is non empty set;

:: METRIC_2:condreg 1
registration
  let a1 be non empty Reflexive symmetric triangle MetrStruct;
  cluster -> non empty (equivalence_class of a1);
end;

:: METRIC_2:th 17
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3, b4 being Element of the carrier of b1
      st b3 in b2 -neighbour & b4 in b2 -neighbour
   holds dist(b3,b4) = 0;

:: METRIC_2:th 18
theorem
for b1 being non empty Reflexive discerning MetrStruct
for b2, b3 being Element of the carrier of b1 holds
   b2 tolerates b3
iff
   b2 = b3;

:: METRIC_2:th 19
theorem
for b1 being non empty Reflexive discerning symmetric triangle MetrStruct
for b2, b3 being Element of the carrier of b1 holds
   b3 in b2 -neighbour
iff
   b3 = b2;

:: METRIC_2:th 20
theorem
for b1 being non empty Reflexive discerning symmetric triangle MetrStruct
for b2 being Element of the carrier of b1 holds
   b2 -neighbour = {b2};

:: METRIC_2:th 21
theorem
for b1 being non empty Reflexive discerning symmetric triangle MetrStruct
for b2 being Element of bool the carrier of b1 holds
      b2 is equivalence_class of b1
   iff
      ex b3 being Element of the carrier of b1 st
         b2 = {b3};

:: METRIC_2:funcnot 2 => METRIC_2:func 2
definition
  let a1 be non empty MetrStruct;
  func A1 -neighbour -> set equals
    {b1 where b1 is Element of bool the carrier of a1: ex b2 being Element of the carrier of a1 st
       b2 -neighbour = b1};
end;

:: METRIC_2:def 4
theorem
for b1 being non empty MetrStruct holds
   b1 -neighbour = {b2 where b2 is Element of bool the carrier of b1: ex b3 being Element of the carrier of b1 st
      b3 -neighbour = b2};

:: METRIC_2:funcreg 1
registration
  let a1 be non empty MetrStruct;
  cluster a1 -neighbour -> non empty;
end;

:: METRIC_2:th 23
theorem
for b1 being set
for b2 being non empty MetrStruct holds
      b1 in b2 -neighbour
   iff
      ex b3 being Element of the carrier of b2 st
         b1 = b3 -neighbour;

:: METRIC_2:th 24
theorem
for b1 being non empty MetrStruct
for b2 being Element of the carrier of b1 holds
   b2 -neighbour in b1 -neighbour;

:: METRIC_2:th 26
theorem
for b1 being set
for b2 being non empty MetrStruct holds
      b1 in b2 -neighbour
   iff
      b1 is equivalence_class of b2;

:: METRIC_2:th 27
theorem
for b1 being non empty Reflexive discerning symmetric triangle MetrStruct
for b2 being Element of the carrier of b1 holds
   {b2} in b1 -neighbour;

:: METRIC_2:th 28
theorem
for b1 being set
for b2 being non empty Reflexive discerning symmetric triangle MetrStruct holds
      b1 in b2 -neighbour
   iff
      ex b3 being Element of the carrier of b2 st
         b1 = {b3};

:: METRIC_2:th 29
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of b1 -neighbour
for b4, b5, b6, b7 being Element of the carrier of b1
      st b4 in b2 & b6 in b3 & b5 in b2 & b7 in b3
   holds dist(b4,b6) = dist(b5,b7);

:: METRIC_2:prednot 4 => METRIC_2:pred 4
definition
  let a1 be non empty MetrStruct;
  let a2, a3 be Element of a1 -neighbour;
  let a4 be Element of REAL;
  pred A2,A3 is_dst A4 means
    for b1, b2 being Element of the carrier of a1
          st b1 in a2 & b2 in a3
       holds dist(b1,b2) = a4;
end;

:: METRIC_2:dfs 5
definiens
  let a1 be non empty MetrStruct;
  let a2, a3 be Element of a1 -neighbour;
  let a4 be Element of REAL;
To prove
     a2,a3 is_dst a4
it is sufficient to prove
  thus for b1, b2 being Element of the carrier of a1
          st b1 in a2 & b2 in a3
       holds dist(b1,b2) = a4;

:: METRIC_2:def 5
theorem
for b1 being non empty MetrStruct
for b2, b3 being Element of b1 -neighbour
for b4 being Element of REAL holds
      b2,b3 is_dst b4
   iff
      for b5, b6 being Element of the carrier of b1
            st b5 in b2 & b6 in b3
         holds dist(b5,b6) = b4;

:: METRIC_2:th 31
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of b1 -neighbour
for b4 being Element of REAL holds
      b2,b3 is_dst b4
   iff
      ex b5, b6 being Element of the carrier of b1 st
         b5 in b2 & b6 in b3 & dist(b5,b6) = b4;

:: METRIC_2:th 32
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of b1 -neighbour
for b4 being Element of REAL
      st b2,b3 is_dst b4
   holds b3,b2 is_dst b4;

:: METRIC_2:funcnot 3 => METRIC_2:func 3
definition
  let a1 be non empty MetrStruct;
  let a2, a3 be Element of a1 -neighbour;
  func ev_eq_1(A2,A3) -> Element of bool REAL equals
    {b1 where b1 is Element of REAL: a2,a3 is_dst b1};
end;

:: METRIC_2:def 6
theorem
for b1 being non empty MetrStruct
for b2, b3 being Element of b1 -neighbour holds
ev_eq_1(b2,b3) = {b4 where b4 is Element of REAL: b2,b3 is_dst b4};

:: METRIC_2:th 34
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of b1 -neighbour
for b4 being Element of REAL holds
      b4 in ev_eq_1(b2,b3)
   iff
      b2,b3 is_dst b4;

:: METRIC_2:funcnot 4 => METRIC_2:func 4
definition
  let a1 be non empty MetrStruct;
  let a2 be Element of REAL;
  func ev_eq_2(A2,A1) -> Element of bool [:a1 -neighbour,a1 -neighbour:] equals
    {b1 where b1 is Element of [:a1 -neighbour,a1 -neighbour:]: ex b2, b3 being Element of a1 -neighbour st
       b1 = [b2,b3] & b2,b3 is_dst a2};
end;

:: METRIC_2:def 7
theorem
for b1 being non empty MetrStruct
for b2 being Element of REAL holds
   ev_eq_2(b2,b1) = {b3 where b3 is Element of [:b1 -neighbour,b1 -neighbour:]: ex b4, b5 being Element of b1 -neighbour st
      b3 = [b4,b5] & b4,b5 is_dst b2};

:: METRIC_2:th 36
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being Element of REAL
for b3 being Element of [:b1 -neighbour,b1 -neighbour:] holds
      b3 in ev_eq_2(b2,b1)
   iff
      ex b4, b5 being Element of b1 -neighbour st
         b3 = [b4,b5] & b4,b5 is_dst b2;

:: METRIC_2:funcnot 5 => METRIC_2:func 5
definition
  let a1 be non empty MetrStruct;
  func real_in_rel A1 -> Element of bool REAL equals
    {b1 where b1 is Element of REAL: ex b2, b3 being Element of a1 -neighbour st
       b2,b3 is_dst b1};
end;

:: METRIC_2:def 8
theorem
for b1 being non empty MetrStruct holds
   real_in_rel b1 = {b2 where b2 is Element of REAL: ex b3, b4 being Element of b1 -neighbour st
      b3,b4 is_dst b2};

:: METRIC_2:th 38
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being Element of REAL holds
      b2 in real_in_rel b1
   iff
      ex b3, b4 being Element of b1 -neighbour st
         b3,b4 is_dst b2;

:: METRIC_2:funcnot 6 => METRIC_2:func 6
definition
  let a1 be non empty MetrStruct;
  func elem_in_rel_1 A1 -> Element of bool (a1 -neighbour) equals
    {b1 where b1 is Element of a1 -neighbour: ex b2 being Element of a1 -neighbour st
       ex b3 being Element of REAL st
          b1,b2 is_dst b3};
end;

:: METRIC_2:def 9
theorem
for b1 being non empty MetrStruct holds
   elem_in_rel_1 b1 = {b2 where b2 is Element of b1 -neighbour: ex b3 being Element of b1 -neighbour st
      ex b4 being Element of REAL st
         b2,b3 is_dst b4};

:: METRIC_2:th 40
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being Element of b1 -neighbour holds
      b2 in elem_in_rel_1 b1
   iff
      ex b3 being Element of b1 -neighbour st
         ex b4 being Element of REAL st
            b2,b3 is_dst b4;

:: METRIC_2:funcnot 7 => METRIC_2:func 7
definition
  let a1 be non empty MetrStruct;
  func elem_in_rel_2 A1 -> Element of bool (a1 -neighbour) equals
    {b1 where b1 is Element of a1 -neighbour: ex b2 being Element of a1 -neighbour st
       ex b3 being Element of REAL st
          b2,b1 is_dst b3};
end;

:: METRIC_2:def 10
theorem
for b1 being non empty MetrStruct holds
   elem_in_rel_2 b1 = {b2 where b2 is Element of b1 -neighbour: ex b3 being Element of b1 -neighbour st
      ex b4 being Element of REAL st
         b3,b2 is_dst b4};

:: METRIC_2:th 42
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being Element of b1 -neighbour holds
      b2 in elem_in_rel_2 b1
   iff
      ex b3 being Element of b1 -neighbour st
         ex b4 being Element of REAL st
            b3,b2 is_dst b4;

:: METRIC_2:funcnot 8 => METRIC_2:func 8
definition
  let a1 be non empty MetrStruct;
  func elem_in_rel A1 -> Element of bool [:a1 -neighbour,a1 -neighbour:] equals
    {b1 where b1 is Element of [:a1 -neighbour,a1 -neighbour:]: ex b2, b3 being Element of a1 -neighbour st
       ex b4 being Element of REAL st
          b1 = [b2,b3] & b2,b3 is_dst b4};
end;

:: METRIC_2:def 11
theorem
for b1 being non empty MetrStruct holds
   elem_in_rel b1 = {b2 where b2 is Element of [:b1 -neighbour,b1 -neighbour:]: ex b3, b4 being Element of b1 -neighbour st
      ex b5 being Element of REAL st
         b2 = [b3,b4] & b3,b4 is_dst b5};

:: METRIC_2:th 44
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being Element of [:b1 -neighbour,b1 -neighbour:] holds
      b2 in elem_in_rel b1
   iff
      ex b3, b4 being Element of b1 -neighbour st
         ex b5 being Element of REAL st
            b2 = [b3,b4] & b3,b4 is_dst b5;

:: METRIC_2:funcnot 9 => METRIC_2:func 9
definition
  let a1 be non empty MetrStruct;
  func set_in_rel A1 -> Element of bool [:a1 -neighbour,a1 -neighbour,REAL:] equals
    {b1 where b1 is Element of [:a1 -neighbour,a1 -neighbour,REAL:]: ex b2, b3 being Element of a1 -neighbour st
       ex b4 being Element of REAL st
          b1 = [b2,b3,b4] & b2,b3 is_dst b4};
end;

:: METRIC_2:def 12
theorem
for b1 being non empty MetrStruct holds
   set_in_rel b1 = {b2 where b2 is Element of [:b1 -neighbour,b1 -neighbour,REAL:]: ex b3, b4 being Element of b1 -neighbour st
      ex b5 being Element of REAL st
         b2 = [b3,b4,b5] & b3,b4 is_dst b5};

:: METRIC_2:th 46
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being Element of [:b1 -neighbour,b1 -neighbour,REAL:] holds
      b2 in set_in_rel b1
   iff
      ex b3, b4 being Element of b1 -neighbour st
         ex b5 being Element of REAL st
            b2 = [b3,b4,b5] & b3,b4 is_dst b5;

:: METRIC_2:th 47
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct holds
   elem_in_rel_1 b1 = elem_in_rel_2 b1;

:: METRIC_2:th 48
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct holds
   set_in_rel b1 c= [:elem_in_rel_1 b1,elem_in_rel_2 b1,real_in_rel b1:];

:: METRIC_2:th 50
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of b1 -neighbour
for b4, b5 being Element of REAL
      st b2,b3 is_dst b4 & b2,b3 is_dst b5
   holds b4 = b5;

:: METRIC_2:th 52
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of b1 -neighbour holds
ex b4 being Element of REAL st
   b2,b3 is_dst b4;

:: METRIC_2:funcnot 10 => METRIC_2:func 10
definition
  let a1 be non empty Reflexive symmetric triangle MetrStruct;
  func nbourdist A1 -> Function-like quasi_total Relation of [:a1 -neighbour,a1 -neighbour:],REAL means
    for b1, b2 being Element of a1 -neighbour
    for b3, b4 being Element of the carrier of a1
          st b3 in b1 & b4 in b2
       holds it .(b1,b2) = dist(b3,b4);
end;

:: METRIC_2:def 13
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2 being Function-like quasi_total Relation of [:b1 -neighbour,b1 -neighbour:],REAL holds
      b2 = nbourdist b1
   iff
      for b3, b4 being Element of b1 -neighbour
      for b5, b6 being Element of the carrier of b1
            st b5 in b3 & b6 in b4
         holds b2 .(b3,b4) = dist(b5,b6);

:: METRIC_2:th 54
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of b1 -neighbour holds
   (nbourdist b1) .(b2,b3) = 0
iff
   b2 = b3;

:: METRIC_2:th 55
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3 being Element of b1 -neighbour holds
(nbourdist b1) .(b2,b3) = (nbourdist b1) .(b3,b2);

:: METRIC_2:th 56
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct
for b2, b3, b4 being Element of b1 -neighbour holds
(nbourdist b1) .(b2,b4) <= ((nbourdist b1) .(b2,b3)) + ((nbourdist b1) .(b3,b4));

:: METRIC_2:funcnot 11 => METRIC_2:func 11
definition
  let a1 be non empty Reflexive symmetric triangle MetrStruct;
  func Eq_classMetricSpace A1 -> Reflexive discerning symmetric triangle MetrStruct equals
    MetrStruct(#a1 -neighbour,nbourdist a1#);
end;

:: METRIC_2:def 14
theorem
for b1 being non empty Reflexive symmetric triangle MetrStruct holds
   Eq_classMetricSpace b1 = MetrStruct(#b1 -neighbour,nbourdist b1#);

:: METRIC_2:funcreg 2
registration
  let a1 be non empty Reflexive symmetric triangle MetrStruct;
  cluster Eq_classMetricSpace a1 -> non empty strict Reflexive discerning symmetric triangle;
end;