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=wNWWalksNG|lastSw=w0
clwwlkf1o.f F=tDtprefixN
Assertion clwwlkf1 NF:D1-1NClWWalksNG

Proof

Step Hyp Ref Expression
1 clwwlkf1o.d D=wNWWalksNG|lastSw=w0
2 clwwlkf1o.f F=tDtprefixN
3 1 2 clwwlkf NF:DNClWWalksNG
4 1 2 clwwlkfv xDFx=xprefixN
5 1 2 clwwlkfv yDFy=yprefixN
6 4 5 eqeqan12d xDyDFx=FyxprefixN=yprefixN
7 6 adantl NxDyDFx=FyxprefixN=yprefixN
8 fveq2 w=xlastSw=lastSx
9 fveq1 w=xw0=x0
10 8 9 eqeq12d w=xlastSw=w0lastSx=x0
11 10 1 elrab2 xDxNWWalksNGlastSx=x0
12 fveq2 w=ylastSw=lastSy
13 fveq1 w=yw0=y0
14 12 13 eqeq12d w=ylastSw=w0lastSy=y0
15 14 1 elrab2 yDyNWWalksNGlastSy=y0
16 11 15 anbi12i xDyDxNWWalksNGlastSx=x0yNWWalksNGlastSy=y0
17 eqid VtxG=VtxG
18 eqid EdgG=EdgG
19 17 18 wwlknp xNWWalksNGxWordVtxGx=N+1i0..^Nxixi+1EdgG
20 17 18 wwlknp yNWWalksNGyWordVtxGy=N+1i0..^Nyiyi+1EdgG
21 simprlr yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0x=N+1
22 simpllr yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0y=N+1
23 21 22 eqtr4d yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0x=y
24 23 ad2antlr NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNx=y
25 nncn NN
26 ax-1cn 1
27 pncan N1N+1-1=N
28 27 eqcomd N1N=N+1-1
29 25 26 28 sylancl NN=N+1-1
30 oveq1 x=N+1x1=N+1-1
31 30 eqcomd x=N+1N+1-1=x1
32 29 31 sylan9eqr x=N+1NN=x1
33 32 oveq2d x=N+1NxprefixN=xprefixx1
34 32 oveq2d x=N+1NyprefixN=yprefixx1
35 33 34 eqeq12d x=N+1NxprefixN=yprefixNxprefixx1=yprefixx1
36 35 ex x=N+1NxprefixN=yprefixNxprefixx1=yprefixx1
37 36 ad2antlr xWordVtxGx=N+1lastSx=x0NxprefixN=yprefixNxprefixx1=yprefixx1
38 37 adantl yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0NxprefixN=yprefixNxprefixx1=yprefixx1
39 38 impcom NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNxprefixx1=yprefixx1
40 39 biimpa NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNxprefixx1=yprefixx1
41 simpll yWordVtxGy=N+1lastSy=y0yWordVtxG
42 simpll xWordVtxGx=N+1lastSx=x0xWordVtxG
43 41 42 anim12ci yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xWordVtxGyWordVtxG
44 43 adantl NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xWordVtxGyWordVtxG
45 nnnn0 NN0
46 0nn0 00
47 45 46 jctil N00N0
48 47 adantr NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x000N0
49 nnre NN
50 49 lep1d NNN+1
51 breq2 x=N+1NxNN+1
52 50 51 imbitrrid x=N+1NNx
53 52 ad2antlr xWordVtxGx=N+1lastSx=x0NNx
54 53 adantl yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0NNx
55 54 impcom NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0Nx
56 breq2 y=N+1NyNN+1
57 50 56 imbitrrid y=N+1NNy
58 57 ad2antlr yWordVtxGy=N+1lastSy=y0NNy
59 58 adantr yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0NNy
60 59 impcom NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0Ny
61 pfxval xWordVtxGN0xprefixN=xsubstr0N
62 61 ad2ant2rl xWordVtxGyWordVtxG00N0xprefixN=xsubstr0N
63 pfxval yWordVtxGN0yprefixN=ysubstr0N
64 63 ad2ant2l xWordVtxGyWordVtxG00N0yprefixN=ysubstr0N
65 62 64 eqeq12d xWordVtxGyWordVtxG00N0xprefixN=yprefixNxsubstr0N=ysubstr0N
66 65 3adant3 xWordVtxGyWordVtxG00N0NxNyxprefixN=yprefixNxsubstr0N=ysubstr0N
67 swrdspsleq xWordVtxGyWordVtxG00N0NxNyxsubstr0N=ysubstr0Ni0..^Nxi=yi
68 66 67 bitrd xWordVtxGyWordVtxG00N0NxNyxprefixN=yprefixNi0..^Nxi=yi
69 44 48 55 60 68 syl112anc NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNi0..^Nxi=yi
70 lbfzo0 00..^NN
71 70 biimpri N00..^N
72 71 adantr NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x000..^N
73 fveq2 i=0xi=x0
74 fveq2 i=0yi=y0
75 73 74 eqeq12d i=0xi=yix0=y0
76 75 rspcv 00..^Ni0..^Nxi=yix0=y0
77 72 76 syl NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0i0..^Nxi=yix0=y0
78 69 77 sylbid NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNx0=y0
79 78 imp NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNx0=y0
80 simpr xWordVtxGx=N+1lastSx=x0lastSx=x0
81 simpr yWordVtxGy=N+1lastSy=y0lastSy=y0
82 80 81 eqeqan12rd yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0lastSx=lastSyx0=y0
83 82 ad2antlr NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNlastSx=lastSyx0=y0
84 79 83 mpbird NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNlastSx=lastSy
85 24 40 84 jca32 NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNx=yxprefixx1=yprefixx1lastSx=lastSy
86 42 adantl yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xWordVtxG
87 86 adantl NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xWordVtxG
88 41 adantr yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0yWordVtxG
89 88 adantl NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0yWordVtxG
90 1red N1
91 nngt0 N0<N
92 0lt1 0<1
93 92 a1i N0<1
94 49 90 91 93 addgt0d N0<N+1
95 breq2 x=N+10<x0<N+1
96 94 95 imbitrrid x=N+1N0<x
97 96 ad2antlr xWordVtxGx=N+1lastSx=x0N0<x
98 97 adantl yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0N0<x
99 98 impcom NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x00<x
100 87 89 99 3jca NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xWordVtxGyWordVtxG0<x
101 100 adantr NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNxWordVtxGyWordVtxG0<x
102 pfxsuff1eqwrdeq xWordVtxGyWordVtxG0<xx=yx=yxprefixx1=yprefixx1lastSx=lastSy
103 101 102 syl NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNx=yx=yxprefixx1=yprefixx1lastSx=lastSy
104 85 103 mpbird NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNx=y
105 104 exp31 NyWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0xprefixN=yprefixNx=y
106 105 expdcom yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0NxprefixN=yprefixNx=y
107 106 ex yWordVtxGy=N+1lastSy=y0xWordVtxGx=N+1lastSx=x0NxprefixN=yprefixNx=y
108 107 3adant3 yWordVtxGy=N+1i0..^Nyiyi+1EdgGlastSy=y0xWordVtxGx=N+1lastSx=x0NxprefixN=yprefixNx=y
109 20 108 syl yNWWalksNGlastSy=y0xWordVtxGx=N+1lastSx=x0NxprefixN=yprefixNx=y
110 109 imp yNWWalksNGlastSy=y0xWordVtxGx=N+1lastSx=x0NxprefixN=yprefixNx=y
111 110 expdcom xWordVtxGx=N+1lastSx=x0yNWWalksNGlastSy=y0NxprefixN=yprefixNx=y
112 111 3adant3 xWordVtxGx=N+1i0..^Nxixi+1EdgGlastSx=x0yNWWalksNGlastSy=y0NxprefixN=yprefixNx=y
113 19 112 syl xNWWalksNGlastSx=x0yNWWalksNGlastSy=y0NxprefixN=yprefixNx=y
114 113 imp31 xNWWalksNGlastSx=x0yNWWalksNGlastSy=y0NxprefixN=yprefixNx=y
115 114 com12 NxNWWalksNGlastSx=x0yNWWalksNGlastSy=y0xprefixN=yprefixNx=y
116 16 115 biimtrid NxDyDxprefixN=yprefixNx=y
117 116 imp NxDyDxprefixN=yprefixNx=y
118 7 117 sylbid NxDyDFx=Fyx=y
119 118 ralrimivva NxDyDFx=Fyx=y
120 dff13 F:D1-1NClWWalksNGF:DNClWWalksNGxDyDFx=Fyx=y
121 3 119 120 sylanbrc NF:D1-1NClWWalksNG