Article SGRAPH1, MML version 4.99.1005

:: SGRAPH1:funcnot 1 => SGRAPH1:func 1
definition
  let a1, a2 be natural set;
  func nat_interval(A1,A2) -> Element of bool NAT equals
    {b1 where b1 is Element of NAT: a1 <= b1 & b1 <= a2};
end;

:: SGRAPH1:def 1
theorem
for b1, b2 being natural set holds
nat_interval(b1,b2) = {b3 where b3 is Element of NAT: b1 <= b3 & b3 <= b2};

:: SGRAPH1:funcnot 2 => SGRAPH1:func 1
notation
  let a1, a2 be natural set;
  synonym Seg(a1,a2) for nat_interval(a1,a2);
end;

:: SGRAPH1:funcreg 1
registration
  let a1, a2 be natural set;
  cluster nat_interval(a1,a2) -> finite;
end;

:: SGRAPH1:th 2
theorem
for b1, b2 being Element of NAT
for b3 being set holds
      b3 in nat_interval(b1,b2)
   iff
      ex b4 being Element of NAT st
         b3 = b4 & b1 <= b4 & b4 <= b2;

:: SGRAPH1:th 3
theorem
for b1, b2, b3 being Element of NAT holds
   b3 in nat_interval(b1,b2)
iff
   b1 <= b3 & b3 <= b2;

:: SGRAPH1:th 4
theorem
for b1 being Element of NAT holds
   nat_interval(1,b1) = Seg b1;

:: SGRAPH1:th 5
theorem
for b1, b2 being Element of NAT
      st 1 <= b1
   holds nat_interval(b1,b2) c= Seg b2;

:: SGRAPH1:th 6
theorem
for b1, b2, b3 being Element of NAT
      st b1 < b2
   holds Seg b1 misses nat_interval(b2,b3);

:: SGRAPH1:th 7
theorem
for b1, b2 being Element of NAT
      st b2 < b1
   holds nat_interval(b1,b2) = {};

:: SGRAPH1:funcnot 3 => SGRAPH1:func 2
definition
  let a1 be set;
  func TWOELEMENTSETS A1 -> set equals
    {b1 where b1 is finite Element of bool a1: card b1 = 2};
end;

:: SGRAPH1:def 4
theorem
for b1 being set holds
   TWOELEMENTSETS b1 = {b2 where b2 is finite Element of bool b1: card b2 = 2};

:: SGRAPH1:th 9
theorem
for b1, b2 being set holds
   b2 in TWOELEMENTSETS b1
iff
   ex b3 being finite Element of bool b1 st
      b2 = b3 & card b3 = 2;

:: SGRAPH1:th 10
theorem
for b1, b2 being set holds
   b2 in TWOELEMENTSETS b1
iff
   b2 is finite Element of bool b1 &
    (ex b3, b4 being set st
       b3 in b1 & b4 in b1 & b3 <> b4 & b2 = {b3,b4});

:: SGRAPH1:th 11
theorem
for b1 being set holds
   TWOELEMENTSETS b1 c= bool b1;

:: SGRAPH1:th 12
theorem
for b1, b2, b3 being set
      st {b2,b3} in TWOELEMENTSETS b1
   holds b2 in b1 & b3 in b1 & b2 <> b3;

:: SGRAPH1:th 13
theorem
TWOELEMENTSETS {} = {};

:: SGRAPH1:th 14
theorem
for b1, b2 being set
      st b1 c= b2
   holds TWOELEMENTSETS b1 c= TWOELEMENTSETS b2;

:: SGRAPH1:th 15
theorem
for b1 being finite set holds
   TWOELEMENTSETS b1 is finite;

:: SGRAPH1:th 16
theorem
for b1 being non trivial set holds
   TWOELEMENTSETS b1 is not empty;

:: SGRAPH1:th 17
theorem
for b1 being set holds
   TWOELEMENTSETS {b1} = {};

:: SGRAPH1:condreg 1
registration
  let a1 be empty set;
  cluster -> empty (Element of bool a1);
end;

:: SGRAPH1:structnot 1 => SGRAPH1:struct 1
definition
  struct(1-sorted) SimpleGraphStruct(#
    carrier -> set,
    SEdges -> Element of bool TWOELEMENTSETS the carrier of it
  #);
end;

:: SGRAPH1:attrnot 1 => SGRAPH1:attr 1
definition
  let a1 be SimpleGraphStruct;
  attr a1 is strict;
end;

:: SGRAPH1:exreg 1
registration
  cluster strict SimpleGraphStruct;
end;

:: SGRAPH1:aggrnot 1 => SGRAPH1:aggr 1
definition
  let a1 be set;
  let a2 be Element of bool TWOELEMENTSETS a1;
  aggr SimpleGraphStruct(#a1,a2#) -> strict SimpleGraphStruct;
end;

:: SGRAPH1:selnot 1 => SGRAPH1:sel 1
definition
  let a1 be SimpleGraphStruct;
  sel the SEdges of a1 -> Element of bool TWOELEMENTSETS the carrier of a1;
end;

:: SGRAPH1:funcnot 4 => SGRAPH1:func 3
definition
  let a1 be set;
  func SIMPLEGRAPHS A1 -> set equals
    {SimpleGraphStruct(#b1,b2#) where b1 is finite Element of bool a1, b2 is finite Element of bool TWOELEMENTSETS b1: TRUE};
end;

:: SGRAPH1:def 6
theorem
for b1 being set holds
   SIMPLEGRAPHS b1 = {SimpleGraphStruct(#b2,b3#) where b2 is finite Element of bool b1, b3 is finite Element of bool TWOELEMENTSETS b2: TRUE};

:: SGRAPH1:th 19
theorem
for b1 being set holds
   SimpleGraphStruct(#{},{} TWOELEMENTSETS {}#) in SIMPLEGRAPHS b1;

:: SGRAPH1:funcreg 2
registration
  let a1 be set;
  cluster SIMPLEGRAPHS a1 -> non empty;
end;

:: SGRAPH1:modenot 1 => SGRAPH1:mode 1
definition
  let a1 be set;
  mode SimpleGraph of A1 -> strict SimpleGraphStruct means
    it is Element of SIMPLEGRAPHS a1;
end;

:: SGRAPH1:dfs 4
definiens
  let a1 be set;
  let a2 be strict SimpleGraphStruct;
To prove
     a2 is SimpleGraph of a1
it is sufficient to prove
  thus a2 is Element of SIMPLEGRAPHS a1;

:: SGRAPH1:def 7
theorem
for b1 being set
for b2 being strict SimpleGraphStruct holds
      b2 is SimpleGraph of b1
   iff
      b2 is Element of SIMPLEGRAPHS b1;

:: SGRAPH1:th 21
theorem
for b1, b2 being set holds
   b2 in SIMPLEGRAPHS b1
iff
   ex b3 being finite Element of bool b1 st
      ex b4 being finite Element of bool TWOELEMENTSETS b3 st
         b2 = SimpleGraphStruct(#b3,b4#);

:: SGRAPH1:th 23
theorem
for b1 being set
for b2 being SimpleGraph of b1 holds
   the carrier of b2 c= b1 & the SEdges of b2 c= TWOELEMENTSETS the carrier of b2;

:: SGRAPH1:th 25
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3 being set
      st b3 in the SEdges of b2
   holds ex b4, b5 being set st
      b4 in the carrier of b2 & b5 in the carrier of b2 & b4 <> b5 & b3 = {b4,b5};

:: SGRAPH1:th 26
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3, b4 being set
      st {b3,b4} in the SEdges of b2
   holds b3 in the carrier of b2 & b4 in the carrier of b2 & b3 <> b4;

:: SGRAPH1:th 27
theorem
for b1 being set
for b2 being SimpleGraph of b1 holds
   the carrier of b2 is finite Element of bool b1 &
    the SEdges of b2 is finite Element of bool TWOELEMENTSETS the carrier of b2;

:: SGRAPH1:prednot 1 => SGRAPH1:pred 1
definition
  let a1 be set;
  let a2, a3 be SimpleGraph of a1;
  pred A2 is_isomorphic_to A3 means
    ex b1 being Function-like quasi_total Relation of the carrier of a2,the carrier of a3 st
       b1 is bijective(the carrier of a2, the carrier of a3) &
        (for b2, b3 being Element of the carrier of a2 holds
           {b2,b3} in the SEdges of a2
        iff
           {b1 . b2,b1 . b3} in the SEdges of a2);
end;

:: SGRAPH1:dfs 5
definiens
  let a1 be set;
  let a2, a3 be SimpleGraph of a1;
To prove
     a2 is_isomorphic_to a3
it is sufficient to prove
  thus ex b1 being Function-like quasi_total Relation of the carrier of a2,the carrier of a3 st
       b1 is bijective(the carrier of a2, the carrier of a3) &
        (for b2, b3 being Element of the carrier of a2 holds
           {b2,b3} in the SEdges of a2
        iff
           {b1 . b2,b1 . b3} in the SEdges of a2);

:: SGRAPH1:def 8
theorem
for b1 being set
for b2, b3 being SimpleGraph of b1 holds
   b2 is_isomorphic_to b3
iff
   ex b4 being Function-like quasi_total Relation of the carrier of b2,the carrier of b3 st
      b4 is bijective(the carrier of b2, the carrier of b3) &
       (for b5, b6 being Element of the carrier of b2 holds
          {b5,b6} in the SEdges of b2
       iff
          {b4 . b5,b4 . b6} in the SEdges of b2);

:: SGRAPH1:sch 1
scheme SGRAPH1:sch 1
{F1 -> set}:
for b1 being set
      st b1 in SIMPLEGRAPHS F1()
   holds P1[b1]
provided
   P1[SimpleGraphStruct(#{},{} TWOELEMENTSETS {}#)]
and
   for b1 being SimpleGraph of F1()
   for b2 being set
         st b1 in SIMPLEGRAPHS F1() & P1[b1] & b2 in F1() & not b2 in the carrier of b1
      holds P1[SimpleGraphStruct(#(the carrier of b1) \/ {b2},{} TWOELEMENTSETS ((the carrier of b1) \/ {b2})#)]
and
   for b1 being SimpleGraph of F1()
   for b2 being set
         st P1[b1] & b2 in TWOELEMENTSETS the carrier of b1 & not b2 in the SEdges of b1
      holds ex b3 being Element of bool TWOELEMENTSETS the carrier of b1 st
         b3 = (the SEdges of b1) \/ {b2} & P1[SimpleGraphStruct(#the carrier of b1,b3#)];


:: SGRAPH1:th 28
theorem
for b1 being set
for b2 being SimpleGraph of b1
      st b2 <> SimpleGraphStruct(#{},{} TWOELEMENTSETS {}#)
   holds ex b3 being set st
      ex b4 being Element of bool TWOELEMENTSETS b3 st
         b3 is not empty & b2 = SimpleGraphStruct(#b3,b4#);

:: SGRAPH1:th 30
theorem
for b1 being set
for b2 being Element of bool b1
for b3 being Element of bool TWOELEMENTSETS b2
for b4 being set
for b5 being finite Element of bool TWOELEMENTSETS (b2 \/ {b4})
      st SimpleGraphStruct(#b2,b3#) in SIMPLEGRAPHS b1 & b4 in b1 & not b4 in b2
   holds SimpleGraphStruct(#b2 \/ {b4},b5#) in SIMPLEGRAPHS b1;

:: SGRAPH1:th 31
theorem
for b1 being set
for b2 being Element of bool b1
for b3 being Element of bool TWOELEMENTSETS b2
for b4, b5 being set
      st b4 in b2 & b5 in b2 & b4 <> b5 & SimpleGraphStruct(#b2,b3#) in SIMPLEGRAPHS b1
   holds ex b6 being finite Element of bool TWOELEMENTSETS b2 st
      b6 = b3 \/ {{b4,b5}} &
       SimpleGraphStruct(#b2,b6#) in SIMPLEGRAPHS b1;

:: SGRAPH1:prednot 2 => SGRAPH1:pred 2
definition
  let a1, a2 be set;
  pred A2 is_SetOfSimpleGraphs_of A1 means
    SimpleGraphStruct(#{},{} TWOELEMENTSETS {}#) in a2 &
     (for b1 being Element of bool a1
     for b2 being Element of bool TWOELEMENTSETS b1
     for b3 being set
     for b4 being finite Element of bool TWOELEMENTSETS (b1 \/ {b3})
           st SimpleGraphStruct(#b1,b2#) in a2 & b3 in a1 & not b3 in b1
        holds SimpleGraphStruct(#b1 \/ {b3},b4#) in a2) &
     (for b1 being Element of bool a1
     for b2 being Element of bool TWOELEMENTSETS b1
     for b3, b4 being set
           st SimpleGraphStruct(#b1,b2#) in a2 & b3 in b1 & b4 in b1 & b3 <> b4 & not {b3,b4} in b2
        holds ex b5 being finite Element of bool TWOELEMENTSETS b1 st
           b5 = b2 \/ {{b3,b4}} &
            SimpleGraphStruct(#b1,b5#) in a2);
end;

:: SGRAPH1:dfs 6
definiens
  let a1, a2 be set;
To prove
     a2 is_SetOfSimpleGraphs_of a1
it is sufficient to prove
  thus SimpleGraphStruct(#{},{} TWOELEMENTSETS {}#) in a2 &
     (for b1 being Element of bool a1
     for b2 being Element of bool TWOELEMENTSETS b1
     for b3 being set
     for b4 being finite Element of bool TWOELEMENTSETS (b1 \/ {b3})
           st SimpleGraphStruct(#b1,b2#) in a2 & b3 in a1 & not b3 in b1
        holds SimpleGraphStruct(#b1 \/ {b3},b4#) in a2) &
     (for b1 being Element of bool a1
     for b2 being Element of bool TWOELEMENTSETS b1
     for b3, b4 being set
           st SimpleGraphStruct(#b1,b2#) in a2 & b3 in b1 & b4 in b1 & b3 <> b4 & not {b3,b4} in b2
        holds ex b5 being finite Element of bool TWOELEMENTSETS b1 st
           b5 = b2 \/ {{b3,b4}} &
            SimpleGraphStruct(#b1,b5#) in a2);

:: SGRAPH1:def 9
theorem
for b1, b2 being set holds
   b2 is_SetOfSimpleGraphs_of b1
iff
   SimpleGraphStruct(#{},{} TWOELEMENTSETS {}#) in b2 &
    (for b3 being Element of bool b1
    for b4 being Element of bool TWOELEMENTSETS b3
    for b5 being set
    for b6 being finite Element of bool TWOELEMENTSETS (b3 \/ {b5})
          st SimpleGraphStruct(#b3,b4#) in b2 & b5 in b1 & not b5 in b3
       holds SimpleGraphStruct(#b3 \/ {b5},b6#) in b2) &
    (for b3 being Element of bool b1
    for b4 being Element of bool TWOELEMENTSETS b3
    for b5, b6 being set
          st SimpleGraphStruct(#b3,b4#) in b2 & b5 in b3 & b6 in b3 & b5 <> b6 & not {b5,b6} in b4
       holds ex b7 being finite Element of bool TWOELEMENTSETS b3 st
          b7 = b4 \/ {{b5,b6}} &
           SimpleGraphStruct(#b3,b7#) in b2);

:: SGRAPH1:th 35
theorem
for b1 being set holds
   SIMPLEGRAPHS b1 is_SetOfSimpleGraphs_of b1;

:: SGRAPH1:th 36
theorem
for b1, b2 being set
      st b2 is_SetOfSimpleGraphs_of b1
   holds SIMPLEGRAPHS b1 c= b2;

:: SGRAPH1:th 37
theorem
for b1 being set holds
   SIMPLEGRAPHS b1 is_SetOfSimpleGraphs_of b1 &
    (for b2 being set
          st b2 is_SetOfSimpleGraphs_of b1
       holds SIMPLEGRAPHS b1 c= b2);

:: SGRAPH1:modenot 2 => SGRAPH1:mode 2
definition
  let a1 be set;
  let a2 be SimpleGraph of a1;
  mode SubGraph of A2 -> SimpleGraph of a1 means
    the carrier of it c= the carrier of a2 & the SEdges of it c= the SEdges of a2;
end;

:: SGRAPH1:dfs 7
definiens
  let a1 be set;
  let a2, a3 be SimpleGraph of a1;
To prove
     a3 is SubGraph of a2
it is sufficient to prove
  thus the carrier of a3 c= the carrier of a2 & the SEdges of a3 c= the SEdges of a2;

:: SGRAPH1:def 10
theorem
for b1 being set
for b2, b3 being SimpleGraph of b1 holds
   b3 is SubGraph of b2
iff
   the carrier of b3 c= the carrier of b2 & the SEdges of b3 c= the SEdges of b2;

:: SGRAPH1:funcnot 5 => SGRAPH1:func 4
definition
  let a1 be set;
  let a2 be SimpleGraph of a1;
  let a3 be set;
  func degree(A2,A3) -> Element of NAT means
    ex b1 being finite set st
       (for b2 being set holds
              b2 in b1
           iff
              b2 in the SEdges of a2 & a3 in b2) &
        it = card b1;
end;

:: SGRAPH1:def 11
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3 being set
for b4 being Element of NAT holds
      b4 = degree(b2,b3)
   iff
      ex b5 being finite set st
         (for b6 being set holds
                b6 in b5
             iff
                b6 in the SEdges of b2 & b3 in b6) &
          b4 = card b5;

:: SGRAPH1:th 39
theorem
for b1 being non empty set
for b2 being SimpleGraph of b1
for b3 being set holds
   ex b4 being finite set st
      b4 = {b5 where b5 is Element of b1: b5 in the carrier of b2 & {b3,b5} in the SEdges of b2} &
       degree(b2,b3) = card b4;

:: SGRAPH1:th 40
theorem
for b1 being non empty set
for b2 being SimpleGraph of b1
for b3 being set
      st b3 in the carrier of b2
   holds ex b4 being finite set st
      b4 = the carrier of b2 & degree(b2,b3) < card b4;

:: SGRAPH1:th 41
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3, b4 being set
      st b3 in the carrier of b2 & b4 in the SEdges of b2 & degree(b2,b3) = 0
   holds not b3 in b4;

:: SGRAPH1:th 42
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3 being set
for b4 being finite set
   st b4 = the carrier of b2 & b3 in b4 & 1 + degree(b2,b3) = card b4
for b5 being Element of b4
      st b3 <> b5
   holds ex b6 being set st
      b6 in the SEdges of b2 & b6 = {b3,b5};

:: SGRAPH1:prednot 3 => SGRAPH1:pred 3
definition
  let a1 be set;
  let a2 be SimpleGraph of a1;
  let a3, a4 be Element of the carrier of a2;
  let a5 be FinSequence of the carrier of a2;
  pred A5 is_path_of A3,A4 means
    a5 . 1 = a3 &
     a5 . len a5 = a4 &
     (for b1 being Element of NAT
           st 1 <= b1 & b1 < len a5
        holds {a5 . b1,a5 . (b1 + 1)} in the SEdges of a2) &
     (for b1, b2 being Element of NAT
           st 1 <= b1 & b1 < len a5 & b1 < b2 & b2 < len a5
        holds a5 . b1 <> a5 . b2 &
         {a5 . b1,a5 . (b1 + 1)} <> {a5 . b2,a5 . (b2 + 1)});
end;

:: SGRAPH1:dfs 9
definiens
  let a1 be set;
  let a2 be SimpleGraph of a1;
  let a3, a4 be Element of the carrier of a2;
  let a5 be FinSequence of the carrier of a2;
To prove
     a5 is_path_of a3,a4
it is sufficient to prove
  thus a5 . 1 = a3 &
     a5 . len a5 = a4 &
     (for b1 being Element of NAT
           st 1 <= b1 & b1 < len a5
        holds {a5 . b1,a5 . (b1 + 1)} in the SEdges of a2) &
     (for b1, b2 being Element of NAT
           st 1 <= b1 & b1 < len a5 & b1 < b2 & b2 < len a5
        holds a5 . b1 <> a5 . b2 &
         {a5 . b1,a5 . (b1 + 1)} <> {a5 . b2,a5 . (b2 + 1)});

:: SGRAPH1:def 12
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3, b4 being Element of the carrier of b2
for b5 being FinSequence of the carrier of b2 holds
      b5 is_path_of b3,b4
   iff
      b5 . 1 = b3 &
       b5 . len b5 = b4 &
       (for b6 being Element of NAT
             st 1 <= b6 & b6 < len b5
          holds {b5 . b6,b5 . (b6 + 1)} in the SEdges of b2) &
       (for b6, b7 being Element of NAT
             st 1 <= b6 & b6 < len b5 & b6 < b7 & b7 < len b5
          holds b5 . b6 <> b5 . b7 &
           {b5 . b6,b5 . (b6 + 1)} <> {b5 . b7,b5 . (b7 + 1)});

:: SGRAPH1:funcnot 6 => SGRAPH1:func 5
definition
  let a1 be set;
  let a2 be SimpleGraph of a1;
  let a3, a4 be Element of the carrier of a2;
  func PATHS(A3,A4) -> Element of bool ((the carrier of a2) *) equals
    {b1 where b1 is Element of (the carrier of a2) *: b1 is_path_of a3,a4};
end;

:: SGRAPH1:def 13
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3, b4 being Element of the carrier of b2 holds
PATHS(b3,b4) = {b5 where b5 is Element of (the carrier of b2) *: b5 is_path_of b3,b4};

:: SGRAPH1:th 44
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3, b4 being Element of the carrier of b2
for b5 being set holds
      b5 in PATHS(b3,b4)
   iff
      ex b6 being Element of (the carrier of b2) * st
         b5 = b6 & b6 is_path_of b3,b4;

:: SGRAPH1:th 45
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3, b4 being Element of the carrier of b2
for b5 being Element of (the carrier of b2) *
      st b5 is_path_of b3,b4
   holds b5 in PATHS(b3,b4);

:: SGRAPH1:prednot 4 => SGRAPH1:pred 4
definition
  let a1 be set;
  let a2 be SimpleGraph of a1;
  let a3 be set;
  pred A3 is_cycle_of A2 means
    ex b1 being Element of the carrier of a2 st
       a3 in PATHS(b1,b1);
end;

:: SGRAPH1:dfs 11
definiens
  let a1 be set;
  let a2 be SimpleGraph of a1;
  let a3 be set;
To prove
     a3 is_cycle_of a2
it is sufficient to prove
  thus ex b1 being Element of the carrier of a2 st
       a3 in PATHS(b1,b1);

:: SGRAPH1:def 14
theorem
for b1 being set
for b2 being SimpleGraph of b1
for b3 being set holds
      b3 is_cycle_of b2
   iff
      ex b4 being Element of the carrier of b2 st
         b3 in PATHS(b4,b4);

:: SGRAPH1:funcnot 7 => SGRAPH1:func 6
definition
  let a1, a2 be Element of NAT;
  func K_(A2,A1) -> SimpleGraph of NAT means
    ex b1 being Element of bool TWOELEMENTSETS Seg (a2 + a1) st
       b1 = {{b2,b3} where b2 is Element of NAT, b3 is Element of NAT: b2 in Seg a2 & b3 in nat_interval(a2 + 1,a2 + a1)} &
        it = SimpleGraphStruct(#Seg (a2 + a1),b1#);
end;

:: SGRAPH1:def 16
theorem
for b1, b2 being Element of NAT
for b3 being SimpleGraph of NAT holds
      b3 = K_(b2,b1)
   iff
      ex b4 being Element of bool TWOELEMENTSETS Seg (b2 + b1) st
         b4 = {{b5,b6} where b5 is Element of NAT, b6 is Element of NAT: b5 in Seg b2 & b6 in nat_interval(b2 + 1,b2 + b1)} &
          b3 = SimpleGraphStruct(#Seg (b2 + b1),b4#);

:: SGRAPH1:funcnot 8 => SGRAPH1:func 7
definition
  let a1 be Element of NAT;
  func K_ A1 -> SimpleGraph of NAT means
    ex b1 being finite Element of bool TWOELEMENTSETS Seg a1 st
       b1 = {{b2,b3} where b2 is Element of NAT, b3 is Element of NAT: b2 in Seg a1 & b3 in Seg a1 & b2 <> b3} &
        it = SimpleGraphStruct(#Seg a1,b1#);
end;

:: SGRAPH1:def 17
theorem
for b1 being Element of NAT
for b2 being SimpleGraph of NAT holds
      b2 = K_ b1
   iff
      ex b3 being finite Element of bool TWOELEMENTSETS Seg b1 st
         b3 = {{b4,b5} where b4 is Element of NAT, b5 is Element of NAT: b4 in Seg b1 & b5 in Seg b1 & b4 <> b5} &
          b2 = SimpleGraphStruct(#Seg b1,b3#);

:: SGRAPH1:funcnot 9 => SGRAPH1:func 8
definition
  func TriangleGraph -> SimpleGraph of NAT equals
    K_ 3;
end;

:: SGRAPH1:def 18
theorem
TriangleGraph = K_ 3;

:: SGRAPH1:th 46
theorem
ex b1 being Element of bool TWOELEMENTSETS Seg 3 st
   b1 = {.{.1,2.},{.2,3.},{.3,1.}.} &
    TriangleGraph = SimpleGraphStruct(#Seg 3,b1#);

:: SGRAPH1:th 47
theorem
the carrier of TriangleGraph = Seg 3 &
 the SEdges of TriangleGraph = {.{.1,2.},{.2,3.},{.3,1.}.};

:: SGRAPH1:th 48
theorem
{1,2} in the SEdges of TriangleGraph & {2,3} in the SEdges of TriangleGraph & {3,1} in the SEdges of TriangleGraph;

:: SGRAPH1:th 49
theorem
((<*1*> ^ <*2*>) ^ <*3*>) ^ <*1*> is_cycle_of TriangleGraph;