Metamath Proof Explorer


Theorem cycpmfv1

Description: Value of a cycle function for any element but the last. (Contributed by Thierry Arnoux, 22-Sep-2023)

Ref Expression
Hypotheses tocycval.1 C=toCycD
tocycfv.d φDV
tocycfv.w φWWordD
tocycfv.1 φW:domW1-1D
cycpmfv1.1 φN0..^W1
Assertion cycpmfv1 φCWWN=WN+1

Proof

Step Hyp Ref Expression
1 tocycval.1 C=toCycD
2 tocycfv.d φDV
3 tocycfv.w φWWordD
4 tocycfv.1 φW:domW1-1D
5 cycpmfv1.1 φN0..^W1
6 lencl WWordDW0
7 3 6 syl φW0
8 7 nn0zd φW
9 fzossrbm1 W0..^W10..^W
10 8 9 syl φ0..^W10..^W
11 10 5 sseldd φN0..^W
12 1 2 3 4 11 cycpmfvlem φCWWN=WcyclShift1W-1WN
13 df-f1 W:domW1-1DW:domWDFunW-1
14 4 13 sylib φW:domWDFunW-1
15 14 simprd φFunW-1
16 wrdfn WWordDWFn0..^W
17 3 16 syl φWFn0..^W
18 fnfvelrn WFn0..^WN0..^WWNranW
19 17 11 18 syl2anc φWNranW
20 df-rn ranW=domW-1
21 19 20 eleqtrdi φWNdomW-1
22 fvco FunW-1WNdomW-1WcyclShift1W-1WN=WcyclShift1W-1WN
23 15 21 22 syl2anc φWcyclShift1W-1WN=WcyclShift1W-1WN
24 f1f1orn W:domW1-1DW:domW1-1 ontoranW
25 4 24 syl φW:domW1-1 ontoranW
26 17 fndmd φdomW=0..^W
27 11 26 eleqtrrd φNdomW
28 f1ocnvfv1 W:domW1-1 ontoranWNdomWW-1WN=N
29 25 27 28 syl2anc φW-1WN=N
30 29 fveq2d φWcyclShift1W-1WN=WcyclShift1N
31 1zzd φ1
32 cshwidxmod WWordD1N0..^WWcyclShift1N=WN+1modW
33 3 31 11 32 syl3anc φWcyclShift1N=WN+1modW
34 fzo0ss1 1..^W0..^W
35 fzoaddel2 N0..^W1W1N+11..^W
36 5 8 31 35 syl3anc φN+11..^W
37 34 36 sselid φN+10..^W
38 zmodidfzoimp N+10..^WN+1modW=N+1
39 37 38 syl φN+1modW=N+1
40 39 fveq2d φWN+1modW=WN+1
41 30 33 40 3eqtrd φWcyclShift1W-1WN=WN+1
42 12 23 41 3eqtrd φCWWN=WN+1