Metamath Proof Explorer


Theorem cshfn

Description: Perform a cyclical shift for a function over a half-open range of nonnegative integers. (Contributed by AV, 20-May-2018) (Revised by AV, 17-Nov-2018) (Revised by AV, 4-Nov-2022)

Ref Expression
Assertion cshfn Wf|l0fFn0..^lNWcyclShiftN=ifW=WsubstrNmodWW++WprefixNmodW

Proof

Step Hyp Ref Expression
1 eqeq1 w=Ww=W=
2 1 adantr w=Wn=Nw=W=
3 simpl w=Wn=Nw=W
4 simpr w=Wn=Nn=N
5 fveq2 w=Ww=W
6 5 adantr w=Wn=Nw=W
7 4 6 oveq12d w=Wn=Nnmodw=NmodW
8 7 6 opeq12d w=Wn=Nnmodww=NmodWW
9 3 8 oveq12d w=Wn=Nwsubstrnmodww=WsubstrNmodWW
10 3 7 oveq12d w=Wn=Nwprefixnmodw=WprefixNmodW
11 9 10 oveq12d w=Wn=Nwsubstrnmodww++wprefixnmodw=WsubstrNmodWW++WprefixNmodW
12 2 11 ifbieq2d w=Wn=Nifw=wsubstrnmodww++wprefixnmodw=ifW=WsubstrNmodWW++WprefixNmodW
13 df-csh cyclShift=wf|l0fFn0..^l,nifw=wsubstrnmodww++wprefixnmodw
14 0ex V
15 ovex WsubstrNmodWW++WprefixNmodWV
16 14 15 ifex ifW=WsubstrNmodWW++WprefixNmodWV
17 12 13 16 ovmpoa Wf|l0fFn0..^lNWcyclShiftN=ifW=WsubstrNmodWW++WprefixNmodW