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

Theorem 1259lem5 13383
Description: Lemma for 1259prm 13384. Calculate the GCD of  2 ^ 3 4  -  1  ==  8 6 9 with  N  =  1 2 5 9. (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
1259lem5  |-  ( ( ( 2 ^; 3 4 )  - 
1 )  gcd  N
)  =  1

Proof of Theorem 1259lem5
StepHypRef Expression
1 2nn 10067 . . . 4  |-  2  e.  NN
2 3nn0 10173 . . . . 5  |-  3  e.  NN0
3 4nn0 10174 . . . . 5  |-  4  e.  NN0
42, 3deccl 10330 . . . 4  |- ; 3 4  e.  NN0
5 nnexpcl 11323 . . . 4  |-  ( ( 2  e.  NN  /\ ; 3 4  e.  NN0 )  -> 
( 2 ^; 3 4 )  e.  NN )
61, 4, 5mp2an 654 . . 3  |-  ( 2 ^; 3 4 )  e.  NN
7 nnm1nn0 10195 . . 3  |-  ( ( 2 ^; 3 4 )  e.  NN  ->  ( (
2 ^; 3 4 )  - 
1 )  e.  NN0 )
86, 7ax-mp 8 . 2  |-  ( ( 2 ^; 3 4 )  - 
1 )  e.  NN0
9 8nn0 10178 . . . 4  |-  8  e.  NN0
10 6nn0 10176 . . . 4  |-  6  e.  NN0
119, 10deccl 10330 . . 3  |- ; 8 6  e.  NN0
12 9nn0 10179 . . 3  |-  9  e.  NN0
1311, 12deccl 10330 . 2  |- ;; 8 6 9  e.  NN0
14 1259prm.1 . . 3  |-  N  = ;;; 1 2 5 9
15 1nn0 10171 . . . . . 6  |-  1  e.  NN0
16 2nn0 10172 . . . . . 6  |-  2  e.  NN0
1715, 16deccl 10330 . . . . 5  |- ; 1 2  e.  NN0
18 5nn0 10175 . . . . 5  |-  5  e.  NN0
1917, 18deccl 10330 . . . 4  |- ;; 1 2 5  e.  NN0
20 9nn 10074 . . . 4  |-  9  e.  NN
2119, 20decnncl 10329 . . 3  |- ;;; 1 2 5 9  e.  NN
2214, 21eqeltri 2459 . 2  |-  N  e.  NN
23141259lem2 13380 . . 3  |-  ( ( 2 ^; 3 4 )  mod 
N )  =  (;; 8 7 0  mod 
N )
24 6p1e7 10041 . . . . 5  |-  ( 6  +  1 )  =  7
25 eqid 2389 . . . . 5  |- ; 8 6  = ; 8 6
269, 10, 24, 25decsuc 10339 . . . 4  |-  (; 8 6  +  1 )  = ; 8 7
27 eqid 2389 . . . 4  |- ;; 8 6 9  = ;; 8 6 9
2811, 26, 27decsucc 10343 . . 3  |-  (;; 8 6 9  +  1 )  = ;; 8 7 0
2922, 6, 15, 13, 23, 28modsubi 13337 . 2  |-  ( ( ( 2 ^; 3 4 )  - 
1 )  mod  N
)  =  (;; 8 6 9  mod  N
)
302, 12deccl 10330 . . . 4  |- ; 3 9  e.  NN0
31 0nn0 10170 . . . 4  |-  0  e.  NN0
3230, 31deccl 10330 . . 3  |- ;; 3 9 0  e.  NN0
339, 12deccl 10330 . . . 4  |- ; 8 9  e.  NN0
3416, 15deccl 10330 . . . . . 6  |- ; 2 1  e.  NN0
3515, 2deccl 10330 . . . . . . 7  |- ; 1 3  e.  NN0
3634nn0zi 10240 . . . . . . . . 9  |- ; 2 1  e.  ZZ
3735nn0zi 10240 . . . . . . . . 9  |- ; 1 3  e.  ZZ
38 gcdcom 12949 . . . . . . . . 9  |-  ( (; 2
1  e.  ZZ  /\ ; 1 3  e.  ZZ )  -> 
(; 2 1  gcd ; 1 3 )  =  (; 1 3  gcd ; 2 1 ) )
3936, 37, 38mp2an 654 . . . . . . . 8  |-  (; 2 1  gcd ; 1 3 )  =  (; 1 3  gcd ; 2 1 )
40 3nn 10068 . . . . . . . . . . 11  |-  3  e.  NN
4115, 40decnncl 10329 . . . . . . . . . 10  |- ; 1 3  e.  NN
42 8nn 10073 . . . . . . . . . 10  |-  8  e.  NN
43 eqid 2389 . . . . . . . . . . 11  |- ; 1 3  = ; 1 3
449dec0h 10332 . . . . . . . . . . 11  |-  8  = ; 0 8
45 ax-1cn 8983 . . . . . . . . . . . . . 14  |-  1  e.  CC
4645mulid1i 9027 . . . . . . . . . . . . 13  |-  ( 1  x.  1 )  =  1
4745addid2i 9188 . . . . . . . . . . . . 13  |-  ( 0  +  1 )  =  1
4846, 47oveq12i 6034 . . . . . . . . . . . 12  |-  ( ( 1  x.  1 )  +  ( 0  +  1 ) )  =  ( 1  +  1 )
49 1p1e2 10028 . . . . . . . . . . . 12  |-  ( 1  +  1 )  =  2
5048, 49eqtri 2409 . . . . . . . . . . 11  |-  ( ( 1  x.  1 )  +  ( 0  +  1 ) )  =  2
51 3cn 10006 . . . . . . . . . . . . . 14  |-  3  e.  CC
5251mulid1i 9027 . . . . . . . . . . . . 13  |-  ( 3  x.  1 )  =  3
5352oveq1i 6032 . . . . . . . . . . . 12  |-  ( ( 3  x.  1 )  +  8 )  =  ( 3  +  8 )
5442nncni 9944 . . . . . . . . . . . . 13  |-  8  e.  CC
55 8p3e11 10372 . . . . . . . . . . . . 13  |-  ( 8  +  3 )  = ; 1
1
5654, 51, 55addcomli 9192 . . . . . . . . . . . 12  |-  ( 3  +  8 )  = ; 1
1
5753, 56eqtri 2409 . . . . . . . . . . 11  |-  ( ( 3  x.  1 )  +  8 )  = ; 1
1
5815, 2, 31, 9, 43, 44, 15, 15, 15, 50, 57decmac 10355 . . . . . . . . . 10  |-  ( (; 1
3  x.  1 )  +  8 )  = ; 2
1
59 1nn 9945 . . . . . . . . . . 11  |-  1  e.  NN
60 8lt10 10113 . . . . . . . . . . 11  |-  8  <  10
6159, 2, 9, 60declti 10341 . . . . . . . . . 10  |-  8  < ; 1
3
6241, 15, 42, 58, 61ndvdsi 12859 . . . . . . . . 9  |-  -. ; 1 3  || ; 2 1
63 13prm 13367 . . . . . . . . . 10  |- ; 1 3  e.  Prime
64 coprm 13029 . . . . . . . . . 10  |-  ( (; 1
3  e.  Prime  /\ ; 2 1  e.  ZZ )  ->  ( -. ; 1 3  || ; 2 1  <->  (; 1 3  gcd ; 2 1 )  =  1 ) )
6563, 36, 64mp2an 654 . . . . . . . . 9  |-  ( -. ; 1
3  || ; 2 1  <->  (; 1 3  gcd ; 2 1 )  =  1 )
6662, 65mpbi 200 . . . . . . . 8  |-  (; 1 3  gcd ; 2 1 )  =  1
6739, 66eqtri 2409 . . . . . . 7  |-  (; 2 1  gcd ; 1 3 )  =  1
68 eqid 2389 . . . . . . . 8  |- ; 2 1  = ; 2 1
69 2cn 10004 . . . . . . . . . . 11  |-  2  e.  CC
7069mulid2i 9028 . . . . . . . . . 10  |-  ( 1  x.  2 )  =  2
7145addid1i 9187 . . . . . . . . . 10  |-  ( 1  +  0 )  =  1
7270, 71oveq12i 6034 . . . . . . . . 9  |-  ( ( 1  x.  2 )  +  ( 1  +  0 ) )  =  ( 2  +  1 )
73 2p1e3 10037 . . . . . . . . 9  |-  ( 2  +  1 )  =  3
7472, 73eqtri 2409 . . . . . . . 8  |-  ( ( 1  x.  2 )  +  ( 1  +  0 ) )  =  3
7546oveq1i 6032 . . . . . . . . 9  |-  ( ( 1  x.  1 )  +  3 )  =  ( 1  +  3 )
76 3p1e4 10038 . . . . . . . . . 10  |-  ( 3  +  1 )  =  4
7751, 45, 76addcomli 9192 . . . . . . . . 9  |-  ( 1  +  3 )  =  4
783dec0h 10332 . . . . . . . . 9  |-  4  = ; 0 4
7975, 77, 783eqtri 2413 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  3 )  = ; 0
4
8016, 15, 15, 2, 68, 43, 15, 3, 31, 74, 79decma2c 10356 . . . . . . 7  |-  ( ( 1  x. ; 2 1 )  + ; 1
3 )  = ; 3 4
8115, 35, 34, 67, 80gcdi 13338 . . . . . 6  |-  (; 3 4  gcd ; 2 1 )  =  1
82 eqid 2389 . . . . . . 7  |- ; 3 4  = ; 3 4
83 3t2e6 10062 . . . . . . . . . 10  |-  ( 3  x.  2 )  =  6
8451, 69, 83mulcomli 9032 . . . . . . . . 9  |-  ( 2  x.  3 )  =  6
8569addid1i 9187 . . . . . . . . 9  |-  ( 2  +  0 )  =  2
8684, 85oveq12i 6034 . . . . . . . 8  |-  ( ( 2  x.  3 )  +  ( 2  +  0 ) )  =  ( 6  +  2 )
87 6p2e8 10054 . . . . . . . 8  |-  ( 6  +  2 )  =  8
8886, 87eqtri 2409 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 2  +  0 ) )  =  8
89 4cn 10008 . . . . . . . . . 10  |-  4  e.  CC
90 4t2e8 10064 . . . . . . . . . 10  |-  ( 4  x.  2 )  =  8
9189, 69, 90mulcomli 9032 . . . . . . . . 9  |-  ( 2  x.  4 )  =  8
9291oveq1i 6032 . . . . . . . 8  |-  ( ( 2  x.  4 )  +  1 )  =  ( 8  +  1 )
93 8p1e9 10043 . . . . . . . 8  |-  ( 8  +  1 )  =  9
9412dec0h 10332 . . . . . . . 8  |-  9  = ; 0 9
9592, 93, 943eqtri 2413 . . . . . . 7  |-  ( ( 2  x.  4 )  +  1 )  = ; 0
9
962, 3, 16, 15, 82, 68, 16, 12, 31, 88, 95decma2c 10356 . . . . . 6  |-  ( ( 2  x. ; 3 4 )  + ; 2
1 )  = ; 8 9
9716, 34, 4, 81, 96gcdi 13338 . . . . 5  |-  (; 8 9  gcd ; 3 4 )  =  1
98 eqid 2389 . . . . . 6  |- ; 8 9  = ; 8 9
99 4p3e7 10048 . . . . . . . . 9  |-  ( 4  +  3 )  =  7
10089, 51, 99addcomli 9192 . . . . . . . 8  |-  ( 3  +  4 )  =  7
101100oveq2i 6033 . . . . . . 7  |-  ( ( 4  x.  8 )  +  ( 3  +  4 ) )  =  ( ( 4  x.  8 )  +  7 )
102 7nn0 10177 . . . . . . . 8  |-  7  e.  NN0
103 8t4e32 10406 . . . . . . . . 9  |-  ( 8  x.  4 )  = ; 3
2
10454, 89, 103mulcomli 9032 . . . . . . . 8  |-  ( 4  x.  8 )  = ; 3
2
105 7nn 10072 . . . . . . . . . 10  |-  7  e.  NN
106105nncni 9944 . . . . . . . . 9  |-  7  e.  CC
107 7p2e9 10057 . . . . . . . . 9  |-  ( 7  +  2 )  =  9
108106, 69, 107addcomli 9192 . . . . . . . 8  |-  ( 2  +  7 )  =  9
1092, 16, 102, 104, 108decaddi 10360 . . . . . . 7  |-  ( ( 4  x.  8 )  +  7 )  = ; 3
9
110101, 109eqtri 2409 . . . . . 6  |-  ( ( 4  x.  8 )  +  ( 3  +  4 ) )  = ; 3
9
11120nncni 9944 . . . . . . . 8  |-  9  e.  CC
112 9t4e36 10413 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
113111, 89, 112mulcomli 9032 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
114 6p4e10 10056 . . . . . . 7  |-  ( 6  +  4 )  =  10
1152, 10, 3, 113, 76, 114decaddci2 10362 . . . . . 6  |-  ( ( 4  x.  9 )  +  4 )  = ; 4
0
1169, 12, 2, 3, 98, 82, 3, 31, 3, 110, 115decma2c 10356 . . . . 5  |-  ( ( 4  x. ; 8 9 )  + ; 3
4 )  = ;; 3 9 0
1173, 4, 33, 97, 116gcdi 13338 . . . 4  |-  (;; 3 9 0  gcd ; 8 9 )  =  1
118 eqid 2389 . . . . 5  |- ;; 3 9 0  = ;; 3 9 0
119 eqid 2389 . . . . . 6  |- ; 3 9  = ; 3 9
12054addid1i 9187 . . . . . . 7  |-  ( 8  +  0 )  =  8
121120, 44eqtri 2409 . . . . . 6  |-  ( 8  +  0 )  = ; 0
8
12269addid2i 9188 . . . . . . . 8  |-  ( 0  +  2 )  =  2
12384, 122oveq12i 6034 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 0  +  2 ) )  =  ( 6  +  2 )
124123, 87eqtri 2409 . . . . . 6  |-  ( ( 2  x.  3 )  +  ( 0  +  2 ) )  =  8
125 9t2e18 10411 . . . . . . . 8  |-  ( 9  x.  2 )  = ; 1
8
126111, 69, 125mulcomli 9032 . . . . . . 7  |-  ( 2  x.  9 )  = ; 1
8
127 8p8e16 10377 . . . . . . 7  |-  ( 8  +  8 )  = ; 1
6
12815, 9, 9, 126, 49, 10, 127decaddci 10361 . . . . . 6  |-  ( ( 2  x.  9 )  +  8 )  = ; 2
6
1292, 12, 31, 9, 119, 121, 16, 10, 16, 124, 128decma2c 10356 . . . . 5  |-  ( ( 2  x. ; 3 9 )  +  ( 8  +  0 ) )  = ; 8 6
13069mul01i 9190 . . . . . . 7  |-  ( 2  x.  0 )  =  0
131130oveq1i 6032 . . . . . 6  |-  ( ( 2  x.  0 )  +  9 )  =  ( 0  +  9 )
132111addid2i 9188 . . . . . 6  |-  ( 0  +  9 )  =  9
133131, 132, 943eqtri 2413 . . . . 5  |-  ( ( 2  x.  0 )  +  9 )  = ; 0
9
13430, 31, 9, 12, 118, 98, 16, 12, 31, 129, 133decma2c 10356 . . . 4  |-  ( ( 2  x. ;; 3 9 0 )  + ; 8
9 )  = ;; 8 6 9
13516, 33, 32, 117, 134gcdi 13338 . . 3  |-  (;; 8 6 9  gcd ;; 3 9 0 )  =  1
13630nn0cni 10167 . . . . . . 7  |- ; 3 9  e.  CC
137136addid1i 9187 . . . . . 6  |-  (; 3 9  +  0 )  = ; 3 9
13854mulid2i 9028 . . . . . . . 8  |-  ( 1  x.  8 )  =  8
139138, 76oveq12i 6034 . . . . . . 7  |-  ( ( 1  x.  8 )  +  ( 3  +  1 ) )  =  ( 8  +  4 )
140 8p4e12 10373 . . . . . . 7  |-  ( 8  +  4 )  = ; 1
2
141139, 140eqtri 2409 . . . . . 6  |-  ( ( 1  x.  8 )  +  ( 3  +  1 ) )  = ; 1
2
142 6nn 10071 . . . . . . . . . 10  |-  6  e.  NN
143142nncni 9944 . . . . . . . . 9  |-  6  e.  CC
144143mulid2i 9028 . . . . . . . 8  |-  ( 1  x.  6 )  =  6
145144oveq1i 6032 . . . . . . 7  |-  ( ( 1  x.  6 )  +  9 )  =  ( 6  +  9 )
146 9p6e15 10382 . . . . . . . 8  |-  ( 9  +  6 )  = ; 1
5
147111, 143, 146addcomli 9192 . . . . . . 7  |-  ( 6  +  9 )  = ; 1
5
148145, 147eqtri 2409 . . . . . 6  |-  ( ( 1  x.  6 )  +  9 )  = ; 1
5
1499, 10, 2, 12, 25, 137, 15, 18, 15, 141, 148decma2c 10356 . . . . 5  |-  ( ( 1  x. ; 8 6 )  +  (; 3 9  +  0 ) )  = ;; 1 2 5
150111mulid2i 9028 . . . . . . 7  |-  ( 1  x.  9 )  =  9
151150oveq1i 6032 . . . . . 6  |-  ( ( 1  x.  9 )  +  0 )  =  ( 9  +  0 )
152111addid1i 9187 . . . . . 6  |-  ( 9  +  0 )  =  9
153151, 152, 943eqtri 2413 . . . . 5  |-  ( ( 1  x.  9 )  +  0 )  = ; 0
9
15411, 12, 30, 31, 27, 118, 15, 12, 31, 149, 153decma2c 10356 . . . 4  |-  ( ( 1  x. ;; 8 6 9 )  + ;; 3 9 0 )  = ;;; 1 2 5 9
155154, 14eqtr4i 2412 . . 3  |-  ( ( 1  x. ;; 8 6 9 )  + ;; 3 9 0 )  =  N
15615, 32, 13, 135, 155gcdi 13338 . 2  |-  ( N  gcd ;; 8 6 9 )  =  1
1578, 13, 22, 29, 156gcdmodi 13339 1  |-  ( ( ( 2 ^; 3 4 )  - 
1 )  gcd  N
)  =  1
Colors of variables: wff set class
Syntax hints:   -. wn 3    <-> wb 177    = wceq 1649    e. wcel 1717   class class class wbr 4155  (class class class)co 6022   0cc0 8925   1c1 8926    + caddc 8928    x. cmul 8930    - cmin 9225   NNcn 9934   2c2 9983   3c3 9984   4c4 9985   5c5 9986   6c6 9987   7c7 9988   8c8 9989   9c9 9990   NN0cn0 10155   ZZcz 10216  ;cdc 10316   ^cexp 11311    || cdivides 12781    gcd cgcd 12935   Primecprime 13008
This theorem is referenced by:  1259prm  13384
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2370  ax-sep 4273  ax-nul 4281  ax-pow 4320  ax-pr 4346  ax-un 4643  ax-cnex 8981  ax-resscn 8982  ax-1cn 8983  ax-icn 8984  ax-addcl 8985  ax-addrcl 8986  ax-mulcl 8987  ax-mulrcl 8988  ax-mulcom 8989  ax-addass 8990  ax-mulass 8991  ax-distr 8992  ax-i2m1 8993  ax-1ne0 8994  ax-1rid 8995  ax-rnegex 8996  ax-rrecex 8997  ax-cnre 8998  ax-pre-lttri 8999  ax-pre-lttrn 9000  ax-pre-ltadd 9001  ax-pre-mulgt0 9002  ax-pre-sup 9003
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2244  df-mo 2245  df-clab 2376  df-cleq 2382  df-clel 2385  df-nfc 2514  df-ne 2554  df-nel 2555  df-ral 2656  df-rex 2657  df-reu 2658  df-rmo 2659  df-rab 2660  df-v 2903  df-sbc 3107  df-csb 3197  df-dif 3268  df-un 3270  df-in 3272  df-ss 3279  df-pss 3281  df-nul 3574  df-if 3685  df-pw 3746  df-sn 3765  df-pr 3766  df-tp 3767  df-op 3768  df-uni 3960  df-int 3995  df-iun 4039  df-br 4156  df-opab 4210  df-mpt 4211  df-tr 4246  df-eprel 4437  df-id 4441  df-po 4446  df-so 4447  df-fr 4484  df-we 4486  df-ord 4527  df-on 4528  df-lim 4529  df-suc 4530  df-om 4788  df-xp 4826  df-rel 4827  df-cnv 4828  df-co 4829  df-dm 4830  df-rn 4831  df-res 4832  df-ima 4833  df-iota 5360  df-fun 5398  df-fn 5399  df-f 5400  df-f1 5401  df-fo 5402  df-f1o 5403  df-fv 5404  df-ov 6025  df-oprab 6026  df-mpt2 6027  df-1st 6290  df-2nd 6291  df-riota 6487  df-recs 6571  df-rdg 6606  df-1o 6662  df-2o 6663  df-oadd 6666  df-er 6843  df-en 7048  df-dom 7049  df-sdom 7050  df-fin 7051  df-sup 7383  df-pnf 9057  df-mnf 9058  df-xr 9059  df-ltxr 9060  df-le 9061  df-sub 9227  df-neg 9228  df-div 9612  df-nn 9935  df-2 9992  df-3 9993  df-4 9994  df-5 9995  df-6 9996  df-7 9997  df-8 9998  df-9 9999  df-10 10000  df-n0 10156  df-z 10217  df-dec 10317  df-uz 10423  df-rp 10547  df-fz 10978  df-fl 11131  df-mod 11180  df-seq 11253  df-exp 11312  df-cj 11833  df-re 11834  df-im 11835  df-sqr 11969  df-abs 11970  df-dvds 12782  df-gcd 12936  df-prm 13009
  Copyright terms: Public domain W3C validator