let G1 be _Graph; :: thesis: for G2 being Dsimple _Graph holds
( G2 is DGraphComplement of G1 iff ( the_Vertices_of G2 = the_Vertices_of G1 & the_Edges_of G2 misses the_Edges_of G1 & ( for v, w being Vertex of G1 st v <> w holds
( ex e1 being object st e1 DJoins v,w,G1 iff for e2 being object holds not e2 DJoins v,w,G2 ) ) ) )

let G2 be Dsimple _Graph; :: thesis: ( G2 is DGraphComplement of G1 iff ( the_Vertices_of G2 = the_Vertices_of G1 & the_Edges_of G2 misses the_Edges_of G1 & ( for v, w being Vertex of G1 st v <> w holds
( ex e1 being object st e1 DJoins v,w,G1 iff for e2 being object holds not e2 DJoins v,w,G2 ) ) ) )

hereby :: thesis: ( the_Vertices_of G2 = the_Vertices_of G1 & the_Edges_of G2 misses the_Edges_of G1 & ( for v, w being Vertex of G1 st v <> w holds
( ex e1 being object st e1 DJoins v,w,G1 iff for e2 being object holds not e2 DJoins v,w,G2 ) ) implies G2 is DGraphComplement of G1 )
assume G2 is DGraphComplement of G1 ; :: thesis: ( the_Vertices_of G2 = the_Vertices_of G1 & the_Edges_of G2 misses the_Edges_of G1 & ( for v, w being Vertex of G1 st v <> w holds
( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w,G2 ) & ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st e1 DJoins v,w,G1 ) ) ) )

then consider G9 being DLGraphComplement of G1 such that
A1: G2 is removeLoops of G9 by Def8;
thus the_Vertices_of G2 = the_Vertices_of G9 by A1, GLIB_000:def 33
.= the_Vertices_of G1 by Def6 ; :: thesis: ( the_Edges_of G2 misses the_Edges_of G1 & ( for v, w being Vertex of G1 st v <> w holds
( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w,G2 ) & ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st e1 DJoins v,w,G1 ) ) ) )

A2: the_Edges_of G2 c= the_Edges_of G9 by A1, GLIB_000:def 32;
the_Edges_of G9 misses the_Edges_of G1 by Def6;
hence the_Edges_of G2 misses the_Edges_of G1 by A2, XBOOLE_1:63; :: thesis: for v, w being Vertex of G1 st v <> w holds
( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w,G2 ) & ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st e1 DJoins v,w,G1 ) )

let v, w be Vertex of G1; :: thesis: ( v <> w implies ( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w,G2 ) & ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st e1 DJoins v,w,G1 ) ) )
assume A3: v <> w ; :: thesis: ( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w,G2 ) & ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st e1 DJoins v,w,G1 ) )
hereby :: thesis: ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st e1 DJoins v,w,G1 )
given e1 being object such that A4: e1 DJoins v,w,G1 ; :: thesis: for e2 being object holds not e2 DJoins v,w,G2
given e2 being object such that A5: e2 DJoins v,w,G2 ; :: thesis: contradiction
e2 DJoins v,w,G9 by A1, A5, GLIB_000:72;
hence contradiction by A4, Th46; :: thesis: verum
end;
assume A6: for e2 being object holds not e2 DJoins v,w,G2 ; :: thesis: ex e1 being object st e1 DJoins v,w,G1
for e9 being object holds not e9 DJoins v,w,G9
proof end;
hence ex e1 being object st e1 DJoins v,w,G1 by Def6; :: thesis: verum
end;
assume that
A10: ( the_Vertices_of G2 = the_Vertices_of G1 & the_Edges_of G2 misses the_Edges_of G1 ) and
A11: for v, w being Vertex of G1 st v <> w holds
( ex e1 being object st e1 DJoins v,w,G1 iff for e2 being object holds not e2 DJoins v,w,G2 ) ; :: thesis: G2 is DGraphComplement of G1
per cases ( not G1 is loopfull or G1 is loopfull ) ;
suppose A12: not G1 is loopfull ; :: thesis: G2 is DGraphComplement of G1
defpred S1[ object ] means for e being object holds not e Joins $1,$1,G1;
consider V being Subset of (the_Vertices_of G2) such that
A13: for x being set holds
( x in V iff ( x in the_Vertices_of G2 & S1[x] ) ) from SUBSET_1:sch 1();
A14: not V is empty by A10, A12, A13;
set E = { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ;
deffunc H1( object ) -> object = $1 `2 ;
consider f being Function such that
A15: ( dom f = { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } & ( for x being object st x in { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } holds
f . x = H1(x) ) ) from FUNCT_1:sch 3();
now :: thesis: for x1, x2 being object st x1 in dom f & x2 in dom f & f . x1 = f . x2 holds
x1 = x2
let x1, x2 be object ; :: thesis: ( x1 in dom f & x2 in dom f & f . x1 = f . x2 implies x1 = x2 )
assume A16: ( x1 in dom f & x2 in dom f & f . x1 = f . x2 ) ; :: thesis: x1 = x2
then consider v1 being Element of V such that
A17: x1 = [{(the_Edges_of G1),(the_Edges_of G2)},v1] by A15;
consider v2 being Element of V such that
A18: x2 = [{(the_Edges_of G1),(the_Edges_of G2)},v2] by A15, A16;
v1 = [{(the_Edges_of G1),(the_Edges_of G2)},v1] `2
.= f . x1 by A15, A16, A17
.= [{(the_Edges_of G1),(the_Edges_of G2)},v2] `2 by A15, A16, A18
.= v2 ;
hence x1 = x2 by A17, A18; :: thesis: verum
end;
then reconsider f = f as one-to-one Function by FUNCT_1:def 4;
now :: thesis: for y being object holds
( ( y in rng f implies y in V ) & ( y in V implies y in rng f ) )
let y be object ; :: thesis: ( ( y in rng f implies y in V ) & ( y in V implies y in rng f ) )
hereby :: thesis: ( y in V implies y in rng f )
assume y in rng f ; :: thesis: y in V
then consider x being object such that
A19: ( x in dom f & f . x = y ) by FUNCT_1:def 3;
consider v being Element of V such that
A20: x = [{(the_Edges_of G1),(the_Edges_of G2)},v] by A15, A19;
y = [{(the_Edges_of G1),(the_Edges_of G2)},v] `2 by A15, A19, A20
.= v ;
hence y in V by A14; :: thesis: verum
end;
set x = [{(the_Edges_of G1),(the_Edges_of G2)},y];
assume y in V ; :: thesis: y in rng f
then A21: [{(the_Edges_of G1),(the_Edges_of G2)},y] in { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ;
then f . [{(the_Edges_of G1),(the_Edges_of G2)},y] = [{(the_Edges_of G1),(the_Edges_of G2)},y] `2 by A15
.= y ;
hence y in rng f by A15, A21, FUNCT_1:3; :: thesis: verum
end;
then A22: rng f = V by TARSKI:2;
A23: { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } misses the_Edges_of G1
proof
assume { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } meets the_Edges_of G1 ; :: thesis: contradiction
then consider e being object such that
A24: ( e in { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } & e in the_Edges_of G1 ) by XBOOLE_0:3;
reconsider e = e as set by TARSKI:1;
consider v being Element of V such that
A25: e = [{(the_Edges_of G1),(the_Edges_of G2)},v] by A24;
A26: e = {{{(the_Edges_of G1),(the_Edges_of G2)},v},{{(the_Edges_of G1),(the_Edges_of G2)}}} by A25, TARSKI:def 5;
A27: the_Edges_of G1 in {(the_Edges_of G1),(the_Edges_of G2)} by TARSKI:def 2;
A28: {(the_Edges_of G1),(the_Edges_of G2)} in {{(the_Edges_of G1),(the_Edges_of G2)}} by TARSKI:def 1;
{{(the_Edges_of G1),(the_Edges_of G2)}} in e by A26, TARSKI:def 2;
hence contradiction by A24, A27, A28, XREGULAR:8; :: thesis: verum
end;
A29: { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } misses the_Edges_of G2
proof
assume { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } meets the_Edges_of G2 ; :: thesis: contradiction
then consider e being object such that
A30: ( e in { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } & e in the_Edges_of G2 ) by XBOOLE_0:3;
reconsider e = e as set by TARSKI:1;
consider v being Element of V such that
A31: e = [{(the_Edges_of G1),(the_Edges_of G2)},v] by A30;
A32: e = {{{(the_Edges_of G1),(the_Edges_of G2)},v},{{(the_Edges_of G1),(the_Edges_of G2)}}} by A31, TARSKI:def 5;
A33: the_Edges_of G2 in {(the_Edges_of G1),(the_Edges_of G2)} by TARSKI:def 2;
A34: {(the_Edges_of G1),(the_Edges_of G2)} in {{(the_Edges_of G1),(the_Edges_of G2)}} by TARSKI:def 1;
{{(the_Edges_of G1),(the_Edges_of G2)}} in e by A32, TARSKI:def 2;
hence contradiction by A30, A33, A34, XREGULAR:8; :: thesis: verum
end;
set s = (the_Source_of G2) +* f;
then reconsider s = (the_Source_of G2) +* f as Function of ((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),(the_Vertices_of G2) by FUNCT_2:2;
set t = (the_Target_of G2) +* f;
then reconsider t = (the_Target_of G2) +* f as Function of ((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),(the_Vertices_of G2) by FUNCT_2:2;
set G9 = createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t);
now :: thesis: ( createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) is Supergraph of G2 & the_Vertices_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = the_Vertices_of G2 & ex E being set ex f being one-to-one Function st
( E misses the_Edges_of G2 & the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Edges_of G2) \/ E & dom f = E & rng f = V & the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f ) )
now :: thesis: ( the_Vertices_of G2 c= the_Vertices_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) & the_Edges_of G2 c= the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) & ( for e being set st e in the_Edges_of G2 holds
( (the_Source_of G2) . e = (the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e & (the_Target_of G2) . e = (the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e ) ) )
thus the_Vertices_of G2 c= the_Vertices_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) ; :: thesis: ( the_Edges_of G2 c= the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) & ( for e being set st e in the_Edges_of G2 holds
( (the_Source_of G2) . e = (the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e & (the_Target_of G2) . e = (the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e ) ) )

thus the_Edges_of G2 c= the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) by XBOOLE_1:7; :: thesis: for e being set st e in the_Edges_of G2 holds
( (the_Source_of G2) . e = (the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e & (the_Target_of G2) . e = (the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e )

let e be set ; :: thesis: ( e in the_Edges_of G2 implies ( (the_Source_of G2) . e = (the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e & (the_Target_of G2) . e = (the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e ) )
assume A37: e in the_Edges_of G2 ; :: thesis: ( (the_Source_of G2) . e = (the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e & (the_Target_of G2) . e = (the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e )
then e in (the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } by XBOOLE_0:def 3;
then A38: not e in dom f by A15, A29, A37, XBOOLE_0:5;
hence (the_Source_of G2) . e = ((the_Source_of G2) +* f) . e by FUNCT_4:11
.= (the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e ;
:: thesis: (the_Target_of G2) . e = (the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e
thus (the_Target_of G2) . e = ((the_Target_of G2) +* f) . e by A38, FUNCT_4:11
.= (the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e ; :: thesis: verum
end;
hence createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) is Supergraph of G2 by GLIB_006:def 9; :: thesis: ( the_Vertices_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = the_Vertices_of G2 & ex E being set ex f being one-to-one Function st
( E misses the_Edges_of G2 & the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Edges_of G2) \/ E & dom f = E & rng f = V & the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f ) )

thus the_Vertices_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = the_Vertices_of G2 ; :: thesis: ex E being set ex f being one-to-one Function st
( E misses the_Edges_of G2 & the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Edges_of G2) \/ E & dom f = E & rng f = V & the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f )

reconsider E = { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } as set ;
reconsider f = f as one-to-one Function ;
take E = E; :: thesis: ex f being one-to-one Function st
( E misses the_Edges_of G2 & the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Edges_of G2) \/ E & dom f = E & rng f = V & the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f )

take f = f; :: thesis: ( E misses the_Edges_of G2 & the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Edges_of G2) \/ E & dom f = E & rng f = V & the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f )
thus E misses the_Edges_of G2 by A29; :: thesis: ( the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Edges_of G2) \/ E & dom f = E & rng f = V & the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f )
thus the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Edges_of G2) \/ E ; :: thesis: ( dom f = E & rng f = V & the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f )
thus dom f = E by A15; :: thesis: ( rng f = V & the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f )
thus rng f = V by A22; :: thesis: ( the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f & the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f )
thus the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Source_of G2) +* f ; :: thesis: the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f
thus the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = (the_Target_of G2) +* f ; :: thesis: verum
end;
then A39: createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) is addLoops of G2,V by Def5;
then G2 == the removeLoops of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) by Th26;
then A40: G2 is removeLoops of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) by GLIB_009:59;
A41: createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) is non-Dmulti by A39;
now :: thesis: ( the_Vertices_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = the_Vertices_of G1 & the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) misses the_Edges_of G1 & ( for v, w being Vertex of G1 holds
( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) & ( ( for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) implies ex e1 being object st e1 DJoins v,w,G1 ) ) ) )
thus the_Vertices_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) = the_Vertices_of G1 by A10; :: thesis: ( the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) misses the_Edges_of G1 & ( for v, w being Vertex of G1 holds
( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) & ( ( for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) implies ex e1 being object st e1 DJoins v,w,G1 ) ) ) )

thus the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) misses the_Edges_of G1 by A10, A23, XBOOLE_1:70; :: thesis: for v, w being Vertex of G1 holds
( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) & ( ( for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) implies ex e1 being object st e1 DJoins v,w,G1 ) )

let v, w be Vertex of G1; :: thesis: ( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) & ( ( for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) implies ex e1 being object st e1 DJoins v,w,G1 ) )
hereby :: thesis: ( ( for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ) implies ex e1 being object st e1 DJoins v,w,G1 )
given e1 being object such that A43: e1 DJoins v,w,G1 ; :: thesis: for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)
given e2 being object such that A44: e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ; :: thesis: contradiction
per cases ( e2 DJoins v,w,G2 or not e2 in the_Edges_of G2 ) by A39, A44, GLIB_006:71;
suppose A46: not e2 in the_Edges_of G2 ; :: thesis: contradiction
e2 in the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) by A44, GLIB_000:def 14;
then A47: e2 in { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } by A46, XBOOLE_0:def 3;
then consider u being Element of V such that
A48: e2 = [{(the_Edges_of G1),(the_Edges_of G2)},u] ;
A49: for e being object holds not e Joins u,u,G1 by A13, A14;
A50: v = (the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e2 by A44, GLIB_000:def 14
.= s . e2
.= f . e2 by A15, A47, FUNCT_4:13
.= [{(the_Edges_of G1),(the_Edges_of G2)},u] `2 by A15, A47, A48
.= u ;
A51: w = (the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . e2 by A44, GLIB_000:def 14
.= t . e2
.= f . e2 by A15, A47, FUNCT_4:13
.= [{(the_Edges_of G1),(the_Edges_of G2)},u] `2 by A15, A47, A48
.= u ;
e1 Joins v,w,G1 by A43, GLIB_000:16;
hence contradiction by A49, A50, A51; :: thesis: verum
end;
end;
end;
assume A52: for e2 being object holds not e2 DJoins v,w, createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) ; :: thesis: ex e1 being object st e1 DJoins v,w,G1
assume A53: for e1 being object holds not e1 DJoins v,w,G1 ; :: thesis: contradiction
per cases ( v <> w or v = w ) ;
suppose A55: v = w ; :: thesis: contradiction
set e = [{(the_Edges_of G1),(the_Edges_of G2)},v];
A56: for e1 being object holds not e1 Joins v,v,G1
proof
given e1 being object such that A57: e1 Joins v,v,G1 ; :: thesis: contradiction
e1 DJoins v,v,G1 by A57, GLIB_000:16;
hence contradiction by A53, A55; :: thesis: verum
end;
v in V by A10, A13, A56;
then A58: [{(the_Edges_of G1),(the_Edges_of G2)},v] in { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ;
then A59: [{(the_Edges_of G1),(the_Edges_of G2)},v] in the_Edges_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t)) by XBOOLE_0:def 3;
A60: (the_Source_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . [{(the_Edges_of G1),(the_Edges_of G2)},v] = s . [{(the_Edges_of G1),(the_Edges_of G2)},v]
.= f . [{(the_Edges_of G1),(the_Edges_of G2)},v] by A15, A58, FUNCT_4:13
.= [{(the_Edges_of G1),(the_Edges_of G2)},v] `2 by A15, A58
.= v ;
(the_Target_of (createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t))) . [{(the_Edges_of G1),(the_Edges_of G2)},v] = t . [{(the_Edges_of G1),(the_Edges_of G2)},v]
.= f . [{(the_Edges_of G1),(the_Edges_of G2)},v] by A15, A58, FUNCT_4:13
.= [{(the_Edges_of G1),(the_Edges_of G2)},v] `2 by A15, A58
.= v ;
hence contradiction by A52, A55, A59, A60, GLIB_000:def 14; :: thesis: verum
end;
end;
end;
then createGraph ((the_Vertices_of G2),((the_Edges_of G2) \/ { [{(the_Edges_of G1),(the_Edges_of G2)},v] where v is Element of V : verum } ),s,t) is DLGraphComplement of G1 by A41, Def6;
hence G2 is DGraphComplement of G1 by A40, Def8; :: thesis: verum
end;
suppose A61: G1 is loopfull ; :: thesis: G2 is DGraphComplement of G1
now :: thesis: for v, w being Vertex of G1 holds
( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w,G2 ) & ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st e1 DJoins v,w,G1 ) )
let v, w be Vertex of G1; :: thesis: ( ( ex e1 being object st e1 DJoins v,w,G1 implies for e2 being object holds not e2 DJoins v,w,G2 ) & ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st b3 DJoins e1,b2,G1 ) )
hereby :: thesis: ( ( for e2 being object holds not e2 DJoins v,w,G2 ) implies ex e1 being object st b3 DJoins e1,b2,G1 )
given e1 being object such that A62: e1 DJoins v,w,G1 ; :: thesis: for e2 being object holds not e2 DJoins v,w,G2
per cases ( v <> w or v = w ) ;
suppose v <> w ; :: thesis: for e2 being object holds not e2 DJoins v,w,G2
hence for e2 being object holds not e2 DJoins v,w,G2 by A11, A62; :: thesis: verum
end;
suppose v = w ; :: thesis: for e2 being object holds not e2 DJoins v,w,G2
hence for e2 being object holds not e2 DJoins v,w,G2 by GLIB_000:136; :: thesis: verum
end;
end;
end;
assume A63: for e2 being object holds not e2 DJoins v,w,G2 ; :: thesis: ex e1 being object st b3 DJoins e1,b2,G1
per cases ( v <> w or v = w ) ;
suppose v <> w ; :: thesis: ex e1 being object st b3 DJoins e1,b2,G1
hence ex e1 being object st e1 DJoins v,w,G1 by A11, A63; :: thesis: verum
end;
suppose v = w ; :: thesis: ex e1 being object st b3 DJoins e1,b2,G1
hence ex e1 being object st e1 DJoins v,w,G1 by A61, Th1; :: thesis: verum
end;
end;
end;
then A64: G2 is DLGraphComplement of G1 by A10, Def6;
G2 is removeLoops of G2 by GLIB_009:58;
hence G2 is DGraphComplement of G1 by A64, Def8; :: thesis: verum
end;
end;