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

Theorem 1259lem2 15839
Description: Lemma for 1259prm 15843. Calculate a power mod. In decimal, we calculate  2 ^ 3 4  =  ( 2 ^ 1 7 ) ^ 2  ==  1
3 6 ^ 2  ==  1 4 N  +  8 7 0. (Contributed by Mario Carneiro, 22-Feb-2014.) (Revised by Mario Carneiro, 20-Apr-2015.) (Proof shortened by AV, 15-Sep-2021.)
Hypothesis
Ref Expression
1259prm.1  |-  N  = ;;; 1 2 5 9
Assertion
Ref Expression
1259lem2  |-  ( ( 2 ^; 3 4 )  mod 
N )  =  (;; 8 7 0  mod 
N )

Proof of Theorem 1259lem2
StepHypRef Expression
1 1259prm.1 . . 3  |-  N  = ;;; 1 2 5 9
2 1nn0 11308 . . . . . 6  |-  1  e.  NN0
3 2nn0 11309 . . . . . 6  |-  2  e.  NN0
42, 3deccl 11512 . . . . 5  |- ; 1 2  e.  NN0
5 5nn0 11312 . . . . 5  |-  5  e.  NN0
64, 5deccl 11512 . . . 4  |- ;; 1 2 5  e.  NN0
7 9nn 11192 . . . 4  |-  9  e.  NN
86, 7decnncl 11518 . . 3  |- ;;; 1 2 5 9  e.  NN
91, 8eqeltri 2697 . 2  |-  N  e.  NN
10 2nn 11185 . 2  |-  2  e.  NN
11 7nn0 11314 . . 3  |-  7  e.  NN0
122, 11deccl 11512 . 2  |- ; 1 7  e.  NN0
13 4nn0 11311 . . . 4  |-  4  e.  NN0
142, 13deccl 11512 . . 3  |- ; 1 4  e.  NN0
1514nn0zi 11402 . 2  |- ; 1 4  e.  ZZ
16 3nn0 11310 . . . 4  |-  3  e.  NN0
172, 16deccl 11512 . . 3  |- ; 1 3  e.  NN0
18 6nn0 11313 . . 3  |-  6  e.  NN0
1917, 18deccl 11512 . 2  |- ;; 1 3 6  e.  NN0
20 8nn0 11315 . . . 4  |-  8  e.  NN0
2120, 11deccl 11512 . . 3  |- ; 8 7  e.  NN0
22 0nn0 11307 . . 3  |-  0  e.  NN0
2321, 22deccl 11512 . 2  |- ;; 8 7 0  e.  NN0
2411259lem1 15838 . 2  |-  ( ( 2 ^; 1 7 )  mod 
N )  =  (;; 1 3 6  mod 
N )
25 eqid 2622 . . 3  |- ; 1 7  = ; 1 7
26 2cn 11091 . . . . . 6  |-  2  e.  CC
2726mulid1i 10042 . . . . 5  |-  ( 2  x.  1 )  =  2
2827oveq1i 6660 . . . 4  |-  ( ( 2  x.  1 )  +  1 )  =  ( 2  +  1 )
29 2p1e3 11151 . . . 4  |-  ( 2  +  1 )  =  3
3028, 29eqtri 2644 . . 3  |-  ( ( 2  x.  1 )  +  1 )  =  3
31 7cn 11104 . . . 4  |-  7  e.  CC
32 7t2e14 11648 . . . 4  |-  ( 7  x.  2 )  = ; 1
4
3331, 26, 32mulcomli 10047 . . 3  |-  ( 2  x.  7 )  = ; 1
4
343, 2, 11, 25, 13, 2, 30, 33decmul2c 11589 . 2  |-  ( 2  x. ; 1 7 )  = ; 3
4
35 9nn0 11316 . . . 4  |-  9  e.  NN0
36 eqid 2622 . . . 4  |- ;; 8 7 0  = ;; 8 7 0
37 eqid 2622 . . . . 5  |- ;; 1 2 5  = ;; 1 2 5
38 eqid 2622 . . . . . 6  |- ; 8 7  = ; 8 7
39 eqid 2622 . . . . . 6  |- ; 1 2  = ; 1 2
40 8p1e9 11158 . . . . . 6  |-  ( 8  +  1 )  =  9
41 7p2e9 11172 . . . . . 6  |-  ( 7  +  2 )  =  9
4220, 11, 2, 3, 38, 39, 40, 41decadd 11570 . . . . 5  |-  (; 8 7  + ; 1 2 )  = ; 9
9
43 9p7e16 11625 . . . . . 6  |-  ( 9  +  7 )  = ; 1
6
44 eqid 2622 . . . . . . 7  |- ; 1 4  = ; 1 4
45 3cn 11095 . . . . . . . . 9  |-  3  e.  CC
46 ax-1cn 9994 . . . . . . . . 9  |-  1  e.  CC
47 3p1e4 11153 . . . . . . . . 9  |-  ( 3  +  1 )  =  4
4845, 46, 47addcomli 10228 . . . . . . . 8  |-  ( 1  +  3 )  =  4
4913dec0h 11522 . . . . . . . 8  |-  4  = ; 0 4
5048, 49eqtri 2644 . . . . . . 7  |-  ( 1  +  3 )  = ; 0
4
5146mulid1i 10042 . . . . . . . . 9  |-  ( 1  x.  1 )  =  1
52 00id 10211 . . . . . . . . 9  |-  ( 0  +  0 )  =  0
5351, 52oveq12i 6662 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  ( 0  +  0 ) )  =  ( 1  +  0 )
5446addid1i 10223 . . . . . . . 8  |-  ( 1  +  0 )  =  1
5553, 54eqtri 2644 . . . . . . 7  |-  ( ( 1  x.  1 )  +  ( 0  +  0 ) )  =  1
56 4cn 11098 . . . . . . . . . 10  |-  4  e.  CC
5756mulid1i 10042 . . . . . . . . 9  |-  ( 4  x.  1 )  =  4
5857oveq1i 6660 . . . . . . . 8  |-  ( ( 4  x.  1 )  +  4 )  =  ( 4  +  4 )
59 4p4e8 11164 . . . . . . . 8  |-  ( 4  +  4 )  =  8
6020dec0h 11522 . . . . . . . 8  |-  8  = ; 0 8
6158, 59, 603eqtri 2648 . . . . . . 7  |-  ( ( 4  x.  1 )  +  4 )  = ; 0
8
622, 13, 22, 13, 44, 50, 2, 20, 22, 55, 61decmac 11566 . . . . . 6  |-  ( (; 1
4  x.  1 )  +  ( 1  +  3 ) )  = ; 1
8
6318dec0h 11522 . . . . . . 7  |-  6  = ; 0 6
6426mulid2i 10043 . . . . . . . . 9  |-  ( 1  x.  2 )  =  2
6546addid2i 10224 . . . . . . . . 9  |-  ( 0  +  1 )  =  1
6664, 65oveq12i 6662 . . . . . . . 8  |-  ( ( 1  x.  2 )  +  ( 0  +  1 ) )  =  ( 2  +  1 )
6766, 29eqtri 2644 . . . . . . 7  |-  ( ( 1  x.  2 )  +  ( 0  +  1 ) )  =  3
68 4t2e8 11181 . . . . . . . . 9  |-  ( 4  x.  2 )  =  8
6968oveq1i 6660 . . . . . . . 8  |-  ( ( 4  x.  2 )  +  6 )  =  ( 8  +  6 )
70 8p6e14 11616 . . . . . . . 8  |-  ( 8  +  6 )  = ; 1
4
7169, 70eqtri 2644 . . . . . . 7  |-  ( ( 4  x.  2 )  +  6 )  = ; 1
4
722, 13, 22, 18, 44, 63, 3, 13, 2, 67, 71decmac 11566 . . . . . 6  |-  ( (; 1
4  x.  2 )  +  6 )  = ; 3
4
732, 3, 2, 18, 39, 43, 14, 13, 16, 62, 72decma2c 11568 . . . . 5  |-  ( (; 1
4  x. ; 1 2 )  +  ( 9  +  7 ) )  = ;; 1 8 4
7435dec0h 11522 . . . . . 6  |-  9  = ; 0 9
75 5cn 11100 . . . . . . . . 9  |-  5  e.  CC
7675mulid2i 10043 . . . . . . . 8  |-  ( 1  x.  5 )  =  5
7726addid2i 10224 . . . . . . . 8  |-  ( 0  +  2 )  =  2
7876, 77oveq12i 6662 . . . . . . 7  |-  ( ( 1  x.  5 )  +  ( 0  +  2 ) )  =  ( 5  +  2 )
79 5p2e7 11165 . . . . . . 7  |-  ( 5  +  2 )  =  7
8078, 79eqtri 2644 . . . . . 6  |-  ( ( 1  x.  5 )  +  ( 0  +  2 ) )  =  7
81 5t4e20 11637 . . . . . . . 8  |-  ( 5  x.  4 )  = ; 2
0
8275, 56, 81mulcomli 10047 . . . . . . 7  |-  ( 4  x.  5 )  = ; 2
0
83 9cn 11108 . . . . . . . 8  |-  9  e.  CC
8483addid2i 10224 . . . . . . 7  |-  ( 0  +  9 )  =  9
853, 22, 35, 82, 84decaddi 11579 . . . . . 6  |-  ( ( 4  x.  5 )  +  9 )  = ; 2
9
862, 13, 22, 35, 44, 74, 5, 35, 3, 80, 85decmac 11566 . . . . 5  |-  ( (; 1
4  x.  5 )  +  9 )  = ; 7
9
874, 5, 35, 35, 37, 42, 14, 35, 11, 73, 86decma2c 11568 . . . 4  |-  ( (; 1
4  x. ;; 1 2 5 )  +  (; 8 7  + ; 1 2 ) )  = ;;; 1 8 4 9
8883mulid2i 10043 . . . . . . . . 9  |-  ( 1  x.  9 )  =  9
8988oveq1i 6660 . . . . . . . 8  |-  ( ( 1  x.  9 )  +  3 )  =  ( 9  +  3 )
90 9p3e12 11621 . . . . . . . 8  |-  ( 9  +  3 )  = ; 1
2
9189, 90eqtri 2644 . . . . . . 7  |-  ( ( 1  x.  9 )  +  3 )  = ; 1
2
92 9t4e36 11665 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
9383, 56, 92mulcomli 10047 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
9435, 2, 13, 44, 18, 16, 91, 93decmul1c 11587 . . . . . 6  |-  (; 1 4  x.  9 )  = ;; 1 2 6
9594oveq1i 6660 . . . . 5  |-  ( (; 1
4  x.  9 )  +  0 )  =  (;; 1 2 6  +  0 )
964, 18deccl 11512 . . . . . . 7  |- ;; 1 2 6  e.  NN0
9796nn0cni 11304 . . . . . 6  |- ;; 1 2 6  e.  CC
9897addid1i 10223 . . . . 5  |-  (;; 1 2 6  +  0 )  = ;; 1 2 6
9995, 98eqtri 2644 . . . 4  |-  ( (; 1
4  x.  9 )  +  0 )  = ;; 1 2 6
1006, 35, 21, 22, 1, 36, 14, 18, 4, 87, 99decma2c 11568 . . 3  |-  ( (; 1
4  x.  N )  + ;; 8 7 0 )  = ;;;; 1 8 4 9 6
101 eqid 2622 . . . 4  |- ;; 1 3 6  = ;; 1 3 6
10220, 2deccl 11512 . . . 4  |- ; 8 1  e.  NN0
103 eqid 2622 . . . . 5  |- ; 1 3  = ; 1 3
104 eqid 2622 . . . . 5  |- ; 8 1  = ; 8 1
10513, 22deccl 11512 . . . . 5  |- ; 4 0  e.  NN0
106 eqid 2622 . . . . . . 7  |- ; 4 0  = ; 4 0
10756addid2i 10224 . . . . . . 7  |-  ( 0  +  4 )  =  4
108 8cn 11106 . . . . . . . 8  |-  8  e.  CC
109108addid1i 10223 . . . . . . 7  |-  ( 8  +  0 )  =  8
11022, 20, 13, 22, 60, 106, 107, 109decadd 11570 . . . . . 6  |-  ( 8  + ; 4 0 )  = ; 4
8
111 4p1e5 11154 . . . . . . . 8  |-  ( 4  +  1 )  =  5
1125dec0h 11522 . . . . . . . 8  |-  5  = ; 0 5
113111, 112eqtri 2644 . . . . . . 7  |-  ( 4  +  1 )  = ; 0
5
11445mulid1i 10042 . . . . . . . . 9  |-  ( 3  x.  1 )  =  3
115114oveq1i 6660 . . . . . . . 8  |-  ( ( 3  x.  1 )  +  5 )  =  ( 3  +  5 )
116 5p3e8 11166 . . . . . . . . 9  |-  ( 5  +  3 )  =  8
11775, 45, 116addcomli 10228 . . . . . . . 8  |-  ( 3  +  5 )  =  8
118115, 117, 603eqtri 2648 . . . . . . 7  |-  ( ( 3  x.  1 )  +  5 )  = ; 0
8
1192, 16, 22, 5, 103, 113, 2, 20, 22, 55, 118decmac 11566 . . . . . 6  |-  ( (; 1
3  x.  1 )  +  ( 4  +  1 ) )  = ; 1
8
120 6cn 11102 . . . . . . . . 9  |-  6  e.  CC
121120mulid1i 10042 . . . . . . . 8  |-  ( 6  x.  1 )  =  6
122121oveq1i 6660 . . . . . . 7  |-  ( ( 6  x.  1 )  +  8 )  =  ( 6  +  8 )
123108, 120, 70addcomli 10228 . . . . . . 7  |-  ( 6  +  8 )  = ; 1
4
124122, 123eqtri 2644 . . . . . 6  |-  ( ( 6  x.  1 )  +  8 )  = ; 1
4
12517, 18, 13, 20, 101, 110, 2, 13, 2, 119, 124decmac 11566 . . . . 5  |-  ( (;; 1 3 6  x.  1 )  +  ( 8  + ; 4 0 ) )  = ;; 1 8 4
1262dec0h 11522 . . . . . 6  |-  1  = ; 0 1
12765, 126eqtri 2644 . . . . . . 7  |-  ( 0  +  1 )  = ; 0
1
12845mulid2i 10043 . . . . . . . . 9  |-  ( 1  x.  3 )  =  3
129128, 65oveq12i 6662 . . . . . . . 8  |-  ( ( 1  x.  3 )  +  ( 0  +  1 ) )  =  ( 3  +  1 )
130129, 47eqtri 2644 . . . . . . 7  |-  ( ( 1  x.  3 )  +  ( 0  +  1 ) )  =  4
131 3t3e9 11180 . . . . . . . . 9  |-  ( 3  x.  3 )  =  9
132131oveq1i 6660 . . . . . . . 8  |-  ( ( 3  x.  3 )  +  1 )  =  ( 9  +  1 )
133 9p1e10 11496 . . . . . . . 8  |-  ( 9  +  1 )  = ; 1
0
134132, 133eqtri 2644 . . . . . . 7  |-  ( ( 3  x.  3 )  +  1 )  = ; 1
0
1352, 16, 22, 2, 103, 127, 16, 22, 2, 130, 134decmac 11566 . . . . . 6  |-  ( (; 1
3  x.  3 )  +  ( 0  +  1 ) )  = ; 4
0
136 6t3e18 11642 . . . . . . 7  |-  ( 6  x.  3 )  = ; 1
8
1372, 20, 2, 136, 40decaddi 11579 . . . . . 6  |-  ( ( 6  x.  3 )  +  1 )  = ; 1
9
13817, 18, 22, 2, 101, 126, 16, 35, 2, 135, 137decmac 11566 . . . . 5  |-  ( (;; 1 3 6  x.  3 )  +  1 )  = ;; 4 0 9
1392, 16, 20, 2, 103, 104, 19, 35, 105, 125, 138decma2c 11568 . . . 4  |-  ( (;; 1 3 6  x. ; 1
3 )  + ; 8 1 )  = ;;; 1 8 4 9
14016dec0h 11522 . . . . . 6  |-  3  = ; 0 3
141120mulid2i 10043 . . . . . . . 8  |-  ( 1  x.  6 )  =  6
142141, 77oveq12i 6662 . . . . . . 7  |-  ( ( 1  x.  6 )  +  ( 0  +  2 ) )  =  ( 6  +  2 )
143 6p2e8 11169 . . . . . . 7  |-  ( 6  +  2 )  =  8
144142, 143eqtri 2644 . . . . . 6  |-  ( ( 1  x.  6 )  +  ( 0  +  2 ) )  =  8
145120, 45, 136mulcomli 10047 . . . . . . 7  |-  ( 3  x.  6 )  = ; 1
8
146 1p1e2 11134 . . . . . . 7  |-  ( 1  +  1 )  =  2
147 8p3e11 11612 . . . . . . 7  |-  ( 8  +  3 )  = ; 1
1
1482, 20, 16, 145, 146, 2, 147decaddci 11580 . . . . . 6  |-  ( ( 3  x.  6 )  +  3 )  = ; 2
1
1492, 16, 22, 16, 103, 140, 18, 2, 3, 144, 148decmac 11566 . . . . 5  |-  ( (; 1
3  x.  6 )  +  3 )  = ; 8
1
150 6t6e36 11646 . . . . 5  |-  ( 6  x.  6 )  = ; 3
6
15118, 17, 18, 101, 18, 16, 149, 150decmul1c 11587 . . . 4  |-  (;; 1 3 6  x.  6 )  = ;; 8 1 6
15219, 17, 18, 101, 18, 102, 139, 151decmul2c 11589 . . 3  |-  (;; 1 3 6  x. ;; 1 3 6 )  = ;;;; 1 8 4 9 6
153100, 152eqtr4i 2647 . 2  |-  ( (; 1
4  x.  N )  + ;; 8 7 0 )  =  (;; 1 3 6  x. ;; 1 3 6 )
1549, 10, 12, 15, 19, 23, 24, 34, 153mod2xi 15773 1  |-  ( ( 2 ^; 3 4 )  mod 
N )  =  (;; 8 7 0  mod 
N )
Colors of variables: wff setvar class
Syntax hints:    = wceq 1483  (class class class)co 6650   0cc0 9936   1c1 9937    + caddc 9939    x. cmul 9941   NNcn 11020   2c2 11070   3c3 11071   4c4 11072   5c5 11073   6c6 11074   7c7 11075   8c8 11076   9c9 11077  ;cdc 11493    mod cmo 12668   ^cexp 12860
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1722  ax-4 1737  ax-5 1839  ax-6 1888  ax-7 1935  ax-8 1992  ax-9 1999  ax-10 2019  ax-11 2034  ax-12 2047  ax-13 2246  ax-ext 2602  ax-sep 4781  ax-nul 4789  ax-pow 4843  ax-pr 4906  ax-un 6949  ax-cnex 9992  ax-resscn 9993  ax-1cn 9994  ax-icn 9995  ax-addcl 9996  ax-addrcl 9997  ax-mulcl 9998  ax-mulrcl 9999  ax-mulcom 10000  ax-addass 10001  ax-mulass 10002  ax-distr 10003  ax-i2m1 10004  ax-1ne0 10005  ax-1rid 10006  ax-rnegex 10007  ax-rrecex 10008  ax-cnre 10009  ax-pre-lttri 10010  ax-pre-lttrn 10011  ax-pre-ltadd 10012  ax-pre-mulgt0 10013  ax-pre-sup 10014
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1038  df-3an 1039  df-tru 1486  df-ex 1705  df-nf 1710  df-sb 1881  df-eu 2474  df-mo 2475  df-clab 2609  df-cleq 2615  df-clel 2618  df-nfc 2753  df-ne 2795  df-nel 2898  df-ral 2917  df-rex 2918  df-reu 2919  df-rmo 2920  df-rab 2921  df-v 3202  df-sbc 3436  df-csb 3534  df-dif 3577  df-un 3579  df-in 3581  df-ss 3588  df-pss 3590  df-nul 3916  df-if 4087  df-pw 4160  df-sn 4178  df-pr 4180  df-tp 4182  df-op 4184  df-uni 4437  df-iun 4522  df-br 4654  df-opab 4713  df-mpt 4730  df-tr 4753  df-id 5024  df-eprel 5029  df-po 5035  df-so 5036  df-fr 5073  df-we 5075  df-xp 5120  df-rel 5121  df-cnv 5122  df-co 5123  df-dm 5124  df-rn 5125  df-res 5126  df-ima 5127  df-pred 5680  df-ord 5726  df-on 5727  df-lim 5728  df-suc 5729  df-iota 5851  df-fun 5890  df-fn 5891  df-f 5892  df-f1 5893  df-fo 5894  df-f1o 5895  df-fv 5896  df-riota 6611  df-ov 6653  df-oprab 6654  df-mpt2 6655  df-om 7066  df-2nd 7169  df-wrecs 7407  df-recs 7468  df-rdg 7506  df-er 7742  df-en 7956  df-dom 7957  df-sdom 7958  df-sup 8348  df-inf 8349  df-pnf 10076  df-mnf 10077  df-xr 10078  df-ltxr 10079  df-le 10080  df-sub 10268  df-neg 10269  df-div 10685  df-nn 11021  df-2 11079  df-3 11080  df-4 11081  df-5 11082  df-6 11083  df-7 11084  df-8 11085  df-9 11086  df-n0 11293  df-z 11378  df-dec 11494  df-uz 11688  df-rp 11833  df-fl 12593  df-mod 12669  df-seq 12802  df-exp 12861
This theorem is referenced by:  1259lem3  15840  1259lem5  15842
  Copyright terms: Public domain W3C validator