let G be _Graph; for W1, W2 being Trail of G st W1 .last() = W2 .first() & W1 .edges() misses W2 .edges() holds
W1 .append W2 is Trail-like
let W1, W2 be Trail of G; ( W1 .last() = W2 .first() & W1 .edges() misses W2 .edges() implies W1 .append W2 is Trail-like )
assume that
A1:
W1 .last() = W2 .first()
and
A2:
W1 .edges() misses W2 .edges()
; W1 .append W2 is Trail-like
set W = W1 .append W2;
now for m, n being even Element of NAT st 1 <= m & m < n & n <= len (W1 .append W2) holds
(W1 .append W2) . m <> (W1 .append W2) . nlet m,
n be
even Element of
NAT ;
( 1 <= m & m < n & n <= len (W1 .append W2) implies (W1 .append W2) . b1 <> (W1 .append W2) . b2 )assume that A3:
1
<= m
and A4:
m < n
and A5:
n <= len (W1 .append W2)
;
(W1 .append W2) . b1 <> (W1 .append W2) . b2
1
<= n
by A3, A4, XXREAL_0:2;
then A6:
n in dom (W1 .append W2)
by A5, FINSEQ_3:25;
m <= len (W1 .append W2)
by A4, A5, XXREAL_0:2;
then A7:
m in dom (W1 .append W2)
by A3, FINSEQ_3:25;
per cases
( n in dom W1 or ex k being Element of NAT st
( k < len W2 & n = (len W1) + k ) )
by A6, GLIB_001:34;
suppose
ex
k being
Element of
NAT st
(
k < len W2 &
n = (len W1) + k )
;
(W1 .append W2) . b1 <> (W1 .append W2) . b2then consider k being
Element of
NAT such that A11:
k < len W2
and A12:
n = (len W1) + k
;
reconsider k =
k as
odd Element of
NAT by A12;
A13:
(W1 .append W2) . n = W2 . (k + 1)
by A1, A11, A12, GLIB_001:33;
A14:
k + 1
<= len W2
by A11, NAT_1:13;
1
<= k + 1
by NAT_1:11;
then A15:
W2 . (k + 1) in W2 .edges()
by A14, GLIB_001:99;
per cases
( m in dom W1 or ex l being Element of NAT st
( l < len W2 & m = (len W1) + l ) )
by A7, GLIB_001:34;
suppose
ex
l being
Element of
NAT st
(
l < len W2 &
m = (len W1) + l )
;
(W1 .append W2) . b1 <> (W1 .append W2) . b2then consider l being
Element of
NAT such that A18:
l < len W2
and A19:
m = (len W1) + l
;
reconsider l =
l as
odd Element of
NAT by A19;
l < k
by A4, A12, A19, XREAL_1:6;
then A20:
( 1
<= l + 1 &
l + 1
< k + 1 )
by NAT_1:11, XREAL_1:6;
(W1 .append W2) . m = W2 . (l + 1)
by A1, A18, A19, GLIB_001:33;
hence
(W1 .append W2) . m <> (W1 .append W2) . n
by A13, A14, A20, GLIB_001:138;
verum end; end; end; end; end;
hence
W1 .append W2 is Trail-like
by GLIB_001:138; verum