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

Theorem 1259lem4 14154
Description: Lemma for 1259prm 14156. 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 10475 . 2  |-  2  e.  NN
2 6nn0 10596 . . . 4  |-  6  e.  NN0
3 2nn0 10592 . . . 4  |-  2  e.  NN0
42, 3deccl 10765 . . 3  |- ; 6 2  e.  NN0
5 9nn0 10599 . . 3  |-  9  e.  NN0
64, 5deccl 10765 . 2  |- ;; 6 2 9  e.  NN0
7 0z 10653 . 2  |-  0  e.  ZZ
8 1nn 10329 . 2  |-  1  e.  NN
9 1nn0 10591 . 2  |-  1  e.  NN0
10 1259prm.1 . . . . . 6  |-  N  = ;;; 1 2 5 9
119, 3deccl 10765 . . . . . . . 8  |- ; 1 2  e.  NN0
12 5nn0 10595 . . . . . . . 8  |-  5  e.  NN0
1311, 12deccl 10765 . . . . . . 7  |- ;; 1 2 5  e.  NN0
14 8nn0 10598 . . . . . . 7  |-  8  e.  NN0
15 8p1e9 10448 . . . . . . 7  |-  ( 8  +  1 )  =  9
16 eqid 2441 . . . . . . 7  |- ;;; 1 2 5 8  = ;;; 1 2 5 8
1713, 14, 15, 16decsuc 10774 . . . . . 6  |-  (;;; 1 2 5 8  +  1 )  = ;;; 1 2 5 9
1810, 17eqtr4i 2464 . . . . 5  |-  N  =  (;;; 1 2 5 8  +  1 )
1918oveq1i 6100 . . . 4  |-  ( N  -  1 )  =  ( (;;; 1 2 5 8  +  1 )  - 
1 )
2013, 14deccl 10765 . . . . . 6  |- ;;; 1 2 5 8  e.  NN0
2120nn0cni 10587 . . . . 5  |- ;;; 1 2 5 8  e.  CC
22 ax-1cn 9336 . . . . 5  |-  1  e.  CC
23 pncan 9612 . . . . 5  |-  ( (;;; 1 2 5 8  e.  CC  /\  1  e.  CC )  ->  (
(;;; 1 2 5 8  +  1 )  - 
1 )  = ;;; 1 2 5 8 )
2421, 22, 23mp2an 667 . . . 4  |-  ( (;;; 1 2 5 8  +  1 )  -  1 )  = ;;; 1 2 5 8
2519, 24eqtri 2461 . . 3  |-  ( N  -  1 )  = ;;; 1 2 5 8
2625, 20eqeltri 2511 . 2  |-  ( N  -  1 )  e. 
NN0
27 9nn 10482 . . . . 5  |-  9  e.  NN
2813, 27decnncl 10764 . . . 4  |- ;;; 1 2 5 9  e.  NN
2910, 28eqeltri 2511 . . 3  |-  N  e.  NN
302, 9deccl 10765 . . . 4  |- ; 6 1  e.  NN0
3130, 3deccl 10765 . . 3  |- ;; 6 1 2  e.  NN0
32 3nn0 10593 . . . . 5  |-  3  e.  NN0
33 4nn0 10594 . . . . 5  |-  4  e.  NN0
3432, 33deccl 10765 . . . 4  |- ; 3 4  e.  NN0
3534nn0zi 10667 . . 3  |- ; 3 4  e.  ZZ
3632, 3deccl 10765 . . . 4  |- ; 3 2  e.  NN0
3736, 33deccl 10765 . . 3  |- ;; 3 2 4  e.  NN0
38 7nn0 10597 . . . 4  |-  7  e.  NN0
399, 38deccl 10765 . . 3  |- ; 1 7  e.  NN0
409, 32deccl 10765 . . . 4  |- ; 1 3  e.  NN0
4140, 2deccl 10765 . . 3  |- ;; 1 3 6  e.  NN0
42 0nn0 10590 . . . . . 6  |-  0  e.  NN0
4332, 42deccl 10765 . . . . 5  |- ; 3 0  e.  NN0
4443, 2deccl 10765 . . . 4  |- ;; 3 0 6  e.  NN0
45 8nn 10481 . . . . 5  |-  8  e.  NN
469, 45decnncl 10764 . . . 4  |- ; 1 8  e.  NN
4711, 33deccl 10765 . . . . 5  |- ;; 1 2 4  e.  NN0
4847, 9deccl 10765 . . . 4  |- ;;; 1 2 4 1  e.  NN0
499, 12deccl 10765 . . . . . 6  |- ; 1 5  e.  NN0
5049, 32deccl 10765 . . . . 5  |- ;; 1 5 3  e.  NN0
51 1z 10672 . . . . 5  |-  1  e.  ZZ
5212, 42deccl 10765 . . . . 5  |- ; 5 0  e.  NN0
5349, 3deccl 10765 . . . . . 6  |- ;; 1 5 2  e.  NN0
543, 12deccl 10765 . . . . . 6  |- ; 2 5  e.  NN0
5538, 2deccl 10765 . . . . . . 7  |- ; 7 6  e.  NN0
56101259lem3 14153 . . . . . . 7  |-  ( ( 2 ^; 7 6 )  mod 
N )  =  ( 5  mod  N )
57 eqid 2441 . . . . . . . 8  |- ; 7 6  = ; 7 6
58 4p1e5 10444 . . . . . . . . 9  |-  ( 4  +  1 )  =  5
59 7cn 10401 . . . . . . . . . 10  |-  7  e.  CC
60 2cn 10388 . . . . . . . . . 10  |-  2  e.  CC
61 7t2e14 10833 . . . . . . . . . 10  |-  ( 7  x.  2 )  = ; 1
4
6259, 60, 61mulcomli 9389 . . . . . . . . 9  |-  ( 2  x.  7 )  = ; 1
4
639, 33, 58, 62decsuc 10774 . . . . . . . 8  |-  ( ( 2  x.  7 )  +  1 )  = ; 1
5
64 6cn 10399 . . . . . . . . 9  |-  6  e.  CC
65 6t2e12 10828 . . . . . . . . 9  |-  ( 6  x.  2 )  = ; 1
2
6664, 60, 65mulcomli 9389 . . . . . . . 8  |-  ( 2  x.  6 )  = ; 1
2
673, 38, 2, 57, 3, 9, 63, 66decmul2c 10799 . . . . . . 7  |-  ( 2  x. ; 7 6 )  = ;; 1 5 2
6854nn0cni 10587 . . . . . . . . 9  |- ; 2 5  e.  CC
6968addid2i 9553 . . . . . . . 8  |-  ( 0  + ; 2 5 )  = ; 2
5
7029nncni 10328 . . . . . . . . . 10  |-  N  e.  CC
7170mul02i 9554 . . . . . . . . 9  |-  ( 0  x.  N )  =  0
7271oveq1i 6100 . . . . . . . 8  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 0  + ; 2 5 )
73 5t5e25 10827 . . . . . . . 8  |-  ( 5  x.  5 )  = ; 2
5
7469, 72, 733eqtr4i 2471 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 5  x.  5 )
7529, 1, 55, 7, 12, 54, 56, 67, 74mod2xi 14094 . . . . . 6  |-  ( ( 2 ^;; 1 5 2 )  mod 
N )  =  (; 2
5  mod  N )
76 2p1e3 10441 . . . . . . 7  |-  ( 2  +  1 )  =  3
77 eqid 2441 . . . . . . 7  |- ;; 1 5 2  = ;; 1 5 2
7849, 3, 76, 77decsuc 10774 . . . . . 6  |-  (;; 1 5 2  +  1 )  = ;; 1 5 3
7952nn0cni 10587 . . . . . . . 8  |- ; 5 0  e.  CC
8079addid2i 9553 . . . . . . 7  |-  ( 0  + ; 5 0 )  = ; 5
0
8171oveq1i 6100 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 5 0 )  =  ( 0  + ; 5 0 )
82 eqid 2441 . . . . . . . 8  |- ; 2 5  = ; 2 5
83 2t2e4 10467 . . . . . . . . . 10  |-  ( 2  x.  2 )  =  4
8483oveq1i 6100 . . . . . . . . 9  |-  ( ( 2  x.  2 )  +  1 )  =  ( 4  +  1 )
8584, 58eqtri 2461 . . . . . . . 8  |-  ( ( 2  x.  2 )  +  1 )  =  5
86 5t2e10 10472 . . . . . . . . 9  |-  ( 5  x.  2 )  =  10
87 dec10 10781 . . . . . . . . 9  |-  10  = ; 1 0
8886, 87eqtri 2461 . . . . . . . 8  |-  ( 5  x.  2 )  = ; 1
0
893, 3, 12, 82, 42, 9, 85, 88decmul1c 10798 . . . . . . 7  |-  (; 2 5  x.  2 )  = ; 5 0
9080, 81, 893eqtr4i 2471 . . . . . 6  |-  ( ( 0  x.  N )  + ; 5 0 )  =  (; 2 5  x.  2 )
9129, 1, 53, 7, 54, 52, 75, 78, 90modxp1i 14095 . . . . 5  |-  ( ( 2 ^;; 1 5 3 )  mod 
N )  =  (; 5
0  mod  N )
92 eqid 2441 . . . . . 6  |- ;; 1 5 3  = ;; 1 5 3
93 eqid 2441 . . . . . . . . 9  |- ; 1 5  = ; 1 5
9460mulid1i 9384 . . . . . . . . . . 11  |-  ( 2  x.  1 )  =  2
9594oveq1i 6100 . . . . . . . . . 10  |-  ( ( 2  x.  1 )  +  1 )  =  ( 2  +  1 )
9695, 76eqtri 2461 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  1 )  =  3
97 5cn 10397 . . . . . . . . . . 11  |-  5  e.  CC
9897, 60, 86mulcomli 9389 . . . . . . . . . 10  |-  ( 2  x.  5 )  =  10
9998, 87eqtri 2461 . . . . . . . . 9  |-  ( 2  x.  5 )  = ; 1
0
1003, 9, 12, 93, 42, 9, 96, 99decmul2c 10799 . . . . . . . 8  |-  ( 2  x. ; 1 5 )  = ; 3
0
101100oveq1i 6100 . . . . . . 7  |-  ( ( 2  x. ; 1 5 )  +  0 )  =  (; 3
0  +  0 )
10243nn0cni 10587 . . . . . . . 8  |- ; 3 0  e.  CC
103102addid1i 9552 . . . . . . 7  |-  (; 3 0  +  0 )  = ; 3 0
104101, 103eqtri 2461 . . . . . 6  |-  ( ( 2  x. ; 1 5 )  +  0 )  = ; 3 0
105 3cn 10392 . . . . . . . 8  |-  3  e.  CC
106 3t2e6 10469 . . . . . . . 8  |-  ( 3  x.  2 )  =  6
107105, 60, 106mulcomli 9389 . . . . . . 7  |-  ( 2  x.  3 )  =  6
1082dec0h 10767 . . . . . . 7  |-  6  = ; 0 6
109107, 108eqtri 2461 . . . . . 6  |-  ( 2  x.  3 )  = ; 0
6
1103, 49, 32, 92, 2, 42, 104, 109decmul2c 10799 . . . . 5  |-  ( 2  x. ;; 1 5 3 )  = ;; 3 0 6
11170mulid2i 9385 . . . . . . . 8  |-  ( 1  x.  N )  =  N
112111, 10eqtri 2461 . . . . . . 7  |-  ( 1  x.  N )  = ;;; 1 2 5 9
113 eqid 2441 . . . . . . 7  |- ;;; 1 2 4 1  = ;;; 1 2 4 1
1143, 33deccl 10765 . . . . . . . 8  |- ; 2 4  e.  NN0
115 eqid 2441 . . . . . . . . 9  |- ; 2 4  = ; 2 4
1163, 33, 58, 115decsuc 10774 . . . . . . . 8  |-  (; 2 4  +  1 )  = ; 2 5
117 eqid 2441 . . . . . . . . 9  |- ;; 1 2 5  = ;; 1 2 5
118 eqid 2441 . . . . . . . . 9  |- ;; 1 2 4  = ;; 1 2 4
119 eqid 2441 . . . . . . . . . 10  |- ; 1 2  = ; 1 2
120 1p1e2 10431 . . . . . . . . . 10  |-  ( 1  +  1 )  =  2
121 2p2e4 10435 . . . . . . . . . 10  |-  ( 2  +  2 )  =  4
1229, 3, 9, 3, 119, 119, 120, 121decadd 10792 . . . . . . . . 9  |-  (; 1 2  + ; 1 2 )  = ; 2
4
123 5p4e9 10457 . . . . . . . . 9  |-  ( 5  +  4 )  =  9
12411, 12, 11, 33, 117, 118, 122, 123decadd 10792 . . . . . . . 8  |-  (;; 1 2 5  + ;; 1 2 4 )  = ;; 2 4 9
125114, 116, 124decsucc 10778 . . . . . . 7  |-  ( (;; 1 2 5  + ;; 1 2 4 )  +  1 )  = ;; 2 5 0
126 9p1e10 10449 . . . . . . 7  |-  ( 9  +  1 )  =  10
12713, 5, 47, 9, 112, 113, 125, 126decaddc2 10794 . . . . . 6  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  = ;;; 2 5 0 0
128 eqid 2441 . . . . . . 7  |- ; 5 0  = ; 5 0
12973oveq1i 6100 . . . . . . . . . . 11  |-  ( ( 5  x.  5 )  +  0 )  =  (; 2 5  +  0 )
13068addid1i 9552 . . . . . . . . . . 11  |-  (; 2 5  +  0 )  = ; 2 5
131129, 130eqtri 2461 . . . . . . . . . 10  |-  ( ( 5  x.  5 )  +  0 )  = ; 2
5
13297mul02i 9554 . . . . . . . . . . 11  |-  ( 0  x.  5 )  =  0
13342dec0h 10767 . . . . . . . . . . 11  |-  0  = ; 0 0
134132, 133eqtri 2461 . . . . . . . . . 10  |-  ( 0  x.  5 )  = ; 0
0
13512, 12, 42, 128, 42, 42, 131, 134decmul1c 10798 . . . . . . . . 9  |-  (; 5 0  x.  5 )  = ;; 2 5 0
136135oveq1i 6100 . . . . . . . 8  |-  ( (; 5
0  x.  5 )  +  0 )  =  (;; 2 5 0  +  0 )
13754, 42deccl 10765 . . . . . . . . . 10  |- ;; 2 5 0  e.  NN0
138137nn0cni 10587 . . . . . . . . 9  |- ;; 2 5 0  e.  CC
139138addid1i 9552 . . . . . . . 8  |-  (;; 2 5 0  +  0 )  = ;; 2 5 0
140136, 139eqtri 2461 . . . . . . 7  |-  ( (; 5
0  x.  5 )  +  0 )  = ;; 2 5 0
14179mul01i 9555 . . . . . . . 8  |-  (; 5 0  x.  0 )  =  0
142141, 133eqtri 2461 . . . . . . 7  |-  (; 5 0  x.  0 )  = ; 0 0
14352, 12, 42, 128, 42, 42, 140, 142decmul2c 10799 . . . . . 6  |-  (; 5 0  x. ; 5 0 )  = ;;; 2 5 0 0
144127, 143eqtr4i 2464 . . . . 5  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  =  (; 5 0  x. ; 5 0 )
14529, 1, 50, 51, 52, 48, 91, 110, 144mod2xi 14094 . . . 4  |-  ( ( 2 ^;; 3 0 6 )  mod 
N )  =  (;;; 1 2 4 1  mod 
N )
146 eqid 2441 . . . . 5  |- ;; 3 0 6  = ;; 3 0 6
147 eqid 2441 . . . . . 6  |- ; 3 0  = ; 3 0
1489dec0h 10767 . . . . . 6  |-  1  = ; 0 1
149 00id 9540 . . . . . . . 8  |-  ( 0  +  0 )  =  0
150107, 149oveq12i 6102 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  ( 6  +  0 )
15164addid1i 9552 . . . . . . 7  |-  ( 6  +  0 )  =  6
152150, 151eqtri 2461 . . . . . 6  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  6
15360mul01i 9555 . . . . . . . 8  |-  ( 2  x.  0 )  =  0
154153oveq1i 6100 . . . . . . 7  |-  ( ( 2  x.  0 )  +  1 )  =  ( 0  +  1 )
155 0p1e1 10429 . . . . . . 7  |-  ( 0  +  1 )  =  1
156154, 155, 1483eqtri 2465 . . . . . 6  |-  ( ( 2  x.  0 )  +  1 )  = ; 0
1
15732, 42, 42, 9, 147, 148, 3, 9, 42, 152, 156decma2c 10791 . . . . 5  |-  ( ( 2  x. ; 3 0 )  +  1 )  = ; 6 1
1583, 43, 2, 146, 3, 9, 157, 66decmul2c 10799 . . . 4  |-  ( 2  x. ;; 3 0 6 )  = ;; 6 1 2
159 eqid 2441 . . . . . 6  |- ; 1 8  = ; 1 8
16011, 33, 58, 118decsuc 10774 . . . . . 6  |-  (;; 1 2 4  +  1 )  = ;; 1 2 5
161 8cn 10403 . . . . . . 7  |-  8  e.  CC
162161, 22, 15addcomli 9557 . . . . . 6  |-  ( 1  +  8 )  =  9
16347, 9, 9, 14, 113, 159, 160, 162decadd 10792 . . . . 5  |-  (;;; 1 2 4 1  + ; 1 8 )  = ;;; 1 2 5 9
164163, 10eqtr4i 2464 . . . 4  |-  (;;; 1 2 4 1  + ; 1 8 )  =  N
16537nn0cni 10587 . . . . . 6  |- ;; 3 2 4  e.  CC
166165addid2i 9553 . . . . 5  |-  ( 0  + ;; 3 2 4 )  = ;; 3 2 4
16771oveq1i 6100 . . . . 5  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  ( 0  + ;; 3 2 4 )
1689, 14deccl 10765 . . . . . 6  |- ; 1 8  e.  NN0
1699, 33deccl 10765 . . . . . 6  |- ; 1 4  e.  NN0
170 eqid 2441 . . . . . . 7  |- ; 1 4  = ; 1 4
17122mulid1i 9384 . . . . . . . . 9  |-  ( 1  x.  1 )  =  1
172171, 120oveq12i 6102 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  ( 1  +  2 )
173 1p2e3 10442 . . . . . . . 8  |-  ( 1  +  2 )  =  3
174172, 173eqtri 2461 . . . . . . 7  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  3
175161mulid1i 9384 . . . . . . . . 9  |-  ( 8  x.  1 )  =  8
176175oveq1i 6100 . . . . . . . 8  |-  ( ( 8  x.  1 )  +  4 )  =  ( 8  +  4 )
177 8p4e12 10808 . . . . . . . 8  |-  ( 8  +  4 )  = ; 1
2
178176, 177eqtri 2461 . . . . . . 7  |-  ( ( 8  x.  1 )  +  4 )  = ; 1
2
1799, 14, 9, 33, 159, 170, 9, 3, 9, 174, 178decmac 10790 . . . . . 6  |-  ( (; 1
8  x.  1 )  + ; 1 4 )  = ; 3
2
180161mulid2i 9385 . . . . . . . . 9  |-  ( 1  x.  8 )  =  8
181180oveq1i 6100 . . . . . . . 8  |-  ( ( 1  x.  8 )  +  6 )  =  ( 8  +  6 )
182 8p6e14 10810 . . . . . . . 8  |-  ( 8  +  6 )  = ; 1
4
183181, 182eqtri 2461 . . . . . . 7  |-  ( ( 1  x.  8 )  +  6 )  = ; 1
4
184 8t8e64 10845 . . . . . . 7  |-  ( 8  x.  8 )  = ; 6
4
18514, 9, 14, 159, 33, 2, 183, 184decmul1c 10798 . . . . . 6  |-  (; 1 8  x.  8 )  = ;; 1 4 4
186168, 9, 14, 159, 33, 169, 179, 185decmul2c 10799 . . . . 5  |-  (; 1 8  x. ; 1 8 )  = ;; 3 2 4
187166, 167, 1863eqtr4i 2471 . . . 4  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  (; 1
8  x. ; 1 8 )
1881, 44, 7, 46, 37, 48, 145, 158, 164, 187mod2xnegi 14096 . . 3  |-  ( ( 2 ^;; 6 1 2 )  mod 
N )  =  (;; 3 2 4  mod 
N )
189101259lem1 14151 . . 3  |-  ( ( 2 ^; 1 7 )  mod 
N )  =  (;; 1 3 6  mod 
N )
190 eqid 2441 . . . 4  |- ;; 6 1 2  = ;; 6 1 2
191 eqid 2441 . . . 4  |- ; 1 7  = ; 1 7
192 eqid 2441 . . . . 5  |- ; 6 1  = ; 6 1
1932, 9, 120, 192decsuc 10774 . . . 4  |-  (; 6 1  +  1 )  = ; 6 2
194 7p2e9 10462 . . . . 5  |-  ( 7  +  2 )  =  9
19559, 60, 194addcomli 9557 . . . 4  |-  ( 2  +  7 )  =  9
19630, 3, 9, 38, 190, 191, 193, 195decadd 10792 . . 3  |-  (;; 6 1 2  + ; 1 7 )  = ;; 6 2 9
19732, 9deccl 10765 . . . . 5  |- ; 3 1  e.  NN0
198 eqid 2441 . . . . . . 7  |- ; 3 1  = ; 3 1
199 3p2e5 10450 . . . . . . . . 9  |-  ( 3  +  2 )  =  5
200105, 60, 199addcomli 9557 . . . . . . . 8  |-  ( 2  +  3 )  =  5
2019, 3, 32, 119, 200decaddi 10795 . . . . . . 7  |-  (; 1 2  +  3 )  = ; 1 5
202 5p1e6 10445 . . . . . . 7  |-  ( 5  +  1 )  =  6
20311, 12, 32, 9, 117, 198, 201, 202decadd 10792 . . . . . 6  |-  (;; 1 2 5  + ; 3 1 )  = ;; 1 5 6
204120oveq1i 6100 . . . . . . . . 9  |-  ( ( 1  +  1 )  +  1 )  =  ( 2  +  1 )
205204, 76eqtri 2461 . . . . . . . 8  |-  ( ( 1  +  1 )  +  1 )  =  3
206 7p5e12 10804 . . . . . . . . 9  |-  ( 7  +  5 )  = ; 1
2
20759, 97, 206addcomli 9557 . . . . . . . 8  |-  ( 5  +  7 )  = ; 1
2
2089, 12, 9, 38, 93, 191, 205, 3, 207decaddc 10793 . . . . . . 7  |-  (; 1 5  + ; 1 7 )  = ; 3
2
209 eqid 2441 . . . . . . . 8  |- ; 3 4  = ; 3 4
210 7p3e10 10463 . . . . . . . . . 10  |-  ( 7  +  3 )  =  10
21159, 105, 210addcomli 9557 . . . . . . . . 9  |-  ( 3  +  7 )  =  10
212211, 87eqtri 2461 . . . . . . . 8  |-  ( 3  +  7 )  = ; 1
0
213105mulid1i 9384 . . . . . . . . . 10  |-  ( 3  x.  1 )  =  3
21422addid1i 9552 . . . . . . . . . 10  |-  ( 1  +  0 )  =  1
215213, 214oveq12i 6102 . . . . . . . . 9  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  ( 3  +  1 )
216 3p1e4 10443 . . . . . . . . 9  |-  ( 3  +  1 )  =  4
217215, 216eqtri 2461 . . . . . . . 8  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  4
218 4cn 10395 . . . . . . . . . . 11  |-  4  e.  CC
219218mulid1i 9384 . . . . . . . . . 10  |-  ( 4  x.  1 )  =  4
220219oveq1i 6100 . . . . . . . . 9  |-  ( ( 4  x.  1 )  +  0 )  =  ( 4  +  0 )
221218addid1i 9552 . . . . . . . . 9  |-  ( 4  +  0 )  =  4
22233dec0h 10767 . . . . . . . . 9  |-  4  = ; 0 4
223220, 221, 2223eqtri 2465 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  0 )  = ; 0
4
22432, 33, 9, 42, 209, 212, 9, 33, 42, 217, 223decmac 10790 . . . . . . 7  |-  ( (; 3
4  x.  1 )  +  ( 3  +  7 ) )  = ; 4
4
2253dec0h 10767 . . . . . . . 8  |-  2  = ; 0 2
226106, 155oveq12i 6102 . . . . . . . . 9  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  ( 6  +  1 )
227 6p1e7 10446 . . . . . . . . 9  |-  ( 6  +  1 )  =  7
228226, 227eqtri 2461 . . . . . . . 8  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  7
229 4t2e8 10471 . . . . . . . . . 10  |-  ( 4  x.  2 )  =  8
230229oveq1i 6100 . . . . . . . . 9  |-  ( ( 4  x.  2 )  +  2 )  =  ( 8  +  2 )
231 8p2e10 10464 . . . . . . . . 9  |-  ( 8  +  2 )  =  10
232230, 231, 873eqtri 2465 . . . . . . . 8  |-  ( ( 4  x.  2 )  +  2 )  = ; 1
0
23332, 33, 42, 3, 209, 225, 3, 42, 9, 228, 232decmac 10790 . . . . . . 7  |-  ( (; 3
4  x.  2 )  +  2 )  = ; 7
0
2349, 3, 32, 3, 119, 208, 34, 42, 38, 224, 233decma2c 10791 . . . . . 6  |-  ( (; 3
4  x. ; 1 2 )  +  (; 1 5  + ; 1 7 ) )  = ;; 4 4 0
23560addid2i 9553 . . . . . . . . 9  |-  ( 0  +  2 )  =  2
236235oveq2i 6101 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  =  ( ( 3  x.  5 )  +  2 )
237 5t3e15 10825 . . . . . . . . . 10  |-  ( 5  x.  3 )  = ; 1
5
23897, 105, 237mulcomli 9389 . . . . . . . . 9  |-  ( 3  x.  5 )  = ; 1
5
239 5p2e7 10455 . . . . . . . . 9  |-  ( 5  +  2 )  =  7
2409, 12, 3, 238, 239decaddi 10795 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  2 )  = ; 1
7
241236, 240eqtri 2461 . . . . . . 7  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  = ; 1
7
242 5t4e20 10826 . . . . . . . . 9  |-  ( 5  x.  4 )  = ; 2
0
24397, 218, 242mulcomli 9389 . . . . . . . 8  |-  ( 4  x.  5 )  = ; 2
0
24464addid2i 9553 . . . . . . . 8  |-  ( 0  +  6 )  =  6
2453, 42, 2, 243, 244decaddi 10795 . . . . . . 7  |-  ( ( 4  x.  5 )  +  6 )  = ; 2
6
24632, 33, 42, 2, 209, 108, 12, 2, 3, 241, 245decmac 10790 . . . . . 6  |-  ( (; 3
4  x.  5 )  +  6 )  = ;; 1 7 6
24711, 12, 49, 2, 117, 203, 34, 2, 39, 234, 246decma2c 10791 . . . . 5  |-  ( (; 3
4  x. ;; 1 2 5 )  +  (;; 1 2 5  + ; 3 1 ) )  = ;;; 4 4 0 6
24814dec0h 10767 . . . . . 6  |-  8  = ; 0 8
249218addid2i 9553 . . . . . . . 8  |-  ( 0  +  4 )  =  4
250249oveq2i 6101 . . . . . . 7  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  =  ( ( 3  x.  9 )  +  4 )
251 9cn 10405 . . . . . . . . 9  |-  9  e.  CC
252 9t3e27 10847 . . . . . . . . 9  |-  ( 9  x.  3 )  = ; 2
7
253251, 105, 252mulcomli 9389 . . . . . . . 8  |-  ( 3  x.  9 )  = ; 2
7
254 7p4e11 10803 . . . . . . . 8  |-  ( 7  +  4 )  = ; 1
1
2553, 38, 33, 253, 76, 9, 254decaddci 10796 . . . . . . 7  |-  ( ( 3  x.  9 )  +  4 )  = ; 3
1
256250, 255eqtri 2461 . . . . . 6  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  = ; 3
1
257 9t4e36 10848 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
258251, 218, 257mulcomli 9389 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
259161, 64, 182addcomli 9557 . . . . . . 7  |-  ( 6  +  8 )  = ; 1
4
26032, 2, 14, 258, 216, 33, 259decaddci 10796 . . . . . 6  |-  ( ( 4  x.  9 )  +  8 )  = ; 4
4
26132, 33, 42, 14, 209, 248, 5, 33, 33, 256, 260decmac 10790 . . . . 5  |-  ( (; 3
4  x.  9 )  +  8 )  = ;; 3 1 4
26213, 5, 13, 14, 10, 25, 34, 33, 197, 247, 261decma2c 10791 . . . 4  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  = ;;;; 4 4 0 6 4
263 eqid 2441 . . . . 5  |- ;; 1 3 6  = ;; 1 3 6
2649, 5deccl 10765 . . . . . 6  |- ; 1 9  e.  NN0
265264, 33deccl 10765 . . . . 5  |- ;; 1 9 4  e.  NN0
266 eqid 2441 . . . . . 6  |- ; 1 3  = ; 1 3
267 eqid 2441 . . . . . 6  |- ;; 1 9 4  = ;; 1 9 4
2685, 38deccl 10765 . . . . . 6  |- ; 9 7  e.  NN0
2699, 9deccl 10765 . . . . . . 7  |- ; 1 1  e.  NN0
270 eqid 2441 . . . . . . 7  |- ;; 3 2 4  = ;; 3 2 4
271 eqid 2441 . . . . . . . 8  |- ; 1 9  = ; 1 9
272 eqid 2441 . . . . . . . 8  |- ; 9 7  = ; 9 7
273251, 22, 126addcomli 9557 . . . . . . . . . 10  |-  ( 1  +  9 )  =  10
274273, 87eqtri 2461 . . . . . . . . 9  |-  ( 1  +  9 )  = ; 1
0
2759, 42, 155, 274decsuc 10774 . . . . . . . 8  |-  ( ( 1  +  9 )  +  1 )  = ; 1
1
276 9p7e16 10818 . . . . . . . 8  |-  ( 9  +  7 )  = ; 1
6
2779, 5, 5, 38, 271, 272, 275, 2, 276decaddc 10793 . . . . . . 7  |-  (; 1 9  + ; 9 7 )  = ;; 1 1 6
278 eqid 2441 . . . . . . . 8  |- ; 3 2  = ; 3 2
279 eqid 2441 . . . . . . . . 9  |- ; 1 1  = ; 1 1
2809, 9, 120, 279decsuc 10774 . . . . . . . 8  |-  (; 1 1  +  1 )  = ; 1 2
28194oveq1i 6100 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  2 )  =  ( 2  +  2 )
282281, 121, 2223eqtri 2465 . . . . . . . 8  |-  ( ( 2  x.  1 )  +  2 )  = ; 0
4
28332, 3, 9, 3, 278, 280, 9, 33, 42, 217, 282decmac 10790 . . . . . . 7  |-  ( (; 3
2  x.  1 )  +  (; 1 1  +  1 ) )  = ; 4 4
284219oveq1i 6100 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  6 )  =  ( 4  +  6 )
285 6p4e10 10461 . . . . . . . . 9  |-  ( 6  +  4 )  =  10
28664, 218, 285addcomli 9557 . . . . . . . 8  |-  ( 4  +  6 )  =  10
287284, 286, 873eqtri 2465 . . . . . . 7  |-  ( ( 4  x.  1 )  +  6 )  = ; 1
0
28836, 33, 269, 2, 270, 277, 9, 42, 9, 283, 287decmac 10790 . . . . . 6  |-  ( (;; 3 2 4  x.  1 )  +  (; 1
9  + ; 9 7 ) )  = ;; 4 4 0
289155, 148eqtri 2461 . . . . . . . 8  |-  ( 0  +  1 )  = ; 0
1
290 3t3e9 10470 . . . . . . . . . 10  |-  ( 3  x.  3 )  =  9
291290, 149oveq12i 6102 . . . . . . . . 9  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  ( 9  +  0 )
292251addid1i 9552 . . . . . . . . 9  |-  ( 9  +  0 )  =  9
293291, 292eqtri 2461 . . . . . . . 8  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  9
294107oveq1i 6100 . . . . . . . . 9  |-  ( ( 2  x.  3 )  +  1 )  =  ( 6  +  1 )
29538dec0h 10767 . . . . . . . . 9  |-  7  = ; 0 7
296294, 227, 2953eqtri 2465 . . . . . . . 8  |-  ( ( 2  x.  3 )  +  1 )  = ; 0
7
29732, 3, 42, 9, 278, 289, 32, 38, 42, 293, 296decmac 10790 . . . . . . 7  |-  ( (; 3
2  x.  3 )  +  ( 0  +  1 ) )  = ; 9
7
298 4t3e12 10823 . . . . . . . 8  |-  ( 4  x.  3 )  = ; 1
2
299 4p2e6 10452 . . . . . . . . 9  |-  ( 4  +  2 )  =  6
300218, 60, 299addcomli 9557 . . . . . . . 8  |-  ( 2  +  4 )  =  6
3019, 3, 33, 298, 300decaddi 10795 . . . . . . 7  |-  ( ( 4  x.  3 )  +  4 )  = ; 1
6
30236, 33, 42, 33, 270, 222, 32, 2, 9, 297, 301decmac 10790 . . . . . 6  |-  ( (;; 3 2 4  x.  3 )  +  4 )  = ;; 9 7 6
3039, 32, 264, 33, 266, 267, 37, 2, 268, 288, 302decma2c 10791 . . . . 5  |-  ( (;; 3 2 4  x. ; 1
3 )  + ;; 1 9 4 )  = ;;; 4 4 0 6
304155oveq2i 6101 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  =  ( ( 3  x.  6 )  +  1 )
305 6t3e18 10829 . . . . . . . . . 10  |-  ( 6  x.  3 )  = ; 1
8
30664, 105, 305mulcomli 9389 . . . . . . . . 9  |-  ( 3  x.  6 )  = ; 1
8
3079, 14, 15, 306decsuc 10774 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  1 )  = ; 1
9
308304, 307eqtri 2461 . . . . . . 7  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  = ; 1
9
3099, 3, 3, 66, 121decaddi 10795 . . . . . . 7  |-  ( ( 2  x.  6 )  +  2 )  = ; 1
4
31032, 3, 42, 3, 278, 225, 2, 33, 9, 308, 309decmac 10790 . . . . . 6  |-  ( (; 3
2  x.  6 )  +  2 )  = ;; 1 9 4
311 6t4e24 10830 . . . . . . 7  |-  ( 6  x.  4 )  = ; 2
4
31264, 218, 311mulcomli 9389 . . . . . 6  |-  ( 4  x.  6 )  = ; 2
4
3132, 36, 33, 270, 33, 3, 310, 312decmul1c 10798 . . . . 5  |-  (;; 3 2 4  x.  6 )  = ;;; 1 9 4 4
31437, 40, 2, 263, 33, 265, 303, 313decmul2c 10799 . . . 4  |-  (;; 3 2 4  x. ;; 1 3 6 )  = ;;;; 4 4 0 6 4
315262, 314eqtr4i 2464 . . 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 14093 . 2  |-  ( ( 2 ^;; 6 2 9 )  mod 
N )  =  ( ( N  -  1 )  mod  N )
317 eqid 2441 . . . 4  |- ;; 6 2 9  = ;; 6 2 9
318 eqid 2441 . . . . 5  |- ; 6 2  = ; 6 2
319149oveq2i 6101 . . . . . 6  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  =  ( ( 2  x.  6 )  +  0 )
32066oveq1i 6100 . . . . . 6  |-  ( ( 2  x.  6 )  +  0 )  =  (; 1 2  +  0 )
32111nn0cni 10587 . . . . . . 7  |- ; 1 2  e.  CC
322321addid1i 9552 . . . . . 6  |-  (; 1 2  +  0 )  = ; 1 2
323319, 320, 3223eqtri 2465 . . . . 5  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  = ; 1
2
32412dec0h 10767 . . . . . 6  |-  5  = ; 0 5
32584, 58, 3243eqtri 2465 . . . . 5  |-  ( ( 2  x.  2 )  +  1 )  = ; 0
5
3262, 3, 42, 9, 318, 148, 3, 12, 42, 323, 325decma2c 10791 . . . 4  |-  ( ( 2  x. ; 6 2 )  +  1 )  = ;; 1 2 5
327 9t2e18 10846 . . . . 5  |-  ( 9  x.  2 )  = ; 1
8
328251, 60, 327mulcomli 9389 . . . 4  |-  ( 2  x.  9 )  = ; 1
8
3293, 4, 5, 317, 14, 9, 326, 328decmul2c 10799 . . 3  |-  ( 2  x. ;; 6 2 9 )  = ;;; 1 2 5 8
330329, 25eqtr4i 2464 . 2  |-  ( 2  x. ;; 6 2 9 )  =  ( N  -  1 )
331 npcan 9615 . . 3  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( ( N  - 
1 )  +  1 )  =  N )
33270, 22, 331mp2an 667 . 2  |-  ( ( N  -  1 )  +  1 )  =  N
33371oveq1i 6100 . . 3  |-  ( ( 0  x.  N )  +  1 )  =  ( 0  +  1 )
334155, 333, 1713eqtr4i 2471 . 2  |-  ( ( 0  x.  N )  +  1 )  =  ( 1  x.  1 )
3351, 6, 7, 8, 9, 26, 316, 330, 332, 334mod2xnegi 14096 1  |-  ( ( 2 ^ ( N  -  1 ) )  mod  N )  =  ( 1  mod  N
)
Colors of variables: wff setvar class
Syntax hints:    = wceq 1364    e. wcel 1761  (class class class)co 6090   CCcc 9276   0cc0 9278   1c1 9279    + caddc 9281    x. cmul 9283    - cmin 9591   NNcn 10318   2c2 10367   3c3 10368   4c4 10369   5c5 10370   6c6 10371   7c7 10372   8c8 10373   9c9 10374   10c10 10375   NN0cn0 10575  ;cdc 10751    mod cmo 11704   ^cexp 11861
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1713  ax-7 1733  ax-8 1763  ax-9 1765  ax-10 1780  ax-11 1785  ax-12 1797  ax-13 1948  ax-ext 2422  ax-sep 4410  ax-nul 4418  ax-pow 4467  ax-pr 4528  ax-un 6371  ax-cnex 9334  ax-resscn 9335  ax-1cn 9336  ax-icn 9337  ax-addcl 9338  ax-addrcl 9339  ax-mulcl 9340  ax-mulrcl 9341  ax-mulcom 9342  ax-addass 9343  ax-mulass 9344  ax-distr 9345  ax-i2m1 9346  ax-1ne0 9347  ax-1rid 9348  ax-rnegex 9349  ax-rrecex 9350  ax-cnre 9351  ax-pre-lttri 9352  ax-pre-lttrn 9353  ax-pre-ltadd 9354  ax-pre-mulgt0 9355  ax-pre-sup 9356
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 961  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1706  df-eu 2263  df-mo 2264  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-reu 2720  df-rmo 2721  df-rab 2722  df-v 2972  df-sbc 3184  df-csb 3286  df-dif 3328  df-un 3330  df-in 3332  df-ss 3339  df-pss 3341  df-nul 3635  df-if 3789  df-pw 3859  df-sn 3875  df-pr 3877  df-tp 3879  df-op 3881  df-uni 4089  df-iun 4170  df-br 4290  df-opab 4348  df-mpt 4349  df-tr 4383  df-eprel 4628  df-id 4632  df-po 4637  df-so 4638  df-fr 4675  df-we 4677  df-ord 4718  df-on 4719  df-lim 4720  df-suc 4721  df-xp 4842  df-rel 4843  df-cnv 4844  df-co 4845  df-dm 4846  df-rn 4847  df-res 4848  df-ima 4849  df-iota 5378  df-fun 5417  df-fn 5418  df-f 5419  df-f1 5420  df-fo 5421  df-f1o 5422  df-fv 5423  df-riota 6049  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-om 6476  df-2nd 6577  df-recs 6828  df-rdg 6862  df-er 7097  df-en 7307  df-dom 7308  df-sdom 7309  df-sup 7687  df-pnf 9416  df-mnf 9417  df-xr 9418  df-ltxr 9419  df-le 9420  df-sub 9593  df-neg 9594  df-div 9990  df-nn 10319  df-2 10376  df-3 10377  df-4 10378  df-5 10379  df-6 10380  df-7 10381  df-8 10382  df-9 10383  df-10 10384  df-n0 10576  df-z 10643  df-dec 10752  df-uz 10858  df-rp 10988  df-fl 11638  df-mod 11705  df-seq 11803  df-exp 11862
This theorem is referenced by:  1259prm  14156
  Copyright terms: Public domain W3C validator