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

Theorem 1259lem4 13443
Description: Lemma for 1259prm 13445. 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 10123 . 2  |-  2  e.  NN
2 6nn0 10232 . . . 4  |-  6  e.  NN0
3 2nn0 10228 . . . 4  |-  2  e.  NN0
42, 3deccl 10386 . . 3  |- ; 6 2  e.  NN0
5 9nn0 10235 . . 3  |-  9  e.  NN0
64, 5deccl 10386 . 2  |- ;; 6 2 9  e.  NN0
7 0z 10283 . 2  |-  0  e.  ZZ
8 1nn 10001 . 2  |-  1  e.  NN
9 1nn0 10227 . 2  |-  1  e.  NN0
10 1259prm.1 . . . . . 6  |-  N  = ;;; 1 2 5 9
119, 3deccl 10386 . . . . . . . 8  |- ; 1 2  e.  NN0
12 5nn0 10231 . . . . . . . 8  |-  5  e.  NN0
1311, 12deccl 10386 . . . . . . 7  |- ;; 1 2 5  e.  NN0
14 8nn0 10234 . . . . . . 7  |-  8  e.  NN0
15 8p1e9 10099 . . . . . . 7  |-  ( 8  +  1 )  =  9
16 eqid 2435 . . . . . . 7  |- ;;; 1 2 5 8  = ;;; 1 2 5 8
1713, 14, 15, 16decsuc 10395 . . . . . 6  |-  (;;; 1 2 5 8  +  1 )  = ;;; 1 2 5 9
1810, 17eqtr4i 2458 . . . . 5  |-  N  =  (;;; 1 2 5 8  +  1 )
1918oveq1i 6083 . . . 4  |-  ( N  -  1 )  =  ( (;;; 1 2 5 8  +  1 )  - 
1 )
2013, 14deccl 10386 . . . . . 6  |- ;;; 1 2 5 8  e.  NN0
2120nn0cni 10223 . . . . 5  |- ;;; 1 2 5 8  e.  CC
22 ax-1cn 9038 . . . . 5  |-  1  e.  CC
23 pncan 9301 . . . . 5  |-  ( (;;; 1 2 5 8  e.  CC  /\  1  e.  CC )  ->  (
(;;; 1 2 5 8  +  1 )  - 
1 )  = ;;; 1 2 5 8 )
2421, 22, 23mp2an 654 . . . 4  |-  ( (;;; 1 2 5 8  +  1 )  -  1 )  = ;;; 1 2 5 8
2519, 24eqtri 2455 . . 3  |-  ( N  -  1 )  = ;;; 1 2 5 8
2625, 20eqeltri 2505 . 2  |-  ( N  -  1 )  e. 
NN0
27 9nn 10130 . . . . 5  |-  9  e.  NN
2813, 27decnncl 10385 . . . 4  |- ;;; 1 2 5 9  e.  NN
2910, 28eqeltri 2505 . . 3  |-  N  e.  NN
302, 9deccl 10386 . . . 4  |- ; 6 1  e.  NN0
3130, 3deccl 10386 . . 3  |- ;; 6 1 2  e.  NN0
32 3nn0 10229 . . . . 5  |-  3  e.  NN0
33 4nn0 10230 . . . . 5  |-  4  e.  NN0
3432, 33deccl 10386 . . . 4  |- ; 3 4  e.  NN0
3534nn0zi 10296 . . 3  |- ; 3 4  e.  ZZ
3632, 3deccl 10386 . . . 4  |- ; 3 2  e.  NN0
3736, 33deccl 10386 . . 3  |- ;; 3 2 4  e.  NN0
38 7nn0 10233 . . . 4  |-  7  e.  NN0
399, 38deccl 10386 . . 3  |- ; 1 7  e.  NN0
409, 32deccl 10386 . . . 4  |- ; 1 3  e.  NN0
4140, 2deccl 10386 . . 3  |- ;; 1 3 6  e.  NN0
42 0nn0 10226 . . . . . 6  |-  0  e.  NN0
4332, 42deccl 10386 . . . . 5  |- ; 3 0  e.  NN0
4443, 2deccl 10386 . . . 4  |- ;; 3 0 6  e.  NN0
45 8nn 10129 . . . . 5  |-  8  e.  NN
469, 45decnncl 10385 . . . 4  |- ; 1 8  e.  NN
4711, 33deccl 10386 . . . . 5  |- ;; 1 2 4  e.  NN0
4847, 9deccl 10386 . . . 4  |- ;;; 1 2 4 1  e.  NN0
499, 12deccl 10386 . . . . . 6  |- ; 1 5  e.  NN0
5049, 32deccl 10386 . . . . 5  |- ;; 1 5 3  e.  NN0
51 1z 10301 . . . . 5  |-  1  e.  ZZ
5212, 42deccl 10386 . . . . 5  |- ; 5 0  e.  NN0
5349, 3deccl 10386 . . . . . 6  |- ;; 1 5 2  e.  NN0
543, 12deccl 10386 . . . . . 6  |- ; 2 5  e.  NN0
5538, 2deccl 10386 . . . . . . 7  |- ; 7 6  e.  NN0
56101259lem3 13442 . . . . . . 7  |-  ( ( 2 ^; 7 6 )  mod 
N )  =  ( 5  mod  N )
57 eqid 2435 . . . . . . . 8  |- ; 7 6  = ; 7 6
58 4p1e5 10095 . . . . . . . . 9  |-  ( 4  +  1 )  =  5
59 7nn 10128 . . . . . . . . . . 11  |-  7  e.  NN
6059nncni 10000 . . . . . . . . . 10  |-  7  e.  CC
61 2cn 10060 . . . . . . . . . 10  |-  2  e.  CC
62 7t2e14 10454 . . . . . . . . . 10  |-  ( 7  x.  2 )  = ; 1
4
6360, 61, 62mulcomli 9087 . . . . . . . . 9  |-  ( 2  x.  7 )  = ; 1
4
649, 33, 58, 63decsuc 10395 . . . . . . . 8  |-  ( ( 2  x.  7 )  +  1 )  = ; 1
5
65 6nn 10127 . . . . . . . . . 10  |-  6  e.  NN
6665nncni 10000 . . . . . . . . 9  |-  6  e.  CC
67 6t2e12 10449 . . . . . . . . 9  |-  ( 6  x.  2 )  = ; 1
2
6866, 61, 67mulcomli 9087 . . . . . . . 8  |-  ( 2  x.  6 )  = ; 1
2
693, 38, 2, 57, 3, 9, 64, 68decmul2c 10420 . . . . . . 7  |-  ( 2  x. ; 7 6 )  = ;; 1 5 2
7054nn0cni 10223 . . . . . . . . 9  |- ; 2 5  e.  CC
7170addid2i 9244 . . . . . . . 8  |-  ( 0  + ; 2 5 )  = ; 2
5
7229nncni 10000 . . . . . . . . . 10  |-  N  e.  CC
7372mul02i 9245 . . . . . . . . 9  |-  ( 0  x.  N )  =  0
7473oveq1i 6083 . . . . . . . 8  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 0  + ; 2 5 )
75 5t5e25 10448 . . . . . . . 8  |-  ( 5  x.  5 )  = ; 2
5
7671, 74, 753eqtr4i 2465 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 5  x.  5 )
7729, 1, 55, 7, 12, 54, 56, 69, 76mod2xi 13395 . . . . . 6  |-  ( ( 2 ^;; 1 5 2 )  mod 
N )  =  (; 2
5  mod  N )
78 2p1e3 10093 . . . . . . 7  |-  ( 2  +  1 )  =  3
79 eqid 2435 . . . . . . 7  |- ;; 1 5 2  = ;; 1 5 2
8049, 3, 78, 79decsuc 10395 . . . . . 6  |-  (;; 1 5 2  +  1 )  = ;; 1 5 3
8152nn0cni 10223 . . . . . . . 8  |- ; 5 0  e.  CC
8281addid2i 9244 . . . . . . 7  |-  ( 0  + ; 5 0 )  = ; 5
0
8373oveq1i 6083 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 5 0 )  =  ( 0  + ; 5 0 )
84 eqid 2435 . . . . . . . 8  |- ; 2 5  = ; 2 5
85 2t2e4 10117 . . . . . . . . . 10  |-  ( 2  x.  2 )  =  4
8685oveq1i 6083 . . . . . . . . 9  |-  ( ( 2  x.  2 )  +  1 )  =  ( 4  +  1 )
8786, 58eqtri 2455 . . . . . . . 8  |-  ( ( 2  x.  2 )  +  1 )  =  5
88 5t2e10 10121 . . . . . . . . 9  |-  ( 5  x.  2 )  =  10
89 dec10 10402 . . . . . . . . 9  |-  10  = ; 1 0
9088, 89eqtri 2455 . . . . . . . 8  |-  ( 5  x.  2 )  = ; 1
0
913, 3, 12, 84, 42, 9, 87, 90decmul1c 10419 . . . . . . 7  |-  (; 2 5  x.  2 )  = ; 5 0
9282, 83, 913eqtr4i 2465 . . . . . 6  |-  ( ( 0  x.  N )  + ; 5 0 )  =  (; 2 5  x.  2 )
9329, 1, 53, 7, 54, 52, 77, 80, 92modxp1i 13396 . . . . 5  |-  ( ( 2 ^;; 1 5 3 )  mod 
N )  =  (; 5
0  mod  N )
94 eqid 2435 . . . . . 6  |- ;; 1 5 3  = ;; 1 5 3
95 eqid 2435 . . . . . . . . 9  |- ; 1 5  = ; 1 5
9661mulid1i 9082 . . . . . . . . . . 11  |-  ( 2  x.  1 )  =  2
9796oveq1i 6083 . . . . . . . . . 10  |-  ( ( 2  x.  1 )  +  1 )  =  ( 2  +  1 )
9897, 78eqtri 2455 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  1 )  =  3
99 5nn 10126 . . . . . . . . . . . 12  |-  5  e.  NN
10099nncni 10000 . . . . . . . . . . 11  |-  5  e.  CC
101100, 61, 88mulcomli 9087 . . . . . . . . . 10  |-  ( 2  x.  5 )  =  10
102101, 89eqtri 2455 . . . . . . . . 9  |-  ( 2  x.  5 )  = ; 1
0
1033, 9, 12, 95, 42, 9, 98, 102decmul2c 10420 . . . . . . . 8  |-  ( 2  x. ; 1 5 )  = ; 3
0
104103oveq1i 6083 . . . . . . 7  |-  ( ( 2  x. ; 1 5 )  +  0 )  =  (; 3
0  +  0 )
10543nn0cni 10223 . . . . . . . 8  |- ; 3 0  e.  CC
106105addid1i 9243 . . . . . . 7  |-  (; 3 0  +  0 )  = ; 3 0
107104, 106eqtri 2455 . . . . . 6  |-  ( ( 2  x. ; 1 5 )  +  0 )  = ; 3 0
108 3cn 10062 . . . . . . . 8  |-  3  e.  CC
109 3t2e6 10118 . . . . . . . 8  |-  ( 3  x.  2 )  =  6
110108, 61, 109mulcomli 9087 . . . . . . 7  |-  ( 2  x.  3 )  =  6
1112dec0h 10388 . . . . . . 7  |-  6  = ; 0 6
112110, 111eqtri 2455 . . . . . 6  |-  ( 2  x.  3 )  = ; 0
6
1133, 49, 32, 94, 2, 42, 107, 112decmul2c 10420 . . . . 5  |-  ( 2  x. ;; 1 5 3 )  = ;; 3 0 6
11472mulid2i 9083 . . . . . . . 8  |-  ( 1  x.  N )  =  N
115114, 10eqtri 2455 . . . . . . 7  |-  ( 1  x.  N )  = ;;; 1 2 5 9
116 eqid 2435 . . . . . . 7  |- ;;; 1 2 4 1  = ;;; 1 2 4 1
1173, 33deccl 10386 . . . . . . . 8  |- ; 2 4  e.  NN0
118 eqid 2435 . . . . . . . . 9  |- ; 2 4  = ; 2 4
1193, 33, 58, 118decsuc 10395 . . . . . . . 8  |-  (; 2 4  +  1 )  = ; 2 5
120 eqid 2435 . . . . . . . . 9  |- ;; 1 2 5  = ;; 1 2 5
121 eqid 2435 . . . . . . . . 9  |- ;; 1 2 4  = ;; 1 2 4
122 eqid 2435 . . . . . . . . . 10  |- ; 1 2  = ; 1 2
123 1p1e2 10084 . . . . . . . . . 10  |-  ( 1  +  1 )  =  2
124 2p2e4 10088 . . . . . . . . . 10  |-  ( 2  +  2 )  =  4
1259, 3, 9, 3, 122, 122, 123, 124decadd 10413 . . . . . . . . 9  |-  (; 1 2  + ; 1 2 )  = ; 2
4
126 5p4e9 10108 . . . . . . . . 9  |-  ( 5  +  4 )  =  9
12711, 12, 11, 33, 120, 121, 125, 126decadd 10413 . . . . . . . 8  |-  (;; 1 2 5  + ;; 1 2 4 )  = ;; 2 4 9
128117, 119, 127decsucc 10399 . . . . . . 7  |-  ( (;; 1 2 5  + ;; 1 2 4 )  +  1 )  = ;; 2 5 0
129 9p1e10 10100 . . . . . . 7  |-  ( 9  +  1 )  =  10
13013, 5, 47, 9, 115, 116, 128, 129decaddc2 10415 . . . . . 6  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  = ;;; 2 5 0 0
131 eqid 2435 . . . . . . 7  |- ; 5 0  = ; 5 0
13275oveq1i 6083 . . . . . . . . . . 11  |-  ( ( 5  x.  5 )  +  0 )  =  (; 2 5  +  0 )
13370addid1i 9243 . . . . . . . . . . 11  |-  (; 2 5  +  0 )  = ; 2 5
134132, 133eqtri 2455 . . . . . . . . . 10  |-  ( ( 5  x.  5 )  +  0 )  = ; 2
5
135100mul02i 9245 . . . . . . . . . . 11  |-  ( 0  x.  5 )  =  0
13642dec0h 10388 . . . . . . . . . . 11  |-  0  = ; 0 0
137135, 136eqtri 2455 . . . . . . . . . 10  |-  ( 0  x.  5 )  = ; 0
0
13812, 12, 42, 131, 42, 42, 134, 137decmul1c 10419 . . . . . . . . 9  |-  (; 5 0  x.  5 )  = ;; 2 5 0
139138oveq1i 6083 . . . . . . . 8  |-  ( (; 5
0  x.  5 )  +  0 )  =  (;; 2 5 0  +  0 )
14054, 42deccl 10386 . . . . . . . . . 10  |- ;; 2 5 0  e.  NN0
141140nn0cni 10223 . . . . . . . . 9  |- ;; 2 5 0  e.  CC
142141addid1i 9243 . . . . . . . 8  |-  (;; 2 5 0  +  0 )  = ;; 2 5 0
143139, 142eqtri 2455 . . . . . . 7  |-  ( (; 5
0  x.  5 )  +  0 )  = ;; 2 5 0
14481mul01i 9246 . . . . . . . 8  |-  (; 5 0  x.  0 )  =  0
145144, 136eqtri 2455 . . . . . . 7  |-  (; 5 0  x.  0 )  = ; 0 0
14652, 12, 42, 131, 42, 42, 143, 145decmul2c 10420 . . . . . 6  |-  (; 5 0  x. ; 5 0 )  = ;;; 2 5 0 0
147130, 146eqtr4i 2458 . . . . 5  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  =  (; 5 0  x. ; 5 0 )
14829, 1, 50, 51, 52, 48, 93, 113, 147mod2xi 13395 . . . 4  |-  ( ( 2 ^;; 3 0 6 )  mod 
N )  =  (;;; 1 2 4 1  mod 
N )
149 eqid 2435 . . . . 5  |- ;; 3 0 6  = ;; 3 0 6
150 eqid 2435 . . . . . 6  |- ; 3 0  = ; 3 0
1519dec0h 10388 . . . . . 6  |-  1  = ; 0 1
152 00id 9231 . . . . . . . 8  |-  ( 0  +  0 )  =  0
153110, 152oveq12i 6085 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  ( 6  +  0 )
15466addid1i 9243 . . . . . . 7  |-  ( 6  +  0 )  =  6
155153, 154eqtri 2455 . . . . . 6  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  6
15661mul01i 9246 . . . . . . . 8  |-  ( 2  x.  0 )  =  0
157156oveq1i 6083 . . . . . . 7  |-  ( ( 2  x.  0 )  +  1 )  =  ( 0  +  1 )
158 0p1e1 10083 . . . . . . 7  |-  ( 0  +  1 )  =  1
159157, 158, 1513eqtri 2459 . . . . . 6  |-  ( ( 2  x.  0 )  +  1 )  = ; 0
1
16032, 42, 42, 9, 150, 151, 3, 9, 42, 155, 159decma2c 10412 . . . . 5  |-  ( ( 2  x. ; 3 0 )  +  1 )  = ; 6 1
1613, 43, 2, 149, 3, 9, 160, 68decmul2c 10420 . . . 4  |-  ( 2  x. ;; 3 0 6 )  = ;; 6 1 2
162 eqid 2435 . . . . . 6  |- ; 1 8  = ; 1 8
16311, 33, 58, 121decsuc 10395 . . . . . 6  |-  (;; 1 2 4  +  1 )  = ;; 1 2 5
16445nncni 10000 . . . . . . 7  |-  8  e.  CC
165164, 22, 15addcomli 9248 . . . . . 6  |-  ( 1  +  8 )  =  9
16647, 9, 9, 14, 116, 162, 163, 165decadd 10413 . . . . 5  |-  (;;; 1 2 4 1  + ; 1 8 )  = ;;; 1 2 5 9
167166, 10eqtr4i 2458 . . . 4  |-  (;;; 1 2 4 1  + ; 1 8 )  =  N
16837nn0cni 10223 . . . . . 6  |- ;; 3 2 4  e.  CC
169168addid2i 9244 . . . . 5  |-  ( 0  + ;; 3 2 4 )  = ;; 3 2 4
17073oveq1i 6083 . . . . 5  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  ( 0  + ;; 3 2 4 )
1719, 14deccl 10386 . . . . . 6  |- ; 1 8  e.  NN0
1729, 33deccl 10386 . . . . . 6  |- ; 1 4  e.  NN0
173 eqid 2435 . . . . . . 7  |- ; 1 4  = ; 1 4
17422mulid1i 9082 . . . . . . . . 9  |-  ( 1  x.  1 )  =  1
175174, 123oveq12i 6085 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  ( 1  +  2 )
17661, 22, 78addcomli 9248 . . . . . . . 8  |-  ( 1  +  2 )  =  3
177175, 176eqtri 2455 . . . . . . 7  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  3
178164mulid1i 9082 . . . . . . . . 9  |-  ( 8  x.  1 )  =  8
179178oveq1i 6083 . . . . . . . 8  |-  ( ( 8  x.  1 )  +  4 )  =  ( 8  +  4 )
180 8p4e12 10429 . . . . . . . 8  |-  ( 8  +  4 )  = ; 1
2
181179, 180eqtri 2455 . . . . . . 7  |-  ( ( 8  x.  1 )  +  4 )  = ; 1
2
1829, 14, 9, 33, 162, 173, 9, 3, 9, 177, 181decmac 10411 . . . . . 6  |-  ( (; 1
8  x.  1 )  + ; 1 4 )  = ; 3
2
183164mulid2i 9083 . . . . . . . . 9  |-  ( 1  x.  8 )  =  8
184183oveq1i 6083 . . . . . . . 8  |-  ( ( 1  x.  8 )  +  6 )  =  ( 8  +  6 )
185 8p6e14 10431 . . . . . . . 8  |-  ( 8  +  6 )  = ; 1
4
186184, 185eqtri 2455 . . . . . . 7  |-  ( ( 1  x.  8 )  +  6 )  = ; 1
4
187 8t8e64 10466 . . . . . . 7  |-  ( 8  x.  8 )  = ; 6
4
18814, 9, 14, 162, 33, 2, 186, 187decmul1c 10419 . . . . . 6  |-  (; 1 8  x.  8 )  = ;; 1 4 4
189171, 9, 14, 162, 33, 172, 182, 188decmul2c 10420 . . . . 5  |-  (; 1 8  x. ; 1 8 )  = ;; 3 2 4
190169, 170, 1893eqtr4i 2465 . . . 4  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  (; 1
8  x. ; 1 8 )
1911, 44, 7, 46, 37, 48, 148, 161, 167, 190mod2xnegi 13397 . . 3  |-  ( ( 2 ^;; 6 1 2 )  mod 
N )  =  (;; 3 2 4  mod 
N )
192101259lem1 13440 . . 3  |-  ( ( 2 ^; 1 7 )  mod 
N )  =  (;; 1 3 6  mod 
N )
193 eqid 2435 . . . 4  |- ;; 6 1 2  = ;; 6 1 2
194 eqid 2435 . . . 4  |- ; 1 7  = ; 1 7
195 eqid 2435 . . . . 5  |- ; 6 1  = ; 6 1
1962, 9, 123, 195decsuc 10395 . . . 4  |-  (; 6 1  +  1 )  = ; 6 2
197 7p2e9 10113 . . . . 5  |-  ( 7  +  2 )  =  9
19860, 61, 197addcomli 9248 . . . 4  |-  ( 2  +  7 )  =  9
19930, 3, 9, 38, 193, 194, 196, 198decadd 10413 . . 3  |-  (;; 6 1 2  + ; 1 7 )  = ;; 6 2 9
20032, 9deccl 10386 . . . . 5  |- ; 3 1  e.  NN0
201 eqid 2435 . . . . . . 7  |- ; 3 1  = ; 3 1
202 3p2e5 10101 . . . . . . . . 9  |-  ( 3  +  2 )  =  5
203108, 61, 202addcomli 9248 . . . . . . . 8  |-  ( 2  +  3 )  =  5
2049, 3, 32, 122, 203decaddi 10416 . . . . . . 7  |-  (; 1 2  +  3 )  = ; 1 5
205 5p1e6 10096 . . . . . . 7  |-  ( 5  +  1 )  =  6
20611, 12, 32, 9, 120, 201, 204, 205decadd 10413 . . . . . 6  |-  (;; 1 2 5  + ; 3 1 )  = ;; 1 5 6
207123oveq1i 6083 . . . . . . . . 9  |-  ( ( 1  +  1 )  +  1 )  =  ( 2  +  1 )
208207, 78eqtri 2455 . . . . . . . 8  |-  ( ( 1  +  1 )  +  1 )  =  3
209 7p5e12 10425 . . . . . . . . 9  |-  ( 7  +  5 )  = ; 1
2
21060, 100, 209addcomli 9248 . . . . . . . 8  |-  ( 5  +  7 )  = ; 1
2
2119, 12, 9, 38, 95, 194, 208, 3, 210decaddc 10414 . . . . . . 7  |-  (; 1 5  + ; 1 7 )  = ; 3
2
212 eqid 2435 . . . . . . . 8  |- ; 3 4  = ; 3 4
213 7p3e10 10114 . . . . . . . . . 10  |-  ( 7  +  3 )  =  10
21460, 108, 213addcomli 9248 . . . . . . . . 9  |-  ( 3  +  7 )  =  10
215214, 89eqtri 2455 . . . . . . . 8  |-  ( 3  +  7 )  = ; 1
0
216108mulid1i 9082 . . . . . . . . . 10  |-  ( 3  x.  1 )  =  3
21722addid1i 9243 . . . . . . . . . 10  |-  ( 1  +  0 )  =  1
218216, 217oveq12i 6085 . . . . . . . . 9  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  ( 3  +  1 )
219 3p1e4 10094 . . . . . . . . 9  |-  ( 3  +  1 )  =  4
220218, 219eqtri 2455 . . . . . . . 8  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  4
221 4cn 10064 . . . . . . . . . . 11  |-  4  e.  CC
222221mulid1i 9082 . . . . . . . . . 10  |-  ( 4  x.  1 )  =  4
223222oveq1i 6083 . . . . . . . . 9  |-  ( ( 4  x.  1 )  +  0 )  =  ( 4  +  0 )
224221addid1i 9243 . . . . . . . . 9  |-  ( 4  +  0 )  =  4
22533dec0h 10388 . . . . . . . . 9  |-  4  = ; 0 4
226223, 224, 2253eqtri 2459 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  0 )  = ; 0
4
22732, 33, 9, 42, 212, 215, 9, 33, 42, 220, 226decmac 10411 . . . . . . 7  |-  ( (; 3
4  x.  1 )  +  ( 3  +  7 ) )  = ; 4
4
2283dec0h 10388 . . . . . . . 8  |-  2  = ; 0 2
229109, 158oveq12i 6085 . . . . . . . . 9  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  ( 6  +  1 )
230 6p1e7 10097 . . . . . . . . 9  |-  ( 6  +  1 )  =  7
231229, 230eqtri 2455 . . . . . . . 8  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  7
232 4t2e8 10120 . . . . . . . . . 10  |-  ( 4  x.  2 )  =  8
233232oveq1i 6083 . . . . . . . . 9  |-  ( ( 4  x.  2 )  +  2 )  =  ( 8  +  2 )
234 8p2e10 10115 . . . . . . . . 9  |-  ( 8  +  2 )  =  10
235233, 234, 893eqtri 2459 . . . . . . . 8  |-  ( ( 4  x.  2 )  +  2 )  = ; 1
0
23632, 33, 42, 3, 212, 228, 3, 42, 9, 231, 235decmac 10411 . . . . . . 7  |-  ( (; 3
4  x.  2 )  +  2 )  = ; 7
0
2379, 3, 32, 3, 122, 211, 34, 42, 38, 227, 236decma2c 10412 . . . . . 6  |-  ( (; 3
4  x. ; 1 2 )  +  (; 1 5  + ; 1 7 ) )  = ;; 4 4 0
23861addid2i 9244 . . . . . . . . 9  |-  ( 0  +  2 )  =  2
239238oveq2i 6084 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  =  ( ( 3  x.  5 )  +  2 )
240 5t3e15 10446 . . . . . . . . . 10  |-  ( 5  x.  3 )  = ; 1
5
241100, 108, 240mulcomli 9087 . . . . . . . . 9  |-  ( 3  x.  5 )  = ; 1
5
242 5p2e7 10106 . . . . . . . . 9  |-  ( 5  +  2 )  =  7
2439, 12, 3, 241, 242decaddi 10416 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  2 )  = ; 1
7
244239, 243eqtri 2455 . . . . . . 7  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  = ; 1
7
245 5t4e20 10447 . . . . . . . . 9  |-  ( 5  x.  4 )  = ; 2
0
246100, 221, 245mulcomli 9087 . . . . . . . 8  |-  ( 4  x.  5 )  = ; 2
0
24766addid2i 9244 . . . . . . . 8  |-  ( 0  +  6 )  =  6
2483, 42, 2, 246, 247decaddi 10416 . . . . . . 7  |-  ( ( 4  x.  5 )  +  6 )  = ; 2
6
24932, 33, 42, 2, 212, 111, 12, 2, 3, 244, 248decmac 10411 . . . . . 6  |-  ( (; 3
4  x.  5 )  +  6 )  = ;; 1 7 6
25011, 12, 49, 2, 120, 206, 34, 2, 39, 237, 249decma2c 10412 . . . . 5  |-  ( (; 3
4  x. ;; 1 2 5 )  +  (;; 1 2 5  + ; 3 1 ) )  = ;;; 4 4 0 6
25114dec0h 10388 . . . . . 6  |-  8  = ; 0 8
252221addid2i 9244 . . . . . . . 8  |-  ( 0  +  4 )  =  4
253252oveq2i 6084 . . . . . . 7  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  =  ( ( 3  x.  9 )  +  4 )
25427nncni 10000 . . . . . . . . 9  |-  9  e.  CC
255 9t3e27 10468 . . . . . . . . 9  |-  ( 9  x.  3 )  = ; 2
7
256254, 108, 255mulcomli 9087 . . . . . . . 8  |-  ( 3  x.  9 )  = ; 2
7
257 7p4e11 10424 . . . . . . . 8  |-  ( 7  +  4 )  = ; 1
1
2583, 38, 33, 256, 78, 9, 257decaddci 10417 . . . . . . 7  |-  ( ( 3  x.  9 )  +  4 )  = ; 3
1
259253, 258eqtri 2455 . . . . . 6  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  = ; 3
1
260 9t4e36 10469 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
261254, 221, 260mulcomli 9087 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
262164, 66, 185addcomli 9248 . . . . . . 7  |-  ( 6  +  8 )  = ; 1
4
26332, 2, 14, 261, 219, 33, 262decaddci 10417 . . . . . 6  |-  ( ( 4  x.  9 )  +  8 )  = ; 4
4
26432, 33, 42, 14, 212, 251, 5, 33, 33, 259, 263decmac 10411 . . . . 5  |-  ( (; 3
4  x.  9 )  +  8 )  = ;; 3 1 4
26513, 5, 13, 14, 10, 25, 34, 33, 200, 250, 264decma2c 10412 . . . 4  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  = ;;;; 4 4 0 6 4
266 eqid 2435 . . . . 5  |- ;; 1 3 6  = ;; 1 3 6
2679, 5deccl 10386 . . . . . 6  |- ; 1 9  e.  NN0
268267, 33deccl 10386 . . . . 5  |- ;; 1 9 4  e.  NN0
269 eqid 2435 . . . . . 6  |- ; 1 3  = ; 1 3
270 eqid 2435 . . . . . 6  |- ;; 1 9 4  = ;; 1 9 4
2715, 38deccl 10386 . . . . . 6  |- ; 9 7  e.  NN0
2729, 9deccl 10386 . . . . . . 7  |- ; 1 1  e.  NN0
273 eqid 2435 . . . . . . 7  |- ;; 3 2 4  = ;; 3 2 4
274 eqid 2435 . . . . . . . 8  |- ; 1 9  = ; 1 9
275 eqid 2435 . . . . . . . 8  |- ; 9 7  = ; 9 7
276254, 22, 129addcomli 9248 . . . . . . . . . 10  |-  ( 1  +  9 )  =  10
277276, 89eqtri 2455 . . . . . . . . 9  |-  ( 1  +  9 )  = ; 1
0
2789, 42, 158, 277decsuc 10395 . . . . . . . 8  |-  ( ( 1  +  9 )  +  1 )  = ; 1
1
279 9p7e16 10439 . . . . . . . 8  |-  ( 9  +  7 )  = ; 1
6
2809, 5, 5, 38, 274, 275, 278, 2, 279decaddc 10414 . . . . . . 7  |-  (; 1 9  + ; 9 7 )  = ;; 1 1 6
281 eqid 2435 . . . . . . . 8  |- ; 3 2  = ; 3 2
282 eqid 2435 . . . . . . . . 9  |- ; 1 1  = ; 1 1
2839, 9, 123, 282decsuc 10395 . . . . . . . 8  |-  (; 1 1  +  1 )  = ; 1 2
28496oveq1i 6083 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  2 )  =  ( 2  +  2 )
285284, 124, 2253eqtri 2459 . . . . . . . 8  |-  ( ( 2  x.  1 )  +  2 )  = ; 0
4
28632, 3, 9, 3, 281, 283, 9, 33, 42, 220, 285decmac 10411 . . . . . . 7  |-  ( (; 3
2  x.  1 )  +  (; 1 1  +  1 ) )  = ; 4 4
287222oveq1i 6083 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  6 )  =  ( 4  +  6 )
288 6p4e10 10112 . . . . . . . . 9  |-  ( 6  +  4 )  =  10
28966, 221, 288addcomli 9248 . . . . . . . 8  |-  ( 4  +  6 )  =  10
290287, 289, 893eqtri 2459 . . . . . . 7  |-  ( ( 4  x.  1 )  +  6 )  = ; 1
0
29136, 33, 272, 2, 273, 280, 9, 42, 9, 286, 290decmac 10411 . . . . . 6  |-  ( (;; 3 2 4  x.  1 )  +  (; 1
9  + ; 9 7 ) )  = ;; 4 4 0
292158, 151eqtri 2455 . . . . . . . 8  |-  ( 0  +  1 )  = ; 0
1
293 3t3e9 10119 . . . . . . . . . 10  |-  ( 3  x.  3 )  =  9
294293, 152oveq12i 6085 . . . . . . . . 9  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  ( 9  +  0 )
295254addid1i 9243 . . . . . . . . 9  |-  ( 9  +  0 )  =  9
296294, 295eqtri 2455 . . . . . . . 8  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  9
297110oveq1i 6083 . . . . . . . . 9  |-  ( ( 2  x.  3 )  +  1 )  =  ( 6  +  1 )
29838dec0h 10388 . . . . . . . . 9  |-  7  = ; 0 7
299297, 230, 2983eqtri 2459 . . . . . . . 8  |-  ( ( 2  x.  3 )  +  1 )  = ; 0
7
30032, 3, 42, 9, 281, 292, 32, 38, 42, 296, 299decmac 10411 . . . . . . 7  |-  ( (; 3
2  x.  3 )  +  ( 0  +  1 ) )  = ; 9
7
301 4t3e12 10444 . . . . . . . 8  |-  ( 4  x.  3 )  = ; 1
2
302 4p2e6 10103 . . . . . . . . 9  |-  ( 4  +  2 )  =  6
303221, 61, 302addcomli 9248 . . . . . . . 8  |-  ( 2  +  4 )  =  6
3049, 3, 33, 301, 303decaddi 10416 . . . . . . 7  |-  ( ( 4  x.  3 )  +  4 )  = ; 1
6
30536, 33, 42, 33, 273, 225, 32, 2, 9, 300, 304decmac 10411 . . . . . 6  |-  ( (;; 3 2 4  x.  3 )  +  4 )  = ;; 9 7 6
3069, 32, 267, 33, 269, 270, 37, 2, 271, 291, 305decma2c 10412 . . . . 5  |-  ( (;; 3 2 4  x. ; 1
3 )  + ;; 1 9 4 )  = ;;; 4 4 0 6
307158oveq2i 6084 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  =  ( ( 3  x.  6 )  +  1 )
308 6t3e18 10450 . . . . . . . . . 10  |-  ( 6  x.  3 )  = ; 1
8
30966, 108, 308mulcomli 9087 . . . . . . . . 9  |-  ( 3  x.  6 )  = ; 1
8
3109, 14, 15, 309decsuc 10395 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  1 )  = ; 1
9
311307, 310eqtri 2455 . . . . . . 7  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  = ; 1
9
3129, 3, 3, 68, 124decaddi 10416 . . . . . . 7  |-  ( ( 2  x.  6 )  +  2 )  = ; 1
4
31332, 3, 42, 3, 281, 228, 2, 33, 9, 311, 312decmac 10411 . . . . . 6  |-  ( (; 3
2  x.  6 )  +  2 )  = ;; 1 9 4
314 6t4e24 10451 . . . . . . 7  |-  ( 6  x.  4 )  = ; 2
4
31566, 221, 314mulcomli 9087 . . . . . 6  |-  ( 4  x.  6 )  = ; 2
4
3162, 36, 33, 273, 33, 3, 313, 315decmul1c 10419 . . . . 5  |-  (;; 3 2 4  x.  6 )  = ;;; 1 9 4 4
31737, 40, 2, 266, 33, 268, 306, 316decmul2c 10420 . . . 4  |-  (;; 3 2 4  x. ;; 1 3 6 )  = ;;;; 4 4 0 6 4
318265, 317eqtr4i 2458 . . 3  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  =  (;; 3 2 4  x. ;; 1 3 6 )
31929, 1, 31, 35, 37, 26, 39, 41, 191, 192, 199, 318modxai 13394 . 2  |-  ( ( 2 ^;; 6 2 9 )  mod 
N )  =  ( ( N  -  1 )  mod  N )
320 eqid 2435 . . . 4  |- ;; 6 2 9  = ;; 6 2 9
321 eqid 2435 . . . . 5  |- ; 6 2  = ; 6 2
322152oveq2i 6084 . . . . . 6  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  =  ( ( 2  x.  6 )  +  0 )
32368oveq1i 6083 . . . . . 6  |-  ( ( 2  x.  6 )  +  0 )  =  (; 1 2  +  0 )
32411nn0cni 10223 . . . . . . 7  |- ; 1 2  e.  CC
325324addid1i 9243 . . . . . 6  |-  (; 1 2  +  0 )  = ; 1 2
326322, 323, 3253eqtri 2459 . . . . 5  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  = ; 1
2
32712dec0h 10388 . . . . . 6  |-  5  = ; 0 5
32886, 58, 3273eqtri 2459 . . . . 5  |-  ( ( 2  x.  2 )  +  1 )  = ; 0
5
3292, 3, 42, 9, 321, 151, 3, 12, 42, 326, 328decma2c 10412 . . . 4  |-  ( ( 2  x. ; 6 2 )  +  1 )  = ;; 1 2 5
330 9t2e18 10467 . . . . 5  |-  ( 9  x.  2 )  = ; 1
8
331254, 61, 330mulcomli 9087 . . . 4  |-  ( 2  x.  9 )  = ; 1
8
3323, 4, 5, 320, 14, 9, 329, 331decmul2c 10420 . . 3  |-  ( 2  x. ;; 6 2 9 )  = ;;; 1 2 5 8
333332, 25eqtr4i 2458 . 2  |-  ( 2  x. ;; 6 2 9 )  =  ( N  -  1 )
334 npcan 9304 . . 3  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( ( N  - 
1 )  +  1 )  =  N )
33572, 22, 334mp2an 654 . 2  |-  ( ( N  -  1 )  +  1 )  =  N
33673oveq1i 6083 . . 3  |-  ( ( 0  x.  N )  +  1 )  =  ( 0  +  1 )
337158, 336, 1743eqtr4i 2465 . 2  |-  ( ( 0  x.  N )  +  1 )  =  ( 1  x.  1 )
3381, 6, 7, 8, 9, 26, 319, 333, 335, 337mod2xnegi 13397 1  |-  ( ( 2 ^ ( N  -  1 ) )  mod  N )  =  ( 1  mod  N
)
Colors of variables: wff set class
Syntax hints:    = wceq 1652    e. wcel 1725  (class class class)co 6073   CCcc 8978   0cc0 8980   1c1 8981    + caddc 8983    x. cmul 8985    - cmin 9281   NNcn 9990   2c2 10039   3c3 10040   4c4 10041   5c5 10042   6c6 10043   7c7 10044   8c8 10045   9c9 10046   10c10 10047   NN0cn0 10211  ;cdc 10372    mod cmo 11240   ^cexp 11372
This theorem is referenced by:  1259prm  13445
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2416  ax-sep 4322  ax-nul 4330  ax-pow 4369  ax-pr 4395  ax-un 4693  ax-cnex 9036  ax-resscn 9037  ax-1cn 9038  ax-icn 9039  ax-addcl 9040  ax-addrcl 9041  ax-mulcl 9042  ax-mulrcl 9043  ax-mulcom 9044  ax-addass 9045  ax-mulass 9046  ax-distr 9047  ax-i2m1 9048  ax-1ne0 9049  ax-1rid 9050  ax-rnegex 9051  ax-rrecex 9052  ax-cnre 9053  ax-pre-lttri 9054  ax-pre-lttrn 9055  ax-pre-ltadd 9056  ax-pre-mulgt0 9057  ax-pre-sup 9058
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2284  df-mo 2285  df-clab 2422  df-cleq 2428  df-clel 2431  df-nfc 2560  df-ne 2600  df-nel 2601  df-ral 2702  df-rex 2703  df-reu 2704  df-rmo 2705  df-rab 2706  df-v 2950  df-sbc 3154  df-csb 3244  df-dif 3315  df-un 3317  df-in 3319  df-ss 3326  df-pss 3328  df-nul 3621  df-if 3732  df-pw 3793  df-sn 3812  df-pr 3813  df-tp 3814  df-op 3815  df-uni 4008  df-iun 4087  df-br 4205  df-opab 4259  df-mpt 4260  df-tr 4295  df-eprel 4486  df-id 4490  df-po 4495  df-so 4496  df-fr 4533  df-we 4535  df-ord 4576  df-on 4577  df-lim 4578  df-suc 4579  df-om 4838  df-xp 4876  df-rel 4877  df-cnv 4878  df-co 4879  df-dm 4880  df-rn 4881  df-res 4882  df-ima 4883  df-iota 5410  df-fun 5448  df-fn 5449  df-f 5450  df-f1 5451  df-fo 5452  df-f1o 5453  df-fv 5454  df-ov 6076  df-oprab 6077  df-mpt2 6078  df-2nd 6342  df-riota 6541  df-recs 6625  df-rdg 6660  df-er 6897  df-en 7102  df-dom 7103  df-sdom 7104  df-sup 7438  df-pnf 9112  df-mnf 9113  df-xr 9114  df-ltxr 9115  df-le 9116  df-sub 9283  df-neg 9284  df-div 9668  df-nn 9991  df-2 10048  df-3 10049  df-4 10050  df-5 10051  df-6 10052  df-7 10053  df-8 10054  df-9 10055  df-10 10056  df-n0 10212  df-z 10273  df-dec 10373  df-uz 10479  df-rp 10603  df-fl 11192  df-mod 11241  df-seq 11314  df-exp 11373
  Copyright terms: Public domain W3C validator