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

Theorem 1259lem4 15068
Description: Lemma for 1259prm 15070. 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 10767 . 2  |-  2  e.  NN
2 6nn0 10890 . . . 4  |-  6  e.  NN0
3 2nn0 10886 . . . 4  |-  2  e.  NN0
42, 3deccl 11065 . . 3  |- ; 6 2  e.  NN0
5 9nn0 10893 . . 3  |-  9  e.  NN0
64, 5deccl 11065 . 2  |- ;; 6 2 9  e.  NN0
7 0z 10948 . 2  |-  0  e.  ZZ
8 1nn 10620 . 2  |-  1  e.  NN
9 1nn0 10885 . 2  |-  1  e.  NN0
10 1259prm.1 . . . . . 6  |-  N  = ;;; 1 2 5 9
119, 3deccl 11065 . . . . . . . 8  |- ; 1 2  e.  NN0
12 5nn0 10889 . . . . . . . 8  |-  5  e.  NN0
1311, 12deccl 11065 . . . . . . 7  |- ;; 1 2 5  e.  NN0
14 8nn0 10892 . . . . . . 7  |-  8  e.  NN0
15 8p1e9 10740 . . . . . . 7  |-  ( 8  +  1 )  =  9
16 eqid 2429 . . . . . . 7  |- ;;; 1 2 5 8  = ;;; 1 2 5 8
1713, 14, 15, 16decsuc 11074 . . . . . 6  |-  (;;; 1 2 5 8  +  1 )  = ;;; 1 2 5 9
1810, 17eqtr4i 2461 . . . . 5  |-  N  =  (;;; 1 2 5 8  +  1 )
1918oveq1i 6315 . . . 4  |-  ( N  -  1 )  =  ( (;;; 1 2 5 8  +  1 )  - 
1 )
2013, 14deccl 11065 . . . . . 6  |- ;;; 1 2 5 8  e.  NN0
2120nn0cni 10881 . . . . 5  |- ;;; 1 2 5 8  e.  CC
22 ax-1cn 9596 . . . . 5  |-  1  e.  CC
2321, 22pncan3oi 9890 . . . 4  |-  ( (;;; 1 2 5 8  +  1 )  -  1 )  = ;;; 1 2 5 8
2419, 23eqtri 2458 . . 3  |-  ( N  -  1 )  = ;;; 1 2 5 8
2524, 20eqeltri 2513 . 2  |-  ( N  -  1 )  e. 
NN0
26 9nn 10774 . . . . 5  |-  9  e.  NN
2713, 26decnncl 11064 . . . 4  |- ;;; 1 2 5 9  e.  NN
2810, 27eqeltri 2513 . . 3  |-  N  e.  NN
292, 9deccl 11065 . . . 4  |- ; 6 1  e.  NN0
3029, 3deccl 11065 . . 3  |- ;; 6 1 2  e.  NN0
31 3nn0 10887 . . . . 5  |-  3  e.  NN0
32 4nn0 10888 . . . . 5  |-  4  e.  NN0
3331, 32deccl 11065 . . . 4  |- ; 3 4  e.  NN0
3433nn0zi 10962 . . 3  |- ; 3 4  e.  ZZ
3531, 3deccl 11065 . . . 4  |- ; 3 2  e.  NN0
3635, 32deccl 11065 . . 3  |- ;; 3 2 4  e.  NN0
37 7nn0 10891 . . . 4  |-  7  e.  NN0
389, 37deccl 11065 . . 3  |- ; 1 7  e.  NN0
399, 31deccl 11065 . . . 4  |- ; 1 3  e.  NN0
4039, 2deccl 11065 . . 3  |- ;; 1 3 6  e.  NN0
41 0nn0 10884 . . . . . 6  |-  0  e.  NN0
4231, 41deccl 11065 . . . . 5  |- ; 3 0  e.  NN0
4342, 2deccl 11065 . . . 4  |- ;; 3 0 6  e.  NN0
44 8nn 10773 . . . . 5  |-  8  e.  NN
459, 44decnncl 11064 . . . 4  |- ; 1 8  e.  NN
4611, 32deccl 11065 . . . . 5  |- ;; 1 2 4  e.  NN0
4746, 9deccl 11065 . . . 4  |- ;;; 1 2 4 1  e.  NN0
489, 12deccl 11065 . . . . . 6  |- ; 1 5  e.  NN0
4948, 31deccl 11065 . . . . 5  |- ;; 1 5 3  e.  NN0
50 1z 10967 . . . . 5  |-  1  e.  ZZ
5112, 41deccl 11065 . . . . 5  |- ; 5 0  e.  NN0
5248, 3deccl 11065 . . . . . 6  |- ;; 1 5 2  e.  NN0
533, 12deccl 11065 . . . . . 6  |- ; 2 5  e.  NN0
5437, 2deccl 11065 . . . . . . 7  |- ; 7 6  e.  NN0
55101259lem3 15067 . . . . . . 7  |-  ( ( 2 ^; 7 6 )  mod 
N )  =  ( 5  mod  N )
56 eqid 2429 . . . . . . . 8  |- ; 7 6  = ; 7 6
57 4p1e5 10736 . . . . . . . . 9  |-  ( 4  +  1 )  =  5
58 7cn 10693 . . . . . . . . . 10  |-  7  e.  CC
59 2cn 10680 . . . . . . . . . 10  |-  2  e.  CC
60 7t2e14 11133 . . . . . . . . . 10  |-  ( 7  x.  2 )  = ; 1
4
6158, 59, 60mulcomli 9649 . . . . . . . . 9  |-  ( 2  x.  7 )  = ; 1
4
629, 32, 57, 61decsuc 11074 . . . . . . . 8  |-  ( ( 2  x.  7 )  +  1 )  = ; 1
5
63 6cn 10691 . . . . . . . . 9  |-  6  e.  CC
64 6t2e12 11128 . . . . . . . . 9  |-  ( 6  x.  2 )  = ; 1
2
6563, 59, 64mulcomli 9649 . . . . . . . 8  |-  ( 2  x.  6 )  = ; 1
2
663, 37, 2, 56, 3, 9, 62, 65decmul2c 11099 . . . . . . 7  |-  ( 2  x. ; 7 6 )  = ;; 1 5 2
6753nn0cni 10881 . . . . . . . . 9  |- ; 2 5  e.  CC
6867addid2i 9820 . . . . . . . 8  |-  ( 0  + ; 2 5 )  = ; 2
5
6928nncni 10619 . . . . . . . . . 10  |-  N  e.  CC
7069mul02i 9821 . . . . . . . . 9  |-  ( 0  x.  N )  =  0
7170oveq1i 6315 . . . . . . . 8  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 0  + ; 2 5 )
72 5t5e25 11127 . . . . . . . 8  |-  ( 5  x.  5 )  = ; 2
5
7368, 71, 723eqtr4i 2468 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 5  x.  5 )
7428, 1, 54, 7, 12, 53, 55, 66, 73mod2xi 15004 . . . . . 6  |-  ( ( 2 ^;; 1 5 2 )  mod 
N )  =  (; 2
5  mod  N )
75 2p1e3 10733 . . . . . . 7  |-  ( 2  +  1 )  =  3
76 eqid 2429 . . . . . . 7  |- ;; 1 5 2  = ;; 1 5 2
7748, 3, 75, 76decsuc 11074 . . . . . 6  |-  (;; 1 5 2  +  1 )  = ;; 1 5 3
7851nn0cni 10881 . . . . . . . 8  |- ; 5 0  e.  CC
7978addid2i 9820 . . . . . . 7  |-  ( 0  + ; 5 0 )  = ; 5
0
8070oveq1i 6315 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 5 0 )  =  ( 0  + ; 5 0 )
81 eqid 2429 . . . . . . . 8  |- ; 2 5  = ; 2 5
82 2t2e4 10759 . . . . . . . . . 10  |-  ( 2  x.  2 )  =  4
8382oveq1i 6315 . . . . . . . . 9  |-  ( ( 2  x.  2 )  +  1 )  =  ( 4  +  1 )
8483, 57eqtri 2458 . . . . . . . 8  |-  ( ( 2  x.  2 )  +  1 )  =  5
85 5t2e10 10764 . . . . . . . . 9  |-  ( 5  x.  2 )  =  10
86 dec10 11081 . . . . . . . . 9  |-  10  = ; 1 0
8785, 86eqtri 2458 . . . . . . . 8  |-  ( 5  x.  2 )  = ; 1
0
883, 3, 12, 81, 41, 9, 84, 87decmul1c 11098 . . . . . . 7  |-  (; 2 5  x.  2 )  = ; 5 0
8979, 80, 883eqtr4i 2468 . . . . . 6  |-  ( ( 0  x.  N )  + ; 5 0 )  =  (; 2 5  x.  2 )
9028, 1, 52, 7, 53, 51, 74, 77, 89modxp1i 15005 . . . . 5  |-  ( ( 2 ^;; 1 5 3 )  mod 
N )  =  (; 5
0  mod  N )
91 eqid 2429 . . . . . 6  |- ;; 1 5 3  = ;; 1 5 3
92 eqid 2429 . . . . . . . . 9  |- ; 1 5  = ; 1 5
9359mulid1i 9644 . . . . . . . . . . 11  |-  ( 2  x.  1 )  =  2
9493oveq1i 6315 . . . . . . . . . 10  |-  ( ( 2  x.  1 )  +  1 )  =  ( 2  +  1 )
9594, 75eqtri 2458 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  1 )  =  3
96 5cn 10689 . . . . . . . . . . 11  |-  5  e.  CC
9796, 59, 85mulcomli 9649 . . . . . . . . . 10  |-  ( 2  x.  5 )  =  10
9897, 86eqtri 2458 . . . . . . . . 9  |-  ( 2  x.  5 )  = ; 1
0
993, 9, 12, 92, 41, 9, 95, 98decmul2c 11099 . . . . . . . 8  |-  ( 2  x. ; 1 5 )  = ; 3
0
10099oveq1i 6315 . . . . . . 7  |-  ( ( 2  x. ; 1 5 )  +  0 )  =  (; 3
0  +  0 )
10142nn0cni 10881 . . . . . . . 8  |- ; 3 0  e.  CC
102101addid1i 9819 . . . . . . 7  |-  (; 3 0  +  0 )  = ; 3 0
103100, 102eqtri 2458 . . . . . 6  |-  ( ( 2  x. ; 1 5 )  +  0 )  = ; 3 0
104 3cn 10684 . . . . . . . 8  |-  3  e.  CC
105 3t2e6 10761 . . . . . . . 8  |-  ( 3  x.  2 )  =  6
106104, 59, 105mulcomli 9649 . . . . . . 7  |-  ( 2  x.  3 )  =  6
1072dec0h 11067 . . . . . . 7  |-  6  = ; 0 6
108106, 107eqtri 2458 . . . . . 6  |-  ( 2  x.  3 )  = ; 0
6
1093, 48, 31, 91, 2, 41, 103, 108decmul2c 11099 . . . . 5  |-  ( 2  x. ;; 1 5 3 )  = ;; 3 0 6
11069mulid2i 9645 . . . . . . . 8  |-  ( 1  x.  N )  =  N
111110, 10eqtri 2458 . . . . . . 7  |-  ( 1  x.  N )  = ;;; 1 2 5 9
112 eqid 2429 . . . . . . 7  |- ;;; 1 2 4 1  = ;;; 1 2 4 1
1133, 32deccl 11065 . . . . . . . 8  |- ; 2 4  e.  NN0
114 eqid 2429 . . . . . . . . 9  |- ; 2 4  = ; 2 4
1153, 32, 57, 114decsuc 11074 . . . . . . . 8  |-  (; 2 4  +  1 )  = ; 2 5
116 eqid 2429 . . . . . . . . 9  |- ;; 1 2 5  = ;; 1 2 5
117 eqid 2429 . . . . . . . . 9  |- ;; 1 2 4  = ;; 1 2 4
118 eqid 2429 . . . . . . . . . 10  |- ; 1 2  = ; 1 2
119 1p1e2 10723 . . . . . . . . . 10  |-  ( 1  +  1 )  =  2
120 2p2e4 10727 . . . . . . . . . 10  |-  ( 2  +  2 )  =  4
1219, 3, 9, 3, 118, 118, 119, 120decadd 11092 . . . . . . . . 9  |-  (; 1 2  + ; 1 2 )  = ; 2
4
122 5p4e9 10749 . . . . . . . . 9  |-  ( 5  +  4 )  =  9
12311, 12, 11, 32, 116, 117, 121, 122decadd 11092 . . . . . . . 8  |-  (;; 1 2 5  + ;; 1 2 4 )  = ;; 2 4 9
124113, 115, 123decsucc 11078 . . . . . . 7  |-  ( (;; 1 2 5  + ;; 1 2 4 )  +  1 )  = ;; 2 5 0
125 9p1e10 10741 . . . . . . 7  |-  ( 9  +  1 )  =  10
12613, 5, 46, 9, 111, 112, 124, 125decaddc2 11094 . . . . . 6  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  = ;;; 2 5 0 0
127 eqid 2429 . . . . . . 7  |- ; 5 0  = ; 5 0
12872oveq1i 6315 . . . . . . . . . . 11  |-  ( ( 5  x.  5 )  +  0 )  =  (; 2 5  +  0 )
12967addid1i 9819 . . . . . . . . . . 11  |-  (; 2 5  +  0 )  = ; 2 5
130128, 129eqtri 2458 . . . . . . . . . 10  |-  ( ( 5  x.  5 )  +  0 )  = ; 2
5
13196mul02i 9821 . . . . . . . . . . 11  |-  ( 0  x.  5 )  =  0
13241dec0h 11067 . . . . . . . . . . 11  |-  0  = ; 0 0
133131, 132eqtri 2458 . . . . . . . . . 10  |-  ( 0  x.  5 )  = ; 0
0
13412, 12, 41, 127, 41, 41, 130, 133decmul1c 11098 . . . . . . . . 9  |-  (; 5 0  x.  5 )  = ;; 2 5 0
135134oveq1i 6315 . . . . . . . 8  |-  ( (; 5
0  x.  5 )  +  0 )  =  (;; 2 5 0  +  0 )
13653, 41deccl 11065 . . . . . . . . . 10  |- ;; 2 5 0  e.  NN0
137136nn0cni 10881 . . . . . . . . 9  |- ;; 2 5 0  e.  CC
138137addid1i 9819 . . . . . . . 8  |-  (;; 2 5 0  +  0 )  = ;; 2 5 0
139135, 138eqtri 2458 . . . . . . 7  |-  ( (; 5
0  x.  5 )  +  0 )  = ;; 2 5 0
14078mul01i 9822 . . . . . . . 8  |-  (; 5 0  x.  0 )  =  0
141140, 132eqtri 2458 . . . . . . 7  |-  (; 5 0  x.  0 )  = ; 0 0
14251, 12, 41, 127, 41, 41, 139, 141decmul2c 11099 . . . . . 6  |-  (; 5 0  x. ; 5 0 )  = ;;; 2 5 0 0
143126, 142eqtr4i 2461 . . . . 5  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  =  (; 5 0  x. ; 5 0 )
14428, 1, 49, 50, 51, 47, 90, 109, 143mod2xi 15004 . . . 4  |-  ( ( 2 ^;; 3 0 6 )  mod 
N )  =  (;;; 1 2 4 1  mod 
N )
145 eqid 2429 . . . . 5  |- ;; 3 0 6  = ;; 3 0 6
146 eqid 2429 . . . . . 6  |- ; 3 0  = ; 3 0
1479dec0h 11067 . . . . . 6  |-  1  = ; 0 1
148 00id 9807 . . . . . . . 8  |-  ( 0  +  0 )  =  0
149106, 148oveq12i 6317 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  ( 6  +  0 )
15063addid1i 9819 . . . . . . 7  |-  ( 6  +  0 )  =  6
151149, 150eqtri 2458 . . . . . 6  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  6
15259mul01i 9822 . . . . . . . 8  |-  ( 2  x.  0 )  =  0
153152oveq1i 6315 . . . . . . 7  |-  ( ( 2  x.  0 )  +  1 )  =  ( 0  +  1 )
154 0p1e1 10721 . . . . . . 7  |-  ( 0  +  1 )  =  1
155153, 154, 1473eqtri 2462 . . . . . 6  |-  ( ( 2  x.  0 )  +  1 )  = ; 0
1
15631, 41, 41, 9, 146, 147, 3, 9, 41, 151, 155decma2c 11091 . . . . 5  |-  ( ( 2  x. ; 3 0 )  +  1 )  = ; 6 1
1573, 42, 2, 145, 3, 9, 156, 65decmul2c 11099 . . . 4  |-  ( 2  x. ;; 3 0 6 )  = ;; 6 1 2
158 eqid 2429 . . . . . 6  |- ; 1 8  = ; 1 8
15911, 32, 57, 117decsuc 11074 . . . . . 6  |-  (;; 1 2 4  +  1 )  = ;; 1 2 5
160 8cn 10695 . . . . . . 7  |-  8  e.  CC
161160, 22, 15addcomli 9824 . . . . . 6  |-  ( 1  +  8 )  =  9
16246, 9, 9, 14, 112, 158, 159, 161decadd 11092 . . . . 5  |-  (;;; 1 2 4 1  + ; 1 8 )  = ;;; 1 2 5 9
163162, 10eqtr4i 2461 . . . 4  |-  (;;; 1 2 4 1  + ; 1 8 )  =  N
16436nn0cni 10881 . . . . . 6  |- ;; 3 2 4  e.  CC
165164addid2i 9820 . . . . 5  |-  ( 0  + ;; 3 2 4 )  = ;; 3 2 4
16670oveq1i 6315 . . . . 5  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  ( 0  + ;; 3 2 4 )
1679, 14deccl 11065 . . . . . 6  |- ; 1 8  e.  NN0
1689, 32deccl 11065 . . . . . 6  |- ; 1 4  e.  NN0
169 eqid 2429 . . . . . . 7  |- ; 1 4  = ; 1 4
17022mulid1i 9644 . . . . . . . . 9  |-  ( 1  x.  1 )  =  1
171170, 119oveq12i 6317 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  ( 1  +  2 )
172 1p2e3 10734 . . . . . . . 8  |-  ( 1  +  2 )  =  3
173171, 172eqtri 2458 . . . . . . 7  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  3
174160mulid1i 9644 . . . . . . . . 9  |-  ( 8  x.  1 )  =  8
175174oveq1i 6315 . . . . . . . 8  |-  ( ( 8  x.  1 )  +  4 )  =  ( 8  +  4 )
176 8p4e12 11108 . . . . . . . 8  |-  ( 8  +  4 )  = ; 1
2
177175, 176eqtri 2458 . . . . . . 7  |-  ( ( 8  x.  1 )  +  4 )  = ; 1
2
1789, 14, 9, 32, 158, 169, 9, 3, 9, 173, 177decmac 11090 . . . . . 6  |-  ( (; 1
8  x.  1 )  + ; 1 4 )  = ; 3
2
179160mulid2i 9645 . . . . . . . . 9  |-  ( 1  x.  8 )  =  8
180179oveq1i 6315 . . . . . . . 8  |-  ( ( 1  x.  8 )  +  6 )  =  ( 8  +  6 )
181 8p6e14 11110 . . . . . . . 8  |-  ( 8  +  6 )  = ; 1
4
182180, 181eqtri 2458 . . . . . . 7  |-  ( ( 1  x.  8 )  +  6 )  = ; 1
4
183 8t8e64 11145 . . . . . . 7  |-  ( 8  x.  8 )  = ; 6
4
18414, 9, 14, 158, 32, 2, 182, 183decmul1c 11098 . . . . . 6  |-  (; 1 8  x.  8 )  = ;; 1 4 4
185167, 9, 14, 158, 32, 168, 178, 184decmul2c 11099 . . . . 5  |-  (; 1 8  x. ; 1 8 )  = ;; 3 2 4
186165, 166, 1853eqtr4i 2468 . . . 4  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  (; 1
8  x. ; 1 8 )
1871, 43, 7, 45, 36, 47, 144, 157, 163, 186mod2xnegi 15006 . . 3  |-  ( ( 2 ^;; 6 1 2 )  mod 
N )  =  (;; 3 2 4  mod 
N )
188101259lem1 15065 . . 3  |-  ( ( 2 ^; 1 7 )  mod 
N )  =  (;; 1 3 6  mod 
N )
189 eqid 2429 . . . 4  |- ;; 6 1 2  = ;; 6 1 2
190 eqid 2429 . . . 4  |- ; 1 7  = ; 1 7
191 eqid 2429 . . . . 5  |- ; 6 1  = ; 6 1
1922, 9, 119, 191decsuc 11074 . . . 4  |-  (; 6 1  +  1 )  = ; 6 2
193 7p2e9 10754 . . . . 5  |-  ( 7  +  2 )  =  9
19458, 59, 193addcomli 9824 . . . 4  |-  ( 2  +  7 )  =  9
19529, 3, 9, 37, 189, 190, 192, 194decadd 11092 . . 3  |-  (;; 6 1 2  + ; 1 7 )  = ;; 6 2 9
19631, 9deccl 11065 . . . . 5  |- ; 3 1  e.  NN0
197 eqid 2429 . . . . . . 7  |- ; 3 1  = ; 3 1
198 3p2e5 10742 . . . . . . . . 9  |-  ( 3  +  2 )  =  5
199104, 59, 198addcomli 9824 . . . . . . . 8  |-  ( 2  +  3 )  =  5
2009, 3, 31, 118, 199decaddi 11095 . . . . . . 7  |-  (; 1 2  +  3 )  = ; 1 5
201 5p1e6 10737 . . . . . . 7  |-  ( 5  +  1 )  =  6
20211, 12, 31, 9, 116, 197, 200, 201decadd 11092 . . . . . 6  |-  (;; 1 2 5  + ; 3 1 )  = ;; 1 5 6
203119oveq1i 6315 . . . . . . . . 9  |-  ( ( 1  +  1 )  +  1 )  =  ( 2  +  1 )
204203, 75eqtri 2458 . . . . . . . 8  |-  ( ( 1  +  1 )  +  1 )  =  3
205 7p5e12 11104 . . . . . . . . 9  |-  ( 7  +  5 )  = ; 1
2
20658, 96, 205addcomli 9824 . . . . . . . 8  |-  ( 5  +  7 )  = ; 1
2
2079, 12, 9, 37, 92, 190, 204, 3, 206decaddc 11093 . . . . . . 7  |-  (; 1 5  + ; 1 7 )  = ; 3
2
208 eqid 2429 . . . . . . . 8  |- ; 3 4  = ; 3 4
209 7p3e10 10755 . . . . . . . . . 10  |-  ( 7  +  3 )  =  10
21058, 104, 209addcomli 9824 . . . . . . . . 9  |-  ( 3  +  7 )  =  10
211210, 86eqtri 2458 . . . . . . . 8  |-  ( 3  +  7 )  = ; 1
0
212104mulid1i 9644 . . . . . . . . . 10  |-  ( 3  x.  1 )  =  3
21322addid1i 9819 . . . . . . . . . 10  |-  ( 1  +  0 )  =  1
214212, 213oveq12i 6317 . . . . . . . . 9  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  ( 3  +  1 )
215 3p1e4 10735 . . . . . . . . 9  |-  ( 3  +  1 )  =  4
216214, 215eqtri 2458 . . . . . . . 8  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  4
217 4cn 10687 . . . . . . . . . . 11  |-  4  e.  CC
218217mulid1i 9644 . . . . . . . . . 10  |-  ( 4  x.  1 )  =  4
219218oveq1i 6315 . . . . . . . . 9  |-  ( ( 4  x.  1 )  +  0 )  =  ( 4  +  0 )
220217addid1i 9819 . . . . . . . . 9  |-  ( 4  +  0 )  =  4
22132dec0h 11067 . . . . . . . . 9  |-  4  = ; 0 4
222219, 220, 2213eqtri 2462 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  0 )  = ; 0
4
22331, 32, 9, 41, 208, 211, 9, 32, 41, 216, 222decmac 11090 . . . . . . 7  |-  ( (; 3
4  x.  1 )  +  ( 3  +  7 ) )  = ; 4
4
2243dec0h 11067 . . . . . . . 8  |-  2  = ; 0 2
225105, 154oveq12i 6317 . . . . . . . . 9  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  ( 6  +  1 )
226 6p1e7 10738 . . . . . . . . 9  |-  ( 6  +  1 )  =  7
227225, 226eqtri 2458 . . . . . . . 8  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  7
228 4t2e8 10763 . . . . . . . . . 10  |-  ( 4  x.  2 )  =  8
229228oveq1i 6315 . . . . . . . . 9  |-  ( ( 4  x.  2 )  +  2 )  =  ( 8  +  2 )
230 8p2e10 10756 . . . . . . . . 9  |-  ( 8  +  2 )  =  10
231229, 230, 863eqtri 2462 . . . . . . . 8  |-  ( ( 4  x.  2 )  +  2 )  = ; 1
0
23231, 32, 41, 3, 208, 224, 3, 41, 9, 227, 231decmac 11090 . . . . . . 7  |-  ( (; 3
4  x.  2 )  +  2 )  = ; 7
0
2339, 3, 31, 3, 118, 207, 33, 41, 37, 223, 232decma2c 11091 . . . . . 6  |-  ( (; 3
4  x. ; 1 2 )  +  (; 1 5  + ; 1 7 ) )  = ;; 4 4 0
23459addid2i 9820 . . . . . . . . 9  |-  ( 0  +  2 )  =  2
235234oveq2i 6316 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  =  ( ( 3  x.  5 )  +  2 )
236 5t3e15 11125 . . . . . . . . . 10  |-  ( 5  x.  3 )  = ; 1
5
23796, 104, 236mulcomli 9649 . . . . . . . . 9  |-  ( 3  x.  5 )  = ; 1
5
238 5p2e7 10747 . . . . . . . . 9  |-  ( 5  +  2 )  =  7
2399, 12, 3, 237, 238decaddi 11095 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  2 )  = ; 1
7
240235, 239eqtri 2458 . . . . . . 7  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  = ; 1
7
241 5t4e20 11126 . . . . . . . . 9  |-  ( 5  x.  4 )  = ; 2
0
24296, 217, 241mulcomli 9649 . . . . . . . 8  |-  ( 4  x.  5 )  = ; 2
0
24363addid2i 9820 . . . . . . . 8  |-  ( 0  +  6 )  =  6
2443, 41, 2, 242, 243decaddi 11095 . . . . . . 7  |-  ( ( 4  x.  5 )  +  6 )  = ; 2
6
24531, 32, 41, 2, 208, 107, 12, 2, 3, 240, 244decmac 11090 . . . . . 6  |-  ( (; 3
4  x.  5 )  +  6 )  = ;; 1 7 6
24611, 12, 48, 2, 116, 202, 33, 2, 38, 233, 245decma2c 11091 . . . . 5  |-  ( (; 3
4  x. ;; 1 2 5 )  +  (;; 1 2 5  + ; 3 1 ) )  = ;;; 4 4 0 6
24714dec0h 11067 . . . . . 6  |-  8  = ; 0 8
248217addid2i 9820 . . . . . . . 8  |-  ( 0  +  4 )  =  4
249248oveq2i 6316 . . . . . . 7  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  =  ( ( 3  x.  9 )  +  4 )
250 9cn 10697 . . . . . . . . 9  |-  9  e.  CC
251 9t3e27 11147 . . . . . . . . 9  |-  ( 9  x.  3 )  = ; 2
7
252250, 104, 251mulcomli 9649 . . . . . . . 8  |-  ( 3  x.  9 )  = ; 2
7
253 7p4e11 11103 . . . . . . . 8  |-  ( 7  +  4 )  = ; 1
1
2543, 37, 32, 252, 75, 9, 253decaddci 11096 . . . . . . 7  |-  ( ( 3  x.  9 )  +  4 )  = ; 3
1
255249, 254eqtri 2458 . . . . . 6  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  = ; 3
1
256 9t4e36 11148 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
257250, 217, 256mulcomli 9649 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
258160, 63, 181addcomli 9824 . . . . . . 7  |-  ( 6  +  8 )  = ; 1
4
25931, 2, 14, 257, 215, 32, 258decaddci 11096 . . . . . 6  |-  ( ( 4  x.  9 )  +  8 )  = ; 4
4
26031, 32, 41, 14, 208, 247, 5, 32, 32, 255, 259decmac 11090 . . . . 5  |-  ( (; 3
4  x.  9 )  +  8 )  = ;; 3 1 4
26113, 5, 13, 14, 10, 24, 33, 32, 196, 246, 260decma2c 11091 . . . 4  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  = ;;;; 4 4 0 6 4
262 eqid 2429 . . . . 5  |- ;; 1 3 6  = ;; 1 3 6
2639, 5deccl 11065 . . . . . 6  |- ; 1 9  e.  NN0
264263, 32deccl 11065 . . . . 5  |- ;; 1 9 4  e.  NN0
265 eqid 2429 . . . . . 6  |- ; 1 3  = ; 1 3
266 eqid 2429 . . . . . 6  |- ;; 1 9 4  = ;; 1 9 4
2675, 37deccl 11065 . . . . . 6  |- ; 9 7  e.  NN0
2689, 9deccl 11065 . . . . . . 7  |- ; 1 1  e.  NN0
269 eqid 2429 . . . . . . 7  |- ;; 3 2 4  = ;; 3 2 4
270 eqid 2429 . . . . . . . 8  |- ; 1 9  = ; 1 9
271 eqid 2429 . . . . . . . 8  |- ; 9 7  = ; 9 7
272250, 22, 125addcomli 9824 . . . . . . . . . 10  |-  ( 1  +  9 )  =  10
273272, 86eqtri 2458 . . . . . . . . 9  |-  ( 1  +  9 )  = ; 1
0
2749, 41, 154, 273decsuc 11074 . . . . . . . 8  |-  ( ( 1  +  9 )  +  1 )  = ; 1
1
275 9p7e16 11118 . . . . . . . 8  |-  ( 9  +  7 )  = ; 1
6
2769, 5, 5, 37, 270, 271, 274, 2, 275decaddc 11093 . . . . . . 7  |-  (; 1 9  + ; 9 7 )  = ;; 1 1 6
277 eqid 2429 . . . . . . . 8  |- ; 3 2  = ; 3 2
278 eqid 2429 . . . . . . . . 9  |- ; 1 1  = ; 1 1
2799, 9, 119, 278decsuc 11074 . . . . . . . 8  |-  (; 1 1  +  1 )  = ; 1 2
28093oveq1i 6315 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  2 )  =  ( 2  +  2 )
281280, 120, 2213eqtri 2462 . . . . . . . 8  |-  ( ( 2  x.  1 )  +  2 )  = ; 0
4
28231, 3, 9, 3, 277, 279, 9, 32, 41, 216, 281decmac 11090 . . . . . . 7  |-  ( (; 3
2  x.  1 )  +  (; 1 1  +  1 ) )  = ; 4 4
283218oveq1i 6315 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  6 )  =  ( 4  +  6 )
284 6p4e10 10753 . . . . . . . . 9  |-  ( 6  +  4 )  =  10
28563, 217, 284addcomli 9824 . . . . . . . 8  |-  ( 4  +  6 )  =  10
286283, 285, 863eqtri 2462 . . . . . . 7  |-  ( ( 4  x.  1 )  +  6 )  = ; 1
0
28735, 32, 268, 2, 269, 276, 9, 41, 9, 282, 286decmac 11090 . . . . . 6  |-  ( (;; 3 2 4  x.  1 )  +  (; 1
9  + ; 9 7 ) )  = ;; 4 4 0
288154, 147eqtri 2458 . . . . . . . 8  |-  ( 0  +  1 )  = ; 0
1
289 3t3e9 10762 . . . . . . . . . 10  |-  ( 3  x.  3 )  =  9
290289, 148oveq12i 6317 . . . . . . . . 9  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  ( 9  +  0 )
291250addid1i 9819 . . . . . . . . 9  |-  ( 9  +  0 )  =  9
292290, 291eqtri 2458 . . . . . . . 8  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  9
293106oveq1i 6315 . . . . . . . . 9  |-  ( ( 2  x.  3 )  +  1 )  =  ( 6  +  1 )
29437dec0h 11067 . . . . . . . . 9  |-  7  = ; 0 7
295293, 226, 2943eqtri 2462 . . . . . . . 8  |-  ( ( 2  x.  3 )  +  1 )  = ; 0
7
29631, 3, 41, 9, 277, 288, 31, 37, 41, 292, 295decmac 11090 . . . . . . 7  |-  ( (; 3
2  x.  3 )  +  ( 0  +  1 ) )  = ; 9
7
297 4t3e12 11123 . . . . . . . 8  |-  ( 4  x.  3 )  = ; 1
2
298 4p2e6 10744 . . . . . . . . 9  |-  ( 4  +  2 )  =  6
299217, 59, 298addcomli 9824 . . . . . . . 8  |-  ( 2  +  4 )  =  6
3009, 3, 32, 297, 299decaddi 11095 . . . . . . 7  |-  ( ( 4  x.  3 )  +  4 )  = ; 1
6
30135, 32, 41, 32, 269, 221, 31, 2, 9, 296, 300decmac 11090 . . . . . 6  |-  ( (;; 3 2 4  x.  3 )  +  4 )  = ;; 9 7 6
3029, 31, 263, 32, 265, 266, 36, 2, 267, 287, 301decma2c 11091 . . . . 5  |-  ( (;; 3 2 4  x. ; 1
3 )  + ;; 1 9 4 )  = ;;; 4 4 0 6
303154oveq2i 6316 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  =  ( ( 3  x.  6 )  +  1 )
304 6t3e18 11129 . . . . . . . . . 10  |-  ( 6  x.  3 )  = ; 1
8
30563, 104, 304mulcomli 9649 . . . . . . . . 9  |-  ( 3  x.  6 )  = ; 1
8
3069, 14, 15, 305decsuc 11074 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  1 )  = ; 1
9
307303, 306eqtri 2458 . . . . . . 7  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  = ; 1
9
3089, 3, 3, 65, 120decaddi 11095 . . . . . . 7  |-  ( ( 2  x.  6 )  +  2 )  = ; 1
4
30931, 3, 41, 3, 277, 224, 2, 32, 9, 307, 308decmac 11090 . . . . . 6  |-  ( (; 3
2  x.  6 )  +  2 )  = ;; 1 9 4
310 6t4e24 11130 . . . . . . 7  |-  ( 6  x.  4 )  = ; 2
4
31163, 217, 310mulcomli 9649 . . . . . 6  |-  ( 4  x.  6 )  = ; 2
4
3122, 35, 32, 269, 32, 3, 309, 311decmul1c 11098 . . . . 5  |-  (;; 3 2 4  x.  6 )  = ;;; 1 9 4 4
31336, 39, 2, 262, 32, 264, 302, 312decmul2c 11099 . . . 4  |-  (;; 3 2 4  x. ;; 1 3 6 )  = ;;;; 4 4 0 6 4
314261, 313eqtr4i 2461 . . 3  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  =  (;; 3 2 4  x. ;; 1 3 6 )
31528, 1, 30, 34, 36, 25, 38, 40, 187, 188, 195, 314modxai 15003 . 2  |-  ( ( 2 ^;; 6 2 9 )  mod 
N )  =  ( ( N  -  1 )  mod  N )
316 eqid 2429 . . . 4  |- ;; 6 2 9  = ;; 6 2 9
317 eqid 2429 . . . . 5  |- ; 6 2  = ; 6 2
318148oveq2i 6316 . . . . . 6  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  =  ( ( 2  x.  6 )  +  0 )
31965oveq1i 6315 . . . . . 6  |-  ( ( 2  x.  6 )  +  0 )  =  (; 1 2  +  0 )
32011nn0cni 10881 . . . . . . 7  |- ; 1 2  e.  CC
321320addid1i 9819 . . . . . 6  |-  (; 1 2  +  0 )  = ; 1 2
322318, 319, 3213eqtri 2462 . . . . 5  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  = ; 1
2
32312dec0h 11067 . . . . . 6  |-  5  = ; 0 5
32483, 57, 3233eqtri 2462 . . . . 5  |-  ( ( 2  x.  2 )  +  1 )  = ; 0
5
3252, 3, 41, 9, 317, 147, 3, 12, 41, 322, 324decma2c 11091 . . . 4  |-  ( ( 2  x. ; 6 2 )  +  1 )  = ;; 1 2 5
326 9t2e18 11146 . . . . 5  |-  ( 9  x.  2 )  = ; 1
8
327250, 59, 326mulcomli 9649 . . . 4  |-  ( 2  x.  9 )  = ; 1
8
3283, 4, 5, 316, 14, 9, 325, 327decmul2c 11099 . . 3  |-  ( 2  x. ;; 6 2 9 )  = ;;; 1 2 5 8
329328, 24eqtr4i 2461 . 2  |-  ( 2  x. ;; 6 2 9 )  =  ( N  -  1 )
330 npcan 9883 . . 3  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( ( N  - 
1 )  +  1 )  =  N )
33169, 22, 330mp2an 676 . 2  |-  ( ( N  -  1 )  +  1 )  =  N
33270oveq1i 6315 . . 3  |-  ( ( 0  x.  N )  +  1 )  =  ( 0  +  1 )
333154, 332, 1703eqtr4i 2468 . 2  |-  ( ( 0  x.  N )  +  1 )  =  ( 1  x.  1 )
3341, 6, 7, 8, 9, 25, 315, 329, 331, 333mod2xnegi 15006 1  |-  ( ( 2 ^ ( N  -  1 ) )  mod  N )  =  ( 1  mod  N
)
Colors of variables: wff setvar class
Syntax hints:    = wceq 1437    e. wcel 1870  (class class class)co 6305   CCcc 9536   0cc0 9538   1c1 9539    + caddc 9541    x. cmul 9543    - cmin 9859   NNcn 10609   2c2 10659   3c3 10660   4c4 10661   5c5 10662   6c6 10663   7c7 10664   8c8 10665   9c9 10666   10c10 10667   NN0cn0 10869  ;cdc 11051    mod cmo 12093   ^cexp 12269
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1751  ax-6 1797  ax-7 1841  ax-8 1872  ax-9 1874  ax-10 1889  ax-11 1894  ax-12 1907  ax-13 2055  ax-ext 2407  ax-sep 4548  ax-nul 4556  ax-pow 4603  ax-pr 4661  ax-un 6597  ax-cnex 9594  ax-resscn 9595  ax-1cn 9596  ax-icn 9597  ax-addcl 9598  ax-addrcl 9599  ax-mulcl 9600  ax-mulrcl 9601  ax-mulcom 9602  ax-addass 9603  ax-mulass 9604  ax-distr 9605  ax-i2m1 9606  ax-1ne0 9607  ax-1rid 9608  ax-rnegex 9609  ax-rrecex 9610  ax-cnre 9611  ax-pre-lttri 9612  ax-pre-lttrn 9613  ax-pre-ltadd 9614  ax-pre-mulgt0 9615  ax-pre-sup 9616
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-ex 1660  df-nf 1664  df-sb 1790  df-eu 2270  df-mo 2271  df-clab 2415  df-cleq 2421  df-clel 2424  df-nfc 2579  df-ne 2627  df-nel 2628  df-ral 2787  df-rex 2788  df-reu 2789  df-rmo 2790  df-rab 2791  df-v 3089  df-sbc 3306  df-csb 3402  df-dif 3445  df-un 3447  df-in 3449  df-ss 3456  df-pss 3458  df-nul 3768  df-if 3916  df-pw 3987  df-sn 4003  df-pr 4005  df-tp 4007  df-op 4009  df-uni 4223  df-iun 4304  df-br 4427  df-opab 4485  df-mpt 4486  df-tr 4521  df-eprel 4765  df-id 4769  df-po 4775  df-so 4776  df-fr 4813  df-we 4815  df-xp 4860  df-rel 4861  df-cnv 4862  df-co 4863  df-dm 4864  df-rn 4865  df-res 4866  df-ima 4867  df-pred 5399  df-ord 5445  df-on 5446  df-lim 5447  df-suc 5448  df-iota 5565  df-fun 5603  df-fn 5604  df-f 5605  df-f1 5606  df-fo 5607  df-f1o 5608  df-fv 5609  df-riota 6267  df-ov 6308  df-oprab 6309  df-mpt2 6310  df-om 6707  df-2nd 6808  df-wrecs 7036  df-recs 7098  df-rdg 7136  df-er 7371  df-en 7578  df-dom 7579  df-sdom 7580  df-sup 7962  df-pnf 9676  df-mnf 9677  df-xr 9678  df-ltxr 9679  df-le 9680  df-sub 9861  df-neg 9862  df-div 10269  df-nn 10610  df-2 10668  df-3 10669  df-4 10670  df-5 10671  df-6 10672  df-7 10673  df-8 10674  df-9 10675  df-10 10676  df-n0 10870  df-z 10938  df-dec 11052  df-uz 11160  df-rp 11303  df-fl 12025  df-mod 12094  df-seq 12211  df-exp 12270
This theorem is referenced by:  1259prm  15070
  Copyright terms: Public domain W3C validator