Metamath Proof Explorer


Theorem clwlkclwwlklem2

Description: Lemma 2 for clwlkclwwlk . (Contributed by Alexander van der Vekens, 22-Jun-2018) (Revised by AV, 11-Apr-2021)

Ref Expression
Assertion clwlkclwwlklem2 E : dom E 1-1 R F Word dom E P : 0 F V 2 P i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E

Proof

Step Hyp Ref Expression
1 f1fn E : dom E 1-1 R E Fn dom E
2 dffn3 E Fn dom E E : dom E ran E
3 1 2 sylib E : dom E 1-1 R E : dom E ran E
4 lencl F Word dom E F 0
5 ffn P : 0 F V P Fn 0 F
6 fnfz0hash F 0 P Fn 0 F P = F + 1
7 4 5 6 syl2an F Word dom E P : 0 F V P = F + 1
8 ffz0iswrd P : 0 F V P Word V
9 lsw P Word V lastS P = P P 1
10 9 ad6antr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P P 1
11 fvoveq1 P = F + 1 P P 1 = P F + 1 - 1
12 11 ad4antlr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F P P 1 = P F + 1 - 1
13 eqcom P 0 = P F P F = P 0
14 nn0cn F 0 F
15 1cnd F 0 1
16 14 15 pncand F 0 F + 1 - 1 = F
17 16 eqcomd F 0 F = F + 1 - 1
18 17 ad4antlr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E F = F + 1 - 1
19 18 fveqeq2d P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E P F = P 0 P F + 1 - 1 = P 0
20 19 biimpd P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E P F = P 0 P F + 1 - 1 = P 0
21 13 20 syl5bi P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E P 0 = P F P F + 1 - 1 = P 0
22 21 adantld P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F P F + 1 - 1 = P 0
23 22 imp P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F P F + 1 - 1 = P 0
24 10 12 23 3eqtrd P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0
25 nn0z F 0 F
26 peano2zm F F 1
27 25 26 syl F 0 F 1
28 nn0re F 0 F
29 28 lem1d F 0 F 1 F
30 eluz2 F F 1 F 1 F F 1 F
31 27 25 29 30 syl3anbrc F 0 F F 1
32 31 ad4antlr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E F F 1
33 fzoss2 F F 1 0 ..^ F 1 0 ..^ F
34 ssralv 0 ..^ F 1 0 ..^ F i 0 ..^ F E F i = P i P i + 1 i 0 ..^ F 1 E F i = P i P i + 1
35 32 33 34 3syl P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 i 0 ..^ F 1 E F i = P i P i + 1
36 simpr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E E : dom E ran E
37 36 adantr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F 1 E : dom E ran E
38 wrdf F Word dom E F : 0 ..^ F dom E
39 simpll F : 0 ..^ F dom E F 0 i 0 ..^ F 1 F : 0 ..^ F dom E
40 fzossrbm1 F 0 ..^ F 1 0 ..^ F
41 25 40 syl F 0 0 ..^ F 1 0 ..^ F
42 41 adantl F : 0 ..^ F dom E F 0 0 ..^ F 1 0 ..^ F
43 42 sselda F : 0 ..^ F dom E F 0 i 0 ..^ F 1 i 0 ..^ F
44 39 43 ffvelrnd F : 0 ..^ F dom E F 0 i 0 ..^ F 1 F i dom E
45 44 exp31 F : 0 ..^ F dom E F 0 i 0 ..^ F 1 F i dom E
46 38 45 syl F Word dom E F 0 i 0 ..^ F 1 F i dom E
47 46 adantl P Word V F Word dom E F 0 i 0 ..^ F 1 F i dom E
48 47 imp P Word V F Word dom E F 0 i 0 ..^ F 1 F i dom E
49 48 ad3antrrr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F 1 F i dom E
50 49 imp P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F 1 F i dom E
51 37 50 ffvelrnd P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F 1 E F i ran E
52 eqcom E F i = P i P i + 1 P i P i + 1 = E F i
53 52 biimpi E F i = P i P i + 1 P i P i + 1 = E F i
54 53 eleq1d E F i = P i P i + 1 P i P i + 1 ran E E F i ran E
55 51 54 syl5ibrcom P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F 1 E F i = P i P i + 1 P i P i + 1 ran E
56 55 ralimdva P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F 1 E F i = P i P i + 1 i 0 ..^ F 1 P i P i + 1 ran E
57 35 56 syldc i 0 ..^ F E F i = P i P i + 1 P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F 1 P i P i + 1 ran E
58 57 adantr i 0 ..^ F E F i = P i P i + 1 P 0 = P F P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F 1 P i P i + 1 ran E
59 58 impcom P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F i 0 ..^ F 1 P i P i + 1 ran E
60 breq2 P = F + 1 2 P 2 F + 1
61 60 adantl P Word V F Word dom E F 0 P = F + 1 2 P 2 F + 1
62 2re 2
63 62 a1i F 0 2
64 1red F 0 1
65 63 64 28 lesubaddd F 0 2 1 F 2 F + 1
66 2m1e1 2 1 = 1
67 66 breq1i 2 1 F 1 F
68 elnnnn0c F F 0 1 F
69 68 simplbi2 F 0 1 F F
70 67 69 syl5bi F 0 2 1 F F
71 65 70 sylbird F 0 2 F + 1 F
72 71 adantl P Word V F Word dom E F 0 2 F + 1 F
73 72 adantr P Word V F Word dom E F 0 P = F + 1 2 F + 1 F
74 61 73 sylbid P Word V F Word dom E F 0 P = F + 1 2 P F
75 74 imp P Word V F Word dom E F 0 P = F + 1 2 P F
76 75 adantr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E F
77 lbfzo0 0 0 ..^ F F
78 76 77 sylibr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E 0 0 ..^ F
79 fzoend 0 0 ..^ F F 1 0 ..^ F
80 78 79 syl P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E F 1 0 ..^ F
81 2fveq3 i = F 1 E F i = E F F 1
82 fveq2 i = F 1 P i = P F 1
83 fvoveq1 i = F 1 P i + 1 = P F - 1 + 1
84 82 83 preq12d i = F 1 P i P i + 1 = P F 1 P F - 1 + 1
85 81 84 eqeq12d i = F 1 E F i = P i P i + 1 E F F 1 = P F 1 P F - 1 + 1
86 85 adantl P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i = F 1 E F i = P i P i + 1 E F F 1 = P F 1 P F - 1 + 1
87 80 86 rspcdv P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 E F F 1 = P F 1 P F - 1 + 1
88 14 15 npcand F 0 F - 1 + 1 = F
89 88 ad4antlr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E F - 1 + 1 = F
90 89 fveq2d P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E P F - 1 + 1 = P F
91 90 preq2d P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E P F 1 P F - 1 + 1 = P F 1 P F
92 91 eqeq2d P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E E F F 1 = P F 1 P F - 1 + 1 E F F 1 = P F 1 P F
93 38 ad4antlr P Word V F Word dom E F 0 P = F + 1 2 P F : 0 ..^ F dom E
94 71 com12 2 F + 1 F 0 F
95 60 94 syl6bi P = F + 1 2 P F 0 F
96 95 com3r F 0 P = F + 1 2 P F
97 96 adantl P Word V F Word dom E F 0 P = F + 1 2 P F
98 97 imp31 P Word V F Word dom E F 0 P = F + 1 2 P F
99 98 77 sylibr P Word V F Word dom E F 0 P = F + 1 2 P 0 0 ..^ F
100 99 79 syl P Word V F Word dom E F 0 P = F + 1 2 P F 1 0 ..^ F
101 93 100 ffvelrnd P Word V F Word dom E F 0 P = F + 1 2 P F F 1 dom E
102 101 adantr P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E F F 1 dom E
103 36 102 ffvelrnd P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E E F F 1 ran E
104 eqcom E F F 1 = P F 1 P F P F 1 P F = E F F 1
105 104 biimpi E F F 1 = P F 1 P F P F 1 P F = E F F 1
106 105 eleq1d E F F 1 = P F 1 P F P F 1 P F ran E E F F 1 ran E
107 103 106 syl5ibrcom P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E E F F 1 = P F 1 P F P F 1 P F ran E
108 92 107 sylbid P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E E F F 1 = P F 1 P F - 1 + 1 P F 1 P F ran E
109 87 108 syldc i 0 ..^ F E F i = P i P i + 1 P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E P F 1 P F ran E
110 109 adantr i 0 ..^ F E F i = P i P i + 1 P 0 = P F P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E P F 1 P F ran E
111 110 impcom P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F P F 1 P F ran E
112 preq2 P 0 = P F P F 1 P 0 = P F 1 P F
113 112 eleq1d P 0 = P F P F 1 P 0 ran E P F 1 P F ran E
114 113 adantl i 0 ..^ F E F i = P i P i + 1 P 0 = P F P F 1 P 0 ran E P F 1 P F ran E
115 114 adantl P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F P F 1 P 0 ran E P F 1 P F ran E
116 111 115 mpbird P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F P F 1 P 0 ran E
117 24 59 116 3jca P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
118 117 exp41 P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
119 118 exp41 P Word V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
120 8 119 syl P : 0 F V F Word dom E F 0 P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
121 120 com13 F 0 F Word dom E P : 0 F V P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
122 4 121 mpcom F Word dom E P : 0 F V P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
123 122 imp F Word dom E P : 0 F V P = F + 1 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
124 7 123 mpd F Word dom E P : 0 F V 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
125 124 expcom P : 0 F V F Word dom E 2 P E : dom E ran E i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
126 125 com14 E : dom E ran E F Word dom E 2 P P : 0 F V i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
127 126 imp E : dom E ran E F Word dom E 2 P P : 0 F V i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
128 127 impcomd E : dom E ran E F Word dom E P : 0 F V 2 P i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
129 3 128 sylan E : dom E 1-1 R F Word dom E P : 0 F V 2 P i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E
130 129 3imp E : dom E 1-1 R F Word dom E P : 0 F V 2 P i 0 ..^ F E F i = P i P i + 1 P 0 = P F lastS P = P 0 i 0 ..^ F 1 P i P i + 1 ran E P F 1 P 0 ran E