Metamath Proof Explorer


Theorem clwlkclwwlklem3

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

Ref Expression
Assertion clwlkclwwlklem3 E:domE1-1RPWordV2PffWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranE

Proof

Step Hyp Ref Expression
1 simp1 E:domE1-1RPWordV2PE:domE1-1R
2 simp1 fWorddomEP:0fVi0..^fEfi=PiPi+1fWorddomE
3 2 adantr fWorddomEP:0fVi0..^fEfi=PiPi+1P0=PffWorddomE
4 1 3 anim12i E:domE1-1RPWordV2PfWorddomEP:0fVi0..^fEfi=PiPi+1P0=PfE:domE1-1RfWorddomE
5 simp3 E:domE1-1RPWordV2P2P
6 simpl2 fWorddomEP:0fVi0..^fEfi=PiPi+1P0=PfP:0fV
7 5 6 anim12ci E:domE1-1RPWordV2PfWorddomEP:0fVi0..^fEfi=PiPi+1P0=PfP:0fV2P
8 simp3 fWorddomEP:0fVi0..^fEfi=PiPi+1i0..^fEfi=PiPi+1
9 8 anim1i fWorddomEP:0fVi0..^fEfi=PiPi+1P0=Pfi0..^fEfi=PiPi+1P0=Pf
10 9 adantl E:domE1-1RPWordV2PfWorddomEP:0fVi0..^fEfi=PiPi+1P0=Pfi0..^fEfi=PiPi+1P0=Pf
11 clwlkclwwlklem2 E:domE1-1RfWorddomEP:0fV2Pi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
12 4 7 10 11 syl3anc E:domE1-1RPWordV2PfWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
13 lencl PWordVP0
14 lencl fWorddomEf0
15 ffz0hash f0P:0fVP=f+1
16 oveq1 P=f+1P1=f+1-1
17 16 oveq1d P=f+1P-1-0=f+1-1-0
18 nn0cn f0f
19 peano2cn ff+1
20 peano2cnm f+1f+1-1
21 18 19 20 3syl f0f+1-1
22 21 subid1d f0f+1-1-0=f+1-1
23 1cnd f01
24 18 23 pncand f0f+1-1=f
25 22 24 eqtrd f0f+1-1-0=f
26 25 adantr f0P0f+1-1-0=f
27 17 26 sylan9eqr f0P0P=f+1P-1-0=f
28 27 oveq1d f0P0P=f+1P1-0-1=f1
29 28 oveq2d f0P0P=f+10..^P1-0-1=0..^f1
30 29 raleqdv f0P0P=f+1i0..^P1-0-1PiPi+1ranEi0..^f1PiPi+1ranE
31 oveq1 P=f+1P2=f+1-2
32 2cnd f02
33 18 32 23 subsub3d f0f21=f+1-2
34 2m1e1 21=1
35 34 a1i f021=1
36 35 oveq2d f0f21=f1
37 33 36 eqtr3d f0f+1-2=f1
38 37 adantr f0P0f+1-2=f1
39 31 38 sylan9eqr f0P0P=f+1P2=f1
40 39 fveq2d f0P0P=f+1PP2=Pf1
41 40 preq1d f0P0P=f+1PP2P0=Pf1P0
42 41 eleq1d f0P0P=f+1PP2P0ranEPf1P0ranE
43 30 42 anbi12d f0P0P=f+1i0..^P1-0-1PiPi+1ranEPP2P0ranEi0..^f1PiPi+1ranEPf1P0ranE
44 43 anbi2d f0P0P=f+1lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
45 3anass lastSP=P0i0..^f1PiPi+1ranEPf1P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
46 44 45 bitr4di f0P0P=f+1lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
47 46 expcom P=f+1f0P0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
48 47 expd P=f+1f0P0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
49 15 48 syl f0P:0fVf0P0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
50 49 ex f0P:0fVf0P0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
51 50 com23 f0f0P:0fVP0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
52 14 14 51 sylc fWorddomEP:0fVP0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
53 52 imp fWorddomEP:0fVP0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
54 53 3adant3 fWorddomEP:0fVi0..^fEfi=PiPi+1P0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
55 54 adantr fWorddomEP:0fVi0..^fEfi=PiPi+1P0=PfP0lastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
56 13 55 syl5com PWordVfWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
57 56 3ad2ant2 E:domE1-1RPWordV2PfWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
58 57 imp E:domE1-1RPWordV2PfWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranElastSP=P0i0..^f1PiPi+1ranEPf1P0ranE
59 12 58 mpbird E:domE1-1RPWordV2PfWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranE
60 59 ex E:domE1-1RPWordV2PfWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranE
61 60 exlimdv E:domE1-1RPWordV2PffWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranE
62 clwlkclwwlklem1 E:domE1-1RPWordV2PlastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranEffWorddomEP:0fVi0..^fEfi=PiPi+1P0=Pf
63 61 62 impbid E:domE1-1RPWordV2PffWorddomEP:0fVi0..^fEfi=PiPi+1P0=PflastSP=P0i0..^P1-0-1PiPi+1ranEPP2P0ranE