Metamath Proof Explorer


Theorem clwwlkf1

Description: Lemma 3 for clwwlkf1o : F is a 1-1 function. (Contributed by AV, 28-Sep-2018) (Revised by AV, 26-Apr-2021) (Revised by AV, 1-Nov-2022)

Ref Expression
Hypotheses clwwlkf1o.d D = w N WWalksN G | lastS w = w 0
clwwlkf1o.f F = t D t prefix N
Assertion clwwlkf1 N F : D 1-1 N ClWWalksN G

Proof

Step Hyp Ref Expression
1 clwwlkf1o.d D = w N WWalksN G | lastS w = w 0
2 clwwlkf1o.f F = t D t prefix N
3 1 2 clwwlkf N F : D N ClWWalksN G
4 1 2 clwwlkfv x D F x = x prefix N
5 1 2 clwwlkfv y D F y = y prefix N
6 4 5 eqeqan12d x D y D F x = F y x prefix N = y prefix N
7 6 adantl N x D y D F x = F y x prefix N = y prefix N
8 fveq2 w = x lastS w = lastS x
9 fveq1 w = x w 0 = x 0
10 8 9 eqeq12d w = x lastS w = w 0 lastS x = x 0
11 10 1 elrab2 x D x N WWalksN G lastS x = x 0
12 fveq2 w = y lastS w = lastS y
13 fveq1 w = y w 0 = y 0
14 12 13 eqeq12d w = y lastS w = w 0 lastS y = y 0
15 14 1 elrab2 y D y N WWalksN G lastS y = y 0
16 11 15 anbi12i x D y D x N WWalksN G lastS x = x 0 y N WWalksN G lastS y = y 0
17 eqid Vtx G = Vtx G
18 eqid Edg G = Edg G
19 17 18 wwlknp x N WWalksN G x Word Vtx G x = N + 1 i 0 ..^ N x i x i + 1 Edg G
20 17 18 wwlknp y N WWalksN G y Word Vtx G y = N + 1 i 0 ..^ N y i y i + 1 Edg G
21 simprlr y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x = N + 1
22 simpllr y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 y = N + 1
23 21 22 eqtr4d y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x = y
24 23 ad2antlr N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x = y
25 nncn N N
26 ax-1cn 1
27 pncan N 1 N + 1 - 1 = N
28 27 eqcomd N 1 N = N + 1 - 1
29 25 26 28 sylancl N N = N + 1 - 1
30 oveq1 x = N + 1 x 1 = N + 1 - 1
31 30 eqcomd x = N + 1 N + 1 - 1 = x 1
32 29 31 sylan9eqr x = N + 1 N N = x 1
33 32 oveq2d x = N + 1 N x prefix N = x prefix x 1
34 32 oveq2d x = N + 1 N y prefix N = y prefix x 1
35 33 34 eqeq12d x = N + 1 N x prefix N = y prefix N x prefix x 1 = y prefix x 1
36 35 ex x = N + 1 N x prefix N = y prefix N x prefix x 1 = y prefix x 1
37 36 ad2antlr x Word Vtx G x = N + 1 lastS x = x 0 N x prefix N = y prefix N x prefix x 1 = y prefix x 1
38 37 adantl y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N x prefix N = y prefix N x prefix x 1 = y prefix x 1
39 38 impcom N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x prefix x 1 = y prefix x 1
40 39 biimpa N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x prefix x 1 = y prefix x 1
41 simpll y Word Vtx G y = N + 1 lastS y = y 0 y Word Vtx G
42 simpll x Word Vtx G x = N + 1 lastS x = x 0 x Word Vtx G
43 41 42 anim12ci y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x Word Vtx G y Word Vtx G
44 43 adantl N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x Word Vtx G y Word Vtx G
45 nnnn0 N N 0
46 0nn0 0 0
47 45 46 jctil N 0 0 N 0
48 47 adantr N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 0 0 N 0
49 nnre N N
50 49 lep1d N N N + 1
51 breq2 x = N + 1 N x N N + 1
52 50 51 syl5ibr x = N + 1 N N x
53 52 ad2antlr x Word Vtx G x = N + 1 lastS x = x 0 N N x
54 53 adantl y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N N x
55 54 impcom N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N x
56 breq2 y = N + 1 N y N N + 1
57 50 56 syl5ibr y = N + 1 N N y
58 57 ad2antlr y Word Vtx G y = N + 1 lastS y = y 0 N N y
59 58 adantr y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N N y
60 59 impcom N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N y
61 pfxval x Word Vtx G N 0 x prefix N = x substr 0 N
62 61 ad2ant2rl x Word Vtx G y Word Vtx G 0 0 N 0 x prefix N = x substr 0 N
63 pfxval y Word Vtx G N 0 y prefix N = y substr 0 N
64 63 ad2ant2l x Word Vtx G y Word Vtx G 0 0 N 0 y prefix N = y substr 0 N
65 62 64 eqeq12d x Word Vtx G y Word Vtx G 0 0 N 0 x prefix N = y prefix N x substr 0 N = y substr 0 N
66 65 3adant3 x Word Vtx G y Word Vtx G 0 0 N 0 N x N y x prefix N = y prefix N x substr 0 N = y substr 0 N
67 swrdspsleq x Word Vtx G y Word Vtx G 0 0 N 0 N x N y x substr 0 N = y substr 0 N i 0 ..^ N x i = y i
68 66 67 bitrd x Word Vtx G y Word Vtx G 0 0 N 0 N x N y x prefix N = y prefix N i 0 ..^ N x i = y i
69 44 48 55 60 68 syl112anc N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N i 0 ..^ N x i = y i
70 lbfzo0 0 0 ..^ N N
71 70 biimpri N 0 0 ..^ N
72 71 adantr N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 0 0 ..^ N
73 fveq2 i = 0 x i = x 0
74 fveq2 i = 0 y i = y 0
75 73 74 eqeq12d i = 0 x i = y i x 0 = y 0
76 75 rspcv 0 0 ..^ N i 0 ..^ N x i = y i x 0 = y 0
77 72 76 syl N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 i 0 ..^ N x i = y i x 0 = y 0
78 69 77 sylbid N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x 0 = y 0
79 78 imp N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x 0 = y 0
80 simpr x Word Vtx G x = N + 1 lastS x = x 0 lastS x = x 0
81 simpr y Word Vtx G y = N + 1 lastS y = y 0 lastS y = y 0
82 80 81 eqeqan12rd y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 lastS x = lastS y x 0 = y 0
83 82 ad2antlr N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N lastS x = lastS y x 0 = y 0
84 79 83 mpbird N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N lastS x = lastS y
85 24 40 84 jca32 N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x = y x prefix x 1 = y prefix x 1 lastS x = lastS y
86 42 adantl y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x Word Vtx G
87 86 adantl N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x Word Vtx G
88 41 adantr y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 y Word Vtx G
89 88 adantl N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 y Word Vtx G
90 1red N 1
91 nngt0 N 0 < N
92 0lt1 0 < 1
93 92 a1i N 0 < 1
94 49 90 91 93 addgt0d N 0 < N + 1
95 breq2 x = N + 1 0 < x 0 < N + 1
96 94 95 syl5ibr x = N + 1 N 0 < x
97 96 ad2antlr x Word Vtx G x = N + 1 lastS x = x 0 N 0 < x
98 97 adantl y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N 0 < x
99 98 impcom N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 0 < x
100 87 89 99 3jca N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x Word Vtx G y Word Vtx G 0 < x
101 100 adantr N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x Word Vtx G y Word Vtx G 0 < x
102 pfxsuff1eqwrdeq x Word Vtx G y Word Vtx G 0 < x x = y x = y x prefix x 1 = y prefix x 1 lastS x = lastS y
103 101 102 syl N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x = y x = y x prefix x 1 = y prefix x 1 lastS x = lastS y
104 85 103 mpbird N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x = y
105 104 exp31 N y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 x prefix N = y prefix N x = y
106 105 expdcom y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N x prefix N = y prefix N x = y
107 106 ex y Word Vtx G y = N + 1 lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N x prefix N = y prefix N x = y
108 107 3adant3 y Word Vtx G y = N + 1 i 0 ..^ N y i y i + 1 Edg G lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N x prefix N = y prefix N x = y
109 20 108 syl y N WWalksN G lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N x prefix N = y prefix N x = y
110 109 imp y N WWalksN G lastS y = y 0 x Word Vtx G x = N + 1 lastS x = x 0 N x prefix N = y prefix N x = y
111 110 expdcom x Word Vtx G x = N + 1 lastS x = x 0 y N WWalksN G lastS y = y 0 N x prefix N = y prefix N x = y
112 111 3adant3 x Word Vtx G x = N + 1 i 0 ..^ N x i x i + 1 Edg G lastS x = x 0 y N WWalksN G lastS y = y 0 N x prefix N = y prefix N x = y
113 19 112 syl x N WWalksN G lastS x = x 0 y N WWalksN G lastS y = y 0 N x prefix N = y prefix N x = y
114 113 imp31 x N WWalksN G lastS x = x 0 y N WWalksN G lastS y = y 0 N x prefix N = y prefix N x = y
115 114 com12 N x N WWalksN G lastS x = x 0 y N WWalksN G lastS y = y 0 x prefix N = y prefix N x = y
116 16 115 syl5bi N x D y D x prefix N = y prefix N x = y
117 116 imp N x D y D x prefix N = y prefix N x = y
118 7 117 sylbid N x D y D F x = F y x = y
119 118 ralrimivva N x D y D F x = F y x = y
120 dff13 F : D 1-1 N ClWWalksN G F : D N ClWWalksN G x D y D F x = F y x = y
121 3 119 120 sylanbrc N F : D 1-1 N ClWWalksN G