let G be non void Graph; for c1, c2 being non empty directed Chain of G holds
( (vertex-seq c1) . ((len c1) + 1) = (vertex-seq c2) . 1 iff c1 ^ c2 is non empty directed Chain of G )
let c1, c2 be non empty directed Chain of G; ( (vertex-seq c1) . ((len c1) + 1) = (vertex-seq c2) . 1 iff c1 ^ c2 is non empty directed Chain of G )
set vsc1 = vertex-seq c1;
set vsc2 = vertex-seq c2;
A1:
len (c1 ^ c2) = (len c1) + (len c2)
by FINSEQ_1:22;
A2:
vertex-seq c1 is_vertex_seq_of c1
by GRAPH_2:def 10;
then A3:
( vertex-seq c2 is_vertex_seq_of c2 & len (vertex-seq c1) = (len c1) + 1 )
by GRAPH_2:def 10;
hereby ( c1 ^ c2 is non empty directed Chain of G implies (vertex-seq c1) . ((len c1) + 1) = (vertex-seq c2) . 1 )
assume A4:
(vertex-seq c1) . ((len c1) + 1) = (vertex-seq c2) . 1
;
c1 ^ c2 is non empty directed Chain of Gthen reconsider c1c2 =
c1 ^ c2 as
Chain of
G by A2, A3, GRAPH_2:43;
c1c2 is
directed
proof
let n be
Nat;
GRAPH_1:def 15 ( not 1 <= n or len c1c2 <= n or the Source of G . (c1c2 . (n + 1)) = the Target of G . (c1c2 . n) )
assume that A5:
1
<= n
and A6:
n < len c1c2
;
the Source of G . (c1c2 . (n + 1)) = the Target of G . (c1c2 . n)
per cases
( n < len c1 or n = len c1 or n > len c1 )
by XXREAL_0:1;
suppose A12:
n > len c1
;
the Source of G . (c1c2 . (n + 1)) = the Target of G . (c1c2 . n)then reconsider k =
n - (len c1) as
Element of
NAT by INT_1:5;
A13:
n = (len c1) + k
;
A14:
n + 1
= (len c1) + (k + 1)
;
A15:
k < len c2
by A1, A6, XREAL_1:19;
then
( 1
<= k + 1 &
k + 1
<= len c2 )
by NAT_1:11, NAT_1:13;
then
k + 1
in dom c2
by FINSEQ_3:25;
then A16:
c1c2 . (n + 1) = c2 . (k + 1)
by A14, FINSEQ_1:def 7;
n >= (len c1) + 1
by A12, NAT_1:13;
then A17:
1
<= k
by XREAL_1:19;
then
k in dom c2
by A15, FINSEQ_3:25;
then
c1c2 . n = c2 . k
by A13, FINSEQ_1:def 7;
hence
the
Source of
G . (c1c2 . (n + 1)) = the
Target of
G . (c1c2 . n)
by A17, A15, A16, GRAPH_1:def 15;
verum end; end;
end; hence
c1 ^ c2 is non
empty directed Chain of
G
;
verum
end;
set n = len c1;
assume
c1 ^ c2 is non empty directed Chain of G
; (vertex-seq c1) . ((len c1) + 1) = (vertex-seq c2) . 1
then reconsider c1c2 = c1 ^ c2 as non empty directed Chain of G ;
A18:
len c1 < len c1c2
by A1, XREAL_1:29;
A19:
len c1 in dom c1
by FINSEQ_5:6;
then A20:
c1c2 . (len c1) = c1 . (len c1)
by FINSEQ_1:def 7;
1 <= len c1
by A19, FINSEQ_3:25;
then A21:
the Source of G . (c1c2 . ((len c1) + 1)) = the Target of G . (c1c2 . (len c1))
by A18, GRAPH_1:def 15;
1 in dom c2
by FINSEQ_5:6;
then A22:
c1c2 . ((len c1) + 1) = c2 . 1
by FINSEQ_1:def 7;
(vertex-seq c1) . ((len c1) + 1) = the Target of G . (c1 . (len c1))
by Th13;
hence
(vertex-seq c1) . ((len c1) + 1) = (vertex-seq c2) . 1
by A21, A22, A20, GRAPH_2:def 10; verum