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

Theorem 1259lem4 14618
Description: Lemma for 1259prm 14620. 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 10610 . 2  |-  2  e.  NN
2 6nn0 10733 . . . 4  |-  6  e.  NN0
3 2nn0 10729 . . . 4  |-  2  e.  NN0
42, 3deccl 10909 . . 3  |- ; 6 2  e.  NN0
5 9nn0 10736 . . 3  |-  9  e.  NN0
64, 5deccl 10909 . 2  |- ;; 6 2 9  e.  NN0
7 0z 10792 . 2  |-  0  e.  ZZ
8 1nn 10463 . 2  |-  1  e.  NN
9 1nn0 10728 . 2  |-  1  e.  NN0
10 1259prm.1 . . . . . 6  |-  N  = ;;; 1 2 5 9
119, 3deccl 10909 . . . . . . . 8  |- ; 1 2  e.  NN0
12 5nn0 10732 . . . . . . . 8  |-  5  e.  NN0
1311, 12deccl 10909 . . . . . . 7  |- ;; 1 2 5  e.  NN0
14 8nn0 10735 . . . . . . 7  |-  8  e.  NN0
15 8p1e9 10583 . . . . . . 7  |-  ( 8  +  1 )  =  9
16 eqid 2382 . . . . . . 7  |- ;;; 1 2 5 8  = ;;; 1 2 5 8
1713, 14, 15, 16decsuc 10918 . . . . . 6  |-  (;;; 1 2 5 8  +  1 )  = ;;; 1 2 5 9
1810, 17eqtr4i 2414 . . . . 5  |-  N  =  (;;; 1 2 5 8  +  1 )
1918oveq1i 6206 . . . 4  |-  ( N  -  1 )  =  ( (;;; 1 2 5 8  +  1 )  - 
1 )
2013, 14deccl 10909 . . . . . 6  |- ;;; 1 2 5 8  e.  NN0
2120nn0cni 10724 . . . . 5  |- ;;; 1 2 5 8  e.  CC
22 ax-1cn 9461 . . . . 5  |-  1  e.  CC
2321, 22pncan3oi 9749 . . . 4  |-  ( (;;; 1 2 5 8  +  1 )  -  1 )  = ;;; 1 2 5 8
2419, 23eqtri 2411 . . 3  |-  ( N  -  1 )  = ;;; 1 2 5 8
2524, 20eqeltri 2466 . 2  |-  ( N  -  1 )  e. 
NN0
26 9nn 10617 . . . . 5  |-  9  e.  NN
2713, 26decnncl 10908 . . . 4  |- ;;; 1 2 5 9  e.  NN
2810, 27eqeltri 2466 . . 3  |-  N  e.  NN
292, 9deccl 10909 . . . 4  |- ; 6 1  e.  NN0
3029, 3deccl 10909 . . 3  |- ;; 6 1 2  e.  NN0
31 3nn0 10730 . . . . 5  |-  3  e.  NN0
32 4nn0 10731 . . . . 5  |-  4  e.  NN0
3331, 32deccl 10909 . . . 4  |- ; 3 4  e.  NN0
3433nn0zi 10806 . . 3  |- ; 3 4  e.  ZZ
3531, 3deccl 10909 . . . 4  |- ; 3 2  e.  NN0
3635, 32deccl 10909 . . 3  |- ;; 3 2 4  e.  NN0
37 7nn0 10734 . . . 4  |-  7  e.  NN0
389, 37deccl 10909 . . 3  |- ; 1 7  e.  NN0
399, 31deccl 10909 . . . 4  |- ; 1 3  e.  NN0
4039, 2deccl 10909 . . 3  |- ;; 1 3 6  e.  NN0
41 0nn0 10727 . . . . . 6  |-  0  e.  NN0
4231, 41deccl 10909 . . . . 5  |- ; 3 0  e.  NN0
4342, 2deccl 10909 . . . 4  |- ;; 3 0 6  e.  NN0
44 8nn 10616 . . . . 5  |-  8  e.  NN
459, 44decnncl 10908 . . . 4  |- ; 1 8  e.  NN
4611, 32deccl 10909 . . . . 5  |- ;; 1 2 4  e.  NN0
4746, 9deccl 10909 . . . 4  |- ;;; 1 2 4 1  e.  NN0
489, 12deccl 10909 . . . . . 6  |- ; 1 5  e.  NN0
4948, 31deccl 10909 . . . . 5  |- ;; 1 5 3  e.  NN0
50 1z 10811 . . . . 5  |-  1  e.  ZZ
5112, 41deccl 10909 . . . . 5  |- ; 5 0  e.  NN0
5248, 3deccl 10909 . . . . . 6  |- ;; 1 5 2  e.  NN0
533, 12deccl 10909 . . . . . 6  |- ; 2 5  e.  NN0
5437, 2deccl 10909 . . . . . . 7  |- ; 7 6  e.  NN0
55101259lem3 14617 . . . . . . 7  |-  ( ( 2 ^; 7 6 )  mod 
N )  =  ( 5  mod  N )
56 eqid 2382 . . . . . . . 8  |- ; 7 6  = ; 7 6
57 4p1e5 10579 . . . . . . . . 9  |-  ( 4  +  1 )  =  5
58 7cn 10536 . . . . . . . . . 10  |-  7  e.  CC
59 2cn 10523 . . . . . . . . . 10  |-  2  e.  CC
60 7t2e14 10977 . . . . . . . . . 10  |-  ( 7  x.  2 )  = ; 1
4
6158, 59, 60mulcomli 9514 . . . . . . . . 9  |-  ( 2  x.  7 )  = ; 1
4
629, 32, 57, 61decsuc 10918 . . . . . . . 8  |-  ( ( 2  x.  7 )  +  1 )  = ; 1
5
63 6cn 10534 . . . . . . . . 9  |-  6  e.  CC
64 6t2e12 10972 . . . . . . . . 9  |-  ( 6  x.  2 )  = ; 1
2
6563, 59, 64mulcomli 9514 . . . . . . . 8  |-  ( 2  x.  6 )  = ; 1
2
663, 37, 2, 56, 3, 9, 62, 65decmul2c 10943 . . . . . . 7  |-  ( 2  x. ; 7 6 )  = ;; 1 5 2
6753nn0cni 10724 . . . . . . . . 9  |- ; 2 5  e.  CC
6867addid2i 9679 . . . . . . . 8  |-  ( 0  + ; 2 5 )  = ; 2
5
6928nncni 10462 . . . . . . . . . 10  |-  N  e.  CC
7069mul02i 9680 . . . . . . . . 9  |-  ( 0  x.  N )  =  0
7170oveq1i 6206 . . . . . . . 8  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 0  + ; 2 5 )
72 5t5e25 10971 . . . . . . . 8  |-  ( 5  x.  5 )  = ; 2
5
7368, 71, 723eqtr4i 2421 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 2 5 )  =  ( 5  x.  5 )
7428, 1, 54, 7, 12, 53, 55, 66, 73mod2xi 14557 . . . . . 6  |-  ( ( 2 ^;; 1 5 2 )  mod 
N )  =  (; 2
5  mod  N )
75 2p1e3 10576 . . . . . . 7  |-  ( 2  +  1 )  =  3
76 eqid 2382 . . . . . . 7  |- ;; 1 5 2  = ;; 1 5 2
7748, 3, 75, 76decsuc 10918 . . . . . 6  |-  (;; 1 5 2  +  1 )  = ;; 1 5 3
7851nn0cni 10724 . . . . . . . 8  |- ; 5 0  e.  CC
7978addid2i 9679 . . . . . . 7  |-  ( 0  + ; 5 0 )  = ; 5
0
8070oveq1i 6206 . . . . . . 7  |-  ( ( 0  x.  N )  + ; 5 0 )  =  ( 0  + ; 5 0 )
81 eqid 2382 . . . . . . . 8  |- ; 2 5  = ; 2 5
82 2t2e4 10602 . . . . . . . . . 10  |-  ( 2  x.  2 )  =  4
8382oveq1i 6206 . . . . . . . . 9  |-  ( ( 2  x.  2 )  +  1 )  =  ( 4  +  1 )
8483, 57eqtri 2411 . . . . . . . 8  |-  ( ( 2  x.  2 )  +  1 )  =  5
85 5t2e10 10607 . . . . . . . . 9  |-  ( 5  x.  2 )  =  10
86 dec10 10925 . . . . . . . . 9  |-  10  = ; 1 0
8785, 86eqtri 2411 . . . . . . . 8  |-  ( 5  x.  2 )  = ; 1
0
883, 3, 12, 81, 41, 9, 84, 87decmul1c 10942 . . . . . . 7  |-  (; 2 5  x.  2 )  = ; 5 0
8979, 80, 883eqtr4i 2421 . . . . . 6  |-  ( ( 0  x.  N )  + ; 5 0 )  =  (; 2 5  x.  2 )
9028, 1, 52, 7, 53, 51, 74, 77, 89modxp1i 14558 . . . . 5  |-  ( ( 2 ^;; 1 5 3 )  mod 
N )  =  (; 5
0  mod  N )
91 eqid 2382 . . . . . 6  |- ;; 1 5 3  = ;; 1 5 3
92 eqid 2382 . . . . . . . . 9  |- ; 1 5  = ; 1 5
9359mulid1i 9509 . . . . . . . . . . 11  |-  ( 2  x.  1 )  =  2
9493oveq1i 6206 . . . . . . . . . 10  |-  ( ( 2  x.  1 )  +  1 )  =  ( 2  +  1 )
9594, 75eqtri 2411 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  1 )  =  3
96 5cn 10532 . . . . . . . . . . 11  |-  5  e.  CC
9796, 59, 85mulcomli 9514 . . . . . . . . . 10  |-  ( 2  x.  5 )  =  10
9897, 86eqtri 2411 . . . . . . . . 9  |-  ( 2  x.  5 )  = ; 1
0
993, 9, 12, 92, 41, 9, 95, 98decmul2c 10943 . . . . . . . 8  |-  ( 2  x. ; 1 5 )  = ; 3
0
10099oveq1i 6206 . . . . . . 7  |-  ( ( 2  x. ; 1 5 )  +  0 )  =  (; 3
0  +  0 )
10142nn0cni 10724 . . . . . . . 8  |- ; 3 0  e.  CC
102101addid1i 9678 . . . . . . 7  |-  (; 3 0  +  0 )  = ; 3 0
103100, 102eqtri 2411 . . . . . 6  |-  ( ( 2  x. ; 1 5 )  +  0 )  = ; 3 0
104 3cn 10527 . . . . . . . 8  |-  3  e.  CC
105 3t2e6 10604 . . . . . . . 8  |-  ( 3  x.  2 )  =  6
106104, 59, 105mulcomli 9514 . . . . . . 7  |-  ( 2  x.  3 )  =  6
1072dec0h 10911 . . . . . . 7  |-  6  = ; 0 6
108106, 107eqtri 2411 . . . . . 6  |-  ( 2  x.  3 )  = ; 0
6
1093, 48, 31, 91, 2, 41, 103, 108decmul2c 10943 . . . . 5  |-  ( 2  x. ;; 1 5 3 )  = ;; 3 0 6
11069mulid2i 9510 . . . . . . . 8  |-  ( 1  x.  N )  =  N
111110, 10eqtri 2411 . . . . . . 7  |-  ( 1  x.  N )  = ;;; 1 2 5 9
112 eqid 2382 . . . . . . 7  |- ;;; 1 2 4 1  = ;;; 1 2 4 1
1133, 32deccl 10909 . . . . . . . 8  |- ; 2 4  e.  NN0
114 eqid 2382 . . . . . . . . 9  |- ; 2 4  = ; 2 4
1153, 32, 57, 114decsuc 10918 . . . . . . . 8  |-  (; 2 4  +  1 )  = ; 2 5
116 eqid 2382 . . . . . . . . 9  |- ;; 1 2 5  = ;; 1 2 5
117 eqid 2382 . . . . . . . . 9  |- ;; 1 2 4  = ;; 1 2 4
118 eqid 2382 . . . . . . . . . 10  |- ; 1 2  = ; 1 2
119 1p1e2 10566 . . . . . . . . . 10  |-  ( 1  +  1 )  =  2
120 2p2e4 10570 . . . . . . . . . 10  |-  ( 2  +  2 )  =  4
1219, 3, 9, 3, 118, 118, 119, 120decadd 10936 . . . . . . . . 9  |-  (; 1 2  + ; 1 2 )  = ; 2
4
122 5p4e9 10592 . . . . . . . . 9  |-  ( 5  +  4 )  =  9
12311, 12, 11, 32, 116, 117, 121, 122decadd 10936 . . . . . . . 8  |-  (;; 1 2 5  + ;; 1 2 4 )  = ;; 2 4 9
124113, 115, 123decsucc 10922 . . . . . . 7  |-  ( (;; 1 2 5  + ;; 1 2 4 )  +  1 )  = ;; 2 5 0
125 9p1e10 10584 . . . . . . 7  |-  ( 9  +  1 )  =  10
12613, 5, 46, 9, 111, 112, 124, 125decaddc2 10938 . . . . . 6  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  = ;;; 2 5 0 0
127 eqid 2382 . . . . . . 7  |- ; 5 0  = ; 5 0
12872oveq1i 6206 . . . . . . . . . . 11  |-  ( ( 5  x.  5 )  +  0 )  =  (; 2 5  +  0 )
12967addid1i 9678 . . . . . . . . . . 11  |-  (; 2 5  +  0 )  = ; 2 5
130128, 129eqtri 2411 . . . . . . . . . 10  |-  ( ( 5  x.  5 )  +  0 )  = ; 2
5
13196mul02i 9680 . . . . . . . . . . 11  |-  ( 0  x.  5 )  =  0
13241dec0h 10911 . . . . . . . . . . 11  |-  0  = ; 0 0
133131, 132eqtri 2411 . . . . . . . . . 10  |-  ( 0  x.  5 )  = ; 0
0
13412, 12, 41, 127, 41, 41, 130, 133decmul1c 10942 . . . . . . . . 9  |-  (; 5 0  x.  5 )  = ;; 2 5 0
135134oveq1i 6206 . . . . . . . 8  |-  ( (; 5
0  x.  5 )  +  0 )  =  (;; 2 5 0  +  0 )
13653, 41deccl 10909 . . . . . . . . . 10  |- ;; 2 5 0  e.  NN0
137136nn0cni 10724 . . . . . . . . 9  |- ;; 2 5 0  e.  CC
138137addid1i 9678 . . . . . . . 8  |-  (;; 2 5 0  +  0 )  = ;; 2 5 0
139135, 138eqtri 2411 . . . . . . 7  |-  ( (; 5
0  x.  5 )  +  0 )  = ;; 2 5 0
14078mul01i 9681 . . . . . . . 8  |-  (; 5 0  x.  0 )  =  0
141140, 132eqtri 2411 . . . . . . 7  |-  (; 5 0  x.  0 )  = ; 0 0
14251, 12, 41, 127, 41, 41, 139, 141decmul2c 10943 . . . . . 6  |-  (; 5 0  x. ; 5 0 )  = ;;; 2 5 0 0
143126, 142eqtr4i 2414 . . . . 5  |-  ( ( 1  x.  N )  + ;;; 1 2 4 1 )  =  (; 5 0  x. ; 5 0 )
14428, 1, 49, 50, 51, 47, 90, 109, 143mod2xi 14557 . . . 4  |-  ( ( 2 ^;; 3 0 6 )  mod 
N )  =  (;;; 1 2 4 1  mod 
N )
145 eqid 2382 . . . . 5  |- ;; 3 0 6  = ;; 3 0 6
146 eqid 2382 . . . . . 6  |- ; 3 0  = ; 3 0
1479dec0h 10911 . . . . . 6  |-  1  = ; 0 1
148 00id 9666 . . . . . . . 8  |-  ( 0  +  0 )  =  0
149106, 148oveq12i 6208 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  ( 6  +  0 )
15063addid1i 9678 . . . . . . 7  |-  ( 6  +  0 )  =  6
151149, 150eqtri 2411 . . . . . 6  |-  ( ( 2  x.  3 )  +  ( 0  +  0 ) )  =  6
15259mul01i 9681 . . . . . . . 8  |-  ( 2  x.  0 )  =  0
153152oveq1i 6206 . . . . . . 7  |-  ( ( 2  x.  0 )  +  1 )  =  ( 0  +  1 )
154 0p1e1 10564 . . . . . . 7  |-  ( 0  +  1 )  =  1
155153, 154, 1473eqtri 2415 . . . . . 6  |-  ( ( 2  x.  0 )  +  1 )  = ; 0
1
15631, 41, 41, 9, 146, 147, 3, 9, 41, 151, 155decma2c 10935 . . . . 5  |-  ( ( 2  x. ; 3 0 )  +  1 )  = ; 6 1
1573, 42, 2, 145, 3, 9, 156, 65decmul2c 10943 . . . 4  |-  ( 2  x. ;; 3 0 6 )  = ;; 6 1 2
158 eqid 2382 . . . . . 6  |- ; 1 8  = ; 1 8
15911, 32, 57, 117decsuc 10918 . . . . . 6  |-  (;; 1 2 4  +  1 )  = ;; 1 2 5
160 8cn 10538 . . . . . . 7  |-  8  e.  CC
161160, 22, 15addcomli 9683 . . . . . 6  |-  ( 1  +  8 )  =  9
16246, 9, 9, 14, 112, 158, 159, 161decadd 10936 . . . . 5  |-  (;;; 1 2 4 1  + ; 1 8 )  = ;;; 1 2 5 9
163162, 10eqtr4i 2414 . . . 4  |-  (;;; 1 2 4 1  + ; 1 8 )  =  N
16436nn0cni 10724 . . . . . 6  |- ;; 3 2 4  e.  CC
165164addid2i 9679 . . . . 5  |-  ( 0  + ;; 3 2 4 )  = ;; 3 2 4
16670oveq1i 6206 . . . . 5  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  ( 0  + ;; 3 2 4 )
1679, 14deccl 10909 . . . . . 6  |- ; 1 8  e.  NN0
1689, 32deccl 10909 . . . . . 6  |- ; 1 4  e.  NN0
169 eqid 2382 . . . . . . 7  |- ; 1 4  = ; 1 4
17022mulid1i 9509 . . . . . . . . 9  |-  ( 1  x.  1 )  =  1
171170, 119oveq12i 6208 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  ( 1  +  2 )
172 1p2e3 10577 . . . . . . . 8  |-  ( 1  +  2 )  =  3
173171, 172eqtri 2411 . . . . . . 7  |-  ( ( 1  x.  1 )  +  ( 1  +  1 ) )  =  3
174160mulid1i 9509 . . . . . . . . 9  |-  ( 8  x.  1 )  =  8
175174oveq1i 6206 . . . . . . . 8  |-  ( ( 8  x.  1 )  +  4 )  =  ( 8  +  4 )
176 8p4e12 10952 . . . . . . . 8  |-  ( 8  +  4 )  = ; 1
2
177175, 176eqtri 2411 . . . . . . 7  |-  ( ( 8  x.  1 )  +  4 )  = ; 1
2
1789, 14, 9, 32, 158, 169, 9, 3, 9, 173, 177decmac 10934 . . . . . 6  |-  ( (; 1
8  x.  1 )  + ; 1 4 )  = ; 3
2
179160mulid2i 9510 . . . . . . . . 9  |-  ( 1  x.  8 )  =  8
180179oveq1i 6206 . . . . . . . 8  |-  ( ( 1  x.  8 )  +  6 )  =  ( 8  +  6 )
181 8p6e14 10954 . . . . . . . 8  |-  ( 8  +  6 )  = ; 1
4
182180, 181eqtri 2411 . . . . . . 7  |-  ( ( 1  x.  8 )  +  6 )  = ; 1
4
183 8t8e64 10989 . . . . . . 7  |-  ( 8  x.  8 )  = ; 6
4
18414, 9, 14, 158, 32, 2, 182, 183decmul1c 10942 . . . . . 6  |-  (; 1 8  x.  8 )  = ;; 1 4 4
185167, 9, 14, 158, 32, 168, 178, 184decmul2c 10943 . . . . 5  |-  (; 1 8  x. ; 1 8 )  = ;; 3 2 4
186165, 166, 1853eqtr4i 2421 . . . 4  |-  ( ( 0  x.  N )  + ;; 3 2 4 )  =  (; 1
8  x. ; 1 8 )
1871, 43, 7, 45, 36, 47, 144, 157, 163, 186mod2xnegi 14559 . . 3  |-  ( ( 2 ^;; 6 1 2 )  mod 
N )  =  (;; 3 2 4  mod 
N )
188101259lem1 14615 . . 3  |-  ( ( 2 ^; 1 7 )  mod 
N )  =  (;; 1 3 6  mod 
N )
189 eqid 2382 . . . 4  |- ;; 6 1 2  = ;; 6 1 2
190 eqid 2382 . . . 4  |- ; 1 7  = ; 1 7
191 eqid 2382 . . . . 5  |- ; 6 1  = ; 6 1
1922, 9, 119, 191decsuc 10918 . . . 4  |-  (; 6 1  +  1 )  = ; 6 2
193 7p2e9 10597 . . . . 5  |-  ( 7  +  2 )  =  9
19458, 59, 193addcomli 9683 . . . 4  |-  ( 2  +  7 )  =  9
19529, 3, 9, 37, 189, 190, 192, 194decadd 10936 . . 3  |-  (;; 6 1 2  + ; 1 7 )  = ;; 6 2 9
19631, 9deccl 10909 . . . . 5  |- ; 3 1  e.  NN0
197 eqid 2382 . . . . . . 7  |- ; 3 1  = ; 3 1
198 3p2e5 10585 . . . . . . . . 9  |-  ( 3  +  2 )  =  5
199104, 59, 198addcomli 9683 . . . . . . . 8  |-  ( 2  +  3 )  =  5
2009, 3, 31, 118, 199decaddi 10939 . . . . . . 7  |-  (; 1 2  +  3 )  = ; 1 5
201 5p1e6 10580 . . . . . . 7  |-  ( 5  +  1 )  =  6
20211, 12, 31, 9, 116, 197, 200, 201decadd 10936 . . . . . 6  |-  (;; 1 2 5  + ; 3 1 )  = ;; 1 5 6
203119oveq1i 6206 . . . . . . . . 9  |-  ( ( 1  +  1 )  +  1 )  =  ( 2  +  1 )
204203, 75eqtri 2411 . . . . . . . 8  |-  ( ( 1  +  1 )  +  1 )  =  3
205 7p5e12 10948 . . . . . . . . 9  |-  ( 7  +  5 )  = ; 1
2
20658, 96, 205addcomli 9683 . . . . . . . 8  |-  ( 5  +  7 )  = ; 1
2
2079, 12, 9, 37, 92, 190, 204, 3, 206decaddc 10937 . . . . . . 7  |-  (; 1 5  + ; 1 7 )  = ; 3
2
208 eqid 2382 . . . . . . . 8  |- ; 3 4  = ; 3 4
209 7p3e10 10598 . . . . . . . . . 10  |-  ( 7  +  3 )  =  10
21058, 104, 209addcomli 9683 . . . . . . . . 9  |-  ( 3  +  7 )  =  10
211210, 86eqtri 2411 . . . . . . . 8  |-  ( 3  +  7 )  = ; 1
0
212104mulid1i 9509 . . . . . . . . . 10  |-  ( 3  x.  1 )  =  3
21322addid1i 9678 . . . . . . . . . 10  |-  ( 1  +  0 )  =  1
214212, 213oveq12i 6208 . . . . . . . . 9  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  ( 3  +  1 )
215 3p1e4 10578 . . . . . . . . 9  |-  ( 3  +  1 )  =  4
216214, 215eqtri 2411 . . . . . . . 8  |-  ( ( 3  x.  1 )  +  ( 1  +  0 ) )  =  4
217 4cn 10530 . . . . . . . . . . 11  |-  4  e.  CC
218217mulid1i 9509 . . . . . . . . . 10  |-  ( 4  x.  1 )  =  4
219218oveq1i 6206 . . . . . . . . 9  |-  ( ( 4  x.  1 )  +  0 )  =  ( 4  +  0 )
220217addid1i 9678 . . . . . . . . 9  |-  ( 4  +  0 )  =  4
22132dec0h 10911 . . . . . . . . 9  |-  4  = ; 0 4
222219, 220, 2213eqtri 2415 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  0 )  = ; 0
4
22331, 32, 9, 41, 208, 211, 9, 32, 41, 216, 222decmac 10934 . . . . . . 7  |-  ( (; 3
4  x.  1 )  +  ( 3  +  7 ) )  = ; 4
4
2243dec0h 10911 . . . . . . . 8  |-  2  = ; 0 2
225105, 154oveq12i 6208 . . . . . . . . 9  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  ( 6  +  1 )
226 6p1e7 10581 . . . . . . . . 9  |-  ( 6  +  1 )  =  7
227225, 226eqtri 2411 . . . . . . . 8  |-  ( ( 3  x.  2 )  +  ( 0  +  1 ) )  =  7
228 4t2e8 10606 . . . . . . . . . 10  |-  ( 4  x.  2 )  =  8
229228oveq1i 6206 . . . . . . . . 9  |-  ( ( 4  x.  2 )  +  2 )  =  ( 8  +  2 )
230 8p2e10 10599 . . . . . . . . 9  |-  ( 8  +  2 )  =  10
231229, 230, 863eqtri 2415 . . . . . . . 8  |-  ( ( 4  x.  2 )  +  2 )  = ; 1
0
23231, 32, 41, 3, 208, 224, 3, 41, 9, 227, 231decmac 10934 . . . . . . 7  |-  ( (; 3
4  x.  2 )  +  2 )  = ; 7
0
2339, 3, 31, 3, 118, 207, 33, 41, 37, 223, 232decma2c 10935 . . . . . 6  |-  ( (; 3
4  x. ; 1 2 )  +  (; 1 5  + ; 1 7 ) )  = ;; 4 4 0
23459addid2i 9679 . . . . . . . . 9  |-  ( 0  +  2 )  =  2
235234oveq2i 6207 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  =  ( ( 3  x.  5 )  +  2 )
236 5t3e15 10969 . . . . . . . . . 10  |-  ( 5  x.  3 )  = ; 1
5
23796, 104, 236mulcomli 9514 . . . . . . . . 9  |-  ( 3  x.  5 )  = ; 1
5
238 5p2e7 10590 . . . . . . . . 9  |-  ( 5  +  2 )  =  7
2399, 12, 3, 237, 238decaddi 10939 . . . . . . . 8  |-  ( ( 3  x.  5 )  +  2 )  = ; 1
7
240235, 239eqtri 2411 . . . . . . 7  |-  ( ( 3  x.  5 )  +  ( 0  +  2 ) )  = ; 1
7
241 5t4e20 10970 . . . . . . . . 9  |-  ( 5  x.  4 )  = ; 2
0
24296, 217, 241mulcomli 9514 . . . . . . . 8  |-  ( 4  x.  5 )  = ; 2
0
24363addid2i 9679 . . . . . . . 8  |-  ( 0  +  6 )  =  6
2443, 41, 2, 242, 243decaddi 10939 . . . . . . 7  |-  ( ( 4  x.  5 )  +  6 )  = ; 2
6
24531, 32, 41, 2, 208, 107, 12, 2, 3, 240, 244decmac 10934 . . . . . 6  |-  ( (; 3
4  x.  5 )  +  6 )  = ;; 1 7 6
24611, 12, 48, 2, 116, 202, 33, 2, 38, 233, 245decma2c 10935 . . . . 5  |-  ( (; 3
4  x. ;; 1 2 5 )  +  (;; 1 2 5  + ; 3 1 ) )  = ;;; 4 4 0 6
24714dec0h 10911 . . . . . 6  |-  8  = ; 0 8
248217addid2i 9679 . . . . . . . 8  |-  ( 0  +  4 )  =  4
249248oveq2i 6207 . . . . . . 7  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  =  ( ( 3  x.  9 )  +  4 )
250 9cn 10540 . . . . . . . . 9  |-  9  e.  CC
251 9t3e27 10991 . . . . . . . . 9  |-  ( 9  x.  3 )  = ; 2
7
252250, 104, 251mulcomli 9514 . . . . . . . 8  |-  ( 3  x.  9 )  = ; 2
7
253 7p4e11 10947 . . . . . . . 8  |-  ( 7  +  4 )  = ; 1
1
2543, 37, 32, 252, 75, 9, 253decaddci 10940 . . . . . . 7  |-  ( ( 3  x.  9 )  +  4 )  = ; 3
1
255249, 254eqtri 2411 . . . . . 6  |-  ( ( 3  x.  9 )  +  ( 0  +  4 ) )  = ; 3
1
256 9t4e36 10992 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
257250, 217, 256mulcomli 9514 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
258160, 63, 181addcomli 9683 . . . . . . 7  |-  ( 6  +  8 )  = ; 1
4
25931, 2, 14, 257, 215, 32, 258decaddci 10940 . . . . . 6  |-  ( ( 4  x.  9 )  +  8 )  = ; 4
4
26031, 32, 41, 14, 208, 247, 5, 32, 32, 255, 259decmac 10934 . . . . 5  |-  ( (; 3
4  x.  9 )  +  8 )  = ;; 3 1 4
26113, 5, 13, 14, 10, 24, 33, 32, 196, 246, 260decma2c 10935 . . . 4  |-  ( (; 3
4  x.  N )  +  ( N  - 
1 ) )  = ;;;; 4 4 0 6 4
262 eqid 2382 . . . . 5  |- ;; 1 3 6  = ;; 1 3 6
2639, 5deccl 10909 . . . . . 6  |- ; 1 9  e.  NN0
264263, 32deccl 10909 . . . . 5  |- ;; 1 9 4  e.  NN0
265 eqid 2382 . . . . . 6  |- ; 1 3  = ; 1 3
266 eqid 2382 . . . . . 6  |- ;; 1 9 4  = ;; 1 9 4
2675, 37deccl 10909 . . . . . 6  |- ; 9 7  e.  NN0
2689, 9deccl 10909 . . . . . . 7  |- ; 1 1  e.  NN0
269 eqid 2382 . . . . . . 7  |- ;; 3 2 4  = ;; 3 2 4
270 eqid 2382 . . . . . . . 8  |- ; 1 9  = ; 1 9
271 eqid 2382 . . . . . . . 8  |- ; 9 7  = ; 9 7
272250, 22, 125addcomli 9683 . . . . . . . . . 10  |-  ( 1  +  9 )  =  10
273272, 86eqtri 2411 . . . . . . . . 9  |-  ( 1  +  9 )  = ; 1
0
2749, 41, 154, 273decsuc 10918 . . . . . . . 8  |-  ( ( 1  +  9 )  +  1 )  = ; 1
1
275 9p7e16 10962 . . . . . . . 8  |-  ( 9  +  7 )  = ; 1
6
2769, 5, 5, 37, 270, 271, 274, 2, 275decaddc 10937 . . . . . . 7  |-  (; 1 9  + ; 9 7 )  = ;; 1 1 6
277 eqid 2382 . . . . . . . 8  |- ; 3 2  = ; 3 2
278 eqid 2382 . . . . . . . . 9  |- ; 1 1  = ; 1 1
2799, 9, 119, 278decsuc 10918 . . . . . . . 8  |-  (; 1 1  +  1 )  = ; 1 2
28093oveq1i 6206 . . . . . . . . 9  |-  ( ( 2  x.  1 )  +  2 )  =  ( 2  +  2 )
281280, 120, 2213eqtri 2415 . . . . . . . 8  |-  ( ( 2  x.  1 )  +  2 )  = ; 0
4
28231, 3, 9, 3, 277, 279, 9, 32, 41, 216, 281decmac 10934 . . . . . . 7  |-  ( (; 3
2  x.  1 )  +  (; 1 1  +  1 ) )  = ; 4 4
283218oveq1i 6206 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  6 )  =  ( 4  +  6 )
284 6p4e10 10596 . . . . . . . . 9  |-  ( 6  +  4 )  =  10
28563, 217, 284addcomli 9683 . . . . . . . 8  |-  ( 4  +  6 )  =  10
286283, 285, 863eqtri 2415 . . . . . . 7  |-  ( ( 4  x.  1 )  +  6 )  = ; 1
0
28735, 32, 268, 2, 269, 276, 9, 41, 9, 282, 286decmac 10934 . . . . . 6  |-  ( (;; 3 2 4  x.  1 )  +  (; 1
9  + ; 9 7 ) )  = ;; 4 4 0
288154, 147eqtri 2411 . . . . . . . 8  |-  ( 0  +  1 )  = ; 0
1
289 3t3e9 10605 . . . . . . . . . 10  |-  ( 3  x.  3 )  =  9
290289, 148oveq12i 6208 . . . . . . . . 9  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  ( 9  +  0 )
291250addid1i 9678 . . . . . . . . 9  |-  ( 9  +  0 )  =  9
292290, 291eqtri 2411 . . . . . . . 8  |-  ( ( 3  x.  3 )  +  ( 0  +  0 ) )  =  9
293106oveq1i 6206 . . . . . . . . 9  |-  ( ( 2  x.  3 )  +  1 )  =  ( 6  +  1 )
29437dec0h 10911 . . . . . . . . 9  |-  7  = ; 0 7
295293, 226, 2943eqtri 2415 . . . . . . . 8  |-  ( ( 2  x.  3 )  +  1 )  = ; 0
7
29631, 3, 41, 9, 277, 288, 31, 37, 41, 292, 295decmac 10934 . . . . . . 7  |-  ( (; 3
2  x.  3 )  +  ( 0  +  1 ) )  = ; 9
7
297 4t3e12 10967 . . . . . . . 8  |-  ( 4  x.  3 )  = ; 1
2
298 4p2e6 10587 . . . . . . . . 9  |-  ( 4  +  2 )  =  6
299217, 59, 298addcomli 9683 . . . . . . . 8  |-  ( 2  +  4 )  =  6
3009, 3, 32, 297, 299decaddi 10939 . . . . . . 7  |-  ( ( 4  x.  3 )  +  4 )  = ; 1
6
30135, 32, 41, 32, 269, 221, 31, 2, 9, 296, 300decmac 10934 . . . . . 6  |-  ( (;; 3 2 4  x.  3 )  +  4 )  = ;; 9 7 6
3029, 31, 263, 32, 265, 266, 36, 2, 267, 287, 301decma2c 10935 . . . . 5  |-  ( (;; 3 2 4  x. ; 1
3 )  + ;; 1 9 4 )  = ;;; 4 4 0 6
303154oveq2i 6207 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  =  ( ( 3  x.  6 )  +  1 )
304 6t3e18 10973 . . . . . . . . . 10  |-  ( 6  x.  3 )  = ; 1
8
30563, 104, 304mulcomli 9514 . . . . . . . . 9  |-  ( 3  x.  6 )  = ; 1
8
3069, 14, 15, 305decsuc 10918 . . . . . . . 8  |-  ( ( 3  x.  6 )  +  1 )  = ; 1
9
307303, 306eqtri 2411 . . . . . . 7  |-  ( ( 3  x.  6 )  +  ( 0  +  1 ) )  = ; 1
9
3089, 3, 3, 65, 120decaddi 10939 . . . . . . 7  |-  ( ( 2  x.  6 )  +  2 )  = ; 1
4
30931, 3, 41, 3, 277, 224, 2, 32, 9, 307, 308decmac 10934 . . . . . 6  |-  ( (; 3
2  x.  6 )  +  2 )  = ;; 1 9 4
310 6t4e24 10974 . . . . . . 7  |-  ( 6  x.  4 )  = ; 2
4
31163, 217, 310mulcomli 9514 . . . . . 6  |-  ( 4  x.  6 )  = ; 2
4
3122, 35, 32, 269, 32, 3, 309, 311decmul1c 10942 . . . . 5  |-  (;; 3 2 4  x.  6 )  = ;;; 1 9 4 4
31336, 39, 2, 262, 32, 264, 302, 312decmul2c 10943 . . . 4  |-  (;; 3 2 4  x. ;; 1 3 6 )  = ;;;; 4 4 0 6 4
314261, 313eqtr4i 2414 . . 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 14556 . 2  |-  ( ( 2 ^;; 6 2 9 )  mod 
N )  =  ( ( N  -  1 )  mod  N )
316 eqid 2382 . . . 4  |- ;; 6 2 9  = ;; 6 2 9
317 eqid 2382 . . . . 5  |- ; 6 2  = ; 6 2
318148oveq2i 6207 . . . . . 6  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  =  ( ( 2  x.  6 )  +  0 )
31965oveq1i 6206 . . . . . 6  |-  ( ( 2  x.  6 )  +  0 )  =  (; 1 2  +  0 )
32011nn0cni 10724 . . . . . . 7  |- ; 1 2  e.  CC
321320addid1i 9678 . . . . . 6  |-  (; 1 2  +  0 )  = ; 1 2
322318, 319, 3213eqtri 2415 . . . . 5  |-  ( ( 2  x.  6 )  +  ( 0  +  0 ) )  = ; 1
2
32312dec0h 10911 . . . . . 6  |-  5  = ; 0 5
32483, 57, 3233eqtri 2415 . . . . 5  |-  ( ( 2  x.  2 )  +  1 )  = ; 0
5
3252, 3, 41, 9, 317, 147, 3, 12, 41, 322, 324decma2c 10935 . . . 4  |-  ( ( 2  x. ; 6 2 )  +  1 )  = ;; 1 2 5
326 9t2e18 10990 . . . . 5  |-  ( 9  x.  2 )  = ; 1
8
327250, 59, 326mulcomli 9514 . . . 4  |-  ( 2  x.  9 )  = ; 1
8
3283, 4, 5, 316, 14, 9, 325, 327decmul2c 10943 . . 3  |-  ( 2  x. ;; 6 2 9 )  = ;;; 1 2 5 8
329328, 24eqtr4i 2414 . 2  |-  ( 2  x. ;; 6 2 9 )  =  ( N  -  1 )
330 npcan 9742 . . 3  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( ( N  - 
1 )  +  1 )  =  N )
33169, 22, 330mp2an 670 . 2  |-  ( ( N  -  1 )  +  1 )  =  N
33270oveq1i 6206 . . 3  |-  ( ( 0  x.  N )  +  1 )  =  ( 0  +  1 )
333154, 332, 1703eqtr4i 2421 . 2  |-  ( ( 0  x.  N )  +  1 )  =  ( 1  x.  1 )
3341, 6, 7, 8, 9, 25, 315, 329, 331, 333mod2xnegi 14559 1  |-  ( ( 2 ^ ( N  -  1 ) )  mod  N )  =  ( 1  mod  N
)
Colors of variables: wff setvar class
Syntax hints:    = wceq 1399    e. wcel 1826  (class class class)co 6196   CCcc 9401   0cc0 9403   1c1 9404    + caddc 9406    x. cmul 9408    - cmin 9718   NNcn 10452   2c2 10502   3c3 10503   4c4 10504   5c5 10505   6c6 10506   7c7 10507   8c8 10508   9c9 10509   10c10 10510   NN0cn0 10712  ;cdc 10895    mod cmo 11896   ^cexp 12069
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1626  ax-4 1639  ax-5 1712  ax-6 1755  ax-7 1798  ax-8 1828  ax-9 1830  ax-10 1845  ax-11 1850  ax-12 1862  ax-13 2006  ax-ext 2360  ax-sep 4488  ax-nul 4496  ax-pow 4543  ax-pr 4601  ax-un 6491  ax-cnex 9459  ax-resscn 9460  ax-1cn 9461  ax-icn 9462  ax-addcl 9463  ax-addrcl 9464  ax-mulcl 9465  ax-mulrcl 9466  ax-mulcom 9467  ax-addass 9468  ax-mulass 9469  ax-distr 9470  ax-i2m1 9471  ax-1ne0 9472  ax-1rid 9473  ax-rnegex 9474  ax-rrecex 9475  ax-cnre 9476  ax-pre-lttri 9477  ax-pre-lttrn 9478  ax-pre-ltadd 9479  ax-pre-mulgt0 9480  ax-pre-sup 9481
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 972  df-3an 973  df-tru 1402  df-ex 1621  df-nf 1625  df-sb 1748  df-eu 2222  df-mo 2223  df-clab 2368  df-cleq 2374  df-clel 2377  df-nfc 2532  df-ne 2579  df-nel 2580  df-ral 2737  df-rex 2738  df-reu 2739  df-rmo 2740  df-rab 2741  df-v 3036  df-sbc 3253  df-csb 3349  df-dif 3392  df-un 3394  df-in 3396  df-ss 3403  df-pss 3405  df-nul 3712  df-if 3858  df-pw 3929  df-sn 3945  df-pr 3947  df-tp 3949  df-op 3951  df-uni 4164  df-iun 4245  df-br 4368  df-opab 4426  df-mpt 4427  df-tr 4461  df-eprel 4705  df-id 4709  df-po 4714  df-so 4715  df-fr 4752  df-we 4754  df-ord 4795  df-on 4796  df-lim 4797  df-suc 4798  df-xp 4919  df-rel 4920  df-cnv 4921  df-co 4922  df-dm 4923  df-rn 4924  df-res 4925  df-ima 4926  df-iota 5460  df-fun 5498  df-fn 5499  df-f 5500  df-f1 5501  df-fo 5502  df-f1o 5503  df-fv 5504  df-riota 6158  df-ov 6199  df-oprab 6200  df-mpt2 6201  df-om 6600  df-2nd 6700  df-recs 6960  df-rdg 6994  df-er 7229  df-en 7436  df-dom 7437  df-sdom 7438  df-sup 7816  df-pnf 9541  df-mnf 9542  df-xr 9543  df-ltxr 9544  df-le 9545  df-sub 9720  df-neg 9721  df-div 10124  df-nn 10453  df-2 10511  df-3 10512  df-4 10513  df-5 10514  df-6 10515  df-7 10516  df-8 10517  df-9 10518  df-10 10519  df-n0 10713  df-z 10782  df-dec 10896  df-uz 11002  df-rp 11140  df-fl 11828  df-mod 11897  df-seq 12011  df-exp 12070
This theorem is referenced by:  1259prm  14620
  Copyright terms: Public domain W3C validator