Metamath Proof Explorer


Theorem wwlksnextproplem2

Description: Lemma 2 for wwlksnextprop . (Contributed by Alexander van der Vekens, 1-Aug-2018) (Revised by AV, 20-Apr-2021) (Revised by AV, 29-Oct-2022)

Ref Expression
Hypotheses wwlksnextprop.x X=N+1WWalksNG
wwlksnextprop.e E=EdgG
Assertion wwlksnextproplem2 WXN0lastSWprefixN+1lastSWE

Proof

Step Hyp Ref Expression
1 wwlksnextprop.x X=N+1WWalksNG
2 wwlksnextprop.e E=EdgG
3 eqid VtxG=VtxG
4 3 2 wwlknp WN+1WWalksNGWWordVtxGW=N+1+1i0..^N+1WiWi+1E
5 fzonn0p1 N0N0..^N+1
6 5 adantl WWordVtxGW=N+1+1N0N0..^N+1
7 fveq2 i=NWi=WN
8 fvoveq1 i=NWi+1=WN+1
9 7 8 preq12d i=NWiWi+1=WNWN+1
10 9 eleq1d i=NWiWi+1EWNWN+1E
11 10 rspcv N0..^N+1i0..^N+1WiWi+1EWNWN+1E
12 6 11 syl WWordVtxGW=N+1+1N0i0..^N+1WiWi+1EWNWN+1E
13 12 imp WWordVtxGW=N+1+1N0i0..^N+1WiWi+1EWNWN+1E
14 simpll WWordVtxGW=N+1+1N0WWordVtxG
15 1zzd WWordVtxGW=N+1+1N01
16 lencl WWordVtxGW0
17 16 nn0zd WWordVtxGW
18 17 ad2antrr WWordVtxGW=N+1+1N0W
19 peano2nn0 N0N+10
20 19 nn0zd N0N+1
21 20 adantl WWordVtxGW=N+1+1N0N+1
22 nn0ge0 N00N
23 1red N01
24 nn0re N0N
25 23 24 addge02d N00N1N+1
26 22 25 mpbid N01N+1
27 26 adantl WWordVtxGW=N+1+1N01N+1
28 19 nn0red N0N+1
29 28 lep1d N0N+1N+1+1
30 breq2 W=N+1+1N+1WN+1N+1+1
31 29 30 syl5ibrcom N0W=N+1+1N+1W
32 31 a1i W0N0W=N+1+1N+1W
33 32 com23 W0W=N+1+1N0N+1W
34 16 33 syl WWordVtxGW=N+1+1N0N+1W
35 34 imp31 WWordVtxGW=N+1+1N0N+1W
36 15 18 21 27 35 elfzd WWordVtxGW=N+1+1N0N+11W
37 pfxfvlsw WWordVtxGN+11WlastSWprefixN+1=WN+1-1
38 14 36 37 syl2anc WWordVtxGW=N+1+1N0lastSWprefixN+1=WN+1-1
39 nn0cn N0N
40 1cnd N01
41 39 40 pncand N0N+1-1=N
42 41 fveq2d N0WN+1-1=WN
43 42 adantl WWordVtxGW=N+1+1N0WN+1-1=WN
44 38 43 eqtrd WWordVtxGW=N+1+1N0lastSWprefixN+1=WN
45 lsw WWordVtxGlastSW=WW1
46 45 ad2antrr WWordVtxGW=N+1+1N0lastSW=WW1
47 fvoveq1 W=N+1+1WW1=WN+1+1-1
48 47 adantl WWordVtxGW=N+1+1WW1=WN+1+1-1
49 19 nn0cnd N0N+1
50 49 40 pncand N0N+1+1-1=N+1
51 50 fveq2d N0WN+1+1-1=WN+1
52 48 51 sylan9eq WWordVtxGW=N+1+1N0WW1=WN+1
53 46 52 eqtrd WWordVtxGW=N+1+1N0lastSW=WN+1
54 44 53 preq12d WWordVtxGW=N+1+1N0lastSWprefixN+1lastSW=WNWN+1
55 54 eleq1d WWordVtxGW=N+1+1N0lastSWprefixN+1lastSWEWNWN+1E
56 55 adantr WWordVtxGW=N+1+1N0i0..^N+1WiWi+1ElastSWprefixN+1lastSWEWNWN+1E
57 13 56 mpbird WWordVtxGW=N+1+1N0i0..^N+1WiWi+1ElastSWprefixN+1lastSWE
58 57 exp31 WWordVtxGW=N+1+1N0i0..^N+1WiWi+1ElastSWprefixN+1lastSWE
59 58 com23 WWordVtxGW=N+1+1i0..^N+1WiWi+1EN0lastSWprefixN+1lastSWE
60 59 3impia WWordVtxGW=N+1+1i0..^N+1WiWi+1EN0lastSWprefixN+1lastSWE
61 4 60 syl WN+1WWalksNGN0lastSWprefixN+1lastSWE
62 61 1 eleq2s WXN0lastSWprefixN+1lastSWE
63 62 imp WXN0lastSWprefixN+1lastSWE