Metamath Proof Explorer


Theorem 3exp4mod41

Description: 3 to the fourth power is -1 modulo 41. (Contributed by AV, 5-Jul-2020)

Ref Expression
Assertion 3exp4mod41 3 4 mod 41 = -1 mod 41

Proof

Step Hyp Ref Expression
1 2p2e4 2 + 2 = 4
2 1 eqcomi 4 = 2 + 2
3 2 oveq2i 3 4 = 3 2 + 2
4 3cn 3
5 2nn0 2 0
6 expadd 3 2 0 2 0 3 2 + 2 = 3 2 3 2
7 4 5 5 6 mp3an 3 2 + 2 = 3 2 3 2
8 sq3 3 2 = 9
9 8 8 oveq12i 3 2 3 2 = 9 9
10 9t9e81 9 9 = 81
11 9 10 eqtri 3 2 3 2 = 81
12 3 7 11 3eqtri 3 4 = 81
13 12 oveq1i 3 4 mod 41 = 81 mod 41
14 dfdec10 81 = 10 8 + 1
15 4cn 4
16 2cn 2
17 4t2e8 4 2 = 8
18 15 16 17 mulcomli 2 4 = 8
19 18 eqcomi 8 = 2 4
20 19 oveq2i 10 8 = 10 2 4
21 ax-1cn 1
22 16 21 negsubi 2 + -1 = 2 1
23 2m1e1 2 1 = 1
24 22 23 eqtri 2 + -1 = 1
25 24 eqcomi 1 = 2 + -1
26 20 25 oveq12i 10 8 + 1 = 10 2 4 + 2 + -1
27 10nn 10
28 27 nncni 10
29 16 15 mulcli 2 4
30 28 29 mulcli 10 2 4
31 neg1cn 1
32 30 16 31 addassi 10 2 4 + 2 + -1 = 10 2 4 + 2 + -1
33 28 15 mulcli 10 4
34 16 33 21 adddii 2 10 4 + 1 = 2 10 4 + 2 1
35 dfdec10 41 = 10 4 + 1
36 35 eqcomi 10 4 + 1 = 41
37 36 oveq2i 2 10 4 + 1 = 2 41
38 16 28 15 mul12i 2 10 4 = 10 2 4
39 2t1e2 2 1 = 2
40 38 39 oveq12i 2 10 4 + 2 1 = 10 2 4 + 2
41 34 37 40 3eqtr3ri 10 2 4 + 2 = 2 41
42 41 oveq1i 10 2 4 + 2 + -1 = 2 41 + -1
43 26 32 42 3eqtr2i 10 8 + 1 = 2 41 + -1
44 14 43 eqtri 81 = 2 41 + -1
45 44 oveq1i 81 mod 41 = 2 41 + -1 mod 41
46 4nn0 4 0
47 1nn 1
48 46 47 decnncl 41
49 48 nncni 41
50 16 49 mulcli 2 41
51 50 31 addcomi 2 41 + -1 = - 1 + 2 41
52 51 oveq1i 2 41 + -1 mod 41 = - 1 + 2 41 mod 41
53 neg1rr 1
54 nnrp 41 41 +
55 48 54 ax-mp 41 +
56 2z 2
57 modcyc 1 41 + 2 - 1 + 2 41 mod 41 = -1 mod 41
58 53 55 56 57 mp3an - 1 + 2 41 mod 41 = -1 mod 41
59 52 58 eqtri 2 41 + -1 mod 41 = -1 mod 41
60 13 45 59 3eqtri 3 4 mod 41 = -1 mod 41