let G be chordal _Graph; :: thesis: for P being Path of G st P is open & P is chordless holds
for x, e being object st not x in P .vertices() & e Joins P .last() ,x,G & ( for f being object holds not f Joins P . ((len P) - 2),x,G ) holds
( P .addEdge e is Path-like & P .addEdge e is open & P .addEdge e is chordless )

let P be Path of G; :: thesis: ( P is open & P is chordless implies for x, e being object st not x in P .vertices() & e Joins P .last() ,x,G & ( for f being object holds not f Joins P . ((len P) - 2),x,G ) holds
( P .addEdge e is Path-like & P .addEdge e is open & P .addEdge e is chordless ) )

assume that
A1: P is open and
A2: P is chordless ; :: thesis: for x, e being object st not x in P .vertices() & e Joins P .last() ,x,G & ( for f being object holds not f Joins P . ((len P) - 2),x,G ) holds
( P .addEdge e is Path-like & P .addEdge e is open & P .addEdge e is chordless )

let x, e be object ; :: thesis: ( not x in P .vertices() & e Joins P .last() ,x,G & ( for f being object holds not f Joins P . ((len P) - 2),x,G ) implies ( P .addEdge e is Path-like & P .addEdge e is open & P .addEdge e is chordless ) )
assume that
A3: not x in P .vertices() and
A4: e Joins P .last() ,x,G and
A5: for f being object holds not f Joins P . ((len P) - 2),x,G ; :: thesis: ( P .addEdge e is Path-like & P .addEdge e is open & P .addEdge e is chordless )
reconsider Q = P .addEdge e as Path of G by ;
A6: len Q = (len P) + 2 by ;
defpred S1[ Nat] means ( 4 <= 2 * \$1 & 2 * \$1 <= (len P) + 1 implies for j being odd Nat st j + (2 * \$1) = (len P) + 2 holds
for e being object holds not e Joins Q . j,x,G );
A7: now :: thesis: for n being odd Nat st n <= len P holds
P . n = Q . n
let n be odd Nat; :: thesis: ( n <= len P implies P . n = Q . n )
assume A8: n <= len P ; :: thesis: P . n = Q . n
1 <= n by Th2;
then n in dom P by ;
hence P . n = Q . n by ; :: thesis: verum
end;
A9: Q .last() = x by ;
for k being Nat st ( for a being Nat st a < k holds
S1[a] ) holds
S1[k]
proof
let k be Nat; :: thesis: ( ( for a being Nat st a < k holds
S1[a] ) implies S1[k] )

assume A10: for a being Nat st a < k holds
S1[a] ; :: thesis: S1[k]
assume that
A11: 4 <= 2 * k and
2 * k <= (len P) + 1 ; :: thesis: for j being odd Nat st j + (2 * k) = (len P) + 2 holds
for e being object holds not e Joins Q . j,x,G

let j be odd Nat; :: thesis: ( j + (2 * k) = (len P) + 2 implies for e being object holds not e Joins Q . j,x,G )
assume A12: j + (2 * k) = (len P) + 2 ; :: thesis: for e being object holds not e Joins Q . j,x,G
j + 4 <= j + (2 * k) by ;
then A13: (j + 4) - 4 <= ((len P) + 2) - 4 by ;
A14: (len P) - 2 <= len P by XREAL_1:43;
then A15: j <= len P by ;
A16: j in NAT by ORDINAL1:def 12;
let e be object ; :: thesis: not e Joins Q . j,x,G
assume A17: e Joins Q . j,x,G ; :: thesis: contradiction
per cases ( j = (len P) - 2 or j < (len P) - (2 * 1) ) by ;
suppose j = (len P) - 2 ; :: thesis: contradiction
then Q . j = P . ((len P) - 2) by ;
hence contradiction by A5, A17; :: thesis: verum
end;
suppose A18: j < (len P) - (2 * 1) ; :: thesis: contradiction
reconsider lP2 = (len P) + 2 as odd Element of NAT ;
reconsider jj = j as odd Element of NAT by ORDINAL1:def 12;
set B = Q .cut (jj,lP2);
len P < (len P) + 2 by XREAL_1:29;
then A19: j <= (len P) + 2 by ;
then A20: (Q .cut (jj,lP2)) .last() = x by ;
A21: (len (Q .cut (jj,lP2))) + j = ((len P) + 2) + 1 by ;
A22: now :: thesis: for i being even Nat st i < (len (Q .cut (jj,lP2))) - 1 holds
( (Q .cut (jj,lP2)) . (i + 1) = P . (j + i) & j + i in dom P )
let i be even Nat; :: thesis: ( i < (len (Q .cut (jj,lP2))) - 1 implies ( (Q .cut (jj,lP2)) . (i + 1) = P . (j + i) & j + i in dom P ) )
assume A23: i < (len (Q .cut (jj,lP2))) - 1 ; :: thesis: ( (Q .cut (jj,lP2)) . (i + 1) = P . (j + i) & j + i in dom P )
j + i < ((len (Q .cut (jj,lP2))) - 1) + j by ;
then A24: j + i <= ((len P) + 2) - 2 by ;
(len (Q .cut (jj,lP2))) - 1 < len (Q .cut (jj,lP2)) by XREAL_1:44;
then A25: i < len (Q .cut (jj,lP2)) by ;
A26: i in NAT by ORDINAL1:def 12;
then j + i in dom Q by ;
then A27: 1 <= j + i by FINSEQ_3:25;
(Q .cut (jj,lP2)) . (i + 1) = Q . (j + i) by ;
hence ( (Q .cut (jj,lP2)) . (i + 1) = P . (j + i) & j + i in dom P ) by ; :: thesis: verum
end;
set C = (Q .cut (jj,lP2)) .addEdge e;
A28: (Q .cut (jj,lP2)) .first() = Q . j by ;
A29: (Q .cut (jj,lP2)) .first() = Q . j by ;
then A30: e Joins (Q .cut (jj,lP2)) .last() ,(Q .cut (jj,lP2)) .first() ,G by ;
A31: now :: thesis: for n being odd Nat st n <= len (Q .cut (jj,lP2)) holds
((Q .cut (jj,lP2)) .addEdge e) . n = (Q .cut (jj,lP2)) . n
let n be odd Nat; :: thesis: ( n <= len (Q .cut (jj,lP2)) implies ((Q .cut (jj,lP2)) .addEdge e) . n = (Q .cut (jj,lP2)) . n )
assume A32: n <= len (Q .cut (jj,lP2)) ; :: thesis: ((Q .cut (jj,lP2)) .addEdge e) . n = (Q .cut (jj,lP2)) . n
1 <= n by Th2;
then n in dom (Q .cut (jj,lP2)) by ;
hence ((Q .cut (jj,lP2)) .addEdge e) . n = (Q .cut (jj,lP2)) . n by ; :: thesis: verum
end;
A33: ((len P) + 3) - ((len P) - 2) < ((len P) + 3) - j by ;
then A34: 3 < len (Q .cut (jj,lP2)) by ;
(len (Q .cut (jj,lP2))) + 2 > 5 + 2 by ;
then A35: len ((Q .cut (jj,lP2)) .addEdge e) > 7 by ;
A36: now :: thesis: not ((Q .cut (jj,lP2)) .addEdge e) .length() <= 3
assume ((Q .cut (jj,lP2)) .addEdge e) .length() <= 3 ; :: thesis: contradiction
then 2 * (((Q .cut (jj,lP2)) .addEdge e) .length()) <= 2 * 3 by XREAL_1:64;
then (2 * (((Q .cut (jj,lP2)) .addEdge e) .length())) + 1 <= (2 * 3) + 1 by XREAL_1:6;
hence contradiction by A35, GLIB_001:112; :: thesis: verum
end;
P .vertexAt j = P . j by ;
then P . j in P .vertices() by ;
then (Q .cut (jj,lP2)) .first() in P .vertices() by ;
then A37: Q .cut (jj,lP2) is open by ;
then (Q .cut (jj,lP2)) .addEdge e is Cycle-like by ;
then (Q .cut (jj,lP2)) .addEdge e is chordal by ;
then consider m, n being odd Nat such that
A38: m + 2 < n and
A39: n <= len ((Q .cut (jj,lP2)) .addEdge e) and
A40: ((Q .cut (jj,lP2)) .addEdge e) . m <> ((Q .cut (jj,lP2)) .addEdge e) . n and
A41: ex e being object st e Joins ((Q .cut (jj,lP2)) .addEdge e) . m,((Q .cut (jj,lP2)) .addEdge e) . n,G and
A42: ( (Q .cut (jj,lP2)) .addEdge e is Cycle-like implies ( ( not m = 1 or not n = len ((Q .cut (jj,lP2)) .addEdge e) ) & ( not m = 1 or not n = (len ((Q .cut (jj,lP2)) .addEdge e)) - 2 ) & ( not m = 3 or not n = len ((Q .cut (jj,lP2)) .addEdge e) ) ) ) by Th83;
consider e being object such that
A43: e Joins ((Q .cut (jj,lP2)) .addEdge e) . m,((Q .cut (jj,lP2)) .addEdge e) . n,G by A41;
1 <= m by Th2;
then 1 - 1 <= m - 1 by XREAL_1:9;
then reconsider m1 = m - 1 as even Element of NAT by INT_1:3;
reconsider m1 = m1 as even Nat ;
A44: len ((Q .cut (jj,lP2)) .addEdge e) = (len (Q .cut (jj,lP2))) + 2 by ;
then m + 2 < (len (Q .cut (jj,lP2))) + 2 by ;
then A45: (m + 2) - 2 < ((len (Q .cut (jj,lP2))) + 2) - 2 by XREAL_1:9;
then A46: m1 < (len (Q .cut (jj,lP2))) - 1 by XREAL_1:9;
then A47: (Q .cut (jj,lP2)) . (m1 + 1) = P . (j + m1) by A22;
A48: j + m1 in dom P by ;
then A49: j + m1 <= len P by FINSEQ_3:25;
A50: ((Q .cut (jj,lP2)) .addEdge e) .last() = Q . j by ;
now :: thesis: not n = len ((Q .cut (jj,lP2)) .addEdge e)
assume A51: n = len ((Q .cut (jj,lP2)) .addEdge e) ; :: thesis: contradiction
then e Joins P . (j + m1),Q . j,G by A31, A50, A43, A45, A47;
then e Joins P . (j + m1),P . j,G by ;
then A52: e Joins P . j,P . (j + m1),G ;
3 < m by ;
then A53: (2 + 1) - 1 < m - 1 by XREAL_1:9;
then A54: j < j + m1 by XREAL_1:29;
j + 2 < j + m1 by ;
hence contradiction by A1, A2, A49, A52, A54, Th91; :: thesis: verum
end;
then n < (len (Q .cut (jj,lP2))) + (2 * 1) by ;
then A55: n <= ((len (Q .cut (jj,lP2))) + 2) - 2 by Th3;
then A56: ((Q .cut (jj,lP2)) .addEdge e) . n = (Q .cut (jj,lP2)) . n by A31;
1 <= n by Th2;
then 1 - 1 <= n - 1 by XREAL_1:9;
then reconsider n1 = n - 1 as even Element of NAT by INT_1:3;
reconsider n1 = n1 as even Nat ;
(m + 2) - 1 < n - 1 by ;
then j + (m1 + 2) < j + n1 by XREAL_1:8;
then A57: (j + m1) + 2 < j + n1 ;
now :: thesis: not n = len (Q .cut (jj,lP2))
((Q .cut (jj,lP2)) .addEdge e) . m = (Q .cut (jj,lP2)) . m by ;
then A58: ((Q .cut (jj,lP2)) .addEdge e) . m = Q . (j + m1) by A7, A47, A49;
A59: len P < (len P) + 2 by XREAL_1:29;
j + m1 <= len P by ;
then consider kk being Nat such that
A60: (j + m1) + (2 * kk) = (len P) + 2 by ;
assume A61: n = len (Q .cut (jj,lP2)) ; :: thesis: contradiction
A62: now :: thesis: not 2 * kk < 3 + 1
assume 2 * kk < 3 + 1 ; :: thesis: contradiction
then 2 * kk <= 3 by NAT_1:13;
then ( 2 * kk = 0 or 2 * kk = 2 ) by Th11;
hence contradiction by A21, A38, A40, A61, A60; :: thesis: verum
end;
1 <= m by Th2;
then 1 < m by ;
then A63: 1 - 1 < m - 1 by XREAL_1:9;
A64: now :: thesis: not 2 * kk > (len P) + 1
assume 2 * kk > (len P) + 1 ; :: thesis: contradiction
then 2 * kk >= ((len P) + 1) + 1 by NAT_1:13;
hence contradiction by A60, XREAL_1:29; :: thesis: verum
end;
A65: now :: thesis: not kk >= k
assume kk >= k ; :: thesis: contradiction
then A66: 2 * kk >= 2 * k by XREAL_1:64;
(j + (2 * kk)) + m1 > j + (2 * kk) by ;
hence contradiction by A12, A60, A66, XREAL_1:7; :: thesis: verum
end;
((Q .cut (jj,lP2)) .addEdge e) . n = x by ;
hence contradiction by A10, A43, A60, A62, A64, A65, A58; :: thesis: verum
end;
then n < len (Q .cut (jj,lP2)) by ;
then A67: n1 < (len (Q .cut (jj,lP2))) - 1 by XREAL_1:9;
then j + n1 in dom P by A22;
then A68: j + n1 <= len P by FINSEQ_3:25;
m < m + 2 by XREAL_1:29;
then m < n by ;
then m1 < n1 by XREAL_1:9;
then A69: j + m1 < j + n1 by XREAL_1:8;
A70: ((Q .cut (jj,lP2)) .addEdge e) . m = (Q .cut (jj,lP2)) . m by ;
(Q .cut (jj,lP2)) . (n1 + 1) = P . (j + n1) by ;
hence contradiction by A1, A2, A43, A47, A68, A70, A56, A69, A57, Th91; :: thesis: verum
end;
end;
end;
then A71: for k being Nat st ( for a being Nat st a < k holds
S1[a] ) holds
S1[k] ;
A72: for k being Nat holds S1[k] from
A73: now :: thesis: for n being odd Nat st n <= (len P) - 2 holds
for e being object holds not e Joins Q . n,x,G
let n be odd Nat; :: thesis: ( n <= (len P) - 2 implies for e being object holds not e Joins Q . n,x,G )
assume A74: n <= (len P) - 2 ; :: thesis: for e being object holds not e Joins Q . n,x,G
(len P) - 2 <= ((len P) - 2) + 4 by XREAL_1:31;
then consider k being Nat such that
A75: n + (2 * k) = (len P) + 2 by ;
A76: now :: thesis: not 2 * k > (len P) + 1
assume 2 * k > (len P) + 1 ; :: thesis: contradiction
then n + (2 * k) > 1 + ((len P) + 1) by ;
hence contradiction by A75; :: thesis: verum
end;
now :: thesis: not 2 * k < 4
assume A77: 2 * k < 4 ; :: thesis: contradiction
n + 4 <= ((len P) - 2) + 4 by ;
hence contradiction by A75, A77, XREAL_1:8; :: thesis: verum
end;
hence for e being object holds not e Joins Q . n,x,G by ; :: thesis: verum
end;
A78: now :: thesis: not Q is chordal
assume Q is chordal ; :: thesis: contradiction
then consider m, n being odd Nat such that
A79: m + 2 < n and
A80: n <= len Q and
Q . m <> Q . n and
A81: ex e being object st e Joins Q . m,Q . n,G and
( Q is Cycle-like implies ( ( not m = 1 or not n = len Q ) & ( not m = 1 or not n = (len Q) - 2 ) & ( not m = 3 or not n = len Q ) ) ) by Th83;
m + 2 < (len P) + 2 by ;
then A82: (m + 2) - 2 < ((len P) + 2) - 2 by XREAL_1:9;
m < m + 2 by XREAL_1:29;
then A83: m < n by ;
per cases ( n = len Q or n < len Q ) by ;
suppose A84: n = len Q ; :: thesis: contradiction
then (m + 2) - 2 < ((len P) + 2) - 2 by ;
hence contradiction by A9, A73, A81, A84, Th3; :: thesis: verum
end;
suppose A85: n < len Q ; :: thesis: contradiction
A86: Q . m = P . m by ;
A87: n <= ((len P) + 2) - 2 by A6, A85, Th3;
then Q . n = P . n by A7;
hence contradiction by A1, A2, A79, A81, A83, A87, A86, Th91; :: thesis: verum
end;
end;
end;
Q .first() = P .first() by ;
then Q .first() in P .vertices() by GLIB_001:88;
hence ( P .addEdge e is Path-like & P .addEdge e is open & P .addEdge e is chordless ) by A3, A9, A78; :: thesis: verum