Metamath Proof Explorer


Theorem wwlksubclwwlk

Description: Any prefix of a word representing a closed walk represents a walk. (Contributed by Alexander van der Vekens, 5-Oct-2018) (Revised by AV, 28-Apr-2021) (Revised by AV, 1-Nov-2022)

Ref Expression
Assertion wwlksubclwwlk MNM+1XNClWWalksNGXprefixMM1WWalksNG

Proof

Step Hyp Ref Expression
1 eqid VtxG=VtxG
2 eqid EdgG=EdgG
3 1 2 clwwlknp XNClWWalksNGXWordVtxGX=Ni0..^N1XiXi+1EdgGlastSXX0EdgG
4 pfxcl XWordVtxGXprefixMWordVtxG
5 4 adantr XWordVtxGX=NXprefixMWordVtxG
6 5 ad2antrr XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1XprefixMWordVtxG
7 nnz MM
8 eluzp1m1 MNM+1N1M
9 8 ex MNM+1N1M
10 7 9 syl MNM+1N1M
11 peano2zm MM1
12 7 11 syl MM1
13 nnre MM
14 13 lem1d MM1M
15 eluzuzle M1M1MN1MN1M1
16 12 14 15 syl2anc MN1MN1M1
17 10 16 syld MNM+1N1M1
18 17 imp MNM+1N1M1
19 fzoss2 N1M10..^M10..^N1
20 18 19 syl MNM+10..^M10..^N1
21 20 adantl XWordVtxGX=NMNM+10..^M10..^N1
22 ssralv 0..^M10..^N1i0..^N1XiXi+1EdgGi0..^M1XiXi+1EdgG
23 21 22 syl XWordVtxGX=NMNM+1i0..^N1XiXi+1EdgGi0..^M1XiXi+1EdgG
24 simpll XWordVtxGX=NMNM+1XWordVtxG
25 24 adantr XWordVtxGX=NMNM+1i0..^M1XWordVtxG
26 eluz2 NM+1M+1NM+1N
27 13 adantr MNM+1NM
28 peano2re MM+1
29 13 28 syl MM+1
30 29 adantr MNM+1NM+1
31 zre NN
32 31 ad2antrl MNM+1NN
33 13 lep1d MMM+1
34 33 adantr MNM+1NMM+1
35 simpr NM+1NM+1N
36 35 adantl MNM+1NM+1N
37 27 30 32 34 36 letrd MNM+1NMN
38 nnnn0 MM0
39 38 ad2antrr MNM+1NMNM0
40 simpr MNN
41 40 adantr MNMNN
42 0red MN0
43 13 adantr MNM
44 31 adantl MNN
45 42 43 44 3jca MN0MN
46 45 adantr MNMN0MN
47 38 nn0ge0d M0M
48 47 adantr MN0M
49 48 anim1i MNMN0MMN
50 letr 0MN0MMN0N
51 46 49 50 sylc MNMN0N
52 elnn0z N0N0N
53 41 51 52 sylanbrc MNMNN0
54 53 adantlrr MNM+1NMNN0
55 simpr MNM+1NMNMN
56 39 54 55 3jca MNM+1NMNM0N0MN
57 37 56 mpdan MNM+1NM0N0MN
58 57 expcom NM+1NMM0N0MN
59 58 3adant1 M+1NM+1NMM0N0MN
60 26 59 sylbi NM+1MM0N0MN
61 60 impcom MNM+1M0N0MN
62 elfz2nn0 M0NM0N0MN
63 61 62 sylibr MNM+1M0N
64 63 adantl XWordVtxGX=NMNM+1M0N
65 oveq2 X=N0X=0N
66 65 eleq2d X=NM0XM0N
67 66 adantl XWordVtxGX=NM0XM0N
68 67 adantr XWordVtxGX=NMNM+1M0XM0N
69 64 68 mpbird XWordVtxGX=NMNM+1M0X
70 69 adantr XWordVtxGX=NMNM+1i0..^M1M0X
71 eluz2 MM1M1MM1M
72 12 7 14 71 syl3anbrc MMM1
73 fzoss2 MM10..^M10..^M
74 72 73 syl M0..^M10..^M
75 74 sseld Mi0..^M1i0..^M
76 75 ad2antrl XWordVtxGX=NMNM+1i0..^M1i0..^M
77 76 imp XWordVtxGX=NMNM+1i0..^M1i0..^M
78 pfxfv XWordVtxGM0Xi0..^MXprefixMi=Xi
79 25 70 77 78 syl3anc XWordVtxGX=NMNM+1i0..^M1XprefixMi=Xi
80 79 eqcomd XWordVtxGX=NMNM+1i0..^M1Xi=XprefixMi
81 fzonn0p1p1 i0..^M1i+10..^M-1+1
82 nncn MM
83 npcan1 MM-1+1=M
84 82 83 syl MM-1+1=M
85 84 oveq2d M0..^M-1+1=0..^M
86 85 eleq2d Mi+10..^M-1+1i+10..^M
87 81 86 imbitrid Mi0..^M1i+10..^M
88 87 ad2antrl XWordVtxGX=NMNM+1i0..^M1i+10..^M
89 88 imp XWordVtxGX=NMNM+1i0..^M1i+10..^M
90 pfxfv XWordVtxGM0Xi+10..^MXprefixMi+1=Xi+1
91 25 70 89 90 syl3anc XWordVtxGX=NMNM+1i0..^M1XprefixMi+1=Xi+1
92 91 eqcomd XWordVtxGX=NMNM+1i0..^M1Xi+1=XprefixMi+1
93 80 92 preq12d XWordVtxGX=NMNM+1i0..^M1XiXi+1=XprefixMiXprefixMi+1
94 93 eleq1d XWordVtxGX=NMNM+1i0..^M1XiXi+1EdgGXprefixMiXprefixMi+1EdgG
95 94 ralbidva XWordVtxGX=NMNM+1i0..^M1XiXi+1EdgGi0..^M1XprefixMiXprefixMi+1EdgG
96 23 95 sylibd XWordVtxGX=NMNM+1i0..^N1XiXi+1EdgGi0..^M1XprefixMiXprefixMi+1EdgG
97 96 impancom XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1i0..^M1XprefixMiXprefixMi+1EdgG
98 97 imp XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1i0..^M1XprefixMiXprefixMi+1EdgG
99 24 69 jca XWordVtxGX=NMNM+1XWordVtxGM0X
100 99 adantlr XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1XWordVtxGM0X
101 pfxlen XWordVtxGM0XXprefixM=M
102 100 101 syl XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1XprefixM=M
103 102 oveq1d XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1XprefixM1=M1
104 103 oveq2d XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+10..^XprefixM1=0..^M1
105 104 raleqdv XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1i0..^XprefixM1XprefixMiXprefixMi+1EdgGi0..^M1XprefixMiXprefixMi+1EdgG
106 98 105 mpbird XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1i0..^XprefixM1XprefixMiXprefixMi+1EdgG
107 24 69 101 syl2anc XWordVtxGX=NMNM+1XprefixM=M
108 84 eqcomd MM=M-1+1
109 108 ad2antrl XWordVtxGX=NMNM+1M=M-1+1
110 107 109 eqtrd XWordVtxGX=NMNM+1XprefixM=M-1+1
111 110 adantlr XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1XprefixM=M-1+1
112 6 106 111 3jca XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1XprefixMWordVtxGi0..^XprefixM1XprefixMiXprefixMi+1EdgGXprefixM=M-1+1
113 112 ex XWordVtxGX=Ni0..^N1XiXi+1EdgGMNM+1XprefixMWordVtxGi0..^XprefixM1XprefixMiXprefixMi+1EdgGXprefixM=M-1+1
114 113 3adant3 XWordVtxGX=Ni0..^N1XiXi+1EdgGlastSXX0EdgGMNM+1XprefixMWordVtxGi0..^XprefixM1XprefixMiXprefixMi+1EdgGXprefixM=M-1+1
115 3 114 syl XNClWWalksNGMNM+1XprefixMWordVtxGi0..^XprefixM1XprefixMiXprefixMi+1EdgGXprefixM=M-1+1
116 115 impcom MNM+1XNClWWalksNGXprefixMWordVtxGi0..^XprefixM1XprefixMiXprefixMi+1EdgGXprefixM=M-1+1
117 nnm1nn0 MM10
118 117 ad2antrr MNM+1XNClWWalksNGM10
119 1 2 iswwlksnx M10XprefixMM1WWalksNGXprefixMWordVtxGi0..^XprefixM1XprefixMiXprefixMi+1EdgGXprefixM=M-1+1
120 118 119 syl MNM+1XNClWWalksNGXprefixMM1WWalksNGXprefixMWordVtxGi0..^XprefixM1XprefixMiXprefixMi+1EdgGXprefixM=M-1+1
121 116 120 mpbird MNM+1XNClWWalksNGXprefixMM1WWalksNG
122 121 ex MNM+1XNClWWalksNGXprefixMM1WWalksNG