let G1, G2 be _Graph; :: thesis: for W1 being Walk of G1
for W2 being Walk of G2 st W1 .vertexSeq() = W2 .vertexSeq() & len W1 <> 5 holds
( ( W1 is Path-like implies W2 is Path-like ) & ( W1 is Cycle-like implies W2 is Cycle-like ) )

let W1 be Walk of G1; :: thesis: for W2 being Walk of G2 st W1 .vertexSeq() = W2 .vertexSeq() & len W1 <> 5 holds
( ( W1 is Path-like implies W2 is Path-like ) & ( W1 is Cycle-like implies W2 is Cycle-like ) )

let W2 be Walk of G2; :: thesis: ( W1 .vertexSeq() = W2 .vertexSeq() & len W1 <> 5 implies ( ( W1 is Path-like implies W2 is Path-like ) & ( W1 is Cycle-like implies W2 is Cycle-like ) ) )
assume A1: W1 .vertexSeq() = W2 .vertexSeq() ; :: thesis: ( not len W1 <> 5 or ( ( W1 is Path-like implies W2 is Path-like ) & ( W1 is Cycle-like implies W2 is Cycle-like ) ) )
assume A2: len W1 <> 5 ; :: thesis: ( ( W1 is Path-like implies W2 is Path-like ) & ( W1 is Cycle-like implies W2 is Cycle-like ) )
thus A3: ( W1 is Path-like implies W2 is Path-like ) :: thesis: ( W1 is Cycle-like implies W2 is Cycle-like )
proof
assume A4: W1 is Path-like ; :: thesis: W2 is Path-like
A5: W2 is Trail-like
proof
assume not W2 is Trail-like ; :: thesis: contradiction
then consider m1, n1 being even Element of NAT such that
A6: ( 1 <= m1 & m1 < n1 & n1 <= len W2 & W2 . m1 = W2 . n1 ) by GLIB_001:138;
( not m1 is zero & not n1 is zero ) by A6;
then ( m1 - 1 is Nat & n1 - 1 is Nat ) by CHORD:1;
then reconsider m = m1 - 1, n = n1 - 1 as odd Element of NAT by ORDINAL1:def 12;
A7: ( W1 . n = W2 . n & W1 . m = W2 . m & W1 . (n + 2) = W2 . (n + 2) & W1 . (m + 2) = W2 . (m + 2) ) by ;
A8: m < n by ;
A9: n < (len W2) - 0 by ;
then A10: W2 . (n + 1) Joins W2 . n,W2 . (n + 2),G2 by GLIB_001:def 3;
A11: m < len W2 by ;
then A12: W2 . (m + 1) Joins W2 . m,W2 . (m + 2),G2 by GLIB_001:def 3;
n + 2 <= len W2 by ;
then A13: n + 2 <= (len W1) + 0 by ;
per cases ( ( W2 . n = W2 . m & W2 . (n + 2) = W2 . (m + 2) ) or ( W2 . n = W2 . (m + 2) & W2 . (n + 2) = W2 . m ) ) by ;
suppose ( W2 . n = W2 . m & W2 . (n + 2) = W2 . (m + 2) ) ; :: thesis: contradiction
then ( W1 . n = W1 . m & n <= len W1 ) by A1, A7, A9, Th30;
then n = len W1 by ;
hence contradiction by A13, XREAL_1:6; :: thesis: verum
end;
suppose A14: ( W2 . n = W2 . (m + 2) & W2 . (n + 2) = W2 . m ) ; :: thesis: contradiction
then ( W1 . m = W1 . (n + 2) & m + 0 < n + 2 ) by ;
then A15: ( m = 1 & n + 2 = len W1 ) by ;
per cases ( n = m + 2 or m + 2 < n or n < m + 2 ) by XXREAL_0:1;
suppose m + 2 < n ; :: thesis: contradiction
end;
suppose n < m + 2 ; :: thesis: contradiction
then ( n < m + 2 & m + 2 <= len W2 ) by ;
then ( n < m + 2 & m + 2 <= len W1 ) by ;
then n = 1 by ;
hence contradiction by A8, A15; :: thesis: verum
end;
end;
end;
end;
end;
now :: thesis: for m, n being odd Element of NAT st m < n & n <= len W2 & W2 . m = W2 . n holds
( m = 1 & n = len W2 )
let m, n be odd Element of NAT ; :: thesis: ( m < n & n <= len W2 & W2 . m = W2 . n implies ( m = 1 & n = len W2 ) )
assume A16: ( m < n & n <= len W2 & W2 . m = W2 . n ) ; :: thesis: ( m = 1 & n = len W2 )
( W1 . m = W2 . m & W1 . n = W2 . n & len W1 = len W2 ) by ;
hence ( m = 1 & n = len W2 ) by ; :: thesis: verum
end;
hence W2 is Path-like by ; :: thesis: verum
end;
hereby :: thesis: verum end;