Article METRIC_3, MML version 4.99.1005

:: METRIC_3:sch 1
scheme METRIC_3:sch 1
{F1 -> non empty set,
  F2 -> non empty set,
  F3 -> non empty set,
  F4 -> Element of F3()}:
ex b1 being Function-like quasi_total Relation of [:[:F1(),F2():],[:F1(),F2():]:],F3() st
   for b2, b3 being Element of F1()
   for b4, b5 being Element of F2()
   for b6, b7 being Element of [:F1(),F2():]
         st b6 = [b2,b4] & b7 = [b3,b5]
      holds b1 .(b6,b7) = F4(b2, b3, b4, b5)


:: METRIC_3:funcnot 1 => METRIC_3:func 1
definition
  let a1, a2 be non empty Reflexive discerning symmetric triangle MetrStruct;
  func dist_cart2(A1,A2) -> Function-like quasi_total Relation of [:[:the carrier of a1,the carrier of a2:],[:the carrier of a1,the carrier of a2:]:],REAL means
    for b1, b2 being Element of the carrier of a1
    for b3, b4 being Element of the carrier of a2
    for b5, b6 being Element of [:the carrier of a1,the carrier of a2:]
          st b5 = [b1,b3] & b6 = [b2,b4]
       holds it .(b5,b6) = (dist(b1,b2)) + dist(b3,b4);
end;

:: METRIC_3:def 1
theorem
for b1, b2 being non empty Reflexive discerning symmetric triangle MetrStruct
for b3 being Function-like quasi_total Relation of [:[:the carrier of b1,the carrier of b2:],[:the carrier of b1,the carrier of b2:]:],REAL holds
      b3 = dist_cart2(b1,b2)
   iff
      for b4, b5 being Element of the carrier of b1
      for b6, b7 being Element of the carrier of b2
      for b8, b9 being Element of [:the carrier of b1,the carrier of b2:]
            st b8 = [b4,b6] & b9 = [b5,b7]
         holds b3 .(b8,b9) = (dist(b4,b5)) + dist(b6,b7);

:: METRIC_3:th 5
theorem
for b1, b2 being non empty Reflexive discerning symmetric triangle MetrStruct
for b3, b4 being Element of [:the carrier of b1,the carrier of b2:] holds
   (dist_cart2(b1,b2)) .(b3,b4) = 0
iff
   b3 = b4;

:: METRIC_3:th 6
theorem
for b1, b2 being non empty Reflexive discerning symmetric triangle MetrStruct
for b3, b4 being Element of [:the carrier of b1,the carrier of b2:] holds
(dist_cart2(b1,b2)) .(b3,b4) = (dist_cart2(b1,b2)) .(b4,b3);

:: METRIC_3:th 7
theorem
for b1, b2 being non empty Reflexive discerning symmetric triangle MetrStruct
for b3, b4, b5 being Element of [:the carrier of b1,the carrier of b2:] holds
(dist_cart2(b1,b2)) .(b3,b5) <= ((dist_cart2(b1,b2)) .(b3,b4)) + ((dist_cart2(b1,b2)) .(b4,b5));

:: METRIC_3:funcnot 2 => METRIC_3:func 2
definition
  let a1, a2 be non empty Reflexive discerning symmetric triangle MetrStruct;
  let a3, a4 be Element of [:the carrier of a1,the carrier of a2:];
  func dist2(A3,A4) -> Element of REAL equals
    (dist_cart2(a1,a2)) .(a3,a4);
end;

:: METRIC_3:def 2
theorem
for b1, b2 being non empty Reflexive discerning symmetric triangle MetrStruct
for b3, b4 being Element of [:the carrier of b1,the carrier of b2:] holds
dist2(b3,b4) = (dist_cart2(b1,b2)) .(b3,b4);

:: METRIC_3:funcreg 1
registration
  let a1 be non empty set;
  let a2 be Function-like quasi_total Relation of [:a1,a1:],REAL;
  cluster MetrStruct(#a1,a2#) -> non empty strict;
end;

:: METRIC_3:funcnot 3 => METRIC_3:func 3
definition
  let a1, a2 be non empty Reflexive discerning symmetric triangle MetrStruct;
  func MetrSpaceCart2(A1,A2) -> non empty strict Reflexive discerning symmetric triangle MetrStruct equals
    MetrStruct(#[:the carrier of a1,the carrier of a2:],dist_cart2(a1,a2)#);
end;

:: METRIC_3:def 3
theorem
for b1, b2 being non empty Reflexive discerning symmetric triangle MetrStruct holds
MetrSpaceCart2(b1,b2) = MetrStruct(#[:the carrier of b1,the carrier of b2:],dist_cart2(b1,b2)#);

:: METRIC_3:sch 2
scheme METRIC_3:sch 2
{F1 -> non empty set,
  F2 -> non empty set,
  F3 -> non empty set,
  F4 -> non empty set,
  F5 -> Element of F4()}:
ex b1 being Function-like quasi_total Relation of [:[:F1(),F2(),F3():],[:F1(),F2(),F3():]:],F4() st
   for b2, b3 being Element of F1()
   for b4, b5 being Element of F2()
   for b6, b7 being Element of F3()
   for b8, b9 being Element of [:F1(),F2(),F3():]
         st b8 = [b2,b4,b6] & b9 = [b3,b5,b7]
      holds b1 .(b8,b9) = F5(b2, b3, b4, b5, b6, b7)


:: METRIC_3:funcnot 4 => METRIC_3:func 4
definition
  let a1, a2, a3 be non empty Reflexive discerning symmetric triangle MetrStruct;
  func dist_cart3(A1,A2,A3) -> Function-like quasi_total Relation of [:[:the carrier of a1,the carrier of a2,the carrier of a3:],[:the carrier of a1,the carrier of a2,the carrier of a3:]:],REAL means
    for b1, b2 being Element of the carrier of a1
    for b3, b4 being Element of the carrier of a2
    for b5, b6 being Element of the carrier of a3
    for b7, b8 being Element of [:the carrier of a1,the carrier of a2,the carrier of a3:]
          st b7 = [b1,b3,b5] & b8 = [b2,b4,b6]
       holds it .(b7,b8) = ((dist(b1,b2)) + dist(b3,b4)) + dist(b5,b6);
end;

:: METRIC_3:def 4
theorem
for b1, b2, b3 being non empty Reflexive discerning symmetric triangle MetrStruct
for b4 being Function-like quasi_total Relation of [:[:the carrier of b1,the carrier of b2,the carrier of b3:],[:the carrier of b1,the carrier of b2,the carrier of b3:]:],REAL holds
      b4 = dist_cart3(b1,b2,b3)
   iff
      for b5, b6 being Element of the carrier of b1
      for b7, b8 being Element of the carrier of b2
      for b9, b10 being Element of the carrier of b3
      for b11, b12 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3:]
            st b11 = [b5,b7,b9] & b12 = [b6,b8,b10]
         holds b4 .(b11,b12) = ((dist(b5,b6)) + dist(b7,b8)) + dist(b9,b10);

:: METRIC_3:th 12
theorem
for b1, b2, b3 being non empty Reflexive discerning symmetric triangle MetrStruct
for b4, b5 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3:] holds
   (dist_cart3(b1,b2,b3)) .(b4,b5) = 0
iff
   b4 = b5;

:: METRIC_3:th 13
theorem
for b1, b2, b3 being non empty Reflexive discerning symmetric triangle MetrStruct
for b4, b5 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3:] holds
(dist_cart3(b1,b2,b3)) .(b4,b5) = (dist_cart3(b1,b2,b3)) .(b5,b4);

:: METRIC_3:th 14
theorem
for b1, b2, b3 being non empty Reflexive discerning symmetric triangle MetrStruct
for b4, b5, b6 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3:] holds
(dist_cart3(b1,b2,b3)) .(b4,b6) <= ((dist_cart3(b1,b2,b3)) .(b4,b5)) + ((dist_cart3(b1,b2,b3)) .(b5,b6));

:: METRIC_3:funcnot 5 => METRIC_3:func 5
definition
  let a1, a2, a3 be non empty Reflexive discerning symmetric triangle MetrStruct;
  func MetrSpaceCart3(A1,A2,A3) -> non empty strict Reflexive discerning symmetric triangle MetrStruct equals
    MetrStruct(#[:the carrier of a1,the carrier of a2,the carrier of a3:],dist_cart3(a1,a2,a3)#);
end;

:: METRIC_3:def 5
theorem
for b1, b2, b3 being non empty Reflexive discerning symmetric triangle MetrStruct holds
MetrSpaceCart3(b1,b2,b3) = MetrStruct(#[:the carrier of b1,the carrier of b2,the carrier of b3:],dist_cart3(b1,b2,b3)#);

:: METRIC_3:funcnot 6 => METRIC_3:func 6
definition
  let a1, a2, a3 be non empty Reflexive discerning symmetric triangle MetrStruct;
  let a4, a5 be Element of [:the carrier of a1,the carrier of a2,the carrier of a3:];
  func dist3(A4,A5) -> Element of REAL equals
    (dist_cart3(a1,a2,a3)) .(a4,a5);
end;

:: METRIC_3:def 6
theorem
for b1, b2, b3 being non empty Reflexive discerning symmetric triangle MetrStruct
for b4, b5 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3:] holds
dist3(b4,b5) = (dist_cart3(b1,b2,b3)) .(b4,b5);

:: METRIC_3:sch 3
scheme METRIC_3:sch 3
{F1 -> non empty set,
  F2 -> non empty set,
  F3 -> non empty set,
  F4 -> non empty set,
  F5 -> non empty set,
  F6 -> Element of F5()}:
ex b1 being Function-like quasi_total Relation of [:[:F1(),F2(),F3(),F4():],[:F1(),F2(),F3(),F4():]:],F5() st
   for b2, b3 being Element of F1()
   for b4, b5 being Element of F2()
   for b6, b7 being Element of F3()
   for b8, b9 being Element of F4()
   for b10, b11 being Element of [:F1(),F2(),F3(),F4():]
         st b10 = [b2,b4,b6,b8] & b11 = [b3,b5,b7,b9]
      holds b1 .(b10,b11) = F6(b2, b3, b4, b5, b6, b7, b8, b9)


:: METRIC_3:funcnot 7 => METRIC_3:func 7
definition
  let a1, a2, a3, a4 be non empty Reflexive discerning symmetric triangle MetrStruct;
  func dist_cart4(A1,A2,A3,A4) -> Function-like quasi_total Relation of [:[:the carrier of a1,the carrier of a2,the carrier of a3,the carrier of a4:],[:the carrier of a1,the carrier of a2,the carrier of a3,the carrier of a4:]:],REAL means
    for b1, b2 being Element of the carrier of a1
    for b3, b4 being Element of the carrier of a2
    for b5, b6 being Element of the carrier of a3
    for b7, b8 being Element of the carrier of a4
    for b9, b10 being Element of [:the carrier of a1,the carrier of a2,the carrier of a3,the carrier of a4:]
          st b9 = [b1,b3,b5,b7] & b10 = [b2,b4,b6,b8]
       holds it .(b9,b10) = ((dist(b1,b2)) + dist(b3,b4)) + ((dist(b5,b6)) + dist(b7,b8));
end;

:: METRIC_3:def 7
theorem
for b1, b2, b3, b4 being non empty Reflexive discerning symmetric triangle MetrStruct
for b5 being Function-like quasi_total Relation of [:[:the carrier of b1,the carrier of b2,the carrier of b3,the carrier of b4:],[:the carrier of b1,the carrier of b2,the carrier of b3,the carrier of b4:]:],REAL holds
      b5 = dist_cart4(b1,b2,b3,b4)
   iff
      for b6, b7 being Element of the carrier of b1
      for b8, b9 being Element of the carrier of b2
      for b10, b11 being Element of the carrier of b3
      for b12, b13 being Element of the carrier of b4
      for b14, b15 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3,the carrier of b4:]
            st b14 = [b6,b8,b10,b12] & b15 = [b7,b9,b11,b13]
         holds b5 .(b14,b15) = ((dist(b6,b7)) + dist(b8,b9)) + ((dist(b10,b11)) + dist(b12,b13));

:: METRIC_3:th 19
theorem
for b1, b2, b3, b4 being non empty Reflexive discerning symmetric triangle MetrStruct
for b5, b6 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3,the carrier of b4:] holds
   (dist_cart4(b1,b2,b3,b4)) .(b5,b6) = 0
iff
   b5 = b6;

:: METRIC_3:th 20
theorem
for b1, b2, b3, b4 being non empty Reflexive discerning symmetric triangle MetrStruct
for b5, b6 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3,the carrier of b4:] holds
(dist_cart4(b1,b2,b3,b4)) .(b5,b6) = (dist_cart4(b1,b2,b3,b4)) .(b6,b5);

:: METRIC_3:th 21
theorem
for b1, b2, b3, b4 being non empty Reflexive discerning symmetric triangle MetrStruct
for b5, b6, b7 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3,the carrier of b4:] holds
(dist_cart4(b1,b2,b3,b4)) .(b5,b7) <= ((dist_cart4(b1,b2,b3,b4)) .(b5,b6)) + ((dist_cart4(b1,b2,b3,b4)) .(b6,b7));

:: METRIC_3:funcnot 8 => METRIC_3:func 8
definition
  let a1, a2, a3, a4 be non empty Reflexive discerning symmetric triangle MetrStruct;
  func MetrSpaceCart4(A1,A2,A3,A4) -> non empty strict Reflexive discerning symmetric triangle MetrStruct equals
    MetrStruct(#[:the carrier of a1,the carrier of a2,the carrier of a3,the carrier of a4:],dist_cart4(a1,a2,a3,a4)#);
end;

:: METRIC_3:def 8
theorem
for b1, b2, b3, b4 being non empty Reflexive discerning symmetric triangle MetrStruct holds
MetrSpaceCart4(b1,b2,b3,b4) = MetrStruct(#[:the carrier of b1,the carrier of b2,the carrier of b3,the carrier of b4:],dist_cart4(b1,b2,b3,b4)#);

:: METRIC_3:funcnot 9 => METRIC_3:func 9
definition
  let a1, a2, a3, a4 be non empty Reflexive discerning symmetric triangle MetrStruct;
  let a5, a6 be Element of [:the carrier of a1,the carrier of a2,the carrier of a3,the carrier of a4:];
  func dist4(A5,A6) -> Element of REAL equals
    (dist_cart4(a1,a2,a3,a4)) .(a5,a6);
end;

:: METRIC_3:def 9
theorem
for b1, b2, b3, b4 being non empty Reflexive discerning symmetric triangle MetrStruct
for b5, b6 being Element of [:the carrier of b1,the carrier of b2,the carrier of b3,the carrier of b4:] holds
dist4(b5,b6) = (dist_cart4(b1,b2,b3,b4)) .(b5,b6);