Article GRAPH_4, MML version 4.99.1005

:: GRAPH_4:prednot 1 => GRAPH_4:pred 1
definition
  let a1 be Graph-like MultiGraphStruct;
  let a2, a3 be Element of the Vertices of a1;
  let a4 be set;
  pred A4 orientedly_joins A2,A3 means
    (the Source of a1) . a4 = a2 & (the Target of a1) . a4 = a3;
end;

:: GRAPH_4:dfs 1
definiens
  let a1 be Graph-like MultiGraphStruct;
  let a2, a3 be Element of the Vertices of a1;
  let a4 be set;
To prove
     a4 orientedly_joins a2,a3
it is sufficient to prove
  thus (the Source of a1) . a4 = a2 & (the Target of a1) . a4 = a3;

:: GRAPH_4:def 1
theorem
for b1 being Graph-like MultiGraphStruct
for b2, b3 being Element of the Vertices of b1
for b4 being set holds
      b4 orientedly_joins b2,b3
   iff
      (the Source of b1) . b4 = b2 & (the Target of b1) . b4 = b3;

:: GRAPH_4:th 1
theorem
for b1 being set
for b2 being Graph-like MultiGraphStruct
for b3, b4 being Element of the Vertices of b2
      st b1 orientedly_joins b3,b4
   holds b1 joins b3,b4;

:: GRAPH_4:prednot 2 => GRAPH_4:pred 2
definition
  let a1 be Graph-like MultiGraphStruct;
  let a2, a3 be Element of the Vertices of a1;
  pred A2,A3 are_orientedly_incident means
    ex b1 being set st
       b1 in the Edges of a1 & b1 orientedly_joins a2,a3;
end;

:: GRAPH_4:dfs 2
definiens
  let a1 be Graph-like MultiGraphStruct;
  let a2, a3 be Element of the Vertices of a1;
To prove
     a2,a3 are_orientedly_incident
it is sufficient to prove
  thus ex b1 being set st
       b1 in the Edges of a1 & b1 orientedly_joins a2,a3;

:: GRAPH_4:def 2
theorem
for b1 being Graph-like MultiGraphStruct
for b2, b3 being Element of the Vertices of b1 holds
   b2,b3 are_orientedly_incident
iff
   ex b4 being set st
      b4 in the Edges of b1 & b4 orientedly_joins b2,b3;

:: GRAPH_4:th 2
theorem
for b1 being set
for b2 being Graph-like MultiGraphStruct
for b3, b4, b5, b6 being Element of the Vertices of b2
      st b1 orientedly_joins b3,b4 & b1 orientedly_joins b5,b6
   holds b3 = b5 & b4 = b6;

:: GRAPH_4:exreg 1
registration
  let a1 be Graph-like MultiGraphStruct;
  cluster Relation-like Function-like empty finite FinSequence-like oriented Chain of a1;
end;

:: GRAPH_4:funcnot 1 => GRAPH_4:func 1
definition
  let a1 be Graph-like MultiGraphStruct;
  let a2 be set;
  func A1 -SVSet A2 -> set equals
    {b1 where b1 is Element of the Vertices of a1: ex b2 being Element of the Edges of a1 st
       b2 in a2 & b1 = (the Source of a1) . b2};
end;

:: GRAPH_4:def 3
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being set holds
   b1 -SVSet b2 = {b3 where b3 is Element of the Vertices of b1: ex b4 being Element of the Edges of b1 st
      b4 in b2 & b3 = (the Source of b1) . b4};

:: GRAPH_4:funcnot 2 => GRAPH_4:func 2
definition
  let a1 be Graph-like MultiGraphStruct;
  let a2 be set;
  func A1 -TVSet A2 -> set equals
    {b1 where b1 is Element of the Vertices of a1: ex b2 being Element of the Edges of a1 st
       b2 in a2 & b1 = (the Target of a1) . b2};
end;

:: GRAPH_4:def 4
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being set holds
   b1 -TVSet b2 = {b3 where b3 is Element of the Vertices of b1: ex b4 being Element of the Edges of b1 st
      b4 in b2 & b3 = (the Target of b1) . b4};

:: GRAPH_4:th 4
theorem
for b1 being Graph-like MultiGraphStruct holds
   b1 -SVSet {} = {} & b1 -TVSet {} = {};

:: GRAPH_4:prednot 3 => GRAPH_4:pred 3
definition
  let a1 be Graph-like MultiGraphStruct;
  let a2 be FinSequence of the Vertices of a1;
  let a3 be Relation-like Function-like FinSequence-like set;
  pred A2 is_oriented_vertex_seq_of A3 means
    len a2 = (len a3) + 1 &
     (for b1 being Element of NAT
           st 1 <= b1 & b1 <= len a3
        holds a3 . b1 orientedly_joins a2 /. b1,a2 /. (b1 + 1));
end;

:: GRAPH_4:dfs 5
definiens
  let a1 be Graph-like MultiGraphStruct;
  let a2 be FinSequence of the Vertices of a1;
  let a3 be Relation-like Function-like FinSequence-like set;
To prove
     a2 is_oriented_vertex_seq_of a3
it is sufficient to prove
  thus len a2 = (len a3) + 1 &
     (for b1 being Element of NAT
           st 1 <= b1 & b1 <= len a3
        holds a3 . b1 orientedly_joins a2 /. b1,a2 /. (b1 + 1));

:: GRAPH_4:def 5
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being FinSequence of the Vertices of b1
for b3 being Relation-like Function-like FinSequence-like set holds
      b2 is_oriented_vertex_seq_of b3
   iff
      len b2 = (len b3) + 1 &
       (for b4 being Element of NAT
             st 1 <= b4 & b4 <= len b3
          holds b3 . b4 orientedly_joins b2 /. b4,b2 /. (b4 + 1));

:: GRAPH_4:th 5
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being FinSequence of the Vertices of b1
for b3 being oriented Chain of b1
      st b2 is_oriented_vertex_seq_of b3
   holds b2 is_vertex_seq_of b3;

:: GRAPH_4:th 6
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being FinSequence of the Vertices of b1
for b3 being oriented Chain of b1
      st b2 is_oriented_vertex_seq_of b3
   holds b1 -SVSet proj2 b3 c= proj2 b2;

:: GRAPH_4:th 7
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being FinSequence of the Vertices of b1
for b3 being oriented Chain of b1
      st b2 is_oriented_vertex_seq_of b3
   holds b1 -TVSet proj2 b3 c= proj2 b2;

:: GRAPH_4:th 8
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being FinSequence of the Vertices of b1
for b3 being oriented Chain of b1
      st b3 <> {} & b2 is_oriented_vertex_seq_of b3
   holds proj2 b2 c= (b1 -SVSet proj2 b3) \/ (b1 -TVSet proj2 b3);

:: GRAPH_4:th 9
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being Element of the Vertices of b1 holds
   <*b2*> is_oriented_vertex_seq_of {};

:: GRAPH_4:th 10
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being oriented Chain of b1 holds
   ex b3 being FinSequence of the Vertices of b1 st
      b3 is_oriented_vertex_seq_of b2;

:: GRAPH_4:th 11
theorem
for b1 being Graph-like MultiGraphStruct
for b2, b3 being FinSequence of the Vertices of b1
for b4 being oriented Chain of b1
      st b4 <> {} & b2 is_oriented_vertex_seq_of b4 & b3 is_oriented_vertex_seq_of b4
   holds b2 = b3;

:: GRAPH_4:funcnot 3 => GRAPH_4:func 3
definition
  let a1 be Graph-like MultiGraphStruct;
  let a2 be oriented Chain of a1;
  assume a2 <> {};
  func oriented-vertex-seq A2 -> FinSequence of the Vertices of a1 means
    it is_oriented_vertex_seq_of a2;
end;

:: GRAPH_4:def 6
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being oriented Chain of b1
   st b2 <> {}
for b3 being FinSequence of the Vertices of b1 holds
      b3 = oriented-vertex-seq b2
   iff
      b3 is_oriented_vertex_seq_of b2;

:: GRAPH_4:th 12
theorem
for b1 being Element of NAT
for b2 being Graph-like MultiGraphStruct
for b3, b4 being FinSequence of the Vertices of b2
for b5, b6 being oriented Chain of b2
      st b3 is_oriented_vertex_seq_of b5 & b6 = b5 | Seg b1 & b4 = b3 | Seg (b1 + 1)
   holds b4 is_oriented_vertex_seq_of b6;

:: GRAPH_4:th 13
theorem
for b1 being Relation-like Function-like FinSequence-like set
for b2, b3 being Element of NAT
for b4 being Graph-like MultiGraphStruct
for b5 being oriented Chain of b4
      st 1 <= b2 & b2 <= b3 & b3 <= len b5 & b1 = (b2,b3)-cut b5
   holds b1 is oriented Chain of b4;

:: GRAPH_4:th 14
theorem
for b1, b2 being Element of NAT
for b3 being Graph-like MultiGraphStruct
for b4, b5 being FinSequence of the Vertices of b3
for b6, b7 being oriented Chain of b3
      st 1 <= b1 & b1 <= b2 & b2 <= len b6 & b7 = (b1,b2)-cut b6 & b4 is_oriented_vertex_seq_of b6 & b5 = (b1,b2 + 1)-cut b4
   holds b5 is_oriented_vertex_seq_of b7;

:: GRAPH_4:th 15
theorem
for b1 being Graph-like MultiGraphStruct
for b2, b3 being FinSequence of the Vertices of b1
for b4, b5 being oriented Chain of b1
      st b2 is_oriented_vertex_seq_of b4 & b3 is_oriented_vertex_seq_of b5 & b2 . len b2 = b3 . 1
   holds b4 ^ b5 is oriented Chain of b1;

:: GRAPH_4:th 16
theorem
for b1 being Graph-like MultiGraphStruct
for b2, b3, b4 being FinSequence of the Vertices of b1
for b5, b6, b7 being oriented Chain of b1
      st b2 is_oriented_vertex_seq_of b5 & b3 is_oriented_vertex_seq_of b6 & b2 . len b2 = b3 . 1 & b7 = b5 ^ b6 & b4 = b2 ^' b3
   holds b4 is_oriented_vertex_seq_of b7;

:: GRAPH_4:attrnot 1 => GRAPH_4:attr 1
definition
  let a1 be Graph-like MultiGraphStruct;
  let a2 be oriented Chain of a1;
  attr a2 is Simple means
    ex b1 being FinSequence of the Vertices of a1 st
       b1 is_oriented_vertex_seq_of a2 &
        (for b2, b3 being Element of NAT
              st 1 <= b2 & b2 < b3 & b3 <= len b1 & b1 . b2 = b1 . b3
           holds b2 = 1 & b3 = len b1);
end;

:: GRAPH_4:dfs 7
definiens
  let a1 be Graph-like MultiGraphStruct;
  let a2 be oriented Chain of a1;
To prove
     a2 is Simple
it is sufficient to prove
  thus ex b1 being FinSequence of the Vertices of a1 st
       b1 is_oriented_vertex_seq_of a2 &
        (for b2, b3 being Element of NAT
              st 1 <= b2 & b2 < b3 & b3 <= len b1 & b1 . b2 = b1 . b3
           holds b2 = 1 & b3 = len b1);

:: GRAPH_4:def 7
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being oriented Chain of b1 holds
      b2 is Simple(b1)
   iff
      ex b3 being FinSequence of the Vertices of b1 st
         b3 is_oriented_vertex_seq_of b2 &
          (for b4, b5 being Element of NAT
                st 1 <= b4 & b4 < b5 & b5 <= len b3 & b3 . b4 = b3 . b5
             holds b4 = 1 & b5 = len b3);

:: GRAPH_4:exreg 2
registration
  let a1 be Graph-like MultiGraphStruct;
  cluster Relation-like Function-like finite FinSequence-like oriented Simple Chain of a1;
end;

:: GRAPH_4:exreg 3
registration
  let a1 be Graph-like MultiGraphStruct;
  cluster Relation-like Function-like finite FinSequence-like oriented simple Chain of a1;
end;

:: GRAPH_4:th 18
theorem
for b1 being Element of NAT
for b2 being Graph-like MultiGraphStruct
for b3 being oriented Chain of b2 holds
   b3 | Seg b1 is oriented Chain of b2;

:: GRAPH_4:th 19
theorem
for b1 being Element of NAT
for b2 being Graph-like MultiGraphStruct
for b3 being oriented simple Chain of b2 holds
   b3 | Seg b1 is oriented simple Chain of b2;

:: GRAPH_4:th 20
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being oriented simple Chain of b1
for b3 being oriented Chain of b1
      st b3 = b2
   holds b3 is Simple(b1);

:: GRAPH_4:th 21
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being oriented Simple Chain of b1 holds
   b2 is oriented simple Chain of b1;

:: GRAPH_4:th 22
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being FinSequence of the Vertices of b1
for b3 being oriented Chain of b1
      st b3 is not Simple(b1) & b2 is_oriented_vertex_seq_of b3
   holds ex b4 being Element of bool b3 st
      ex b5 being Element of bool b2 st
         ex b6 being oriented Chain of b1 st
            ex b7 being FinSequence of the Vertices of b1 st
               len b6 < len b3 & b7 is_oriented_vertex_seq_of b6 & len b7 < len b2 & b2 . 1 = b7 . 1 & b2 . len b2 = b7 . len b7 & Seq b4 = b6 & Seq b5 = b7;

:: GRAPH_4:th 23
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being FinSequence of the Vertices of b1
for b3 being oriented Chain of b1
      st b2 is_oriented_vertex_seq_of b3
   holds ex b4 being Element of bool b3 st
      ex b5 being Element of bool b2 st
         ex b6 being oriented simple Chain of b1 st
            ex b7 being FinSequence of the Vertices of b1 st
               Seq b4 = b6 & Seq b5 = b7 & b7 is_oriented_vertex_seq_of b6 & b2 . 1 = b7 . 1 & b2 . len b2 = b7 . len b7;

:: GRAPH_4:condreg 1
registration
  let a1 be Graph-like MultiGraphStruct;
  cluster empty oriented -> one-to-one (Chain of a1);
end;

:: GRAPH_4:th 24
theorem
for b1 being Relation-like Function-like FinSequence-like set
for b2 being Element of NAT
for b3 being Graph-like MultiGraphStruct
      st b1 is one-to-one oriented Chain of b3
   holds b1 | Seg b2 is one-to-one oriented Chain of b3;

:: GRAPH_4:th 25
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being oriented simple Chain of b1 holds
   b2 is one-to-one oriented Chain of b1;

:: GRAPH_4:th 26
theorem
for b1 being Graph-like MultiGraphStruct
for b2 being Relation-like Function-like FinSequence-like set holds
   (b2 is oriented Simple Chain of b1 implies b2 is oriented simple Chain of b1) &
    (b2 is oriented simple Chain of b1 implies b2 is oriented Simple Chain of b1) &
    (b2 is oriented simple Chain of b1 implies b2 is one-to-one oriented Chain of b1);