Metamath Proof Explorer


Theorem iexpcyc

Description: Taking _i to the K -th power is the same as using the K mod 4 -th power instead, by i4 . (Contributed by Mario Carneiro, 7-Jul-2014)

Ref Expression
Assertion iexpcyc K i K mod 4 = i K

Proof

Step Hyp Ref Expression
1 zre K K
2 4re 4
3 4pos 0 < 4
4 2 3 elrpii 4 +
5 modval K 4 + K mod 4 = K 4 K 4
6 1 4 5 sylancl K K mod 4 = K 4 K 4
7 6 oveq2d K i K mod 4 = i K 4 K 4
8 4z 4
9 4nn 4
10 nndivre K 4 K 4
11 1 9 10 sylancl K K 4
12 11 flcld K K 4
13 zmulcl 4 K 4 4 K 4
14 8 12 13 sylancr K 4 K 4
15 ax-icn i
16 ine0 i 0
17 expsub i i 0 K 4 K 4 i K 4 K 4 = i K i 4 K 4
18 15 16 17 mpanl12 K 4 K 4 i K 4 K 4 = i K i 4 K 4
19 14 18 mpdan K i K 4 K 4 = i K i 4 K 4
20 expmulz i i 0 4 K 4 i 4 K 4 = i 4 K 4
21 15 16 20 mpanl12 4 K 4 i 4 K 4 = i 4 K 4
22 8 12 21 sylancr K i 4 K 4 = i 4 K 4
23 i4 i 4 = 1
24 23 oveq1i i 4 K 4 = 1 K 4
25 1exp K 4 1 K 4 = 1
26 12 25 syl K 1 K 4 = 1
27 24 26 eqtrid K i 4 K 4 = 1
28 22 27 eqtrd K i 4 K 4 = 1
29 28 oveq2d K i K i 4 K 4 = i K 1
30 expclz i i 0 K i K
31 15 16 30 mp3an12 K i K
32 31 div1d K i K 1 = i K
33 29 32 eqtrd K i K i 4 K 4 = i K
34 19 33 eqtrd K i K 4 K 4 = i K
35 7 34 eqtrd K i K mod 4 = i K