begin
:: deftheorem defines dom GRAPH_1:def 1 :
for C being non empty non void MultiGraphStruct
for f being Edge of C holds dom f = the Source of C . f;
:: deftheorem defines cod GRAPH_1:def 2 :
for C being non empty non void MultiGraphStruct
for f being Edge of C holds cod f = the Target of C . f;
:: deftheorem Def3 defines \/ GRAPH_1:def 3 :
for G1, G2 being Graph st the Source of G1 tolerates the Source of G2 & the Target of G1 tolerates the Target of G2 holds
for b3 being strict Graph holds
( b3 = G1 \/ G2 iff ( the carrier of b3 = the carrier of G1 \/ the carrier of G2 & the carrier' of b3 = the carrier' of G1 \/ the carrier' of G2 & ( for v being set st v in the carrier' of G1 holds
( the Source of b3 . v = the Source of G1 . v & the Target of b3 . v = the Target of G1 . v ) ) & ( for v being set st v in the carrier' of G2 holds
( the Source of b3 . v = the Source of G2 . v & the Target of b3 . v = the Target of G2 . v ) ) ) );
:: deftheorem Def4 defines is_sum_of GRAPH_1:def 4 :
for G, G1, G2 being Graph holds
( G is_sum_of G1,G2 iff ( the Target of G1 tolerates the Target of G2 & the Source of G1 tolerates the Source of G2 & MultiGraphStruct(# the carrier of G, the carrier' of G, the Source of G, the Target of G #) = G1 \/ G2 ) );
:: deftheorem Def5 defines oriented GRAPH_1:def 5 :
for IT being Graph holds
( IT is oriented iff for x, y being set st x in the carrier' of IT & y in the carrier' of IT & the Source of IT . x = the Source of IT . y & the Target of IT . x = the Target of IT . y holds
x = y );
:: deftheorem Def6 defines non-multi GRAPH_1:def 6 :
for IT being Graph holds
( IT is non-multi iff for x, y being set st x in the carrier' of IT & y in the carrier' of IT & ( ( the Source of IT . x = the Source of IT . y & the Target of IT . x = the Target of IT . y ) or ( the Source of IT . x = the Target of IT . y & the Source of IT . y = the Target of IT . x ) ) holds
x = y );
:: deftheorem Def7 defines simple GRAPH_1:def 7 :
for IT being Graph holds
( IT is simple iff for x being set holds
( not x in the carrier' of IT or not the Source of IT . x = the Target of IT . x ) );
:: deftheorem Def8 defines connected GRAPH_1:def 8 :
for IT being Graph holds
( IT is connected iff for G1, G2 being Graph holds
( not the carrier of G1 misses the carrier of G2 or not IT is_sum_of G1,G2 ) );
:: deftheorem Def9 defines finite GRAPH_1:def 9 :
for IT being MultiGraphStruct holds
( IT is finite iff ( the carrier of IT is finite & the carrier' of IT is finite ) );
:: deftheorem defines joins GRAPH_1:def 10 :
for G being Graph
for x, y being Element of the carrier of G
for v being set holds
( v joins x,y iff ( ( the Source of G . v = x & the Target of G . v = y ) or ( the Source of G . v = y & the Target of G . v = x ) ) );
:: deftheorem defines are_incident GRAPH_1:def 11 :
for G being Graph
for x, y being Element of the carrier of G holds
( x,y are_incident iff ex v being set st
( v in the carrier' of G & v joins x,y ) );
:: deftheorem Def12 defines Chain GRAPH_1:def 12 :
for G being Graph
for b2 being FinSequence holds
( b2 is Chain of G iff ( ( for n being Element of NAT st 1 <= n & n <= len b2 holds
b2 . n in the carrier' of G ) & ex p being FinSequence st
( len p = (len b2) + 1 & ( for n being Element of NAT st 1 <= n & n <= len p holds
p . n in the carrier of G ) & ( for n being Element of NAT st 1 <= n & n <= len b2 holds
ex x9, y9 being Vertex of G st
( x9 = p . n & y9 = p . (n + 1) & b2 . n joins x9,y9 ) ) ) ) );
Lm1:
for G being Graph holds {} is Chain of G
:: deftheorem defines oriented GRAPH_1:def 13 :
for G being Graph
for IT being Chain of G holds
( IT is oriented iff for n being Element of NAT st 1 <= n & n < len IT holds
the Source of G . (IT . (n + 1)) = the Target of G . (IT . n) );
:: deftheorem defines one-to-one GRAPH_1:def 14 :
for G being Graph
for IT being Chain of G holds
( IT is one-to-one iff for n, m being Element of NAT st 1 <= n & n < m & m <= len IT holds
IT . n <> IT . m );
:: deftheorem GRAPH_1:def 15 :
canceled;
:: deftheorem defines cyclic GRAPH_1:def 16 :
for G being Graph
for IT being Path of G holds
( IT is cyclic iff ex p being FinSequence st
( len p = (len IT) + 1 & ( for n being Element of NAT st 1 <= n & n <= len p holds
p . n in the carrier of G ) & ( for n being Element of NAT st 1 <= n & n <= len IT holds
ex x9, y9 being Vertex of G st
( x9 = p . n & y9 = p . (n + 1) & IT . n joins x9,y9 ) ) & p . 1 = p . (len p) ) );
:: deftheorem GRAPH_1:def 17 :
canceled;
:: deftheorem Def18 defines Subgraph GRAPH_1:def 18 :
for G, b2 being Graph holds
( b2 is Subgraph of G iff ( the carrier of b2 c= the carrier of G & the carrier' of b2 c= the carrier' of G & ( for v being set st v in the carrier' of b2 holds
( the Source of b2 . v = the Source of G . v & the Target of b2 . v = the Target of G . v & the Source of G . v in the carrier of b2 & the Target of G . v in the carrier of b2 ) ) ) );
:: deftheorem defines VerticesCount GRAPH_1:def 19 :
for G being finite Graph
for b2 being Element of NAT holds
( b2 = VerticesCount G iff ex B being finite set st
( B = the carrier of G & b2 = card B ) );
:: deftheorem defines EdgesCount GRAPH_1:def 20 :
for G being finite Graph
for b2 being Element of NAT holds
( b2 = EdgesCount G iff ex B being finite set st
( B = the carrier' of G & b2 = card B ) );
:: deftheorem defines EdgesIn GRAPH_1:def 21 :
for G being finite Graph
for x being Vertex of G
for b3 being Element of NAT holds
( b3 = EdgesIn x iff ex X being finite set st
( ( for z being set holds
( z in X iff ( z in the carrier' of G & the Target of G . z = x ) ) ) & b3 = card X ) );
:: deftheorem defines EdgesOut GRAPH_1:def 22 :
for G being finite Graph
for x being Vertex of G
for b3 being Element of NAT holds
( b3 = EdgesOut x iff ex X being finite set st
( ( for z being set holds
( z in X iff ( z in the carrier' of G & the Source of G . z = x ) ) ) & b3 = card X ) );
:: deftheorem defines Degree GRAPH_1:def 23 :
for G being finite Graph
for x being Vertex of G holds Degree x = (EdgesIn x) + (EdgesOut x);
Lm2:
for n being Element of NAT
for G being Graph
for p being Chain of G holds p | (Seg n) is Chain of G
Lm3:
for G being Graph
for H1, H2 being strict Subgraph of G st the carrier of H1 = the carrier of H2 & the carrier' of H1 = the carrier' of H2 holds
H1 = H2
:: deftheorem Def24 defines c= GRAPH_1:def 24 :
for G1, G2 being Graph holds
( G1 c= G2 iff G1 is Subgraph of G2 );
Lm4:
for G being Graph
for H being Subgraph of G holds
( the Source of H in PFuncs ( the carrier' of G, the carrier of G) & the Target of H in PFuncs ( the carrier' of G, the carrier of G) )
:: deftheorem Def25 defines bool GRAPH_1:def 25 :
for G being Graph
for b2 being set holds
( b2 = bool G iff for x being set holds
( x in b2 iff x is strict Subgraph of G ) );
theorem
theorem
theorem
theorem
theorem Th5:
theorem
theorem Th7:
theorem Th8:
theorem Th9:
theorem Th10:
theorem
theorem Th12:
theorem
theorem
theorem
theorem Th16:
theorem Th17:
for
G1,
G2,
G3 being
Graph st
G1 c= G2 &
G2 c= G3 holds
G1 c= G3
theorem Th18:
theorem Th19:
theorem Th20:
theorem Th21:
theorem Th22:
for
G1,
G,
G2 being
Graph st
G1 c= G &
G2 c= G holds
G1 \/ G2 c= G
theorem
theorem Th24:
theorem
canceled;
theorem
canceled;
theorem
theorem
theorem
theorem
theorem Th31:
theorem
theorem
canceled;
theorem
theorem
theorem
theorem