Metamath Proof Explorer


Theorem wwlksnextinj

Description: Lemma for wwlksnextbij . (Contributed by Alexander van der Vekens, 7-Aug-2018) (Revised by AV, 18-Apr-2021) (Revised by AV, 27-Oct-2022)

Ref Expression
Hypotheses wwlksnextbij0.v V=VtxG
wwlksnextbij0.e E=EdgG
wwlksnextbij0.d D=wWordV|w=N+2wprefixN+1=WlastSWlastSwE
wwlksnextbij0.r R=nV|lastSWnE
wwlksnextbij0.f F=tDlastSt
Assertion wwlksnextinj N0F:D1-1R

Proof

Step Hyp Ref Expression
1 wwlksnextbij0.v V=VtxG
2 wwlksnextbij0.e E=EdgG
3 wwlksnextbij0.d D=wWordV|w=N+2wprefixN+1=WlastSWlastSwE
4 wwlksnextbij0.r R=nV|lastSWnE
5 wwlksnextbij0.f F=tDlastSt
6 1 2 3 4 5 wwlksnextfun N0F:DR
7 fveq2 t=dlastSt=lastSd
8 fvex lastSdV
9 7 5 8 fvmpt dDFd=lastSd
10 fveq2 t=xlastSt=lastSx
11 fvex lastSxV
12 10 5 11 fvmpt xDFx=lastSx
13 9 12 eqeqan12d dDxDFd=FxlastSd=lastSx
14 13 adantl N0dDxDFd=FxlastSd=lastSx
15 fveqeq2 w=dw=N+2d=N+2
16 oveq1 w=dwprefixN+1=dprefixN+1
17 16 eqeq1d w=dwprefixN+1=WdprefixN+1=W
18 fveq2 w=dlastSw=lastSd
19 18 preq2d w=dlastSWlastSw=lastSWlastSd
20 19 eleq1d w=dlastSWlastSwElastSWlastSdE
21 15 17 20 3anbi123d w=dw=N+2wprefixN+1=WlastSWlastSwEd=N+2dprefixN+1=WlastSWlastSdE
22 21 3 elrab2 dDdWordVd=N+2dprefixN+1=WlastSWlastSdE
23 fveqeq2 w=xw=N+2x=N+2
24 oveq1 w=xwprefixN+1=xprefixN+1
25 24 eqeq1d w=xwprefixN+1=WxprefixN+1=W
26 fveq2 w=xlastSw=lastSx
27 26 preq2d w=xlastSWlastSw=lastSWlastSx
28 27 eleq1d w=xlastSWlastSwElastSWlastSxE
29 23 25 28 3anbi123d w=xw=N+2wprefixN+1=WlastSWlastSwEx=N+2xprefixN+1=WlastSWlastSxE
30 29 3 elrab2 xDxWordVx=N+2xprefixN+1=WlastSWlastSxE
31 eqtr3 d=N+2x=N+2d=x
32 31 expcom x=N+2d=N+2d=x
33 32 3ad2ant1 x=N+2xprefixN+1=WlastSWlastSxEd=N+2d=x
34 33 adantl xWordVx=N+2xprefixN+1=WlastSWlastSxEd=N+2d=x
35 34 com12 d=N+2xWordVx=N+2xprefixN+1=WlastSWlastSxEd=x
36 35 3ad2ant1 d=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEd=x
37 36 adantl dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEd=x
38 37 imp dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEd=x
39 38 adantr dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0d=x
40 39 adantr dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0lastSd=lastSxd=x
41 simpr dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0lastSd=lastSxlastSd=lastSx
42 eqtr3 dprefixN+1=WxprefixN+1=WdprefixN+1=xprefixN+1
43 1e2m1 1=21
44 43 a1i N01=21
45 44 oveq2d N0N+1=N+2-1
46 nn0cn N0N
47 2cnd N02
48 1cnd N01
49 46 47 48 addsubassd N0N+2-1=N+2-1
50 45 49 eqtr4d N0N+1=N+2-1
51 50 adantr N0d=N+2N+1=N+2-1
52 oveq1 d=N+2d1=N+2-1
53 52 eqeq2d d=N+2N+1=d1N+1=N+2-1
54 53 adantl N0d=N+2N+1=d1N+1=N+2-1
55 51 54 mpbird N0d=N+2N+1=d1
56 oveq2 N+1=d1dprefixN+1=dprefixd1
57 oveq2 N+1=d1xprefixN+1=xprefixd1
58 56 57 eqeq12d N+1=d1dprefixN+1=xprefixN+1dprefixd1=xprefixd1
59 55 58 syl N0d=N+2dprefixN+1=xprefixN+1dprefixd1=xprefixd1
60 59 biimpd N0d=N+2dprefixN+1=xprefixN+1dprefixd1=xprefixd1
61 60 ex N0d=N+2dprefixN+1=xprefixN+1dprefixd1=xprefixd1
62 61 com13 dprefixN+1=xprefixN+1d=N+2N0dprefixd1=xprefixd1
63 42 62 syl dprefixN+1=WxprefixN+1=Wd=N+2N0dprefixd1=xprefixd1
64 63 ex dprefixN+1=WxprefixN+1=Wd=N+2N0dprefixd1=xprefixd1
65 64 com23 dprefixN+1=Wd=N+2xprefixN+1=WN0dprefixd1=xprefixd1
66 65 impcom d=N+2dprefixN+1=WxprefixN+1=WN0dprefixd1=xprefixd1
67 66 com12 xprefixN+1=Wd=N+2dprefixN+1=WN0dprefixd1=xprefixd1
68 67 3ad2ant2 x=N+2xprefixN+1=WlastSWlastSxEd=N+2dprefixN+1=WN0dprefixd1=xprefixd1
69 68 adantl xWordVx=N+2xprefixN+1=WlastSWlastSxEd=N+2dprefixN+1=WN0dprefixd1=xprefixd1
70 69 com12 d=N+2dprefixN+1=WxWordVx=N+2xprefixN+1=WlastSWlastSxEN0dprefixd1=xprefixd1
71 70 3adant3 d=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0dprefixd1=xprefixd1
72 71 adantl dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0dprefixd1=xprefixd1
73 72 imp31 dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0dprefixd1=xprefixd1
74 73 adantr dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0lastSd=lastSxdprefixd1=xprefixd1
75 simpl dWordVd=N+2dprefixN+1=WlastSWlastSdEdWordV
76 simpl xWordVx=N+2xprefixN+1=WlastSWlastSxExWordV
77 75 76 anim12i dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEdWordVxWordV
78 77 adantr dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0dWordVxWordV
79 nn0re N0N
80 2re 2
81 80 a1i N02
82 nn0ge0 N00N
83 2pos 0<2
84 83 a1i N00<2
85 79 81 82 84 addgegt0d N00<N+2
86 85 adantl d=N+2N00<N+2
87 breq2 d=N+20<d0<N+2
88 87 adantr d=N+2N00<d0<N+2
89 86 88 mpbird d=N+2N00<d
90 hashgt0n0 dWordV0<dd
91 89 90 sylan2 dWordVd=N+2N0d
92 91 exp32 dWordVd=N+2N0d
93 92 com12 d=N+2dWordVN0d
94 93 3ad2ant1 d=N+2dprefixN+1=WlastSWlastSdEdWordVN0d
95 94 impcom dWordVd=N+2dprefixN+1=WlastSWlastSdEN0d
96 95 adantr dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0d
97 96 imp dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0d
98 85 adantl x=N+2N00<N+2
99 breq2 x=N+20<x0<N+2
100 99 adantr x=N+2N00<x0<N+2
101 98 100 mpbird x=N+2N00<x
102 hashgt0n0 xWordV0<xx
103 101 102 sylan2 xWordVx=N+2N0x
104 103 exp32 xWordVx=N+2N0x
105 104 com12 x=N+2xWordVN0x
106 105 3ad2ant1 x=N+2xprefixN+1=WlastSWlastSxExWordVN0x
107 106 impcom xWordVx=N+2xprefixN+1=WlastSWlastSxEN0x
108 107 adantl dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0x
109 108 imp dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0x
110 78 97 109 jca32 dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0dWordVxWordVdx
111 110 adantr dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0lastSd=lastSxdWordVxWordVdx
112 simpl dWordVxWordVdWordV
113 112 adantr dWordVxWordVdxdWordV
114 simpr dWordVxWordVxWordV
115 114 adantr dWordVxWordVdxxWordV
116 hashneq0 dWordV0<dd
117 116 biimprd dWordVd0<d
118 117 adantr dWordVxWordVd0<d
119 118 com12 ddWordVxWordV0<d
120 119 adantr dxdWordVxWordV0<d
121 120 impcom dWordVxWordVdx0<d
122 pfxsuff1eqwrdeq dWordVxWordV0<dd=xd=xdprefixd1=xprefixd1lastSd=lastSx
123 113 115 121 122 syl3anc dWordVxWordVdxd=xd=xdprefixd1=xprefixd1lastSd=lastSx
124 ancom dprefixd1=xprefixd1lastSd=lastSxlastSd=lastSxdprefixd1=xprefixd1
125 124 anbi2i d=xdprefixd1=xprefixd1lastSd=lastSxd=xlastSd=lastSxdprefixd1=xprefixd1
126 3anass d=xlastSd=lastSxdprefixd1=xprefixd1d=xlastSd=lastSxdprefixd1=xprefixd1
127 125 126 bitr4i d=xdprefixd1=xprefixd1lastSd=lastSxd=xlastSd=lastSxdprefixd1=xprefixd1
128 123 127 bitrdi dWordVxWordVdxd=xd=xlastSd=lastSxdprefixd1=xprefixd1
129 111 128 syl dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0lastSd=lastSxd=xd=xlastSd=lastSxdprefixd1=xprefixd1
130 40 41 74 129 mpbir3and dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0lastSd=lastSxd=x
131 130 exp31 dWordVd=N+2dprefixN+1=WlastSWlastSdExWordVx=N+2xprefixN+1=WlastSWlastSxEN0lastSd=lastSxd=x
132 22 30 131 syl2anb dDxDN0lastSd=lastSxd=x
133 132 impcom N0dDxDlastSd=lastSxd=x
134 14 133 sylbid N0dDxDFd=Fxd=x
135 134 ralrimivva N0dDxDFd=Fxd=x
136 dff13 F:D1-1RF:DRdDxDFd=Fxd=x
137 6 135 136 sylanbrc N0F:D1-1R