Metamath Proof Explorer


Theorem wwlksnextsurj

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 = Vtx G
wwlksnextbij0.e E = Edg G
wwlksnextbij0.d D = w Word V | w = N + 2 w prefix N + 1 = W lastS W lastS w E
wwlksnextbij0.r R = n V | lastS W n E
wwlksnextbij0.f F = t D lastS t
Assertion wwlksnextsurj W N WWalksN G F : D onto R

Proof

Step Hyp Ref Expression
1 wwlksnextbij0.v V = Vtx G
2 wwlksnextbij0.e E = Edg G
3 wwlksnextbij0.d D = w Word V | w = N + 2 w prefix N + 1 = W lastS W lastS w E
4 wwlksnextbij0.r R = n V | lastS W n E
5 wwlksnextbij0.f F = t D lastS t
6 1 wwlknbp W N WWalksN G G V N 0 W Word V
7 simp2 G V N 0 W Word V N 0
8 1 2 3 4 5 wwlksnextfun N 0 F : D R
9 6 7 8 3syl W N WWalksN G F : D R
10 preq2 n = r lastS W n = lastS W r
11 10 eleq1d n = r lastS W n E lastS W r E
12 11 4 elrab2 r R r V lastS W r E
13 1 2 wwlksnext W N WWalksN G r V lastS W r E W ++ ⟨“ r ”⟩ N + 1 WWalksN G
14 13 3expb W N WWalksN G r V lastS W r E W ++ ⟨“ r ”⟩ N + 1 WWalksN G
15 s1cl r V ⟨“ r ”⟩ Word V
16 pfxccat1 W Word V ⟨“ r ”⟩ Word V W ++ ⟨“ r ”⟩ prefix W = W
17 15 16 sylan2 W Word V r V W ++ ⟨“ r ”⟩ prefix W = W
18 17 ex W Word V r V W ++ ⟨“ r ”⟩ prefix W = W
19 18 adantr W Word V W = N + 1 r V W ++ ⟨“ r ”⟩ prefix W = W
20 oveq2 N + 1 = W W ++ ⟨“ r ”⟩ prefix N + 1 = W ++ ⟨“ r ”⟩ prefix W
21 20 eqcoms W = N + 1 W ++ ⟨“ r ”⟩ prefix N + 1 = W ++ ⟨“ r ”⟩ prefix W
22 21 eqeq1d W = N + 1 W ++ ⟨“ r ”⟩ prefix N + 1 = W W ++ ⟨“ r ”⟩ prefix W = W
23 22 adantl W Word V W = N + 1 W ++ ⟨“ r ”⟩ prefix N + 1 = W W ++ ⟨“ r ”⟩ prefix W = W
24 19 23 sylibrd W Word V W = N + 1 r V W ++ ⟨“ r ”⟩ prefix N + 1 = W
25 24 3adant3 W Word V W = N + 1 i 0 ..^ N W i W i + 1 E r V W ++ ⟨“ r ”⟩ prefix N + 1 = W
26 1 2 wwlknp W N WWalksN G W Word V W = N + 1 i 0 ..^ N W i W i + 1 E
27 25 26 syl11 r V W N WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W
28 27 adantr r V lastS W r E W N WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W
29 28 impcom W N WWalksN G r V lastS W r E W ++ ⟨“ r ”⟩ prefix N + 1 = W
30 lswccats1 W Word V r V lastS W ++ ⟨“ r ”⟩ = r
31 30 eqcomd W Word V r V r = lastS W ++ ⟨“ r ”⟩
32 31 ex W Word V r V r = lastS W ++ ⟨“ r ”⟩
33 32 3ad2ant3 G V N 0 W Word V r V r = lastS W ++ ⟨“ r ”⟩
34 6 33 syl W N WWalksN G r V r = lastS W ++ ⟨“ r ”⟩
35 34 imp W N WWalksN G r V r = lastS W ++ ⟨“ r ”⟩
36 35 preq2d W N WWalksN G r V lastS W r = lastS W lastS W ++ ⟨“ r ”⟩
37 36 eleq1d W N WWalksN G r V lastS W r E lastS W lastS W ++ ⟨“ r ”⟩ E
38 37 biimpd W N WWalksN G r V lastS W r E lastS W lastS W ++ ⟨“ r ”⟩ E
39 38 impr W N WWalksN G r V lastS W r E lastS W lastS W ++ ⟨“ r ”⟩ E
40 14 29 39 jca32 W N WWalksN G r V lastS W r E W ++ ⟨“ r ”⟩ N + 1 WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W lastS W lastS W ++ ⟨“ r ”⟩ E
41 33 6 syl11 r V W N WWalksN G r = lastS W ++ ⟨“ r ”⟩
42 41 adantr r V lastS W r E W N WWalksN G r = lastS W ++ ⟨“ r ”⟩
43 42 impcom W N WWalksN G r V lastS W r E r = lastS W ++ ⟨“ r ”⟩
44 ovexd W N WWalksN G r V lastS W r E W ++ ⟨“ r ”⟩ V
45 eleq1 d = W ++ ⟨“ r ”⟩ d N + 1 WWalksN G W ++ ⟨“ r ”⟩ N + 1 WWalksN G
46 oveq1 d = W ++ ⟨“ r ”⟩ d prefix N + 1 = W ++ ⟨“ r ”⟩ prefix N + 1
47 46 eqeq1d d = W ++ ⟨“ r ”⟩ d prefix N + 1 = W W ++ ⟨“ r ”⟩ prefix N + 1 = W
48 fveq2 d = W ++ ⟨“ r ”⟩ lastS d = lastS W ++ ⟨“ r ”⟩
49 48 preq2d d = W ++ ⟨“ r ”⟩ lastS W lastS d = lastS W lastS W ++ ⟨“ r ”⟩
50 49 eleq1d d = W ++ ⟨“ r ”⟩ lastS W lastS d E lastS W lastS W ++ ⟨“ r ”⟩ E
51 47 50 anbi12d d = W ++ ⟨“ r ”⟩ d prefix N + 1 = W lastS W lastS d E W ++ ⟨“ r ”⟩ prefix N + 1 = W lastS W lastS W ++ ⟨“ r ”⟩ E
52 45 51 anbi12d d = W ++ ⟨“ r ”⟩ d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E W ++ ⟨“ r ”⟩ N + 1 WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W lastS W lastS W ++ ⟨“ r ”⟩ E
53 48 eqeq2d d = W ++ ⟨“ r ”⟩ r = lastS d r = lastS W ++ ⟨“ r ”⟩
54 52 53 anbi12d d = W ++ ⟨“ r ”⟩ d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E r = lastS d W ++ ⟨“ r ”⟩ N + 1 WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W lastS W lastS W ++ ⟨“ r ”⟩ E r = lastS W ++ ⟨“ r ”⟩
55 54 bicomd d = W ++ ⟨“ r ”⟩ W ++ ⟨“ r ”⟩ N + 1 WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W lastS W lastS W ++ ⟨“ r ”⟩ E r = lastS W ++ ⟨“ r ”⟩ d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E r = lastS d
56 55 adantl W N WWalksN G r V lastS W r E d = W ++ ⟨“ r ”⟩ W ++ ⟨“ r ”⟩ N + 1 WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W lastS W lastS W ++ ⟨“ r ”⟩ E r = lastS W ++ ⟨“ r ”⟩ d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E r = lastS d
57 56 biimpd W N WWalksN G r V lastS W r E d = W ++ ⟨“ r ”⟩ W ++ ⟨“ r ”⟩ N + 1 WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W lastS W lastS W ++ ⟨“ r ”⟩ E r = lastS W ++ ⟨“ r ”⟩ d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E r = lastS d
58 44 57 spcimedv W N WWalksN G r V lastS W r E W ++ ⟨“ r ”⟩ N + 1 WWalksN G W ++ ⟨“ r ”⟩ prefix N + 1 = W lastS W lastS W ++ ⟨“ r ”⟩ E r = lastS W ++ ⟨“ r ”⟩ d d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E r = lastS d
59 40 43 58 mp2and W N WWalksN G r V lastS W r E d d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E r = lastS d
60 oveq1 w = d w prefix N + 1 = d prefix N + 1
61 60 eqeq1d w = d w prefix N + 1 = W d prefix N + 1 = W
62 fveq2 w = d lastS w = lastS d
63 62 preq2d w = d lastS W lastS w = lastS W lastS d
64 63 eleq1d w = d lastS W lastS w E lastS W lastS d E
65 61 64 anbi12d w = d w prefix N + 1 = W lastS W lastS w E d prefix N + 1 = W lastS W lastS d E
66 65 elrab d w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E
67 66 anbi1i d w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E r = lastS d d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E r = lastS d
68 67 exbii d d w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E r = lastS d d d N + 1 WWalksN G d prefix N + 1 = W lastS W lastS d E r = lastS d
69 59 68 sylibr W N WWalksN G r V lastS W r E d d w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E r = lastS d
70 df-rex d w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E r = lastS d d d w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E r = lastS d
71 69 70 sylibr W N WWalksN G r V lastS W r E d w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E r = lastS d
72 1 2 3 wwlksnextwrd W N WWalksN G D = w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E
73 72 adantr W N WWalksN G r V lastS W r E D = w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E
74 73 rexeqdv W N WWalksN G r V lastS W r E d D r = lastS d d w N + 1 WWalksN G | w prefix N + 1 = W lastS W lastS w E r = lastS d
75 71 74 mpbird W N WWalksN G r V lastS W r E d D r = lastS d
76 fveq2 t = d lastS t = lastS d
77 fvex lastS d V
78 76 5 77 fvmpt d D F d = lastS d
79 78 eqeq2d d D r = F d r = lastS d
80 79 rexbiia d D r = F d d D r = lastS d
81 75 80 sylibr W N WWalksN G r V lastS W r E d D r = F d
82 12 81 sylan2b W N WWalksN G r R d D r = F d
83 82 ralrimiva W N WWalksN G r R d D r = F d
84 dffo3 F : D onto R F : D R r R d D r = F d
85 9 83 84 sylanbrc W N WWalksN G F : D onto R