let G1 be _Graph; :: thesis: for G2 being removeLoops of G1 holds
( G1 is chordal iff G2 is chordal )

let G2 be removeLoops of G1; :: thesis: ( G1 is chordal iff G2 is chordal )
hereby :: thesis: ( G2 is chordal implies G1 is chordal )
assume A1: G1 is chordal ; :: thesis: G2 is chordal
now :: thesis: for P2 being Walk of G2 st P2 .length() > 3 & P2 is Cycle-like holds
P2 is chordal
let P2 be Walk of G2; :: thesis: ( P2 .length() > 3 & P2 is Cycle-like implies P2 is chordal )
assume A2: ( P2 .length() > 3 & P2 is Cycle-like ) ; :: thesis: P2 is chordal
now :: thesis: ex m, n being odd Nat st
( m + 2 < n & n <= len P2 & P2 . m <> P2 . n & ex e being object st e Joins P2 . m,P2 . n,G2 & ( for f being object st f in P2 .edges() holds
not f Joins P2 . m,P2 . n,G2 ) )
reconsider P1 = P2 as Walk of G1 by GLIB_001:167;
( P1 .length() > 3 & P1 is Cycle-like ) by ;
then consider m, n being odd Nat such that
A3: ( m + 2 < n & n <= len P1 & P1 . m <> P1 . n ) and
A4: ex e being object st e Joins P1 . m,P1 . n,G1 and
A5: for f being object st f in P1 .edges() holds
not f Joins P1 . m,P1 . n,G1 by ;
take m = m; :: thesis: ex n being odd Nat st
( m + 2 < n & n <= len P2 & P2 . m <> P2 . n & ex e being object st e Joins P2 . m,P2 . n,G2 & ( for f being object st f in P2 .edges() holds
not f Joins P2 . m,P2 . n,G2 ) )

take n = n; :: thesis: ( m + 2 < n & n <= len P2 & P2 . m <> P2 . n & ex e being object st e Joins P2 . m,P2 . n,G2 & ( for f being object st f in P2 .edges() holds
not f Joins P2 . m,P2 . n,G2 ) )

thus ( m + 2 < n & n <= len P2 & P2 . m <> P2 . n ) by A3; :: thesis: ( ex e being object st e Joins P2 . m,P2 . n,G2 & ( for f being object st f in P2 .edges() holds
not f Joins P2 . m,P2 . n,G2 ) )

hereby :: thesis: for f being object st f in P2 .edges() holds
not f Joins P2 . m,P2 . n,G2
consider e being object such that
A6: e Joins P1 . m,P1 . n,G1 by A4;
take e = e; :: thesis: e Joins P2 . m,P2 . n,G2
A7: e in the_Edges_of G1 by ;
not e in G1 .loops() by A3, A6, Th46;
then e in () \ (G1 .loops()) by ;
then e in the_Edges_of G2 by GLIB_000:53;
hence e Joins P2 . m,P2 . n,G2 by ; :: thesis: verum
end;
let f be object ; :: thesis: ( f in P2 .edges() implies not f Joins P2 . m,P2 . n,G2 )
assume f in P2 .edges() ; :: thesis: not f Joins P2 . m,P2 . n,G2
then f in P1 .edges() by GLIB_001:110;
hence not f Joins P2 . m,P2 . n,G2 by ; :: thesis: verum
end;
hence P2 is chordal by CHORD:def 10; :: thesis: verum
end;
hence G2 is chordal by CHORD:def 11; :: thesis: verum
end;
assume A8: G2 is chordal ; :: thesis: G1 is chordal
now :: thesis: for P1 being Walk of G1 st P1 .length() > 3 & P1 is Cycle-like holds
P1 is chordal
let P1 be Walk of G1; :: thesis: ( P1 .length() > 3 & P1 is Cycle-like implies P1 is chordal )
assume A9: ( P1 .length() > 3 & P1 is Cycle-like ) ; :: thesis: P1 is chordal
now :: thesis: ex m, n being odd Nat st
( m + 2 < n & n <= len P1 & P1 . m <> P1 . n & ex e being object st e Joins P1 . m,P1 . n,G1 & ( for f being object st f in P1 .edges() holds
not f Joins P1 . m,P1 . n,G1 ) )
P1 .edges() misses G1 .loops()
proof
assume P1 .edges() meets G1 .loops() ; :: thesis: contradiction
then consider v, e being object such that
A10: ( e Joins v,v,G1 & P1 = G1 .walkOf (v,e,v) ) by ;
(2 * ()) + 1 = len P1 by GLIB_001:112
.= (2 * 1) + 1 by ;
hence contradiction by A9; :: thesis: verum
end;
then P1 .edges() c= () \ (G1 .loops()) by XBOOLE_1:86;
then A11: P1 .edges() c= the_Edges_of G2 by GLIB_000:53;
the_Vertices_of G1 = the_Vertices_of G2 by GLIB_000:53;
then P1 .vertices() c= the_Vertices_of G2 ;
then reconsider P2 = P1 as Walk of G2 by ;
( P2 .length() > 3 & P2 is Cycle-like ) by ;
then consider m, n being odd Nat such that
A12: ( m + 2 < n & n <= len P2 & P2 . m <> P2 . n ) and
A13: ex e being object st e Joins P2 . m,P2 . n,G2 and
A14: for f being object st f in P2 .edges() holds
not f Joins P2 . m,P2 . n,G2 by ;
take m = m; :: thesis: ex n being odd Nat st
( m + 2 < n & n <= len P1 & P1 . m <> P1 . n & ex e being object st e Joins P1 . m,P1 . n,G1 & ( for f being object st f in P1 .edges() holds
not f Joins P1 . m,P1 . n,G1 ) )

take n = n; :: thesis: ( m + 2 < n & n <= len P1 & P1 . m <> P1 . n & ex e being object st e Joins P1 . m,P1 . n,G1 & ( for f being object st f in P1 .edges() holds
not f Joins P1 . m,P1 . n,G1 ) )

thus ( m + 2 < n & n <= len P1 & P1 . m <> P1 . n ) by A12; :: thesis: ( ex e being object st e Joins P1 . m,P1 . n,G1 & ( for f being object st f in P1 .edges() holds
not f Joins P1 . m,P1 . n,G1 ) )

thus ex e being object st e Joins P1 . m,P1 . n,G1 by ; :: thesis: for f being object st f in P1 .edges() holds
not f Joins P1 . m,P1 . n,G1

let f be object ; :: thesis: ( f in P1 .edges() implies not f Joins P1 . m,P1 . n,G1 )
assume f in P1 .edges() ; :: thesis: not f Joins P1 . m,P1 . n,G1
then A15: f in P2 .edges() by GLIB_001:110;
then not f Joins P2 . m,P2 . n,G2 by A14;
hence not f Joins P1 . m,P1 . n,G1 by ; :: thesis: verum
end;
hence P1 is chordal by CHORD:def 10; :: thesis: verum
end;
hence G1 is chordal by CHORD:def 11; :: thesis: verum