Metamath Proof Explorer


Theorem wlknewwlksn

Description: If a walk in a pseudograph has length N , then the sequence of the vertices of the walk is a word representing the walk as word of length N . (Contributed by Alexander van der Vekens, 25-Aug-2018) (Revised by AV, 11-Apr-2021)

Ref Expression
Assertion wlknewwlksn G UPGraph W Walks G N 0 1 st W = N 2 nd W N WWalksN G

Proof

Step Hyp Ref Expression
1 wlkcpr W Walks G 1 st W Walks G 2 nd W
2 wlkn0 1 st W Walks G 2 nd W 2 nd W
3 1 2 sylbi W Walks G 2 nd W
4 3 adantl G UPGraph W Walks G 2 nd W
5 eqid Vtx G = Vtx G
6 eqid iEdg G = iEdg G
7 eqid 1 st W = 1 st W
8 eqid 2 nd W = 2 nd W
9 5 6 7 8 wlkelwrd W Walks G 1 st W Word dom iEdg G 2 nd W : 0 1 st W Vtx G
10 ffz0iswrd 2 nd W : 0 1 st W Vtx G 2 nd W Word Vtx G
11 10 adantl 1 st W Word dom iEdg G 2 nd W : 0 1 st W Vtx G 2 nd W Word Vtx G
12 9 11 syl W Walks G 2 nd W Word Vtx G
13 12 adantl G UPGraph W Walks G 2 nd W Word Vtx G
14 eqid Edg G = Edg G
15 14 upgrwlkvtxedg G UPGraph 1 st W Walks G 2 nd W i 0 ..^ 1 st W 2 nd W i 2 nd W i + 1 Edg G
16 wlklenvm1 1 st W Walks G 2 nd W 1 st W = 2 nd W 1
17 16 adantl G UPGraph 1 st W Walks G 2 nd W 1 st W = 2 nd W 1
18 17 oveq2d G UPGraph 1 st W Walks G 2 nd W 0 ..^ 1 st W = 0 ..^ 2 nd W 1
19 18 raleqdv G UPGraph 1 st W Walks G 2 nd W i 0 ..^ 1 st W 2 nd W i 2 nd W i + 1 Edg G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G
20 15 19 mpbid G UPGraph 1 st W Walks G 2 nd W i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G
21 1 20 sylan2b G UPGraph W Walks G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G
22 4 13 21 3jca G UPGraph W Walks G 2 nd W 2 nd W Word Vtx G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G
23 22 adantr G UPGraph W Walks G N 0 1 st W = N 2 nd W 2 nd W Word Vtx G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G
24 simpl N 0 1 st W = N N 0
25 oveq2 1 st W = N 0 1 st W = 0 N
26 25 adantl 1 st W Word dom iEdg G 1 st W = N 0 1 st W = 0 N
27 26 feq2d 1 st W Word dom iEdg G 1 st W = N 2 nd W : 0 1 st W Vtx G 2 nd W : 0 N Vtx G
28 27 biimpd 1 st W Word dom iEdg G 1 st W = N 2 nd W : 0 1 st W Vtx G 2 nd W : 0 N Vtx G
29 28 impancom 1 st W Word dom iEdg G 2 nd W : 0 1 st W Vtx G 1 st W = N 2 nd W : 0 N Vtx G
30 29 adantld 1 st W Word dom iEdg G 2 nd W : 0 1 st W Vtx G N 0 1 st W = N 2 nd W : 0 N Vtx G
31 30 imp 1 st W Word dom iEdg G 2 nd W : 0 1 st W Vtx G N 0 1 st W = N 2 nd W : 0 N Vtx G
32 ffz0hash N 0 2 nd W : 0 N Vtx G 2 nd W = N + 1
33 24 31 32 syl2an2 1 st W Word dom iEdg G 2 nd W : 0 1 st W Vtx G N 0 1 st W = N 2 nd W = N + 1
34 33 ex 1 st W Word dom iEdg G 2 nd W : 0 1 st W Vtx G N 0 1 st W = N 2 nd W = N + 1
35 9 34 syl W Walks G N 0 1 st W = N 2 nd W = N + 1
36 35 adantl G UPGraph W Walks G N 0 1 st W = N 2 nd W = N + 1
37 36 imp G UPGraph W Walks G N 0 1 st W = N 2 nd W = N + 1
38 24 adantl G UPGraph W Walks G N 0 1 st W = N N 0
39 iswwlksn N 0 2 nd W N WWalksN G 2 nd W WWalks G 2 nd W = N + 1
40 5 14 iswwlks 2 nd W WWalks G 2 nd W 2 nd W Word Vtx G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G
41 40 a1i N 0 2 nd W WWalks G 2 nd W 2 nd W Word Vtx G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G
42 41 anbi1d N 0 2 nd W WWalks G 2 nd W = N + 1 2 nd W 2 nd W Word Vtx G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G 2 nd W = N + 1
43 39 42 bitrd N 0 2 nd W N WWalksN G 2 nd W 2 nd W Word Vtx G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G 2 nd W = N + 1
44 38 43 syl G UPGraph W Walks G N 0 1 st W = N 2 nd W N WWalksN G 2 nd W 2 nd W Word Vtx G i 0 ..^ 2 nd W 1 2 nd W i 2 nd W i + 1 Edg G 2 nd W = N + 1
45 23 37 44 mpbir2and G UPGraph W Walks G N 0 1 st W = N 2 nd W N WWalksN G