Article NECKLACE, MML version 4.99.1005

:: NECKLACE:th 2
theorem
4 = {0,1,2,3};

:: NECKLACE:th 3
theorem
for b1, b2, b3, b4, b5, b6 being set holds
[:{b1,b2,b3},{b4,b5,b6}:] = {[b1,b4],[b1,b5],[b1,b6],[b2,b4],[b2,b5],[b2,b6],[b3,b4],[b3,b5],[b3,b6]};

:: NECKLACE:th 4
theorem
for b1 being set
for b2 being natural set
      st b1 in b2
   holds b1 is natural set;

:: NECKLACE:th 5
theorem
for b1 being non empty natural set holds
   0 in b1;

:: NECKLACE:condreg 1
registration
  cluster natural -> cardinal (set);
end;

:: NECKLACE:funcreg 1
registration
  let a1 be set;
  cluster delta a1 -> Relation-like Function-like one-to-one;
end;

:: NECKLACE:th 6
theorem
for b1 being set holds
   Card id b1 = Card b1;

:: NECKLACE:funcreg 2
registration
  let a1 be Relation-like trivial set;
  cluster proj1 a1 -> trivial;
end;

:: NECKLACE:condreg 2
registration
  cluster Relation-like Function-like trivial -> one-to-one (set);
end;

:: NECKLACE:th 7
theorem
for b1, b2 being Relation-like Function-like set
      st proj1 b1 misses proj1 b2
   holds proj2 (b1 +* b2) = (proj2 b1) \/ proj2 b2;

:: NECKLACE:th 8
theorem
for b1, b2 being Relation-like Function-like one-to-one set
      st proj1 b1 misses proj1 b2 & proj2 b1 misses proj2 b2
   holds (b1 +* b2) " = b1 " +* (b2 ");

:: NECKLACE:th 9
theorem
for b1, b2, b3 being set holds
(b1 --> b2) +* (b1 --> b3) = b1 --> b3;

:: NECKLACE:th 10
theorem
for b1, b2 being set holds
(b1 .--> b2) " = b2 .--> b1;

:: NECKLACE:th 11
theorem
for b1, b2, b3, b4 being set
      st    b1 = b2
        iff
           b3 = b4
   holds ((b1,b2)-->(b3,b4)) " = (b3,b4)-->(b1,b2);

:: NECKLACE:sch 1
scheme NECKLACE:sch 1
{F1 -> non empty set,
  F2 -> Relation-like set,
  F3 -> set,
  F4 -> set}:
F2() ~ = {[F3(b1),F4(b1)] where b1 is Element of F1(): P1[b1]}
provided
   F2() = {[F4(b1),F3(b1)] where b1 is Element of F1(): P1[b1]};


:: NECKLACE:th 12
theorem
for b1, b2, b3 being natural set
      st b1 < b2 & b2 in b3
   holds b1 in b3;

:: NECKLACE:prednot 1 => NECKLACE:pred 1
definition
  let a1, a2 be RelStr;
  pred A2 embeds A1 means
    ex b1 being Function-like quasi_total Relation of the carrier of a1,the carrier of a2 st
       b1 is one-to-one &
        (for b2, b3 being Element of the carrier of a1 holds
           [b2,b3] in the InternalRel of a1
        iff
           [b1 . b2,b1 . b3] in the InternalRel of a2);
end;

:: NECKLACE:dfs 1
definiens
  let a1, a2 be RelStr;
To prove
     a2 embeds a1
it is sufficient to prove
  thus ex b1 being Function-like quasi_total Relation of the carrier of a1,the carrier of a2 st
       b1 is one-to-one &
        (for b2, b3 being Element of the carrier of a1 holds
           [b2,b3] in the InternalRel of a1
        iff
           [b1 . b2,b1 . b3] in the InternalRel of a2);

:: NECKLACE:def 2
theorem
for b1, b2 being RelStr holds
   b2 embeds b1
iff
   ex b3 being Function-like quasi_total Relation of the carrier of b1,the carrier of b2 st
      b3 is one-to-one &
       (for b4, b5 being Element of the carrier of b1 holds
          [b4,b5] in the InternalRel of b1
       iff
          [b3 . b4,b3 . b5] in the InternalRel of b2);

:: NECKLACE:prednot 2 => NECKLACE:pred 2
definition
  let a1, a2 be non empty RelStr;
  redefine pred a2 embeds a1;
  reflexivity;
::  for a1 being non empty RelStr holds
::     a1 embeds a1;
end;

:: NECKLACE:th 13
theorem
for b1, b2, b3 being non empty RelStr
      st b1 embeds b2 & b2 embeds b3
   holds b1 embeds b3;

:: NECKLACE:prednot 3 => NECKLACE:pred 3
definition
  let a1, a2 be non empty RelStr;
  pred A1 is_equimorphic_to A2 means
    a1 embeds a2 & a2 embeds a1;
  symmetry;
::  for a1, a2 being non empty RelStr
::        st a1 is_equimorphic_to a2
::     holds a2 is_equimorphic_to a1;
  reflexivity;
::  for a1 being non empty RelStr holds
::     a1 is_equimorphic_to a1;
end;

:: NECKLACE:dfs 2
definiens
  let a1, a2 be non empty RelStr;
To prove
     a1 is_equimorphic_to a2
it is sufficient to prove
  thus a1 embeds a2 & a2 embeds a1;

:: NECKLACE:def 3
theorem
for b1, b2 being non empty RelStr holds
   b1 is_equimorphic_to b2
iff
   b1 embeds b2 & b2 embeds b1;

:: NECKLACE:th 14
theorem
for b1, b2, b3 being non empty RelStr
      st b1 is_equimorphic_to b2 & b2 is_equimorphic_to b3
   holds b1 is_equimorphic_to b3;

:: NECKLACE:attrnot 1 => ORDERS_3:attr 3
notation
  let a1 be non empty RelStr;
  synonym parallel for disconnected;
end;

:: NECKLACE:attrnot 2 => NECKLACE:attr 1
definition
  let a1 be RelStr;
  attr a1 is symmetric means
    the InternalRel of a1 is_symmetric_in the carrier of a1;
end;

:: NECKLACE:dfs 3
definiens
  let a1 be RelStr;
To prove
     a1 is symmetric
it is sufficient to prove
  thus the InternalRel of a1 is_symmetric_in the carrier of a1;

:: NECKLACE:def 4
theorem
for b1 being RelStr holds
      b1 is symmetric
   iff
      the InternalRel of b1 is_symmetric_in the carrier of b1;

:: NECKLACE:attrnot 3 => NECKLACE:attr 2
definition
  let a1 be RelStr;
  attr a1 is asymmetric means
    the InternalRel of a1 is asymmetric;
end;

:: NECKLACE:dfs 4
definiens
  let a1 be RelStr;
To prove
     a1 is asymmetric
it is sufficient to prove
  thus the InternalRel of a1 is asymmetric;

:: NECKLACE:def 5
theorem
for b1 being RelStr holds
      b1 is asymmetric
   iff
      the InternalRel of b1 is asymmetric;

:: NECKLACE:th 15
theorem
for b1 being RelStr
      st b1 is asymmetric
   holds the InternalRel of b1 misses (the InternalRel of b1) ~;

:: NECKLACE:attrnot 4 => NECKLACE:attr 3
definition
  let a1 be RelStr;
  attr a1 is irreflexive means
    for b1 being set
          st b1 in the carrier of a1
       holds not [b1,b1] in the InternalRel of a1;
end;

:: NECKLACE:dfs 5
definiens
  let a1 be RelStr;
To prove
     a1 is irreflexive
it is sufficient to prove
  thus for b1 being set
          st b1 in the carrier of a1
       holds not [b1,b1] in the InternalRel of a1;

:: NECKLACE:def 6
theorem
for b1 being RelStr holds
      b1 is irreflexive
   iff
      for b2 being set
            st b2 in the carrier of b1
         holds not [b2,b2] in the InternalRel of b1;

:: NECKLACE:funcnot 1 => NECKLACE:func 1
definition
  let a1 be natural set;
  func A1 -SuccRelStr -> strict RelStr means
    the carrier of it = a1 &
     the InternalRel of it = {[b1,b1 + 1] where b1 is Element of NAT: b1 + 1 < a1};
end;

:: NECKLACE:def 7
theorem
for b1 being natural set
for b2 being strict RelStr holds
      b2 = b1 -SuccRelStr
   iff
      the carrier of b2 = b1 &
       the InternalRel of b2 = {[b3,b3 + 1] where b3 is Element of NAT: b3 + 1 < b1};

:: NECKLACE:th 16
theorem
for b1 being natural set holds
   b1 -SuccRelStr is asymmetric;

:: NECKLACE:th 17
theorem
for b1 being natural set
      st 0 < b1
   holds Card the InternalRel of b1 -SuccRelStr = b1 - 1;

:: NECKLACE:funcnot 2 => NECKLACE:func 2
definition
  let a1 be RelStr;
  func SymRelStr A1 -> strict RelStr means
    the carrier of it = the carrier of a1 &
     the InternalRel of it = (the InternalRel of a1) \/ ((the InternalRel of a1) ~);
end;

:: NECKLACE:def 8
theorem
for b1 being RelStr
for b2 being strict RelStr holds
      b2 = SymRelStr b1
   iff
      the carrier of b2 = the carrier of b1 &
       the InternalRel of b2 = (the InternalRel of b1) \/ ((the InternalRel of b1) ~);

:: NECKLACE:funcreg 3
registration
  let a1 be RelStr;
  cluster SymRelStr a1 -> strict symmetric;
end;

:: NECKLACE:exreg 1
registration
  cluster non empty symmetric RelStr;
end;

:: NECKLACE:funcreg 4
registration
  let a1 be symmetric RelStr;
  cluster the InternalRel of a1 -> symmetric;
end;

:: NECKLACE:funcnot 3 => NECKLACE:func 3
definition
  let a1 be RelStr;
  func ComplRelStr A1 -> strict RelStr means
    the carrier of it = the carrier of a1 &
     the InternalRel of it = (the InternalRel of a1) ` \ id the carrier of a1;
end;

:: NECKLACE:def 9
theorem
for b1 being RelStr
for b2 being strict RelStr holds
      b2 = ComplRelStr b1
   iff
      the carrier of b2 = the carrier of b1 &
       the InternalRel of b2 = (the InternalRel of b1) ` \ id the carrier of b1;

:: NECKLACE:funcreg 5
registration
  let a1 be non empty RelStr;
  cluster ComplRelStr a1 -> non empty strict;
end;

:: NECKLACE:th 18
theorem
for b1, b2 being RelStr
      st b1,b2 are_isomorphic
   holds Card the InternalRel of b1 = Card the InternalRel of b2;

:: NECKLACE:funcnot 4 => NECKLACE:func 4
definition
  let a1 be natural set;
  func Necklace A1 -> strict RelStr equals
    SymRelStr (a1 -SuccRelStr);
end;

:: NECKLACE:def 10
theorem
for b1 being natural set holds
   Necklace b1 = SymRelStr (b1 -SuccRelStr);

:: NECKLACE:funcreg 6
registration
  let a1 be natural set;
  cluster Necklace a1 -> strict symmetric;
end;

:: NECKLACE:th 19
theorem
for b1 being natural set holds
   the InternalRel of Necklace b1 = {[b2,b2 + 1] where b2 is Element of NAT: b2 + 1 < b1} \/ {[b2 + 1,b2] where b2 is Element of NAT: b2 + 1 < b1};

:: NECKLACE:th 20
theorem
for b1 being natural set
for b2 being set holds
      b2 in the InternalRel of Necklace b1
   iff
      ex b3 being Element of NAT st
         b3 + 1 < b1 &
          (b2 = [b3,b3 + 1] or b2 = [b3 + 1,b3]);

:: NECKLACE:funcreg 7
registration
  let a1 be natural set;
  cluster Necklace a1 -> strict irreflexive;
end;

:: NECKLACE:th 21
theorem
for b1 being natural set holds
   the carrier of Necklace b1 = b1;

:: NECKLACE:funcreg 8
registration
  let a1 be non empty natural set;
  cluster Necklace a1 -> non empty strict;
end;

:: NECKLACE:funcreg 9
registration
  let a1 be natural set;
  cluster the carrier of Necklace a1 -> finite;
end;

:: NECKLACE:th 22
theorem
for b1, b2 being natural set
      st b2 + 1 < b1
   holds [b2,b2 + 1] in the InternalRel of Necklace b1;

:: NECKLACE:th 23
theorem
for b1, b2 being natural set
      st b2 in the carrier of Necklace b1
   holds b2 < b1;

:: NECKLACE:th 24
theorem
for b1 being non empty natural set holds
   Necklace b1 is connected;

:: NECKLACE:th 25
theorem
for b1, b2, b3 being natural set
      st [b2,b3] in the InternalRel of Necklace b1 & b2 <> b3 + 1
   holds b3 = b2 + 1;

:: NECKLACE:th 26
theorem
for b1, b2, b3 being natural set
      st (b2 = b3 + 1 or b3 = b2 + 1) & b2 in the carrier of Necklace b1 & b3 in the carrier of Necklace b1
   holds [b2,b3] in the InternalRel of Necklace b1;

:: NECKLACE:th 27
theorem
for b1 being natural set
      st 0 < b1
   holds Card {[b2 + 1,b2] where b2 is Element of NAT: b2 + 1 < b1} = b1 - 1;

:: NECKLACE:th 28
theorem
for b1 being natural set
      st 0 < b1
   holds Card the InternalRel of Necklace b1 = 2 * (b1 - 1);

:: NECKLACE:th 29
theorem
Necklace 1,ComplRelStr Necklace 1 are_isomorphic;

:: NECKLACE:th 30
theorem
Necklace 4,ComplRelStr Necklace 4 are_isomorphic;

:: NECKLACE:th 31
theorem
for b1 being natural set
      st Necklace b1,ComplRelStr Necklace b1 are_isomorphic & b1 <> 0 & b1 <> 1
   holds b1 = 4;