let G be _Graph; :: thesis: for P, H being Path of G st P .edges() misses H .edges() & not P is trivial & not P is closed & not H is trivial & not H is closed & (P .vertices() ) /\ (H .vertices() ) = {(P .first() ),(P .last() )} & H .first() = P .last() & H .last() = P .first() holds
P .append H is Cycle-like
let P, H be Path of G; :: thesis: ( P .edges() misses H .edges() & not P is trivial & not P is closed & not H is trivial & not H is closed & (P .vertices() ) /\ (H .vertices() ) = {(P .first() ),(P .last() )} & H .first() = P .last() & H .last() = P .first() implies P .append H is Cycle-like )
assume that
A1:
P .edges() misses H .edges()
and
A2:
( not P is trivial & not P is closed )
and
A3:
( not H is trivial & not H is closed )
and
A4:
(P .vertices() ) /\ (H .vertices() ) = {(P .first() ),(P .last() )}
and
A5:
( H .first() = P .last() & H .last() = P .first() )
; :: thesis: P .append H is Cycle-like
set J = P .append H;
A6:
((len (P .append H)) + 1) + (- 1) = ((len P) + (len H)) + (- 1)
by A5, GLIB_001:29;
A8:
for m being odd Nat st m > len P & m <= len (P .append H) holds
( m in dom (P .append H) & not m in dom P )
( (P .append H) .first() = P .first() & (P .append H) .last() = P .first() )
by A5, GLIB_001:31;
then A10:
P .append H is closed
by GLIB_001:def 24;
then A13:
not P .append H is trivial
by GLIB_001:127;
( rng (P .edgeSeq() ) = P .edges() & rng (H .edgeSeq() ) = H .edges() & P .edgeSeq() is one-to-one & H .edgeSeq() is one-to-one )
by GLIB_001:def 27;
then
(P .edgeSeq() ) ^ (H .edgeSeq() ) is one-to-one
by A1, FINSEQ_3:98;
then
(P .append H) .edgeSeq() is one-to-one
by A5, GLIB_001:86;
then A14:
P .append H is Trail-like
by GLIB_001:def 27;
now let m,
n be
odd Element of
NAT ;
:: thesis: ( m < n & n <= len (P .append H) & (P .append H) . b1 = (P .append H) . b2 implies ( b1 = 1 & b2 = len (P .append H) ) )assume A15:
(
m < n &
n <= len (P .append H) )
;
:: thesis: ( (P .append H) . b1 = (P .append H) . b2 implies ( b1 = 1 & b2 = len (P .append H) ) )A16:
( 1
<= m &
m <= len (P .append H) )
by A15, HEYTING3:1, XXREAL_0:2;
per cases
( ( m <= len P & n <= len P ) or ( m <= len P & n > len P ) or ( m > len P & n <= len P ) or ( m > len P & n > len P ) )
;
suppose A17:
(
m <= len P &
n > len P )
;
:: thesis: ( (P .append H) . b1 = (P .append H) . b2 implies ( b1 = 1 & b2 = len (P .append H) ) )then A18:
(P .append H) . m = P . m
by A7;
(
n in dom (P .append H) & not
n in dom P )
by A8, A15, A17;
then consider j being
Element of
NAT such that A19:
(
j < len H &
n = (len P) + j )
by GLIB_001:35;
A20:
(P .append H) . n = H . (j + 1)
by A5, A19, GLIB_001:34;
j is
even
by A19;
then reconsider jj =
j as
even Nat ;
reconsider j1 =
jj + 1 as
odd Nat ;
A21:
j1 <= len H
by A19, NAT_1:13;
now assume A22:
(P .append H) . m = (P .append H) . n
;
:: thesis: ( m = 1 & n = len (P .append H) )then
(
(P .append H) . m in P .vertices() &
(P .append H) . m in H .vertices() )
by A17, A18, A20, A21, GLIB_001:88;
then A23:
(P .append H) . m in (P .vertices() ) /\ (H .vertices() )
by XBOOLE_0:def 4;
then A26:
(P .append H) . m = P .first()
by A4, A23, TARSKI:def 2;
A27:
(P .append H) . n = H .last()
by A4, A5, A22, A23, A24, TARSKI:def 2;
hence
(
m = 1 &
n = len (P .append H) )
by A15, A16, A28, XXREAL_0:1;
:: thesis: verum end; hence
(
(P .append H) . m = (P .append H) . n implies (
m = 1 &
n = len (P .append H) ) )
;
:: thesis: verum end; suppose A31:
(
m > len P &
n > len P )
;
:: thesis: ( (P .append H) . b1 = (P .append H) . b2 implies ( b1 = 1 & b2 = len (P .append H) ) )then
(
m in dom (P .append H) & not
m in dom P )
by A8, A16;
then consider k being
Element of
NAT such that A32:
(
k < len H &
m = (len P) + k )
by GLIB_001:35;
(
n in dom (P .append H) & not
n in dom P )
by A8, A15, A31;
then consider j being
Element of
NAT such that A33:
(
j < len H &
n = (len P) + j )
by GLIB_001:35;
A34:
(P .append H) . ((len P) + k) = H . (k + 1)
by A5, A32, GLIB_001:34;
A35:
(P .append H) . ((len P) + j) = H . (j + 1)
by A5, A33, GLIB_001:34;
k is
even
by A32;
then reconsider kk =
k as
even Nat ;
reconsider k1 =
kk + 1 as
odd Nat ;
j is
even
by A33;
then reconsider jj =
j as
even Nat ;
reconsider j1 =
jj + 1 as
odd Element of
NAT ;
k < j
by A15, A32, A33, XREAL_1:9;
then A36:
k1 < j1
by XREAL_1:10;
j1 <= len H
by A33, NAT_1:13;
hence
(
(P .append H) . m = (P .append H) . n implies (
m = 1 &
n = len (P .append H) ) )
by A3, A32, A33, A34, A35, A36, GLIB_001:148;
:: thesis: verum end; end; end;
then
P .append H is Path-like
by A14, GLIB_001:def 28;
hence
P .append H is Cycle-like
by A10, A13, GLIB_001:def 31; :: thesis: verum