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

Theorem 1259lem4 14473
Description: Lemma for 1259prm 14475. 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 10692 . 2  |-  2  e.  NN
2 6nn0 10815 . . . 4  |-  6  e.  NN0
3 2nn0 10811 . . . 4  |-  2  e.  NN0
42, 3deccl 10989 . . 3  |- ; 6 2  e.  NN0
5 9nn0 10818 . . 3  |-  9  e.  NN0
64, 5deccl 10989 . 2  |- ;; 6 2 9  e.  NN0
7 0z 10874 . 2  |-  0  e.  ZZ
8 1nn 10546 . 2  |-  1  e.  NN
9 1nn0 10810 . 2  |-  1  e.  NN0
10 1259prm.1 . . . . . 6  |-  N  = ;;; 1 2 5 9
119, 3deccl 10989 . . . . . . . 8  |- ; 1 2  e.  NN0
12 5nn0 10814 . . . . . . . 8  |-  5  e.  NN0
1311, 12deccl 10989 . . . . . . 7  |- ;; 1 2 5  e.  NN0
14 8nn0 10817 . . . . . . 7  |-  8  e.  NN0
15 8p1e9 10665 . . . . . . 7  |-  ( 8  +  1 )  =  9
16 eqid 2467 . . . . . . 7  |- ;;; 1 2 5 8  = ;;; 1 2 5 8
1713, 14, 15, 16decsuc 10998 . . . . . 6  |-  (;;; 1 2 5 8  +  1 )  = ;;; 1 2 5 9
1810, 17eqtr4i 2499 . . . . 5  |-  N  =  (;;; 1 2 5 8  +  1 )
1918oveq1i 6293 . . . 4  |-  ( N  -  1 )  =  ( (;;; 1 2 5 8  +  1 )  - 
1 )
2013, 14deccl 10989 . . . . . 6  |- ;;; 1 2 5 8  e.  NN0
2120nn0cni 10806 . . . . 5  |- ;;; 1 2 5 8  e.  CC
22 ax-1cn 9549 . . . . 5  |-  1  e.  CC
23 pncan 9825 . . . . 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 2496 . . 3  |-  ( N  -  1 )  = ;;; 1 2 5 8
2625, 20eqeltri 2551 . 2  |-  ( N  -  1 )  e. 
NN0
27 9nn 10699 . . . . 5  |-  9  e.  NN
2813, 27decnncl 10988 . . . 4  |- ;;; 1 2 5 9  e.  NN
2910, 28eqeltri 2551 . . 3  |-  N  e.  NN
302, 9deccl 10989 . . . 4  |- ; 6 1  e.  NN0
3130, 3deccl 10989 . . 3  |- ;; 6 1 2  e.  NN0
32 3nn0 10812 . . . . 5  |-  3  e.  NN0
33 4nn0 10813 . . . . 5  |-  4  e.  NN0
3432, 33deccl 10989 . . . 4  |- ; 3 4  e.  NN0
3534nn0zi 10888 . . 3  |- ; 3 4  e.  ZZ
3632, 3deccl 10989 . . . 4  |- ; 3 2  e.  NN0
3736, 33deccl 10989 . . 3  |- ;; 3 2 4  e.  NN0
38 7nn0 10816 . . . 4  |-  7  e.  NN0
399, 38deccl 10989 . . 3  |- ; 1 7  e.  NN0
409, 32deccl 10989 . . . 4  |- ; 1 3  e.  NN0
4140, 2deccl 10989 . . 3  |- ;; 1 3 6  e.  NN0
42 0nn0 10809 . . . . . 6  |-  0  e.  NN0
4332, 42deccl 10989 . . . . 5  |- ; 3 0  e.  NN0
4443, 2deccl 10989 . . . 4  |- ;; 3 0 6  e.  NN0
45 8nn 10698 . . . . 5  |-  8  e.  NN
469, 45decnncl 10988 . . . 4  |- ; 1 8  e.  NN
4711, 33deccl 10989 . . . . 5  |- ;; 1 2 4  e.  NN0
4847, 9deccl 10989 . . . 4  |- ;;; 1 2 4 1  e.  NN0
499, 12deccl 10989 . . . . . 6  |- ; 1 5  e.  NN0
5049, 32deccl 10989 . . . . 5  |- ;; 1 5 3  e.  NN0
51 1z 10893 . . . . 5  |-  1  e.  ZZ
5212, 42deccl 10989 . . . . 5  |- ; 5 0  e.  NN0
5349, 3deccl 10989 . . . . . 6  |- ;; 1 5 2  e.  NN0
543, 12deccl 10989 . . . . . 6  |- ; 2 5  e.  NN0
5538, 2deccl 10989 . . . . . . 7  |- ; 7 6  e.  NN0
56101259lem3 14472 . . . . . . 7  |-  ( ( 2 ^; 7 6 )  mod 
N )  =  ( 5  mod  N )
57 eqid 2467 . . . . . . . 8  |- ; 7 6  = ; 7 6
58 4p1e5 10661 . . . . . . . . 9  |-  ( 4  +  1 )  =  5
59 7cn 10618 . . . . . . . . . 10  |-  7  e.  CC
60 2cn 10605 . . . . . . . . . 10  |-  2  e.  CC
61 7t2e14 11057 . . . . . . . . . 10  |-  ( 7  x.  2 )  = ; 1
4
6259, 60, 61mulcomli 9602 . . . . . . . . 9  |-  ( 2  x.  7 )  = ; 1
4
639, 33, 58, 62decsuc 10998 . . . . . . . 8  |-  ( ( 2  x.  7 )  +  1 )  = ; 1
5
64 6cn 10616 . . . . . . . . 9  |-  6  e.  CC
65 6t2e12 11052 . . . . . . . . 9  |-  ( 6  x.  2 )  = ; 1
2
6664, 60, 65mulcomli 9602 . . . . . . . 8  |-  ( 2  x.  6 )  = ; 1
2
673, 38, 2, 57, 3, 9, 63, 66decmul2c 11023 . . . . . . 7  |-  ( 2  x. ; 7 6 )  = ;; 1 5 2
6854nn0cni 10806 . . . . . . . . 9  |- ; 2 5  e.  CC
6968addid2i 9766 . . . . . . . 8  |-  ( 0  + ; 2 5 )  = ; 2
5
7029nncni 10545 . . . . . . . . . 10  |-  N  e.  CC
7170mul02i 9767 . . . . . . . . 9  |-  ( 0  x.  N )  =  0
7271oveq1i 6293 . . . . . . . 8  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 0  + ; 2 5 )
73 5t5e25 11051 . . . . . . . 8  |-  ( 5  x.  5 )  = ; 2
5
7469, 72, 733eqtr4i 2506 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 5  x.  5 )
7529, 1, 55, 7, 12, 54, 56, 67, 74mod2xi 14413 . . . . . 6  |-  ( ( 2 ^;; 1 5 2 )  mod 
N )  =  (; 2
5  mod  N )
76 2p1e3 10658 . . . . . . 7  |-  ( 2  +  1 )  =  3
77 eqid 2467 . . . . . . 7  |- ;; 1 5 2  = ;; 1 5 2
7849, 3, 76, 77decsuc 10998 . . . . . 6  |-  (;; 1 5 2  +  1 )  = ;; 1 5 3
7952nn0cni 10806 . . . . . . . 8  |- ; 5 0  e.  CC
8079addid2i 9766 . . . . . . 7  |-  ( 0  + ; 5 0 )  = ; 5
0
8171oveq1i 6293 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 5 0 )  =  ( 0  + ; 5 0 )
82 eqid 2467 . . . . . . . 8  |- ; 2 5  = ; 2 5
83 2t2e4 10684 . . . . . . . . . 10  |-  ( 2  x.  2 )  =  4
8483oveq1i 6293 . . . . . . . . 9  |-  ( ( 2  x.  2 )  +  1 )  =  ( 4  +  1 )
8584, 58eqtri 2496 . . . . . . . 8  |-  ( ( 2  x.  2 )  +  1 )  =  5
86 5t2e10 10689 . . . . . . . . 9  |-  ( 5  x.  2 )  =  10
87 dec10 11005 . . . . . . . . 9  |-  10  = ; 1 0
8886, 87eqtri 2496 . . . . . . . 8  |-  ( 5  x.  2 )  = ; 1
0
893, 3, 12, 82, 42, 9, 85, 88decmul1c 11022 . . . . . . 7  |-  (; 2 5  x.  2 )  = ; 5 0
9080, 81, 893eqtr4i 2506 . . . . . 6  |-  ( ( 0  x.  N )  + ; 5 0 )  =  (; 2 5  x.  2 )
9129, 1, 53, 7, 54, 52, 75, 78, 90modxp1i 14414 . . . . 5  |-  ( ( 2 ^;; 1 5 3 )  mod 
N )  =  (; 5
0  mod  N )
92 eqid 2467 . . . . . 6  |- ;; 1 5 3  = ;; 1 5 3
93 eqid 2467 . . . . . . . . 9  |- ; 1 5  = ; 1 5
9460mulid1i 9597 . . . . . . . . . . 11  |-  ( 2  x.  1 )  =  2
9594oveq1i 6293 . . . . . . . . . 10  |-  ( ( 2  x.  1 )  +  1 )  =  ( 2  +  1 )
9695, 76eqtri 2496 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  1 )  =  3
97 5cn 10614 . . . . . . . . . . 11  |-  5  e.  CC
9897, 60, 86mulcomli 9602 . . . . . . . . . 10  |-  ( 2  x.  5 )  =  10
9998, 87eqtri 2496 . . . . . . . . 9  |-  ( 2  x.  5 )  = ; 1
0
1003, 9, 12, 93, 42, 9, 96, 99decmul2c 11023 . . . . . . . 8  |-  ( 2  x. ; 1 5 )  = ; 3
0
101100oveq1i 6293 . . . . . . 7  |-  ( ( 2  x. ; 1 5 )  +  0 )  =  (; 3
0  +  0 )
10243nn0cni 10806 . . . . . . . 8  |- ; 3 0  e.  CC
103102addid1i 9765 . . . . . . 7  |-  (; 3 0  +  0 )  = ; 3 0
104101, 103eqtri 2496 . . . . . 6  |-  ( ( 2  x. ; 1 5 )  +  0 )  = ; 3 0
105 3cn 10609 . . . . . . . 8  |-  3  e.  CC
106 3t2e6 10686 . . . . . . . 8  |-  ( 3  x.  2 )  =  6
107105, 60, 106mulcomli 9602 . . . . . . 7  |-  ( 2  x.  3 )  =  6
1082dec0h 10991 . . . . . . 7  |-  6  = ; 0 6
109107, 108eqtri 2496 . . . . . 6  |-  ( 2  x.  3 )  = ; 0
6
1103, 49, 32, 92, 2, 42, 104, 109decmul2c 11023 . . . . 5  |-  ( 2  x. ;; 1 5 3 )  = ;; 3 0 6
11170mulid2i 9598 . . . . . . . 8  |-  ( 1  x.  N )  =  N
112111, 10eqtri 2496 . . . . . . 7  |-  ( 1  x.  N )  = ;;; 1 2 5 9
113 eqid 2467 . . . . . . 7  |- ;;; 1 2 4 1  = ;;; 1 2 4 1
1143, 33deccl 10989 . . . . . . . 8  |- ; 2 4  e.  NN0
115 eqid 2467 . . . . . . . . 9  |- ; 2 4  = ; 2 4
1163, 33, 58, 115decsuc 10998 . . . . . . . 8  |-  (; 2 4  +  1 )  = ; 2 5
117 eqid 2467 . . . . . . . . 9  |- ;; 1 2 5  = ;; 1 2 5
118 eqid 2467 . . . . . . . . 9  |- ;; 1 2 4  = ;; 1 2 4
119 eqid 2467 . . . . . . . . . 10  |- ; 1 2  = ; 1 2
120 1p1e2 10648 . . . . . . . . . 10  |-  ( 1  +  1 )  =  2
121 2p2e4 10652 . . . . . . . . . 10  |-  ( 2  +  2 )  =  4
1229, 3, 9, 3, 119, 119, 120, 121decadd 11016 . . . . . . . . 9  |-  (; 1 2  + ; 1 2 )  = ; 2
4
123 5p4e9 10674 . . . . . . . . 9  |-  ( 5  +  4 )  =  9
12411, 12, 11, 33, 117, 118, 122, 123decadd 11016 . . . . . . . 8  |-  (;; 1 2 5  + ;; 1 2 4 )  = ;; 2 4 9
125114, 116, 124decsucc 11002 . . . . . . 7  |-  ( (;; 1 2 5  + ;; 1 2 4 )  +  1 )  = ;; 2 5 0
126 9p1e10 10666 . . . . . . 7  |-  ( 9  +  1 )  =  10
12713, 5, 47, 9, 112, 113, 125, 126decaddc2 11018 . . . . . 6  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  = ;;; 2 5 0 0
128 eqid 2467 . . . . . . 7  |- ; 5 0  = ; 5 0
12973oveq1i 6293 . . . . . . . . . . 11  |-  ( ( 5  x.  5 )  +  0 )  =  (; 2 5  +  0 )
13068addid1i 9765 . . . . . . . . . . 11  |-  (; 2 5  +  0 )  = ; 2 5
131129, 130eqtri 2496 . . . . . . . . . 10  |-  ( ( 5  x.  5 )  +  0 )  = ; 2
5
13297mul02i 9767 . . . . . . . . . . 11  |-  ( 0  x.  5 )  =  0
13342dec0h 10991 . . . . . . . . . . 11  |-  0  = ; 0 0
134132, 133eqtri 2496 . . . . . . . . . 10  |-  ( 0  x.  5 )  = ; 0
0
13512, 12, 42, 128, 42, 42, 131, 134decmul1c 11022 . . . . . . . . 9  |-  (; 5 0  x.  5 )  = ;; 2 5 0
136135oveq1i 6293 . . . . . . . 8  |-  ( (; 5
0  x.  5 )  +  0 )  =  (;; 2 5 0  +  0 )
13754, 42deccl 10989 . . . . . . . . . 10  |- ;; 2 5 0  e.  NN0
138137nn0cni 10806 . . . . . . . . 9  |- ;; 2 5 0  e.  CC
139138addid1i 9765 . . . . . . . 8  |-  (;; 2 5 0  +  0 )  = ;; 2 5 0
140136, 139eqtri 2496 . . . . . . 7  |-  ( (; 5
0  x.  5 )  +  0 )  = ;; 2 5 0
14179mul01i 9768 . . . . . . . 8  |-  (; 5 0  x.  0 )  =  0
142141, 133eqtri 2496 . . . . . . 7  |-  (; 5 0  x.  0 )  = ; 0 0
14352, 12, 42, 128, 42, 42, 140, 142decmul2c 11023 . . . . . 6  |-  (; 5 0  x. ; 5 0 )  = ;;; 2 5 0 0
144127, 143eqtr4i 2499 . . . . 5  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  =  (; 5 0  x. ; 5 0 )
14529, 1, 50, 51, 52, 48, 91, 110, 144mod2xi 14413 . . . 4  |-  ( ( 2 ^;; 3 0 6 )  mod 
N )  =  (;;; 1 2 4 1  mod 
N )
146 eqid 2467 . . . . 5  |- ;; 3 0 6  = ;; 3 0 6
147 eqid 2467 . . . . . 6  |- ; 3 0  = ; 3 0
1489dec0h 10991 . . . . . 6  |-  1  = ; 0 1
149 00id 9753 . . . . . . . 8  |-  ( 0  +  0 )  =  0
150107, 149oveq12i 6295 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  ( 6  +  0 )
15164addid1i 9765 . . . . . . 7  |-  ( 6  +  0 )  =  6
152150, 151eqtri 2496 . . . . . 6  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  6
15360mul01i 9768 . . . . . . . 8  |-  ( 2  x.  0 )  =  0
154153oveq1i 6293 . . . . . . 7  |-  ( ( 2  x.  0 )  +  1 )  =  ( 0  +  1 )
155 0p1e1 10646 . . . . . . 7  |-  ( 0  +  1 )  =  1
156154, 155, 1483eqtri 2500 . . . . . 6  |-  ( ( 2  x.  0 )  +  1 )  = ; 0
1
15732, 42, 42, 9, 147, 148, 3, 9, 42, 152, 156decma2c 11015 . . . . 5  |-  ( ( 2  x. ; 3 0 )  +  1 )  = ; 6 1
1583, 43, 2, 146, 3, 9, 157, 66decmul2c 11023 . . . 4  |-  ( 2  x. ;; 3 0 6 )  = ;; 6 1 2
159 eqid 2467 . . . . . 6  |- ; 1 8  = ; 1 8
16011, 33, 58, 118decsuc 10998 . . . . . 6  |-  (;; 1 2 4  +  1 )  = ;; 1 2 5
161 8cn 10620 . . . . . . 7  |-  8  e.  CC
162161, 22, 15addcomli 9770 . . . . . 6  |-  ( 1  +  8 )  =  9
16347, 9, 9, 14, 113, 159, 160, 162decadd 11016 . . . . 5  |-  (;;; 1 2 4 1  + ; 1 8 )  = ;;; 1 2 5 9
164163, 10eqtr4i 2499 . . . 4  |-  (;;; 1 2 4 1  + ; 1 8 )  =  N
16537nn0cni 10806 . . . . . 6  |- ;; 3 2 4  e.  CC
166165addid2i 9766 . . . . 5  |-  ( 0  + ;; 3 2 4 )  = ;; 3 2 4
16771oveq1i 6293 . . . . 5  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  ( 0  + ;; 3 2 4 )
1689, 14deccl 10989 . . . . . 6  |- ; 1 8  e.  NN0
1699, 33deccl 10989 . . . . . 6  |- ; 1 4  e.  NN0
170 eqid 2467 . . . . . . 7  |- ; 1 4  = ; 1 4
17122mulid1i 9597 . . . . . . . . 9  |-  ( 1  x.  1 )  =  1
172171, 120oveq12i 6295 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  ( 1  +  2 )
173 1p2e3 10659 . . . . . . . 8  |-  ( 1  +  2 )  =  3
174172, 173eqtri 2496 . . . . . . 7  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  3
175161mulid1i 9597 . . . . . . . . 9  |-  ( 8  x.  1 )  =  8
176175oveq1i 6293 . . . . . . . 8  |-  ( ( 8  x.  1 )  +  4 )  =  ( 8  +  4 )
177 8p4e12 11032 . . . . . . . 8  |-  ( 8  +  4 )  = ; 1
2
178176, 177eqtri 2496 . . . . . . 7  |-  ( ( 8  x.  1 )  +  4 )  = ; 1
2
1799, 14, 9, 33, 159, 170, 9, 3, 9, 174, 178decmac 11014 . . . . . 6  |-  ( (; 1
8  x.  1 )  + ; 1 4 )  = ; 3
2
180161mulid2i 9598 . . . . . . . . 9  |-  ( 1  x.  8 )  =  8
181180oveq1i 6293 . . . . . . . 8  |-  ( ( 1  x.  8 )  +  6 )  =  ( 8  +  6 )
182 8p6e14 11034 . . . . . . . 8  |-  ( 8  +  6 )  = ; 1
4
183181, 182eqtri 2496 . . . . . . 7  |-  ( ( 1  x.  8 )  +  6 )  = ; 1
4
184 8t8e64 11069 . . . . . . 7  |-  ( 8  x.  8 )  = ; 6
4
18514, 9, 14, 159, 33, 2, 183, 184decmul1c 11022 . . . . . 6  |-  (; 1 8  x.  8 )  = ;; 1 4 4
186168, 9, 14, 159, 33, 169, 179, 185decmul2c 11023 . . . . 5  |-  (; 1 8  x. ; 1 8 )  = ;; 3 2 4
187166, 167, 1863eqtr4i 2506 . . . 4  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  (; 1
8  x. ; 1 8 )
1881, 44, 7, 46, 37, 48, 145, 158, 164, 187mod2xnegi 14415 . . 3  |-  ( ( 2 ^;; 6 1 2 )  mod 
N )  =  (;; 3 2 4  mod 
N )
189101259lem1 14470 . . 3  |-  ( ( 2 ^; 1 7 )  mod 
N )  =  (;; 1 3 6  mod 
N )
190 eqid 2467 . . . 4  |- ;; 6 1 2  = ;; 6 1 2
191 eqid 2467 . . . 4  |- ; 1 7  = ; 1 7
192 eqid 2467 . . . . 5  |- ; 6 1  = ; 6 1
1932, 9, 120, 192decsuc 10998 . . . 4  |-  (; 6 1  +  1 )  = ; 6 2
194 7p2e9 10679 . . . . 5  |-  ( 7  +  2 )  =  9
19559, 60, 194addcomli 9770 . . . 4  |-  ( 2  +  7 )  =  9
19630, 3, 9, 38, 190, 191, 193, 195decadd 11016 . . 3  |-  (;; 6 1 2  + ; 1 7 )  = ;; 6 2 9
19732, 9deccl 10989 . . . . 5  |- ; 3 1  e.  NN0
198 eqid 2467 . . . . . . 7  |- ; 3 1  = ; 3 1
199 3p2e5 10667 . . . . . . . . 9  |-  ( 3  +  2 )  =  5
200105, 60, 199addcomli 9770 . . . . . . . 8  |-  ( 2  +  3 )  =  5
2019, 3, 32, 119, 200decaddi 11019 . . . . . . 7  |-  (; 1 2  +  3 )  = ; 1 5
202 5p1e6 10662 . . . . . . 7  |-  ( 5  +  1 )  =  6
20311, 12, 32, 9, 117, 198, 201, 202decadd 11016 . . . . . 6  |-  (;; 1 2 5  + ; 3 1 )  = ;; 1 5 6
204120oveq1i 6293 . . . . . . . . 9  |-  ( ( 1  +  1 )  +  1 )  =  ( 2  +  1 )
205204, 76eqtri 2496 . . . . . . . 8  |-  ( ( 1  +  1 )  +  1 )  =  3
206 7p5e12 11028 . . . . . . . . 9  |-  ( 7  +  5 )  = ; 1
2
20759, 97, 206addcomli 9770 . . . . . . . 8  |-  ( 5  +  7 )  = ; 1
2
2089, 12, 9, 38, 93, 191, 205, 3, 207decaddc 11017 . . . . . . 7  |-  (; 1 5  + ; 1 7 )  = ; 3
2
209 eqid 2467 . . . . . . . 8  |- ; 3 4  = ; 3 4
210 7p3e10 10680 . . . . . . . . . 10  |-  ( 7  +  3 )  =  10
21159, 105, 210addcomli 9770 . . . . . . . . 9  |-  ( 3  +  7 )  =  10
212211, 87eqtri 2496 . . . . . . . 8  |-  ( 3  +  7 )  = ; 1
0
213105mulid1i 9597 . . . . . . . . . 10  |-  ( 3  x.  1 )  =  3
21422addid1i 9765 . . . . . . . . . 10  |-  ( 1  +  0 )  =  1
215213, 214oveq12i 6295 . . . . . . . . 9  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  ( 3  +  1 )
216 3p1e4 10660 . . . . . . . . 9  |-  ( 3  +  1 )  =  4
217215, 216eqtri 2496 . . . . . . . 8  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  4
218 4cn 10612 . . . . . . . . . . 11  |-  4  e.  CC
219218mulid1i 9597 . . . . . . . . . 10  |-  ( 4  x.  1 )  =  4
220219oveq1i 6293 . . . . . . . . 9  |-  ( ( 4  x.  1 )  +  0 )  =  ( 4  +  0 )
221218addid1i 9765 . . . . . . . . 9  |-  ( 4  +  0 )  =  4
22233dec0h 10991 . . . . . . . . 9  |-  4  = ; 0 4
223220, 221, 2223eqtri 2500 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  0 )  = ; 0
4
22432, 33, 9, 42, 209, 212, 9, 33, 42, 217, 223decmac 11014 . . . . . . 7  |-  ( (; 3
4  x.  1 )  +  ( 3  +  7 ) )  = ; 4
4
2253dec0h 10991 . . . . . . . 8  |-  2  = ; 0 2
226106, 155oveq12i 6295 . . . . . . . . 9  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  ( 6  +  1 )
227 6p1e7 10663 . . . . . . . . 9  |-  ( 6  +  1 )  =  7
228226, 227eqtri 2496 . . . . . . . 8  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  7
229 4t2e8 10688 . . . . . . . . . 10  |-  ( 4  x.  2 )  =  8
230229oveq1i 6293 . . . . . . . . 9  |-  ( ( 4  x.  2 )  +  2 )  =  ( 8  +  2 )
231 8p2e10 10681 . . . . . . . . 9  |-  ( 8  +  2 )  =  10
232230, 231, 873eqtri 2500 . . . . . . . 8  |-  ( ( 4  x.  2 )  +  2 )  = ; 1
0
23332, 33, 42, 3, 209, 225, 3, 42, 9, 228, 232decmac 11014 . . . . . . 7  |-  ( (; 3
4  x.  2 )  +  2 )  = ; 7
0
2349, 3, 32, 3, 119, 208, 34, 42, 38, 224, 233decma2c 11015 . . . . . 6  |-  ( (; 3
4  x. ; 1 2 )  +  (; 1 5  + ; 1 7 ) )  = ;; 4 4 0
23560addid2i 9766 . . . . . . . . 9  |-  ( 0  +  2 )  =  2
236235oveq2i 6294 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  =  ( ( 3  x.  5 )  +  2 )
237 5t3e15 11049 . . . . . . . . . 10  |-  ( 5  x.  3 )  = ; 1
5
23897, 105, 237mulcomli 9602 . . . . . . . . 9  |-  ( 3  x.  5 )  = ; 1
5
239 5p2e7 10672 . . . . . . . . 9  |-  ( 5  +  2 )  =  7
2409, 12, 3, 238, 239decaddi 11019 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  2 )  = ; 1
7
241236, 240eqtri 2496 . . . . . . 7  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  = ; 1
7
242 5t4e20 11050 . . . . . . . . 9  |-  ( 5  x.  4 )  = ; 2
0
24397, 218, 242mulcomli 9602 . . . . . . . 8  |-  ( 4  x.  5 )  = ; 2
0
24464addid2i 9766 . . . . . . . 8  |-  ( 0  +  6 )  =  6
2453, 42, 2, 243, 244decaddi 11019 . . . . . . 7  |-  ( ( 4  x.  5 )  +  6 )  = ; 2
6
24632, 33, 42, 2, 209, 108, 12, 2, 3, 241, 245decmac 11014 . . . . . 6  |-  ( (; 3
4  x.  5 )  +  6 )  = ;; 1 7 6
24711, 12, 49, 2, 117, 203, 34, 2, 39, 234, 246decma2c 11015 . . . . 5  |-  ( (; 3
4  x. ;; 1 2 5 )  +  (;; 1 2 5  + ; 3 1 ) )  = ;;; 4 4 0 6
24814dec0h 10991 . . . . . 6  |-  8  = ; 0 8
249218addid2i 9766 . . . . . . . 8  |-  ( 0  +  4 )  =  4
250249oveq2i 6294 . . . . . . 7  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  =  ( ( 3  x.  9 )  +  4 )
251 9cn 10622 . . . . . . . . 9  |-  9  e.  CC
252 9t3e27 11071 . . . . . . . . 9  |-  ( 9  x.  3 )  = ; 2
7
253251, 105, 252mulcomli 9602 . . . . . . . 8  |-  ( 3  x.  9 )  = ; 2
7
254 7p4e11 11027 . . . . . . . 8  |-  ( 7  +  4 )  = ; 1
1
2553, 38, 33, 253, 76, 9, 254decaddci 11020 . . . . . . 7  |-  ( ( 3  x.  9 )  +  4 )  = ; 3
1
256250, 255eqtri 2496 . . . . . 6  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  = ; 3
1
257 9t4e36 11072 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
258251, 218, 257mulcomli 9602 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
259161, 64, 182addcomli 9770 . . . . . . 7  |-  ( 6  +  8 )  = ; 1
4
26032, 2, 14, 258, 216, 33, 259decaddci 11020 . . . . . 6  |-  ( ( 4  x.  9 )  +  8 )  = ; 4
4
26132, 33, 42, 14, 209, 248, 5, 33, 33, 256, 260decmac 11014 . . . . 5  |-  ( (; 3
4  x.  9 )  +  8 )  = ;; 3 1 4
26213, 5, 13, 14, 10, 25, 34, 33, 197, 247, 261decma2c 11015 . . . 4  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  = ;;;; 4 4 0 6 4
263 eqid 2467 . . . . 5  |- ;; 1 3 6  = ;; 1 3 6
2649, 5deccl 10989 . . . . . 6  |- ; 1 9  e.  NN0
265264, 33deccl 10989 . . . . 5  |- ;; 1 9 4  e.  NN0
266 eqid 2467 . . . . . 6  |- ; 1 3  = ; 1 3
267 eqid 2467 . . . . . 6  |- ;; 1 9 4  = ;; 1 9 4
2685, 38deccl 10989 . . . . . 6  |- ; 9 7  e.  NN0
2699, 9deccl 10989 . . . . . . 7  |- ; 1 1  e.  NN0
270 eqid 2467 . . . . . . 7  |- ;; 3 2 4  = ;; 3 2 4
271 eqid 2467 . . . . . . . 8  |- ; 1 9  = ; 1 9
272 eqid 2467 . . . . . . . 8  |- ; 9 7  = ; 9 7
273251, 22, 126addcomli 9770 . . . . . . . . . 10  |-  ( 1  +  9 )  =  10
274273, 87eqtri 2496 . . . . . . . . 9  |-  ( 1  +  9 )  = ; 1
0
2759, 42, 155, 274decsuc 10998 . . . . . . . 8  |-  ( ( 1  +  9 )  +  1 )  = ; 1
1
276 9p7e16 11042 . . . . . . . 8  |-  ( 9  +  7 )  = ; 1
6
2779, 5, 5, 38, 271, 272, 275, 2, 276decaddc 11017 . . . . . . 7  |-  (; 1 9  + ; 9 7 )  = ;; 1 1 6
278 eqid 2467 . . . . . . . 8  |- ; 3 2  = ; 3 2
279 eqid 2467 . . . . . . . . 9  |- ; 1 1  = ; 1 1
2809, 9, 120, 279decsuc 10998 . . . . . . . 8  |-  (; 1 1  +  1 )  = ; 1 2
28194oveq1i 6293 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  2 )  =  ( 2  +  2 )
282281, 121, 2223eqtri 2500 . . . . . . . 8  |-  ( ( 2  x.  1 )  +  2 )  = ; 0
4
28332, 3, 9, 3, 278, 280, 9, 33, 42, 217, 282decmac 11014 . . . . . . 7  |-  ( (; 3
2  x.  1 )  +  (; 1 1  +  1 ) )  = ; 4 4
284219oveq1i 6293 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  6 )  =  ( 4  +  6 )
285 6p4e10 10678 . . . . . . . . 9  |-  ( 6  +  4 )  =  10
28664, 218, 285addcomli 9770 . . . . . . . 8  |-  ( 4  +  6 )  =  10
287284, 286, 873eqtri 2500 . . . . . . 7  |-  ( ( 4  x.  1 )  +  6 )  = ; 1
0
28836, 33, 269, 2, 270, 277, 9, 42, 9, 283, 287decmac 11014 . . . . . 6  |-  ( (;; 3 2 4  x.  1 )  +  (; 1
9  + ; 9 7 ) )  = ;; 4 4 0
289155, 148eqtri 2496 . . . . . . . 8  |-  ( 0  +  1 )  = ; 0
1
290 3t3e9 10687 . . . . . . . . . 10  |-  ( 3  x.  3 )  =  9
291290, 149oveq12i 6295 . . . . . . . . 9  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  ( 9  +  0 )
292251addid1i 9765 . . . . . . . . 9  |-  ( 9  +  0 )  =  9
293291, 292eqtri 2496 . . . . . . . 8  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  9
294107oveq1i 6293 . . . . . . . . 9  |-  ( ( 2  x.  3 )  +  1 )  =  ( 6  +  1 )
29538dec0h 10991 . . . . . . . . 9  |-  7  = ; 0 7
296294, 227, 2953eqtri 2500 . . . . . . . 8  |-  ( ( 2  x.  3 )  +  1 )  = ; 0
7
29732, 3, 42, 9, 278, 289, 32, 38, 42, 293, 296decmac 11014 . . . . . . 7  |-  ( (; 3
2  x.  3 )  +  ( 0  +  1 ) )  = ; 9
7
298 4t3e12 11047 . . . . . . . 8  |-  ( 4  x.  3 )  = ; 1
2
299 4p2e6 10669 . . . . . . . . 9  |-  ( 4  +  2 )  =  6
300218, 60, 299addcomli 9770 . . . . . . . 8  |-  ( 2  +  4 )  =  6
3019, 3, 33, 298, 300decaddi 11019 . . . . . . 7  |-  ( ( 4  x.  3 )  +  4 )  = ; 1
6
30236, 33, 42, 33, 270, 222, 32, 2, 9, 297, 301decmac 11014 . . . . . 6  |-  ( (;; 3 2 4  x.  3 )  +  4 )  = ;; 9 7 6
3039, 32, 264, 33, 266, 267, 37, 2, 268, 288, 302decma2c 11015 . . . . 5  |-  ( (;; 3 2 4  x. ; 1
3 )  + ;; 1 9 4 )  = ;;; 4 4 0 6
304155oveq2i 6294 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  =  ( ( 3  x.  6 )  +  1 )
305 6t3e18 11053 . . . . . . . . . 10  |-  ( 6  x.  3 )  = ; 1
8
30664, 105, 305mulcomli 9602 . . . . . . . . 9  |-  ( 3  x.  6 )  = ; 1
8
3079, 14, 15, 306decsuc 10998 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  1 )  = ; 1
9
308304, 307eqtri 2496 . . . . . . 7  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  = ; 1
9
3099, 3, 3, 66, 121decaddi 11019 . . . . . . 7  |-  ( ( 2  x.  6 )  +  2 )  = ; 1
4
31032, 3, 42, 3, 278, 225, 2, 33, 9, 308, 309decmac 11014 . . . . . 6  |-  ( (; 3
2  x.  6 )  +  2 )  = ;; 1 9 4
311 6t4e24 11054 . . . . . . 7  |-  ( 6  x.  4 )  = ; 2
4
31264, 218, 311mulcomli 9602 . . . . . 6  |-  ( 4  x.  6 )  = ; 2
4
3132, 36, 33, 270, 33, 3, 310, 312decmul1c 11022 . . . . 5  |-  (;; 3 2 4  x.  6 )  = ;;; 1 9 4 4
31437, 40, 2, 263, 33, 265, 303, 313decmul2c 11023 . . . 4  |-  (;; 3 2 4  x. ;; 1 3 6 )  = ;;;; 4 4 0 6 4
315262, 314eqtr4i 2499 . . 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 14412 . 2  |-  ( ( 2 ^;; 6 2 9 )  mod 
N )  =  ( ( N  -  1 )  mod  N )
317 eqid 2467 . . . 4  |- ;; 6 2 9  = ;; 6 2 9
318 eqid 2467 . . . . 5  |- ; 6 2  = ; 6 2
319149oveq2i 6294 . . . . . 6  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  =  ( ( 2  x.  6 )  +  0 )
32066oveq1i 6293 . . . . . 6  |-  ( ( 2  x.  6 )  +  0 )  =  (; 1 2  +  0 )
32111nn0cni 10806 . . . . . . 7  |- ; 1 2  e.  CC
322321addid1i 9765 . . . . . 6  |-  (; 1 2  +  0 )  = ; 1 2
323319, 320, 3223eqtri 2500 . . . . 5  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  = ; 1
2
32412dec0h 10991 . . . . . 6  |-  5  = ; 0 5
32584, 58, 3243eqtri 2500 . . . . 5  |-  ( ( 2  x.  2 )  +  1 )  = ; 0
5
3262, 3, 42, 9, 318, 148, 3, 12, 42, 323, 325decma2c 11015 . . . 4  |-  ( ( 2  x. ; 6 2 )  +  1 )  = ;; 1 2 5
327 9t2e18 11070 . . . . 5  |-  ( 9  x.  2 )  = ; 1
8
328251, 60, 327mulcomli 9602 . . . 4  |-  ( 2  x.  9 )  = ; 1
8
3293, 4, 5, 317, 14, 9, 326, 328decmul2c 11023 . . 3  |-  ( 2  x. ;; 6 2 9 )  = ;;; 1 2 5 8
330329, 25eqtr4i 2499 . 2  |-  ( 2  x. ;; 6 2 9 )  =  ( N  -  1 )
331 npcan 9828 . . 3  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( ( N  - 
1 )  +  1 )  =  N )
33270, 22, 331mp2an 672 . 2  |-  ( ( N  -  1 )  +  1 )  =  N
33371oveq1i 6293 . . 3  |-  ( ( 0  x.  N )  +  1 )  =  ( 0  +  1 )
334155, 333, 1713eqtr4i 2506 . 2  |-  ( ( 0  x.  N )  +  1 )  =  ( 1  x.  1 )
3351, 6, 7, 8, 9, 26, 316, 330, 332, 334mod2xnegi 14415 1  |-  ( ( 2 ^ ( N  -  1 ) )  mod  N )  =  ( 1  mod  N
)
Colors of variables: wff setvar class
Syntax hints:    = wceq 1379    e. wcel 1767  (class class class)co 6283   CCcc 9489   0cc0 9491   1c1 9492    + caddc 9494    x. cmul 9496    - cmin 9804   NNcn 10535   2c2 10584   3c3 10585   4c4 10586   5c5 10587   6c6 10588   7c7 10589   8c8 10590   9c9 10591   10c10 10592   NN0cn0 10794  ;cdc 10975    mod cmo 11963   ^cexp 12133
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6575  ax-cnex 9547  ax-resscn 9548  ax-1cn 9549  ax-icn 9550  ax-addcl 9551  ax-addrcl 9552  ax-mulcl 9553  ax-mulrcl 9554  ax-mulcom 9555  ax-addass 9556  ax-mulass 9557  ax-distr 9558  ax-i2m1 9559  ax-1ne0 9560  ax-1rid 9561  ax-rnegex 9562  ax-rrecex 9563  ax-cnre 9564  ax-pre-lttri 9565  ax-pre-lttrn 9566  ax-pre-ltadd 9567  ax-pre-mulgt0 9568  ax-pre-sup 9569
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rmo 2822  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5550  df-fun 5589  df-fn 5590  df-f 5591  df-f1 5592  df-fo 5593  df-f1o 5594  df-fv 5595  df-riota 6244  df-ov 6286  df-oprab 6287  df-mpt2 6288  df-om 6680  df-2nd 6785  df-recs 7042  df-rdg 7076  df-er 7311  df-en 7517  df-dom 7518  df-sdom 7519  df-sup 7900  df-pnf 9629  df-mnf 9630  df-xr 9631  df-ltxr 9632  df-le 9633  df-sub 9806  df-neg 9807  df-div 10206  df-nn 10536  df-2 10593  df-3 10594  df-4 10595  df-5 10596  df-6 10597  df-7 10598  df-8 10599  df-9 10600  df-10 10601  df-n0 10795  df-z 10864  df-dec 10976  df-uz 11082  df-rp 11220  df-fl 11896  df-mod 11964  df-seq 12075  df-exp 12134
This theorem is referenced by:  1259prm  14475
  Copyright terms: Public domain W3C validator