Metamath Proof Explorer


Theorem wwlksnredwwlkn0

Description: For each walk (as word) of length at least 1 there is a shorter walk (as word) starting at the same vertex. (Contributed by Alexander van der Vekens, 22-Aug-2018) (Revised by AV, 18-Apr-2021) (Revised by AV, 26-Oct-2022)

Ref Expression
Hypothesis wwlksnredwwlkn.e E = Edg G
Assertion wwlksnredwwlkn0 N 0 W N + 1 WWalksN G W 0 = P y N WWalksN G W prefix N + 1 = y y 0 = P lastS y lastS W E

Proof

Step Hyp Ref Expression
1 wwlksnredwwlkn.e E = Edg G
2 1 wwlksnredwwlkn N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E
3 2 imp N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E
4 simpl W prefix N + 1 = y lastS y lastS W E W prefix N + 1 = y
5 4 adantl W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E W prefix N + 1 = y
6 fveq1 y = W prefix N + 1 y 0 = W prefix N + 1 0
7 6 eqcoms W prefix N + 1 = y y 0 = W prefix N + 1 0
8 7 adantr W prefix N + 1 = y W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G y 0 = W prefix N + 1 0
9 eqid Vtx G = Vtx G
10 9 1 wwlknp W N + 1 WWalksN G W Word Vtx G W = N + 1 + 1 i 0 ..^ N + 1 W i W i + 1 E
11 nn0p1nn N 0 N + 1
12 peano2nn0 N 0 N + 1 0
13 nn0re N + 1 0 N + 1
14 lep1 N + 1 N + 1 N + 1 + 1
15 12 13 14 3syl N 0 N + 1 N + 1 + 1
16 peano2nn0 N + 1 0 N + 1 + 1 0
17 16 nn0zd N + 1 0 N + 1 + 1
18 fznn N + 1 + 1 N + 1 1 N + 1 + 1 N + 1 N + 1 N + 1 + 1
19 12 17 18 3syl N 0 N + 1 1 N + 1 + 1 N + 1 N + 1 N + 1 + 1
20 11 15 19 mpbir2and N 0 N + 1 1 N + 1 + 1
21 oveq2 W = N + 1 + 1 1 W = 1 N + 1 + 1
22 21 eleq2d W = N + 1 + 1 N + 1 1 W N + 1 1 N + 1 + 1
23 20 22 syl5ibr W = N + 1 + 1 N 0 N + 1 1 W
24 23 adantl W Word Vtx G W = N + 1 + 1 N 0 N + 1 1 W
25 simpl W Word Vtx G W = N + 1 + 1 W Word Vtx G
26 24 25 jctild W Word Vtx G W = N + 1 + 1 N 0 W Word Vtx G N + 1 1 W
27 26 3adant3 W Word Vtx G W = N + 1 + 1 i 0 ..^ N + 1 W i W i + 1 E N 0 W Word Vtx G N + 1 1 W
28 10 27 syl W N + 1 WWalksN G N 0 W Word Vtx G N + 1 1 W
29 28 impcom N 0 W N + 1 WWalksN G W Word Vtx G N + 1 1 W
30 29 adantl W 0 = P N 0 W N + 1 WWalksN G W Word Vtx G N + 1 1 W
31 30 adantr W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W Word Vtx G N + 1 1 W
32 31 adantl W prefix N + 1 = y W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W Word Vtx G N + 1 1 W
33 pfxfv0 W Word Vtx G N + 1 1 W W prefix N + 1 0 = W 0
34 32 33 syl W prefix N + 1 = y W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 0 = W 0
35 simprll W prefix N + 1 = y W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W 0 = P
36 8 34 35 3eqtrd W prefix N + 1 = y W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G y 0 = P
37 36 ex W prefix N + 1 = y W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G y 0 = P
38 37 adantr W prefix N + 1 = y lastS y lastS W E W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G y 0 = P
39 38 impcom W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E y 0 = P
40 simpr W prefix N + 1 = y lastS y lastS W E lastS y lastS W E
41 40 adantl W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E lastS y lastS W E
42 5 39 41 3jca W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E W prefix N + 1 = y y 0 = P lastS y lastS W E
43 42 ex W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E W prefix N + 1 = y y 0 = P lastS y lastS W E
44 43 reximdva W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E y N WWalksN G W prefix N + 1 = y y 0 = P lastS y lastS W E
45 44 ex W 0 = P N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y lastS y lastS W E y N WWalksN G W prefix N + 1 = y y 0 = P lastS y lastS W E
46 45 com13 y N WWalksN G W prefix N + 1 = y lastS y lastS W E N 0 W N + 1 WWalksN G W 0 = P y N WWalksN G W prefix N + 1 = y y 0 = P lastS y lastS W E
47 3 46 mpcom N 0 W N + 1 WWalksN G W 0 = P y N WWalksN G W prefix N + 1 = y y 0 = P lastS y lastS W E
48 29 33 syl N 0 W N + 1 WWalksN G W prefix N + 1 0 = W 0
49 48 eqcomd N 0 W N + 1 WWalksN G W 0 = W prefix N + 1 0
50 49 adantl W prefix N + 1 = y y 0 = P N 0 W N + 1 WWalksN G W 0 = W prefix N + 1 0
51 fveq1 W prefix N + 1 = y W prefix N + 1 0 = y 0
52 51 adantr W prefix N + 1 = y y 0 = P W prefix N + 1 0 = y 0
53 52 adantr W prefix N + 1 = y y 0 = P N 0 W N + 1 WWalksN G W prefix N + 1 0 = y 0
54 simpr W prefix N + 1 = y y 0 = P y 0 = P
55 54 adantr W prefix N + 1 = y y 0 = P N 0 W N + 1 WWalksN G y 0 = P
56 50 53 55 3eqtrd W prefix N + 1 = y y 0 = P N 0 W N + 1 WWalksN G W 0 = P
57 56 ex W prefix N + 1 = y y 0 = P N 0 W N + 1 WWalksN G W 0 = P
58 57 3adant3 W prefix N + 1 = y y 0 = P lastS y lastS W E N 0 W N + 1 WWalksN G W 0 = P
59 58 com12 N 0 W N + 1 WWalksN G W prefix N + 1 = y y 0 = P lastS y lastS W E W 0 = P
60 59 rexlimdvw N 0 W N + 1 WWalksN G y N WWalksN G W prefix N + 1 = y y 0 = P lastS y lastS W E W 0 = P
61 47 60 impbid N 0 W N + 1 WWalksN G W 0 = P y N WWalksN G W prefix N + 1 = y y 0 = P lastS y lastS W E