MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  1259lem4 Structured version   Unicode version

Theorem 1259lem4 14170
Description: Lemma for 1259prm 14172. Calculate a power mod. In decimal, we calculate  2 ^ 3 0 6  =  ( 2 ^ 7 6 ) ^ 4  x.  4  ==  5 ^ 4  x.  4  =  2 N  -  1 8,  2 ^ 6 1 2  =  ( 2 ^ 3 0 6 ) ^ 2  ==  1 8 ^ 2  =  3 2 4,  2 ^ 6 2 9  =  2 ^ 6 1 2  x.  2 ^ 1 7  ==  3 2 4  x.  1 3 6  =  3 5 N  -  1 and finally  2 ^ ( N  -  1 )  =  ( 2 ^ 6 2 9 ) ^ 2  ==  1 ^ 2  =  1. (Contributed by Mario Carneiro, 22-Feb-2014.) (Revised by Mario Carneiro, 20-Apr-2015.)
Hypothesis
Ref Expression
1259prm.1  |-  N  = ;;; 1 2 5 9
Assertion
Ref Expression
1259lem4  |-  ( ( 2 ^ ( N  -  1 ) )  mod  N )  =  ( 1  mod  N
)

Proof of Theorem 1259lem4
StepHypRef Expression
1 2nn 10491 . 2  |-  2  e.  NN
2 6nn0 10612 . . . 4  |-  6  e.  NN0
3 2nn0 10608 . . . 4  |-  2  e.  NN0
42, 3deccl 10781 . . 3  |- ; 6 2  e.  NN0
5 9nn0 10615 . . 3  |-  9  e.  NN0
64, 5deccl 10781 . 2  |- ;; 6 2 9  e.  NN0
7 0z 10669 . 2  |-  0  e.  ZZ
8 1nn 10345 . 2  |-  1  e.  NN
9 1nn0 10607 . 2  |-  1  e.  NN0
10 1259prm.1 . . . . . 6  |-  N  = ;;; 1 2 5 9
119, 3deccl 10781 . . . . . . . 8  |- ; 1 2  e.  NN0
12 5nn0 10611 . . . . . . . 8  |-  5  e.  NN0
1311, 12deccl 10781 . . . . . . 7  |- ;; 1 2 5  e.  NN0
14 8nn0 10614 . . . . . . 7  |-  8  e.  NN0
15 8p1e9 10464 . . . . . . 7  |-  ( 8  +  1 )  =  9
16 eqid 2443 . . . . . . 7  |- ;;; 1 2 5 8  = ;;; 1 2 5 8
1713, 14, 15, 16decsuc 10790 . . . . . 6  |-  (;;; 1 2 5 8  +  1 )  = ;;; 1 2 5 9
1810, 17eqtr4i 2466 . . . . 5  |-  N  =  (;;; 1 2 5 8  +  1 )
1918oveq1i 6113 . . . 4  |-  ( N  -  1 )  =  ( (;;; 1 2 5 8  +  1 )  - 
1 )
2013, 14deccl 10781 . . . . . 6  |- ;;; 1 2 5 8  e.  NN0
2120nn0cni 10603 . . . . 5  |- ;;; 1 2 5 8  e.  CC
22 ax-1cn 9352 . . . . 5  |-  1  e.  CC
23 pncan 9628 . . . . 5  |-  ( (;;; 1 2 5 8  e.  CC  /\  1  e.  CC )  ->  (
(;;; 1 2 5 8  +  1 )  - 
1 )  = ;;; 1 2 5 8 )
2421, 22, 23mp2an 672 . . . 4  |-  ( (;;; 1 2 5 8  +  1 )  -  1 )  = ;;; 1 2 5 8
2519, 24eqtri 2463 . . 3  |-  ( N  -  1 )  = ;;; 1 2 5 8
2625, 20eqeltri 2513 . 2  |-  ( N  -  1 )  e. 
NN0
27 9nn 10498 . . . . 5  |-  9  e.  NN
2813, 27decnncl 10780 . . . 4  |- ;;; 1 2 5 9  e.  NN
2910, 28eqeltri 2513 . . 3  |-  N  e.  NN
302, 9deccl 10781 . . . 4  |- ; 6 1  e.  NN0
3130, 3deccl 10781 . . 3  |- ;; 6 1 2  e.  NN0
32 3nn0 10609 . . . . 5  |-  3  e.  NN0
33 4nn0 10610 . . . . 5  |-  4  e.  NN0
3432, 33deccl 10781 . . . 4  |- ; 3 4  e.  NN0
3534nn0zi 10683 . . 3  |- ; 3 4  e.  ZZ
3632, 3deccl 10781 . . . 4  |- ; 3 2  e.  NN0
3736, 33deccl 10781 . . 3  |- ;; 3 2 4  e.  NN0
38 7nn0 10613 . . . 4  |-  7  e.  NN0
399, 38deccl 10781 . . 3  |- ; 1 7  e.  NN0
409, 32deccl 10781 . . . 4  |- ; 1 3  e.  NN0
4140, 2deccl 10781 . . 3  |- ;; 1 3 6  e.  NN0
42 0nn0 10606 . . . . . 6  |-  0  e.  NN0
4332, 42deccl 10781 . . . . 5  |- ; 3 0  e.  NN0
4443, 2deccl 10781 . . . 4  |- ;; 3 0 6  e.  NN0
45 8nn 10497 . . . . 5  |-  8  e.  NN
469, 45decnncl 10780 . . . 4  |- ; 1 8  e.  NN
4711, 33deccl 10781 . . . . 5  |- ;; 1 2 4  e.  NN0
4847, 9deccl 10781 . . . 4  |- ;;; 1 2 4 1  e.  NN0
499, 12deccl 10781 . . . . . 6  |- ; 1 5  e.  NN0
5049, 32deccl 10781 . . . . 5  |- ;; 1 5 3  e.  NN0
51 1z 10688 . . . . 5  |-  1  e.  ZZ
5212, 42deccl 10781 . . . . 5  |- ; 5 0  e.  NN0
5349, 3deccl 10781 . . . . . 6  |- ;; 1 5 2  e.  NN0
543, 12deccl 10781 . . . . . 6  |- ; 2 5  e.  NN0
5538, 2deccl 10781 . . . . . . 7  |- ; 7 6  e.  NN0
56101259lem3 14169 . . . . . . 7  |-  ( ( 2 ^; 7 6 )  mod 
N )  =  ( 5  mod  N )
57 eqid 2443 . . . . . . . 8  |- ; 7 6  = ; 7 6
58 4p1e5 10460 . . . . . . . . 9  |-  ( 4  +  1 )  =  5
59 7cn 10417 . . . . . . . . . 10  |-  7  e.  CC
60 2cn 10404 . . . . . . . . . 10  |-  2  e.  CC
61 7t2e14 10849 . . . . . . . . . 10  |-  ( 7  x.  2 )  = ; 1
4
6259, 60, 61mulcomli 9405 . . . . . . . . 9  |-  ( 2  x.  7 )  = ; 1
4
639, 33, 58, 62decsuc 10790 . . . . . . . 8  |-  ( ( 2  x.  7 )  +  1 )  = ; 1
5
64 6cn 10415 . . . . . . . . 9  |-  6  e.  CC
65 6t2e12 10844 . . . . . . . . 9  |-  ( 6  x.  2 )  = ; 1
2
6664, 60, 65mulcomli 9405 . . . . . . . 8  |-  ( 2  x.  6 )  = ; 1
2
673, 38, 2, 57, 3, 9, 63, 66decmul2c 10815 . . . . . . 7  |-  ( 2  x. ; 7 6 )  = ;; 1 5 2
6854nn0cni 10603 . . . . . . . . 9  |- ; 2 5  e.  CC
6968addid2i 9569 . . . . . . . 8  |-  ( 0  + ; 2 5 )  = ; 2
5
7029nncni 10344 . . . . . . . . . 10  |-  N  e.  CC
7170mul02i 9570 . . . . . . . . 9  |-  ( 0  x.  N )  =  0
7271oveq1i 6113 . . . . . . . 8  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 0  + ; 2 5 )
73 5t5e25 10843 . . . . . . . 8  |-  ( 5  x.  5 )  = ; 2
5
7469, 72, 733eqtr4i 2473 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 5  x.  5 )
7529, 1, 55, 7, 12, 54, 56, 67, 74mod2xi 14110 . . . . . 6  |-  ( ( 2 ^;; 1 5 2 )  mod 
N )  =  (; 2
5  mod  N )
76 2p1e3 10457 . . . . . . 7  |-  ( 2  +  1 )  =  3
77 eqid 2443 . . . . . . 7  |- ;; 1 5 2  = ;; 1 5 2
7849, 3, 76, 77decsuc 10790 . . . . . 6  |-  (;; 1 5 2  +  1 )  = ;; 1 5 3
7952nn0cni 10603 . . . . . . . 8  |- ; 5 0  e.  CC
8079addid2i 9569 . . . . . . 7  |-  ( 0  + ; 5 0 )  = ; 5
0
8171oveq1i 6113 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 5 0 )  =  ( 0  + ; 5 0 )
82 eqid 2443 . . . . . . . 8  |- ; 2 5  = ; 2 5
83 2t2e4 10483 . . . . . . . . . 10  |-  ( 2  x.  2 )  =  4
8483oveq1i 6113 . . . . . . . . 9  |-  ( ( 2  x.  2 )  +  1 )  =  ( 4  +  1 )
8584, 58eqtri 2463 . . . . . . . 8  |-  ( ( 2  x.  2 )  +  1 )  =  5
86 5t2e10 10488 . . . . . . . . 9  |-  ( 5  x.  2 )  =  10
87 dec10 10797 . . . . . . . . 9  |-  10  = ; 1 0
8886, 87eqtri 2463 . . . . . . . 8  |-  ( 5  x.  2 )  = ; 1
0
893, 3, 12, 82, 42, 9, 85, 88decmul1c 10814 . . . . . . 7  |-  (; 2 5  x.  2 )  = ; 5 0
9080, 81, 893eqtr4i 2473 . . . . . 6  |-  ( ( 0  x.  N )  + ; 5 0 )  =  (; 2 5  x.  2 )
9129, 1, 53, 7, 54, 52, 75, 78, 90modxp1i 14111 . . . . 5  |-  ( ( 2 ^;; 1 5 3 )  mod 
N )  =  (; 5
0  mod  N )
92 eqid 2443 . . . . . 6  |- ;; 1 5 3  = ;; 1 5 3
93 eqid 2443 . . . . . . . . 9  |- ; 1 5  = ; 1 5
9460mulid1i 9400 . . . . . . . . . . 11  |-  ( 2  x.  1 )  =  2
9594oveq1i 6113 . . . . . . . . . 10  |-  ( ( 2  x.  1 )  +  1 )  =  ( 2  +  1 )
9695, 76eqtri 2463 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  1 )  =  3
97 5cn 10413 . . . . . . . . . . 11  |-  5  e.  CC
9897, 60, 86mulcomli 9405 . . . . . . . . . 10  |-  ( 2  x.  5 )  =  10
9998, 87eqtri 2463 . . . . . . . . 9  |-  ( 2  x.  5 )  = ; 1
0
1003, 9, 12, 93, 42, 9, 96, 99decmul2c 10815 . . . . . . . 8  |-  ( 2  x. ; 1 5 )  = ; 3
0
101100oveq1i 6113 . . . . . . 7  |-  ( ( 2  x. ; 1 5 )  +  0 )  =  (; 3
0  +  0 )
10243nn0cni 10603 . . . . . . . 8  |- ; 3 0  e.  CC
103102addid1i 9568 . . . . . . 7  |-  (; 3 0  +  0 )  = ; 3 0
104101, 103eqtri 2463 . . . . . 6  |-  ( ( 2  x. ; 1 5 )  +  0 )  = ; 3 0
105 3cn 10408 . . . . . . . 8  |-  3  e.  CC
106 3t2e6 10485 . . . . . . . 8  |-  ( 3  x.  2 )  =  6
107105, 60, 106mulcomli 9405 . . . . . . 7  |-  ( 2  x.  3 )  =  6
1082dec0h 10783 . . . . . . 7  |-  6  = ; 0 6
109107, 108eqtri 2463 . . . . . 6  |-  ( 2  x.  3 )  = ; 0
6
1103, 49, 32, 92, 2, 42, 104, 109decmul2c 10815 . . . . 5  |-  ( 2  x. ;; 1 5 3 )  = ;; 3 0 6
11170mulid2i 9401 . . . . . . . 8  |-  ( 1  x.  N )  =  N
112111, 10eqtri 2463 . . . . . . 7  |-  ( 1  x.  N )  = ;;; 1 2 5 9
113 eqid 2443 . . . . . . 7  |- ;;; 1 2 4 1  = ;;; 1 2 4 1
1143, 33deccl 10781 . . . . . . . 8  |- ; 2 4  e.  NN0
115 eqid 2443 . . . . . . . . 9  |- ; 2 4  = ; 2 4
1163, 33, 58, 115decsuc 10790 . . . . . . . 8  |-  (; 2 4  +  1 )  = ; 2 5
117 eqid 2443 . . . . . . . . 9  |- ;; 1 2 5  = ;; 1 2 5
118 eqid 2443 . . . . . . . . 9  |- ;; 1 2 4  = ;; 1 2 4
119 eqid 2443 . . . . . . . . . 10  |- ; 1 2  = ; 1 2
120 1p1e2 10447 . . . . . . . . . 10  |-  ( 1  +  1 )  =  2
121 2p2e4 10451 . . . . . . . . . 10  |-  ( 2  +  2 )  =  4
1229, 3, 9, 3, 119, 119, 120, 121decadd 10808 . . . . . . . . 9  |-  (; 1 2  + ; 1 2 )  = ; 2
4
123 5p4e9 10473 . . . . . . . . 9  |-  ( 5  +  4 )  =  9
12411, 12, 11, 33, 117, 118, 122, 123decadd 10808 . . . . . . . 8  |-  (;; 1 2 5  + ;; 1 2 4 )  = ;; 2 4 9
125114, 116, 124decsucc 10794 . . . . . . 7  |-  ( (;; 1 2 5  + ;; 1 2 4 )  +  1 )  = ;; 2 5 0
126 9p1e10 10465 . . . . . . 7  |-  ( 9  +  1 )  =  10
12713, 5, 47, 9, 112, 113, 125, 126decaddc2 10810 . . . . . 6  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  = ;;; 2 5 0 0
128 eqid 2443 . . . . . . 7  |- ; 5 0  = ; 5 0
12973oveq1i 6113 . . . . . . . . . . 11  |-  ( ( 5  x.  5 )  +  0 )  =  (; 2 5  +  0 )
13068addid1i 9568 . . . . . . . . . . 11  |-  (; 2 5  +  0 )  = ; 2 5
131129, 130eqtri 2463 . . . . . . . . . 10  |-  ( ( 5  x.  5 )  +  0 )  = ; 2
5
13297mul02i 9570 . . . . . . . . . . 11  |-  ( 0  x.  5 )  =  0
13342dec0h 10783 . . . . . . . . . . 11  |-  0  = ; 0 0
134132, 133eqtri 2463 . . . . . . . . . 10  |-  ( 0  x.  5 )  = ; 0
0
13512, 12, 42, 128, 42, 42, 131, 134decmul1c 10814 . . . . . . . . 9  |-  (; 5 0  x.  5 )  = ;; 2 5 0
136135oveq1i 6113 . . . . . . . 8  |-  ( (; 5
0  x.  5 )  +  0 )  =  (;; 2 5 0  +  0 )
13754, 42deccl 10781 . . . . . . . . . 10  |- ;; 2 5 0  e.  NN0
138137nn0cni 10603 . . . . . . . . 9  |- ;; 2 5 0  e.  CC
139138addid1i 9568 . . . . . . . 8  |-  (;; 2 5 0  +  0 )  = ;; 2 5 0
140136, 139eqtri 2463 . . . . . . 7  |-  ( (; 5
0  x.  5 )  +  0 )  = ;; 2 5 0
14179mul01i 9571 . . . . . . . 8  |-  (; 5 0  x.  0 )  =  0
142141, 133eqtri 2463 . . . . . . 7  |-  (; 5 0  x.  0 )  = ; 0 0
14352, 12, 42, 128, 42, 42, 140, 142decmul2c 10815 . . . . . 6  |-  (; 5 0  x. ; 5 0 )  = ;;; 2 5 0 0
144127, 143eqtr4i 2466 . . . . 5  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  =  (; 5 0  x. ; 5 0 )
14529, 1, 50, 51, 52, 48, 91, 110, 144mod2xi 14110 . . . 4  |-  ( ( 2 ^;; 3 0 6 )  mod 
N )  =  (;;; 1 2 4 1  mod 
N )
146 eqid 2443 . . . . 5  |- ;; 3 0 6  = ;; 3 0 6
147 eqid 2443 . . . . . 6  |- ; 3 0  = ; 3 0
1489dec0h 10783 . . . . . 6  |-  1  = ; 0 1
149 00id 9556 . . . . . . . 8  |-  ( 0  +  0 )  =  0
150107, 149oveq12i 6115 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  ( 6  +  0 )
15164addid1i 9568 . . . . . . 7  |-  ( 6  +  0 )  =  6
152150, 151eqtri 2463 . . . . . 6  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  6
15360mul01i 9571 . . . . . . . 8  |-  ( 2  x.  0 )  =  0
154153oveq1i 6113 . . . . . . 7  |-  ( ( 2  x.  0 )  +  1 )  =  ( 0  +  1 )
155 0p1e1 10445 . . . . . . 7  |-  ( 0  +  1 )  =  1
156154, 155, 1483eqtri 2467 . . . . . 6  |-  ( ( 2  x.  0 )  +  1 )  = ; 0
1
15732, 42, 42, 9, 147, 148, 3, 9, 42, 152, 156decma2c 10807 . . . . 5  |-  ( ( 2  x. ; 3 0 )  +  1 )  = ; 6 1
1583, 43, 2, 146, 3, 9, 157, 66decmul2c 10815 . . . 4  |-  ( 2  x. ;; 3 0 6 )  = ;; 6 1 2
159 eqid 2443 . . . . . 6  |- ; 1 8  = ; 1 8
16011, 33, 58, 118decsuc 10790 . . . . . 6  |-  (;; 1 2 4  +  1 )  = ;; 1 2 5
161 8cn 10419 . . . . . . 7  |-  8  e.  CC
162161, 22, 15addcomli 9573 . . . . . 6  |-  ( 1  +  8 )  =  9
16347, 9, 9, 14, 113, 159, 160, 162decadd 10808 . . . . 5  |-  (;;; 1 2 4 1  + ; 1 8 )  = ;;; 1 2 5 9
164163, 10eqtr4i 2466 . . . 4  |-  (;;; 1 2 4 1  + ; 1 8 )  =  N
16537nn0cni 10603 . . . . . 6  |- ;; 3 2 4  e.  CC
166165addid2i 9569 . . . . 5  |-  ( 0  + ;; 3 2 4 )  = ;; 3 2 4
16771oveq1i 6113 . . . . 5  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  ( 0  + ;; 3 2 4 )
1689, 14deccl 10781 . . . . . 6  |- ; 1 8  e.  NN0
1699, 33deccl 10781 . . . . . 6  |- ; 1 4  e.  NN0
170 eqid 2443 . . . . . . 7  |- ; 1 4  = ; 1 4
17122mulid1i 9400 . . . . . . . . 9  |-  ( 1  x.  1 )  =  1
172171, 120oveq12i 6115 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  ( 1  +  2 )
173 1p2e3 10458 . . . . . . . 8  |-  ( 1  +  2 )  =  3
174172, 173eqtri 2463 . . . . . . 7  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  3
175161mulid1i 9400 . . . . . . . . 9  |-  ( 8  x.  1 )  =  8
176175oveq1i 6113 . . . . . . . 8  |-  ( ( 8  x.  1 )  +  4 )  =  ( 8  +  4 )
177 8p4e12 10824 . . . . . . . 8  |-  ( 8  +  4 )  = ; 1
2
178176, 177eqtri 2463 . . . . . . 7  |-  ( ( 8  x.  1 )  +  4 )  = ; 1
2
1799, 14, 9, 33, 159, 170, 9, 3, 9, 174, 178decmac 10806 . . . . . 6  |-  ( (; 1
8  x.  1 )  + ; 1 4 )  = ; 3
2
180161mulid2i 9401 . . . . . . . . 9  |-  ( 1  x.  8 )  =  8
181180oveq1i 6113 . . . . . . . 8  |-  ( ( 1  x.  8 )  +  6 )  =  ( 8  +  6 )
182 8p6e14 10826 . . . . . . . 8  |-  ( 8  +  6 )  = ; 1
4
183181, 182eqtri 2463 . . . . . . 7  |-  ( ( 1  x.  8 )  +  6 )  = ; 1
4
184 8t8e64 10861 . . . . . . 7  |-  ( 8  x.  8 )  = ; 6
4
18514, 9, 14, 159, 33, 2, 183, 184decmul1c 10814 . . . . . 6  |-  (; 1 8  x.  8 )  = ;; 1 4 4
186168, 9, 14, 159, 33, 169, 179, 185decmul2c 10815 . . . . 5  |-  (; 1 8  x. ; 1 8 )  = ;; 3 2 4
187166, 167, 1863eqtr4i 2473 . . . 4  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  (; 1
8  x. ; 1 8 )
1881, 44, 7, 46, 37, 48, 145, 158, 164, 187mod2xnegi 14112 . . 3  |-  ( ( 2 ^;; 6 1 2 )  mod 
N )  =  (;; 3 2 4  mod 
N )
189101259lem1 14167 . . 3  |-  ( ( 2 ^; 1 7 )  mod 
N )  =  (;; 1 3 6  mod 
N )
190 eqid 2443 . . . 4  |- ;; 6 1 2  = ;; 6 1 2
191 eqid 2443 . . . 4  |- ; 1 7  = ; 1 7
192 eqid 2443 . . . . 5  |- ; 6 1  = ; 6 1
1932, 9, 120, 192decsuc 10790 . . . 4  |-  (; 6 1  +  1 )  = ; 6 2
194 7p2e9 10478 . . . . 5  |-  ( 7  +  2 )  =  9
19559, 60, 194addcomli 9573 . . . 4  |-  ( 2  +  7 )  =  9
19630, 3, 9, 38, 190, 191, 193, 195decadd 10808 . . 3  |-  (;; 6 1 2  + ; 1 7 )  = ;; 6 2 9
19732, 9deccl 10781 . . . . 5  |- ; 3 1  e.  NN0
198 eqid 2443 . . . . . . 7  |- ; 3 1  = ; 3 1
199 3p2e5 10466 . . . . . . . . 9  |-  ( 3  +  2 )  =  5
200105, 60, 199addcomli 9573 . . . . . . . 8  |-  ( 2  +  3 )  =  5
2019, 3, 32, 119, 200decaddi 10811 . . . . . . 7  |-  (; 1 2  +  3 )  = ; 1 5
202 5p1e6 10461 . . . . . . 7  |-  ( 5  +  1 )  =  6
20311, 12, 32, 9, 117, 198, 201, 202decadd 10808 . . . . . 6  |-  (;; 1 2 5  + ; 3 1 )  = ;; 1 5 6
204120oveq1i 6113 . . . . . . . . 9  |-  ( ( 1  +  1 )  +  1 )  =  ( 2  +  1 )
205204, 76eqtri 2463 . . . . . . . 8  |-  ( ( 1  +  1 )  +  1 )  =  3
206 7p5e12 10820 . . . . . . . . 9  |-  ( 7  +  5 )  = ; 1
2
20759, 97, 206addcomli 9573 . . . . . . . 8  |-  ( 5  +  7 )  = ; 1
2
2089, 12, 9, 38, 93, 191, 205, 3, 207decaddc 10809 . . . . . . 7  |-  (; 1 5  + ; 1 7 )  = ; 3
2
209 eqid 2443 . . . . . . . 8  |- ; 3 4  = ; 3 4
210 7p3e10 10479 . . . . . . . . . 10  |-  ( 7  +  3 )  =  10
21159, 105, 210addcomli 9573 . . . . . . . . 9  |-  ( 3  +  7 )  =  10
212211, 87eqtri 2463 . . . . . . . 8  |-  ( 3  +  7 )  = ; 1
0
213105mulid1i 9400 . . . . . . . . . 10  |-  ( 3  x.  1 )  =  3
21422addid1i 9568 . . . . . . . . . 10  |-  ( 1  +  0 )  =  1
215213, 214oveq12i 6115 . . . . . . . . 9  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  ( 3  +  1 )
216 3p1e4 10459 . . . . . . . . 9  |-  ( 3  +  1 )  =  4
217215, 216eqtri 2463 . . . . . . . 8  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  4
218 4cn 10411 . . . . . . . . . . 11  |-  4  e.  CC
219218mulid1i 9400 . . . . . . . . . 10  |-  ( 4  x.  1 )  =  4
220219oveq1i 6113 . . . . . . . . 9  |-  ( ( 4  x.  1 )  +  0 )  =  ( 4  +  0 )
221218addid1i 9568 . . . . . . . . 9  |-  ( 4  +  0 )  =  4
22233dec0h 10783 . . . . . . . . 9  |-  4  = ; 0 4
223220, 221, 2223eqtri 2467 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  0 )  = ; 0
4
22432, 33, 9, 42, 209, 212, 9, 33, 42, 217, 223decmac 10806 . . . . . . 7  |-  ( (; 3
4  x.  1 )  +  ( 3  +  7 ) )  = ; 4
4
2253dec0h 10783 . . . . . . . 8  |-  2  = ; 0 2
226106, 155oveq12i 6115 . . . . . . . . 9  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  ( 6  +  1 )
227 6p1e7 10462 . . . . . . . . 9  |-  ( 6  +  1 )  =  7
228226, 227eqtri 2463 . . . . . . . 8  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  7
229 4t2e8 10487 . . . . . . . . . 10  |-  ( 4  x.  2 )  =  8
230229oveq1i 6113 . . . . . . . . 9  |-  ( ( 4  x.  2 )  +  2 )  =  ( 8  +  2 )
231 8p2e10 10480 . . . . . . . . 9  |-  ( 8  +  2 )  =  10
232230, 231, 873eqtri 2467 . . . . . . . 8  |-  ( ( 4  x.  2 )  +  2 )  = ; 1
0
23332, 33, 42, 3, 209, 225, 3, 42, 9, 228, 232decmac 10806 . . . . . . 7  |-  ( (; 3
4  x.  2 )  +  2 )  = ; 7
0
2349, 3, 32, 3, 119, 208, 34, 42, 38, 224, 233decma2c 10807 . . . . . 6  |-  ( (; 3
4  x. ; 1 2 )  +  (; 1 5  + ; 1 7 ) )  = ;; 4 4 0
23560addid2i 9569 . . . . . . . . 9  |-  ( 0  +  2 )  =  2
236235oveq2i 6114 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  =  ( ( 3  x.  5 )  +  2 )
237 5t3e15 10841 . . . . . . . . . 10  |-  ( 5  x.  3 )  = ; 1
5
23897, 105, 237mulcomli 9405 . . . . . . . . 9  |-  ( 3  x.  5 )  = ; 1
5
239 5p2e7 10471 . . . . . . . . 9  |-  ( 5  +  2 )  =  7
2409, 12, 3, 238, 239decaddi 10811 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  2 )  = ; 1
7
241236, 240eqtri 2463 . . . . . . 7  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  = ; 1
7
242 5t4e20 10842 . . . . . . . . 9  |-  ( 5  x.  4 )  = ; 2
0
24397, 218, 242mulcomli 9405 . . . . . . . 8  |-  ( 4  x.  5 )  = ; 2
0
24464addid2i 9569 . . . . . . . 8  |-  ( 0  +  6 )  =  6
2453, 42, 2, 243, 244decaddi 10811 . . . . . . 7  |-  ( ( 4  x.  5 )  +  6 )  = ; 2
6
24632, 33, 42, 2, 209, 108, 12, 2, 3, 241, 245decmac 10806 . . . . . 6  |-  ( (; 3
4  x.  5 )  +  6 )  = ;; 1 7 6
24711, 12, 49, 2, 117, 203, 34, 2, 39, 234, 246decma2c 10807 . . . . 5  |-  ( (; 3
4  x. ;; 1 2 5 )  +  (;; 1 2 5  + ; 3 1 ) )  = ;;; 4 4 0 6
24814dec0h 10783 . . . . . 6  |-  8  = ; 0 8
249218addid2i 9569 . . . . . . . 8  |-  ( 0  +  4 )  =  4
250249oveq2i 6114 . . . . . . 7  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  =  ( ( 3  x.  9 )  +  4 )
251 9cn 10421 . . . . . . . . 9  |-  9  e.  CC
252 9t3e27 10863 . . . . . . . . 9  |-  ( 9  x.  3 )  = ; 2
7
253251, 105, 252mulcomli 9405 . . . . . . . 8  |-  ( 3  x.  9 )  = ; 2
7
254 7p4e11 10819 . . . . . . . 8  |-  ( 7  +  4 )  = ; 1
1
2553, 38, 33, 253, 76, 9, 254decaddci 10812 . . . . . . 7  |-  ( ( 3  x.  9 )  +  4 )  = ; 3
1
256250, 255eqtri 2463 . . . . . 6  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  = ; 3
1
257 9t4e36 10864 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
258251, 218, 257mulcomli 9405 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
259161, 64, 182addcomli 9573 . . . . . . 7  |-  ( 6  +  8 )  = ; 1
4
26032, 2, 14, 258, 216, 33, 259decaddci 10812 . . . . . 6  |-  ( ( 4  x.  9 )  +  8 )  = ; 4
4
26132, 33, 42, 14, 209, 248, 5, 33, 33, 256, 260decmac 10806 . . . . 5  |-  ( (; 3
4  x.  9 )  +  8 )  = ;; 3 1 4
26213, 5, 13, 14, 10, 25, 34, 33, 197, 247, 261decma2c 10807 . . . 4  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  = ;;;; 4 4 0 6 4
263 eqid 2443 . . . . 5  |- ;; 1 3 6  = ;; 1 3 6
2649, 5deccl 10781 . . . . . 6  |- ; 1 9  e.  NN0
265264, 33deccl 10781 . . . . 5  |- ;; 1 9 4  e.  NN0
266 eqid 2443 . . . . . 6  |- ; 1 3  = ; 1 3
267 eqid 2443 . . . . . 6  |- ;; 1 9 4  = ;; 1 9 4
2685, 38deccl 10781 . . . . . 6  |- ; 9 7  e.  NN0
2699, 9deccl 10781 . . . . . . 7  |- ; 1 1  e.  NN0
270 eqid 2443 . . . . . . 7  |- ;; 3 2 4  = ;; 3 2 4
271 eqid 2443 . . . . . . . 8  |- ; 1 9  = ; 1 9
272 eqid 2443 . . . . . . . 8  |- ; 9 7  = ; 9 7
273251, 22, 126addcomli 9573 . . . . . . . . . 10  |-  ( 1  +  9 )  =  10
274273, 87eqtri 2463 . . . . . . . . 9  |-  ( 1  +  9 )  = ; 1
0
2759, 42, 155, 274decsuc 10790 . . . . . . . 8  |-  ( ( 1  +  9 )  +  1 )  = ; 1
1
276 9p7e16 10834 . . . . . . . 8  |-  ( 9  +  7 )  = ; 1
6
2779, 5, 5, 38, 271, 272, 275, 2, 276decaddc 10809 . . . . . . 7  |-  (; 1 9  + ; 9 7 )  = ;; 1 1 6
278 eqid 2443 . . . . . . . 8  |- ; 3 2  = ; 3 2
279 eqid 2443 . . . . . . . . 9  |- ; 1 1  = ; 1 1
2809, 9, 120, 279decsuc 10790 . . . . . . . 8  |-  (; 1 1  +  1 )  = ; 1 2
28194oveq1i 6113 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  2 )  =  ( 2  +  2 )
282281, 121, 2223eqtri 2467 . . . . . . . 8  |-  ( ( 2  x.  1 )  +  2 )  = ; 0
4
28332, 3, 9, 3, 278, 280, 9, 33, 42, 217, 282decmac 10806 . . . . . . 7  |-  ( (; 3
2  x.  1 )  +  (; 1 1  +  1 ) )  = ; 4 4
284219oveq1i 6113 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  6 )  =  ( 4  +  6 )
285 6p4e10 10477 . . . . . . . . 9  |-  ( 6  +  4 )  =  10
28664, 218, 285addcomli 9573 . . . . . . . 8  |-  ( 4  +  6 )  =  10
287284, 286, 873eqtri 2467 . . . . . . 7  |-  ( ( 4  x.  1 )  +  6 )  = ; 1
0
28836, 33, 269, 2, 270, 277, 9, 42, 9, 283, 287decmac 10806 . . . . . 6  |-  ( (;; 3 2 4  x.  1 )  +  (; 1
9  + ; 9 7 ) )  = ;; 4 4 0
289155, 148eqtri 2463 . . . . . . . 8  |-  ( 0  +  1 )  = ; 0
1
290 3t3e9 10486 . . . . . . . . . 10  |-  ( 3  x.  3 )  =  9
291290, 149oveq12i 6115 . . . . . . . . 9  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  ( 9  +  0 )
292251addid1i 9568 . . . . . . . . 9  |-  ( 9  +  0 )  =  9
293291, 292eqtri 2463 . . . . . . . 8  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  9
294107oveq1i 6113 . . . . . . . . 9  |-  ( ( 2  x.  3 )  +  1 )  =  ( 6  +  1 )
29538dec0h 10783 . . . . . . . . 9  |-  7  = ; 0 7
296294, 227, 2953eqtri 2467 . . . . . . . 8  |-  ( ( 2  x.  3 )  +  1 )  = ; 0
7
29732, 3, 42, 9, 278, 289, 32, 38, 42, 293, 296decmac 10806 . . . . . . 7  |-  ( (; 3
2  x.  3 )  +  ( 0  +  1 ) )  = ; 9
7
298 4t3e12 10839 . . . . . . . 8  |-  ( 4  x.  3 )  = ; 1
2
299 4p2e6 10468 . . . . . . . . 9  |-  ( 4  +  2 )  =  6
300218, 60, 299addcomli 9573 . . . . . . . 8  |-  ( 2  +  4 )  =  6
3019, 3, 33, 298, 300decaddi 10811 . . . . . . 7  |-  ( ( 4  x.  3 )  +  4 )  = ; 1
6
30236, 33, 42, 33, 270, 222, 32, 2, 9, 297, 301decmac 10806 . . . . . 6  |-  ( (;; 3 2 4  x.  3 )  +  4 )  = ;; 9 7 6
3039, 32, 264, 33, 266, 267, 37, 2, 268, 288, 302decma2c 10807 . . . . 5  |-  ( (;; 3 2 4  x. ; 1
3 )  + ;; 1 9 4 )  = ;;; 4 4 0 6
304155oveq2i 6114 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  =  ( ( 3  x.  6 )  +  1 )
305 6t3e18 10845 . . . . . . . . . 10  |-  ( 6  x.  3 )  = ; 1
8
30664, 105, 305mulcomli 9405 . . . . . . . . 9  |-  ( 3  x.  6 )  = ; 1
8
3079, 14, 15, 306decsuc 10790 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  1 )  = ; 1
9
308304, 307eqtri 2463 . . . . . . 7  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  = ; 1
9
3099, 3, 3, 66, 121decaddi 10811 . . . . . . 7  |-  ( ( 2  x.  6 )  +  2 )  = ; 1
4
31032, 3, 42, 3, 278, 225, 2, 33, 9, 308, 309decmac 10806 . . . . . 6  |-  ( (; 3
2  x.  6 )  +  2 )  = ;; 1 9 4
311 6t4e24 10846 . . . . . . 7  |-  ( 6  x.  4 )  = ; 2
4
31264, 218, 311mulcomli 9405 . . . . . 6  |-  ( 4  x.  6 )  = ; 2
4
3132, 36, 33, 270, 33, 3, 310, 312decmul1c 10814 . . . . 5  |-  (;; 3 2 4  x.  6 )  = ;;; 1 9 4 4
31437, 40, 2, 263, 33, 265, 303, 313decmul2c 10815 . . . 4  |-  (;; 3 2 4  x. ;; 1 3 6 )  = ;;;; 4 4 0 6 4
315262, 314eqtr4i 2466 . . 3  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  =  (;; 3 2 4  x. ;; 1 3 6 )
31629, 1, 31, 35, 37, 26, 39, 41, 188, 189, 196, 315modxai 14109 . 2  |-  ( ( 2 ^;; 6 2 9 )  mod 
N )  =  ( ( N  -  1 )  mod  N )
317 eqid 2443 . . . 4  |- ;; 6 2 9  = ;; 6 2 9
318 eqid 2443 . . . . 5  |- ; 6 2  = ; 6 2
319149oveq2i 6114 . . . . . 6  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  =  ( ( 2  x.  6 )  +  0 )
32066oveq1i 6113 . . . . . 6  |-  ( ( 2  x.  6 )  +  0 )  =  (; 1 2  +  0 )
32111nn0cni 10603 . . . . . . 7  |- ; 1 2  e.  CC
322321addid1i 9568 . . . . . 6  |-  (; 1 2  +  0 )  = ; 1 2
323319, 320, 3223eqtri 2467 . . . . 5  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  = ; 1
2
32412dec0h 10783 . . . . . 6  |-  5  = ; 0 5
32584, 58, 3243eqtri 2467 . . . . 5  |-  ( ( 2  x.  2 )  +  1 )  = ; 0
5
3262, 3, 42, 9, 318, 148, 3, 12, 42, 323, 325decma2c 10807 . . . 4  |-  ( ( 2  x. ; 6 2 )  +  1 )  = ;; 1 2 5
327 9t2e18 10862 . . . . 5  |-  ( 9  x.  2 )  = ; 1
8
328251, 60, 327mulcomli 9405 . . . 4  |-  ( 2  x.  9 )  = ; 1
8
3293, 4, 5, 317, 14, 9, 326, 328decmul2c 10815 . . 3  |-  ( 2  x. ;; 6 2 9 )  = ;;; 1 2 5 8
330329, 25eqtr4i 2466 . 2  |-  ( 2  x. ;; 6 2 9 )  =  ( N  -  1 )
331 npcan 9631 . . 3  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( ( N  - 
1 )  +  1 )  =  N )
33270, 22, 331mp2an 672 . 2  |-  ( ( N  -  1 )  +  1 )  =  N
33371oveq1i 6113 . . 3  |-  ( ( 0  x.  N )  +  1 )  =  ( 0  +  1 )
334155, 333, 1713eqtr4i 2473 . 2  |-  ( ( 0  x.  N )  +  1 )  =  ( 1  x.  1 )
3351, 6, 7, 8, 9, 26, 316, 330, 332, 334mod2xnegi 14112 1  |-  ( ( 2 ^ ( N  -  1 ) )  mod  N )  =  ( 1  mod  N
)
Colors of variables: wff setvar class
Syntax hints:    = wceq 1369    e. wcel 1756  (class class class)co 6103   CCcc 9292   0cc0 9294   1c1 9295    + caddc 9297    x. cmul 9299    - cmin 9607   NNcn 10334   2c2 10383   3c3 10384   4c4 10385   5c5 10386   6c6 10387   7c7 10388   8c8 10389   9c9 10390   10c10 10391   NN0cn0 10591  ;cdc 10767    mod cmo 11720   ^cexp 11877
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-sep 4425  ax-nul 4433  ax-pow 4482  ax-pr 4543  ax-un 6384  ax-cnex 9350  ax-resscn 9351  ax-1cn 9352  ax-icn 9353  ax-addcl 9354  ax-addrcl 9355  ax-mulcl 9356  ax-mulrcl 9357  ax-mulcom 9358  ax-addass 9359  ax-mulass 9360  ax-distr 9361  ax-i2m1 9362  ax-1ne0 9363  ax-1rid 9364  ax-rnegex 9365  ax-rrecex 9366  ax-cnre 9367  ax-pre-lttri 9368  ax-pre-lttrn 9369  ax-pre-ltadd 9370  ax-pre-mulgt0 9371  ax-pre-sup 9372
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2620  df-nel 2621  df-ral 2732  df-rex 2733  df-reu 2734  df-rmo 2735  df-rab 2736  df-v 2986  df-sbc 3199  df-csb 3301  df-dif 3343  df-un 3345  df-in 3347  df-ss 3354  df-pss 3356  df-nul 3650  df-if 3804  df-pw 3874  df-sn 3890  df-pr 3892  df-tp 3894  df-op 3896  df-uni 4104  df-iun 4185  df-br 4305  df-opab 4363  df-mpt 4364  df-tr 4398  df-eprel 4644  df-id 4648  df-po 4653  df-so 4654  df-fr 4691  df-we 4693  df-ord 4734  df-on 4735  df-lim 4736  df-suc 4737  df-xp 4858  df-rel 4859  df-cnv 4860  df-co 4861  df-dm 4862  df-rn 4863  df-res 4864  df-ima 4865  df-iota 5393  df-fun 5432  df-fn 5433  df-f 5434  df-f1 5435  df-fo 5436  df-f1o 5437  df-fv 5438  df-riota 6064  df-ov 6106  df-oprab 6107  df-mpt2 6108  df-om 6489  df-2nd 6590  df-recs 6844  df-rdg 6878  df-er 7113  df-en 7323  df-dom 7324  df-sdom 7325  df-sup 7703  df-pnf 9432  df-mnf 9433  df-xr 9434  df-ltxr 9435  df-le 9436  df-sub 9609  df-neg 9610  df-div 10006  df-nn 10335  df-2 10392  df-3 10393  df-4 10394  df-5 10395  df-6 10396  df-7 10397  df-8 10398  df-9 10399  df-10 10400  df-n0 10592  df-z 10659  df-dec 10768  df-uz 10874  df-rp 11004  df-fl 11654  df-mod 11721  df-seq 11819  df-exp 11878
This theorem is referenced by:  1259prm  14172
  Copyright terms: Public domain W3C validator