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

Theorem 2503lem1 15844
Description: Lemma for 2503prm 15847. Calculate a power mod. In decimal, we calculate  2 ^ 1 8  =  5 1 2 ^ 2  =  1 0 4 N  +  1 8 3 2  ==  1 8 3 2. (Contributed by Mario Carneiro, 3-Mar-2014.) (Revised by Mario Carneiro, 20-Apr-2015.) (Proof shortened by AV, 16-Sep-2021.)
Hypothesis
Ref Expression
2503prm.1  |-  N  = ;;; 2 5 0 3
Assertion
Ref Expression
2503lem1  |-  ( ( 2 ^; 1 8 )  mod 
N )  =  (;;; 1 8 3 2  mod 
N )

Proof of Theorem 2503lem1
StepHypRef Expression
1 2503prm.1 . . 3  |-  N  = ;;; 2 5 0 3
2 2nn0 11309 . . . . . 6  |-  2  e.  NN0
3 5nn0 11312 . . . . . 6  |-  5  e.  NN0
42, 3deccl 11512 . . . . 5  |- ; 2 5  e.  NN0
5 0nn0 11307 . . . . 5  |-  0  e.  NN0
64, 5deccl 11512 . . . 4  |- ;; 2 5 0  e.  NN0
7 3nn 11186 . . . 4  |-  3  e.  NN
86, 7decnncl 11518 . . 3  |- ;;; 2 5 0 3  e.  NN
91, 8eqeltri 2697 . 2  |-  N  e.  NN
10 2nn 11185 . 2  |-  2  e.  NN
11 9nn0 11316 . 2  |-  9  e.  NN0
12 10nn0 11516 . . . 4  |- ; 1 0  e.  NN0
13 4nn0 11311 . . . 4  |-  4  e.  NN0
1412, 13deccl 11512 . . 3  |- ;; 1 0 4  e.  NN0
1514nn0zi 11402 . 2  |- ;; 1 0 4  e.  ZZ
16 1nn0 11308 . . . 4  |-  1  e.  NN0
173, 16deccl 11512 . . 3  |- ; 5 1  e.  NN0
1817, 2deccl 11512 . 2  |- ;; 5 1 2  e.  NN0
19 8nn0 11315 . . . . 5  |-  8  e.  NN0
2016, 19deccl 11512 . . . 4  |- ; 1 8  e.  NN0
21 3nn0 11310 . . . 4  |-  3  e.  NN0
2220, 21deccl 11512 . . 3  |- ;; 1 8 3  e.  NN0
2322, 2deccl 11512 . 2  |- ;;; 1 8 3 2  e.  NN0
24 8p1e9 11158 . . . 4  |-  ( 8  +  1 )  =  9
25 6nn0 11313 . . . . 5  |-  6  e.  NN0
26 2exp8 15796 . . . . 5  |-  ( 2 ^ 8 )  = ;; 2 5 6
27 eqid 2622 . . . . . 6  |- ; 2 5  = ; 2 5
2816dec0h 11522 . . . . . 6  |-  1  = ; 0 1
29 2t2e4 11177 . . . . . . . 8  |-  ( 2  x.  2 )  =  4
30 ax-1cn 9994 . . . . . . . . 9  |-  1  e.  CC
3130addid2i 10224 . . . . . . . 8  |-  ( 0  +  1 )  =  1
3229, 31oveq12i 6662 . . . . . . 7  |-  ( ( 2  x.  2 )  +  ( 0  +  1 ) )  =  ( 4  +  1 )
33 4p1e5 11154 . . . . . . 7  |-  ( 4  +  1 )  =  5
3432, 33eqtri 2644 . . . . . 6  |-  ( ( 2  x.  2 )  +  ( 0  +  1 ) )  =  5
35 5t2e10 11634 . . . . . . 7  |-  ( 5  x.  2 )  = ; 1
0
3616, 5, 31, 35decsuc 11535 . . . . . 6  |-  ( ( 5  x.  2 )  +  1 )  = ; 1
1
372, 3, 5, 16, 27, 28, 2, 16, 16, 34, 36decmac 11566 . . . . 5  |-  ( (; 2
5  x.  2 )  +  1 )  = ; 5
1
38 6t2e12 11641 . . . . 5  |-  ( 6  x.  2 )  = ; 1
2
392, 4, 25, 26, 2, 16, 37, 38decmul1c 11587 . . . 4  |-  ( ( 2 ^ 8 )  x.  2 )  = ;; 5 1 2
402, 19, 24, 39numexpp1 15782 . . 3  |-  ( 2 ^ 9 )  = ;; 5 1 2
4140oveq1i 6660 . 2  |-  ( ( 2 ^ 9 )  mod  N )  =  (;; 5 1 2  mod  N )
42 9cn 11108 . . 3  |-  9  e.  CC
43 2cn 11091 . . 3  |-  2  e.  CC
44 9t2e18 11663 . . 3  |-  ( 9  x.  2 )  = ; 1
8
4542, 43, 44mulcomli 10047 . 2  |-  ( 2  x.  9 )  = ; 1
8
46 eqid 2622 . . . 4  |- ;;; 1 8 3 2  = ;;; 1 8 3 2
4721, 16deccl 11512 . . . 4  |- ; 3 1  e.  NN0
482, 16deccl 11512 . . . . 5  |- ; 2 1  e.  NN0
49 eqid 2622 . . . . 5  |- ;; 2 5 0  = ;; 2 5 0
50 eqid 2622 . . . . . 6  |- ;; 1 8 3  = ;; 1 8 3
51 eqid 2622 . . . . . 6  |- ; 3 1  = ; 3 1
52 eqid 2622 . . . . . . 7  |- ; 1 8  = ; 1 8
53 1p1e2 11134 . . . . . . 7  |-  ( 1  +  1 )  =  2
54 8p3e11 11612 . . . . . . 7  |-  ( 8  +  3 )  = ; 1
1
5516, 19, 21, 52, 53, 16, 54decaddci 11580 . . . . . 6  |-  (; 1 8  +  3 )  = ; 2 1
56 3p1e4 11153 . . . . . 6  |-  ( 3  +  1 )  =  4
5720, 21, 21, 16, 50, 51, 55, 56decadd 11570 . . . . 5  |-  (;; 1 8 3  + ; 3 1 )  = ;; 2 1 4
5848nn0cni 11304 . . . . . . 7  |- ; 2 1  e.  CC
5958addid1i 10223 . . . . . 6  |-  (; 2 1  +  0 )  = ; 2 1
603, 2deccl 11512 . . . . . 6  |- ; 5 2  e.  NN0
61 eqid 2622 . . . . . . 7  |- ;; 1 0 4  = ;; 1 0 4
6260nn0cni 11304 . . . . . . . 8  |- ; 5 2  e.  CC
63 eqid 2622 . . . . . . . . 9  |- ; 5 2  = ; 5 2
64 2p2e4 11144 . . . . . . . . 9  |-  ( 2  +  2 )  =  4
653, 2, 2, 63, 64decaddi 11579 . . . . . . . 8  |-  (; 5 2  +  2 )  = ; 5 4
6662, 43, 65addcomli 10228 . . . . . . 7  |-  ( 2  + ; 5 2 )  = ; 5
4
672dec0u 11520 . . . . . . . . 9  |-  (; 1 0  x.  2 )  = ; 2 0
68 5p1e6 11155 . . . . . . . . 9  |-  ( 5  +  1 )  =  6
6967, 68oveq12i 6662 . . . . . . . 8  |-  ( (; 1
0  x.  2 )  +  ( 5  +  1 ) )  =  (; 2 0  +  6 )
70 eqid 2622 . . . . . . . . 9  |- ; 2 0  = ; 2 0
71 6cn 11102 . . . . . . . . . 10  |-  6  e.  CC
7271addid2i 10224 . . . . . . . . 9  |-  ( 0  +  6 )  =  6
732, 5, 25, 70, 72decaddi 11579 . . . . . . . 8  |-  (; 2 0  +  6 )  = ; 2 6
7469, 73eqtri 2644 . . . . . . 7  |-  ( (; 1
0  x.  2 )  +  ( 5  +  1 ) )  = ; 2
6
75 4t2e8 11181 . . . . . . . . 9  |-  ( 4  x.  2 )  =  8
7675oveq1i 6660 . . . . . . . 8  |-  ( ( 4  x.  2 )  +  4 )  =  ( 8  +  4 )
77 8p4e12 11614 . . . . . . . 8  |-  ( 8  +  4 )  = ; 1
2
7876, 77eqtri 2644 . . . . . . 7  |-  ( ( 4  x.  2 )  +  4 )  = ; 1
2
7912, 13, 3, 13, 61, 66, 2, 2, 16, 74, 78decmac 11566 . . . . . 6  |-  ( (;; 1 0 4  x.  2 )  +  ( 2  + ; 5 2 ) )  = ;; 2 6 2
803dec0u 11520 . . . . . . . . 9  |-  (; 1 0  x.  5 )  = ; 5 0
8143addid2i 10224 . . . . . . . . 9  |-  ( 0  +  2 )  =  2
8280, 81oveq12i 6662 . . . . . . . 8  |-  ( (; 1
0  x.  5 )  +  ( 0  +  2 ) )  =  (; 5 0  +  2 )
83 eqid 2622 . . . . . . . . 9  |- ; 5 0  = ; 5 0
843, 5, 2, 83, 81decaddi 11579 . . . . . . . 8  |-  (; 5 0  +  2 )  = ; 5 2
8582, 84eqtri 2644 . . . . . . 7  |-  ( (; 1
0  x.  5 )  +  ( 0  +  2 ) )  = ; 5
2
86 5cn 11100 . . . . . . . . 9  |-  5  e.  CC
87 4cn 11098 . . . . . . . . 9  |-  4  e.  CC
88 5t4e20 11637 . . . . . . . . 9  |-  ( 5  x.  4 )  = ; 2
0
8986, 87, 88mulcomli 10047 . . . . . . . 8  |-  ( 4  x.  5 )  = ; 2
0
902, 5, 31, 89decsuc 11535 . . . . . . 7  |-  ( ( 4  x.  5 )  +  1 )  = ; 2
1
9112, 13, 5, 16, 61, 28, 3, 16, 2, 85, 90decmac 11566 . . . . . 6  |-  ( (;; 1 0 4  x.  5 )  +  1 )  = ;; 5 2 1
922, 3, 2, 16, 27, 59, 14, 16, 60, 79, 91decma2c 11568 . . . . 5  |-  ( (;; 1 0 4  x. ; 2
5 )  +  (; 2
1  +  0 ) )  = ;;; 2 6 2 1
9314nn0cni 11304 . . . . . . . 8  |- ;; 1 0 4  e.  CC
9493mul01i 10226 . . . . . . 7  |-  (;; 1 0 4  x.  0 )  =  0
9594oveq1i 6660 . . . . . 6  |-  ( (;; 1 0 4  x.  0 )  +  4 )  =  ( 0  +  4 )
9687addid2i 10224 . . . . . 6  |-  ( 0  +  4 )  =  4
9713dec0h 11522 . . . . . 6  |-  4  = ; 0 4
9895, 96, 973eqtri 2648 . . . . 5  |-  ( (;; 1 0 4  x.  0 )  +  4 )  = ; 0 4
994, 5, 48, 13, 49, 57, 14, 13, 5, 92, 98decma2c 11568 . . . 4  |-  ( (;; 1 0 4  x. ;; 2 5 0 )  +  (;; 1 8 3  + ; 3 1 ) )  = ;;;; 2 6 2 1 4
100 eqid 2622 . . . . . 6  |- ; 1 0  = ; 1 0
101 3cn 11095 . . . . . . . . 9  |-  3  e.  CC
102101mulid2i 10043 . . . . . . . 8  |-  ( 1  x.  3 )  =  3
103 00id 10211 . . . . . . . 8  |-  ( 0  +  0 )  =  0
104102, 103oveq12i 6662 . . . . . . 7  |-  ( ( 1  x.  3 )  +  ( 0  +  0 ) )  =  ( 3  +  0 )
105101addid1i 10223 . . . . . . 7  |-  ( 3  +  0 )  =  3
106104, 105eqtri 2644 . . . . . 6  |-  ( ( 1  x.  3 )  +  ( 0  +  0 ) )  =  3
107101mul02i 10225 . . . . . . . 8  |-  ( 0  x.  3 )  =  0
108107oveq1i 6660 . . . . . . 7  |-  ( ( 0  x.  3 )  +  1 )  =  ( 0  +  1 )
109108, 31, 283eqtri 2648 . . . . . 6  |-  ( ( 0  x.  3 )  +  1 )  = ; 0
1
11016, 5, 5, 16, 100, 28, 21, 16, 5, 106, 109decmac 11566 . . . . 5  |-  ( (; 1
0  x.  3 )  +  1 )  = ; 3
1
111 4t3e12 11632 . . . . . 6  |-  ( 4  x.  3 )  = ; 1
2
11216, 2, 2, 111, 64decaddi 11579 . . . . 5  |-  ( ( 4  x.  3 )  +  2 )  = ; 1
4
11312, 13, 2, 61, 21, 13, 16, 110, 112decrmac 11577 . . . 4  |-  ( (;; 1 0 4  x.  3 )  +  2 )  = ;; 3 1 4
1146, 21, 22, 2, 1, 46, 14, 13, 47, 99, 113decma2c 11568 . . 3  |-  ( (;; 1 0 4  x.  N )  + ;;; 1 8 3 2 )  = ;;;;; 2 6 2 1 4 4
115 eqid 2622 . . . 4  |- ;; 5 1 2  = ;; 5 1 2
11612, 2deccl 11512 . . . 4  |- ;; 1 0 2  e.  NN0
117 eqid 2622 . . . . 5  |- ; 5 1  = ; 5 1
118 eqid 2622 . . . . 5  |- ;; 1 0 2  = ;; 1 0 2
11986, 30, 68addcomli 10228 . . . . . . 7  |-  ( 1  +  5 )  =  6
12016, 5, 3, 16, 100, 117, 119, 31decadd 11570 . . . . . 6  |-  (; 1 0  + ; 5 1 )  = ; 6
1
121 7nn0 11314 . . . . . . 7  |-  7  e.  NN0
122 6p1e7 11156 . . . . . . . 8  |-  ( 6  +  1 )  =  7
123121dec0h 11522 . . . . . . . 8  |-  7  = ; 0 7
124122, 123eqtri 2644 . . . . . . 7  |-  ( 6  +  1 )  = ; 0
7
12531oveq2i 6661 . . . . . . . 8  |-  ( ( 5  x.  5 )  +  ( 0  +  1 ) )  =  ( ( 5  x.  5 )  +  1 )
126 5t5e25 11639 . . . . . . . . 9  |-  ( 5  x.  5 )  = ; 2
5
1272, 3, 68, 126decsuc 11535 . . . . . . . 8  |-  ( ( 5  x.  5 )  +  1 )  = ; 2
6
128125, 127eqtri 2644 . . . . . . 7  |-  ( ( 5  x.  5 )  +  ( 0  +  1 ) )  = ; 2
6
12986mulid2i 10043 . . . . . . . . 9  |-  ( 1  x.  5 )  =  5
130129oveq1i 6660 . . . . . . . 8  |-  ( ( 1  x.  5 )  +  7 )  =  ( 5  +  7 )
131 7cn 11104 . . . . . . . . 9  |-  7  e.  CC
132 7p5e12 11607 . . . . . . . . 9  |-  ( 7  +  5 )  = ; 1
2
133131, 86, 132addcomli 10228 . . . . . . . 8  |-  ( 5  +  7 )  = ; 1
2
134130, 133eqtri 2644 . . . . . . 7  |-  ( ( 1  x.  5 )  +  7 )  = ; 1
2
1353, 16, 5, 121, 117, 124, 3, 2, 16, 128, 134decmac 11566 . . . . . 6  |-  ( (; 5
1  x.  5 )  +  ( 6  +  1 ) )  = ;; 2 6 2
13686, 43, 35mulcomli 10047 . . . . . . 7  |-  ( 2  x.  5 )  = ; 1
0
13716, 5, 31, 136decsuc 11535 . . . . . 6  |-  ( ( 2  x.  5 )  +  1 )  = ; 1
1
13817, 2, 25, 16, 115, 120, 3, 16, 16, 135, 137decmac 11566 . . . . 5  |-  ( (;; 5 1 2  x.  5 )  +  (; 1
0  + ; 5 1 ) )  = ;;; 2 6 2 1
13917nn0cni 11304 . . . . . . 7  |- ; 5 1  e.  CC
140139mulid1i 10042 . . . . . 6  |-  (; 5 1  x.  1 )  = ; 5 1
14143mulid1i 10042 . . . . . . . 8  |-  ( 2  x.  1 )  =  2
142141oveq1i 6660 . . . . . . 7  |-  ( ( 2  x.  1 )  +  2 )  =  ( 2  +  2 )
143142, 64eqtri 2644 . . . . . 6  |-  ( ( 2  x.  1 )  +  2 )  =  4
14417, 2, 2, 115, 16, 140, 143decrmanc 11576 . . . . 5  |-  ( (;; 5 1 2  x.  1 )  +  2 )  = ;; 5 1 4
1453, 16, 12, 2, 117, 118, 18, 13, 17, 138, 144decma2c 11568 . . . 4  |-  ( (;; 5 1 2  x. ; 5
1 )  + ;; 1 0 2 )  = ;;;; 2 6 2 1 4
14643mulid2i 10043 . . . . . 6  |-  ( 1  x.  2 )  =  2
1472, 3, 16, 117, 2, 35, 146decmul1 11585 . . . . 5  |-  (; 5 1  x.  2 )  = ;; 1 0 2
1482, 17, 2, 115, 13, 147, 29decmul1 11585 . . . 4  |-  (;; 5 1 2  x.  2 )  = ;;; 1 0 2 4
14918, 17, 2, 115, 13, 116, 145, 148decmul2c 11589 . . 3  |-  (;; 5 1 2  x. ;; 5 1 2 )  = ;;;;; 2 6 2 1 4 4
150114, 149eqtr4i 2647 . 2  |-  ( (;; 1 0 4  x.  N )  + ;;; 1 8 3 2 )  =  (;; 5 1 2  x. ;; 5 1 2 )
1519, 10, 11, 15, 18, 23, 41, 45, 150mod2xi 15773 1  |-  ( ( 2 ^; 1 8 )  mod 
N )  =  (;;; 1 8 3 2  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:  2503lem2  15845  2503lem3  15846
  Copyright terms: Public domain W3C validator