Lm1:
for G2 being _Graph
for E being set
for G1 being reverseEdgeDirections of G2,E
for v1, e, v2 being object st E c= the_Edges_of G2 & e in E & e DJoins v1,v2,G2 holds
e DJoins v2,v1,G1
Lm2:
for G2 being _Graph
for E being set
for G1 being reverseEdgeDirections of G2,E
for v1, e, v2 being object st E c= the_Edges_of G2 & not e in E & e DJoins v1,v2,G2 holds
e DJoins v1,v2,G1
Lm3:
for G2 being _Graph
for E being set
for G1 being reverseEdgeDirections of G2,E st E c= the_Edges_of G2 holds
for v1, e, v2 being object st e Joins v1,v2,G2 holds
e Joins v1,v2,G1
Lm4:
for G2 being _Graph
for E being set
for G1 being reverseEdgeDirections of G2,E
for W2 being Walk of G2
for W1 being Walk of G1 st W1 = W2 & W1 is chordal holds
W2 is chordal
Lm5:
for G2 being _Graph
for E being set
for G1 being reverseEdgeDirections of G2,E
for v1 being Vertex of G1
for v2 being Vertex of G2 st v1 = v2 holds
( ( v1 is isolated implies v2 is isolated ) & ( v1 is endvertex implies v2 is endvertex ) & ( v1 is cut-vertex implies v2 is cut-vertex ) )
Lm6:
for X, Y being set holds X /\ (Y --> X) = {}
Lm7:
for X, Y being set
for x being object st X /\ Y = {} & x in X holds
not x in Y
by XBOOLE_0:def 4;
theorem
for
G being
_Graph for
v being
object for
V being
set for
G1 being
addAdjVertexToAll of
G,
v,
V for
G2 being
addAdjVertexFromAll of
G,
v,
V for
v1,
e,
v2 being
object holds
(
e Joins v1,
v2,
G1 iff
e Joins v1,
v2,
G2 )
theorem Th38:
for
G2 being
_Graph for
v being
object for
V being
set for
G1 being
addAdjVertexToAll of
G2,
v,
V st
V c= the_Vertices_of G2 & not
v in the_Vertices_of G2 holds
for
e1,
u being
object holds
( not
e1 DJoins u,
v,
G1 & ( not
u in V implies not
e1 DJoins v,
u,
G1 ) & ( for
e2 being
object st
e1 DJoins v,
u,
G1 &
e2 DJoins v,
u,
G1 holds
e1 = e2 ) )
theorem Th39:
for
G2 being
_Graph for
v being
object for
V being
set for
G1 being
addAdjVertexFromAll of
G2,
v,
V st
V c= the_Vertices_of G2 & not
v in the_Vertices_of G2 holds
for
e1,
u being
object holds
( not
e1 DJoins v,
u,
G1 & ( not
u in V implies not
e1 DJoins u,
v,
G1 ) & ( for
e2 being
object st
e1 DJoins u,
v,
G1 &
e2 DJoins u,
v,
G1 holds
e1 = e2 ) )
Lm8:
for V, E being set holds card V = card (V --> E)
Lm9:
for G2 being _Graph
for v being object
for V being set
for G1 being addAdjVertexToAll of G2,v,V st V c= the_Vertices_of G2 & not v in the_Vertices_of G2 holds
( ( for e being object holds
( not e Joins v,v,G1 & ( for v1 being object holds
( ( not v1 in V implies not e Joins v1,v,G1 ) & ( for v2 being object st v1 <> v & v2 <> v & e DJoins v1,v2,G1 holds
e DJoins v1,v2,G2 ) ) ) ) ) & ex E being set st
( card V = card E & E misses the_Edges_of G2 & the_Edges_of G1 = (the_Edges_of G2) \/ E & ( for v1 being object st v1 in V holds
ex e1 being object st
( e1 in E & e1 Joins v1,v,G1 & ( for e2 being object st e2 Joins v1,v,G1 holds
e1 = e2 ) ) ) ) )
Lm10:
for G2 being _Graph
for v being object
for V being set
for G1 being addAdjVertexFromAll of G2,v,V st V c= the_Vertices_of G2 & not v in the_Vertices_of G2 holds
( ( for e being object holds
( not e Joins v,v,G1 & ( for v1 being object holds
( ( not v1 in V implies not e Joins v1,v,G1 ) & ( for v2 being object st v1 <> v & v2 <> v & e DJoins v1,v2,G1 holds
e DJoins v1,v2,G2 ) ) ) ) ) & ex E being set st
( card V = card E & E misses the_Edges_of G2 & the_Edges_of G1 = (the_Edges_of G2) \/ E & ( for v1 being object st v1 in V holds
ex e1 being object st
( e1 in E & e1 Joins v1,v,G1 & ( for e2 being object st e2 Joins v1,v,G1 holds
e1 = e2 ) ) ) ) )
definition
let G be
_Graph;
let v be
object ;
let V be
set ;
mode addAdjVertexAll of
G,
v,
V -> Supergraph of
G means :
Def4:
(
the_Vertices_of it = (the_Vertices_of G) \/ {v} & ( for
e being
object holds
( not
e Joins v,
v,
it & ( for
v1 being
object holds
( ( not
v1 in V implies not
e Joins v1,
v,
it ) & ( for
v2 being
object st
v1 <> v &
v2 <> v &
e DJoins v1,
v2,
it holds
e DJoins v1,
v2,
G ) ) ) ) ) & ex
E being
set st
(
card V = card E &
E misses the_Edges_of G &
the_Edges_of it = (the_Edges_of G) \/ E & ( for
v1 being
object st
v1 in V holds
ex
e1 being
object st
(
e1 in E &
e1 Joins v1,
v,
it & ( for
e2 being
object st
e2 Joins v1,
v,
it holds
e1 = e2 ) ) ) ) )
if (
V c= the_Vertices_of G & not
v in the_Vertices_of G )
otherwise it == G;
existence
( ( V c= the_Vertices_of G & not v in the_Vertices_of G implies ex b1 being Supergraph of G st
( the_Vertices_of b1 = (the_Vertices_of G) \/ {v} & ( for e being object holds
( not e Joins v,v,b1 & ( for v1 being object holds
( ( not v1 in V implies not e Joins v1,v,b1 ) & ( for v2 being object st v1 <> v & v2 <> v & e DJoins v1,v2,b1 holds
e DJoins v1,v2,G ) ) ) ) ) & ex E being set st
( card V = card E & E misses the_Edges_of G & the_Edges_of b1 = (the_Edges_of G) \/ E & ( for v1 being object st v1 in V holds
ex e1 being object st
( e1 in E & e1 Joins v1,v,b1 & ( for e2 being object st e2 Joins v1,v,b1 holds
e1 = e2 ) ) ) ) ) ) & ( ( not V c= the_Vertices_of G or v in the_Vertices_of G ) implies ex b1 being Supergraph of G st b1 == G ) )
consistency
for b1 being Supergraph of G holds verum
;
end;
::
deftheorem Def4 defines
addAdjVertexAll GLIB_007:def 4 :
for G being _Graph
for v being object
for V being set
for b4 being Supergraph of G holds
( ( V c= the_Vertices_of G & not v in the_Vertices_of G implies ( b4 is addAdjVertexAll of G,v,V iff ( the_Vertices_of b4 = (the_Vertices_of G) \/ {v} & ( for e being object holds
( not e Joins v,v,b4 & ( for v1 being object holds
( ( not v1 in V implies not e Joins v1,v,b4 ) & ( for v2 being object st v1 <> v & v2 <> v & e DJoins v1,v2,b4 holds
e DJoins v1,v2,G ) ) ) ) ) & ex E being set st
( card V = card E & E misses the_Edges_of G & the_Edges_of b4 = (the_Edges_of G) \/ E & ( for v1 being object st v1 in V holds
ex e1 being object st
( e1 in E & e1 Joins v1,v,b4 & ( for e2 being object st e2 Joins v1,v,b4 holds
e1 = e2 ) ) ) ) ) ) ) & ( ( not V c= the_Vertices_of G or v in the_Vertices_of G ) implies ( b4 is addAdjVertexAll of G,v,V iff b4 == G ) ) );
definition
let G be
_Graph;
let v be
object ;
mode addAdjVertexAll of G,v is addAdjVertexAll of
G,
v,
the_Vertices_of G;
correctness
;
let V be
set ;
addAdjVertexToAllredefine mode addAdjVertexToAll of
G,
v,
V -> addAdjVertexAll of
G,
v,
V;
coherence
for b1 being addAdjVertexToAll of G,v,V holds b1 is addAdjVertexAll of G,v,V
addAdjVertexFromAllredefine mode addAdjVertexFromAll of
G,
v,
V -> addAdjVertexAll of
G,
v,
V;
coherence
for b1 being addAdjVertexFromAll of G,v,V holds b1 is addAdjVertexAll of G,v,V
end;
Lm11:
for G2 being _Graph
for v being object
for G1 being addAdjVertexAll of G2,v, {} st the_Edges_of G2 = {} holds
the_Edges_of G1 = {}
by Th46;
Lm12:
for G2 being _Graph
for v being object
for V being set
for W being Subset of V
for G1 being addAdjVertexAll of G2,v,V st V c= the_Vertices_of G2 & not v in the_Vertices_of G2 & G1 .edgesBetween (W,{v}) = {} holds
W = {}
theorem
for
G3 being
_Graph for
v being
object for
V being
set for
v1 being
Vertex of
G3 for
G1 being
addAdjVertexAll of
G3,
v,
V \/ {v1} st
V c= the_Vertices_of G3 & not
v in the_Vertices_of G3 & not
v1 in V holds
ex
G2 being
addAdjVertexAll of
G3,
v,
V ex
e being
object st
( not
e in the_Edges_of G2 & (
G1 is
addEdge of
G2,
v,
e,
v1 or
G1 is
addEdge of
G2,
v1,
e,
v ) )
theorem
for
G3 being
_Graph for
v being
object for
V being
set for
v1 being
Vertex of
G3 for
e being
object for
G2 being
addAdjVertexAll of
G3,
v,
V st
V c= the_Vertices_of G3 & not
v in the_Vertices_of G3 & not
v1 in V & not
e in the_Edges_of G2 holds
for
G1 being
_Graph st (
G1 is
addEdge of
G2,
v1,
e,
v or
G1 is
addEdge of
G2,
v,
e,
v1 ) holds
G1 is
addAdjVertexAll of
G3,
v,
V \/ {v1}
Lm13:
for k being odd Element of NAT st 1 < k holds
k - 2 is odd Element of NAT
theorem
for
G being
_Graph for
v being
object for
V being
set for
G1,
G2 being
addAdjVertexAll of
G,
v,
V ex
f being
Function of
(the_Edges_of G1),
(the_Edges_of G2) st
(
f | (the_Edges_of G) = id (the_Edges_of G) &
f is
one-to-one &
f is
onto & ( for
v1,
e,
v2 being
object st
e Joins v1,
v2,
G1 holds
f . e Joins v1,
v2,
G2 ) )
Lm14:
for k being odd Element of NAT holds
( (k -' 1) + 1 = k & ( for n being Element of NAT st k <= n holds
k -' 1 < n ) )
Lm15:
for k, n being odd Element of NAT holds n + (k -' 1) is odd Element of NAT
Lm16:
( 1 is odd Element of NAT & 3 is odd Element of NAT )
by POLYFORM:4, POLYFORM:6;
:: subgraph modes. This particular example was needed
:: to show that the cut-vertex property prevails in graphs
:: with (partially) reversed edge directions