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

Theorem 1259lem5 15099
Description: Lemma for 1259prm 15100. 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 10769 . . . 4  |-  2  e.  NN
2 3nn0 10889 . . . . 5  |-  3  e.  NN0
3 4nn0 10890 . . . . 5  |-  4  e.  NN0
42, 3deccl 11067 . . . 4  |- ; 3 4  e.  NN0
5 nnexpcl 12286 . . . 4  |-  ( ( 2  e.  NN  /\ ; 3 4  e.  NN0 )  -> 
( 2 ^; 3 4 )  e.  NN )
61, 4, 5mp2an 677 . . 3  |-  ( 2 ^; 3 4 )  e.  NN
7 nnm1nn0 10913 . . 3  |-  ( ( 2 ^; 3 4 )  e.  NN  ->  ( (
2 ^; 3 4 )  - 
1 )  e.  NN0 )
86, 7ax-mp 5 . 2  |-  ( ( 2 ^; 3 4 )  - 
1 )  e.  NN0
9 8nn0 10894 . . . 4  |-  8  e.  NN0
10 6nn0 10892 . . . 4  |-  6  e.  NN0
119, 10deccl 11067 . . 3  |- ; 8 6  e.  NN0
12 9nn0 10895 . . 3  |-  9  e.  NN0
1311, 12deccl 11067 . 2  |- ;; 8 6 9  e.  NN0
14 1259prm.1 . . 3  |-  N  = ;;; 1 2 5 9
15 1nn0 10887 . . . . . 6  |-  1  e.  NN0
16 2nn0 10888 . . . . . 6  |-  2  e.  NN0
1715, 16deccl 11067 . . . . 5  |- ; 1 2  e.  NN0
18 5nn0 10891 . . . . 5  |-  5  e.  NN0
1917, 18deccl 11067 . . . 4  |- ;; 1 2 5  e.  NN0
20 9nn 10776 . . . 4  |-  9  e.  NN
2119, 20decnncl 11066 . . 3  |- ;;; 1 2 5 9  e.  NN
2214, 21eqeltri 2507 . 2  |-  N  e.  NN
23141259lem2 15096 . . 3  |-  ( ( 2 ^; 3 4 )  mod 
N )  =  (;; 8 7 0  mod 
N )
24 6p1e7 10740 . . . . 5  |-  ( 6  +  1 )  =  7
25 eqid 2423 . . . . 5  |- ; 8 6  = ; 8 6
269, 10, 24, 25decsuc 11076 . . . 4  |-  (; 8 6  +  1 )  = ; 8 7
27 eqid 2423 . . . 4  |- ;; 8 6 9  = ;; 8 6 9
2811, 26, 27decsucc 11080 . . 3  |-  (;; 8 6 9  +  1 )  = ;; 8 7 0
2922, 6, 15, 13, 23, 28modsubi 15037 . 2  |-  ( ( ( 2 ^; 3 4 )  - 
1 )  mod  N
)  =  (;; 8 6 9  mod  N
)
302, 12deccl 11067 . . . 4  |- ; 3 9  e.  NN0
31 0nn0 10886 . . . 4  |-  0  e.  NN0
3230, 31deccl 11067 . . 3  |- ;; 3 9 0  e.  NN0
339, 12deccl 11067 . . . 4  |- ; 8 9  e.  NN0
3416, 15deccl 11067 . . . . . 6  |- ; 2 1  e.  NN0
3515, 2deccl 11067 . . . . . . 7  |- ; 1 3  e.  NN0
3634nn0zi 10964 . . . . . . . . 9  |- ; 2 1  e.  ZZ
3735nn0zi 10964 . . . . . . . . 9  |- ; 1 3  e.  ZZ
38 gcdcom 14477 . . . . . . . . 9  |-  ( (; 2
1  e.  ZZ  /\ ; 1 3  e.  ZZ )  -> 
(; 2 1  gcd ; 1 3 )  =  (; 1 3  gcd ; 2 1 ) )
3936, 37, 38mp2an 677 . . . . . . . 8  |-  (; 2 1  gcd ; 1 3 )  =  (; 1 3  gcd ; 2 1 )
40 3nn 10770 . . . . . . . . . . 11  |-  3  e.  NN
4115, 40decnncl 11066 . . . . . . . . . 10  |- ; 1 3  e.  NN
42 8nn 10775 . . . . . . . . . 10  |-  8  e.  NN
43 eqid 2423 . . . . . . . . . . 11  |- ; 1 3  = ; 1 3
449dec0h 11069 . . . . . . . . . . 11  |-  8  = ; 0 8
45 ax-1cn 9599 . . . . . . . . . . . . . 14  |-  1  e.  CC
4645mulid1i 9647 . . . . . . . . . . . . 13  |-  ( 1  x.  1 )  =  1
4745addid2i 9823 . . . . . . . . . . . . 13  |-  ( 0  +  1 )  =  1
4846, 47oveq12i 6315 . . . . . . . . . . . 12  |-  ( ( 1  x.  1 )  +  ( 0  +  1 ) )  =  ( 1  +  1 )
49 1p1e2 10725 . . . . . . . . . . . 12  |-  ( 1  +  1 )  =  2
5048, 49eqtri 2452 . . . . . . . . . . 11  |-  ( ( 1  x.  1 )  +  ( 0  +  1 ) )  =  2
51 3cn 10686 . . . . . . . . . . . . . 14  |-  3  e.  CC
5251mulid1i 9647 . . . . . . . . . . . . 13  |-  ( 3  x.  1 )  =  3
5352oveq1i 6313 . . . . . . . . . . . 12  |-  ( ( 3  x.  1 )  +  8 )  =  ( 3  +  8 )
54 8cn 10697 . . . . . . . . . . . . 13  |-  8  e.  CC
55 8p3e11 11109 . . . . . . . . . . . . 13  |-  ( 8  +  3 )  = ; 1
1
5654, 51, 55addcomli 9827 . . . . . . . . . . . 12  |-  ( 3  +  8 )  = ; 1
1
5753, 56eqtri 2452 . . . . . . . . . . 11  |-  ( ( 3  x.  1 )  +  8 )  = ; 1
1
5815, 2, 31, 9, 43, 44, 15, 15, 15, 50, 57decmac 11092 . . . . . . . . . 10  |-  ( (; 1
3  x.  1 )  +  8 )  = ; 2
1
59 1nn 10622 . . . . . . . . . . 11  |-  1  e.  NN
60 8lt10 10815 . . . . . . . . . . 11  |-  8  <  10
6159, 2, 9, 60declti 11078 . . . . . . . . . 10  |-  8  < ; 1
3
6241, 15, 42, 58, 61ndvdsi 14384 . . . . . . . . 9  |-  -. ; 1 3  || ; 2 1
63 13prm 15080 . . . . . . . . . 10  |- ; 1 3  e.  Prime
64 coprm 14650 . . . . . . . . . 10  |-  ( (; 1
3  e.  Prime  /\ ; 2 1  e.  ZZ )  ->  ( -. ; 1 3  || ; 2 1  <->  (; 1 3  gcd ; 2 1 )  =  1 ) )
6563, 36, 64mp2an 677 . . . . . . . . 9  |-  ( -. ; 1
3  || ; 2 1  <->  (; 1 3  gcd ; 2 1 )  =  1 )
6662, 65mpbi 212 . . . . . . . 8  |-  (; 1 3  gcd ; 2 1 )  =  1
6739, 66eqtri 2452 . . . . . . 7  |-  (; 2 1  gcd ; 1 3 )  =  1
68 eqid 2423 . . . . . . . 8  |- ; 2 1  = ; 2 1
69 2cn 10682 . . . . . . . . . . 11  |-  2  e.  CC
7069mulid2i 9648 . . . . . . . . . 10  |-  ( 1  x.  2 )  =  2
7145addid1i 9822 . . . . . . . . . 10  |-  ( 1  +  0 )  =  1
7270, 71oveq12i 6315 . . . . . . . . 9  |-  ( ( 1  x.  2 )  +  ( 1  +  0 ) )  =  ( 2  +  1 )
73 2p1e3 10735 . . . . . . . . 9  |-  ( 2  +  1 )  =  3
7472, 73eqtri 2452 . . . . . . . 8  |-  ( ( 1  x.  2 )  +  ( 1  +  0 ) )  =  3
7546oveq1i 6313 . . . . . . . . 9  |-  ( ( 1  x.  1 )  +  3 )  =  ( 1  +  3 )
76 3p1e4 10737 . . . . . . . . . 10  |-  ( 3  +  1 )  =  4
7751, 45, 76addcomli 9827 . . . . . . . . 9  |-  ( 1  +  3 )  =  4
783dec0h 11069 . . . . . . . . 9  |-  4  = ; 0 4
7975, 77, 783eqtri 2456 . . . . . . . 8  |-  ( ( 1  x.  1 )  +  3 )  = ; 0
4
8016, 15, 15, 2, 68, 43, 15, 3, 31, 74, 79decma2c 11093 . . . . . . 7  |-  ( ( 1  x. ; 2 1 )  + ; 1
3 )  = ; 3 4
8115, 35, 34, 67, 80gcdi 15038 . . . . . 6  |-  (; 3 4  gcd ; 2 1 )  =  1
82 eqid 2423 . . . . . . 7  |- ; 3 4  = ; 3 4
83 3t2e6 10763 . . . . . . . . . 10  |-  ( 3  x.  2 )  =  6
8451, 69, 83mulcomli 9652 . . . . . . . . 9  |-  ( 2  x.  3 )  =  6
8569addid1i 9822 . . . . . . . . 9  |-  ( 2  +  0 )  =  2
8684, 85oveq12i 6315 . . . . . . . 8  |-  ( ( 2  x.  3 )  +  ( 2  +  0 ) )  =  ( 6  +  2 )
87 6p2e8 10753 . . . . . . . 8  |-  ( 6  +  2 )  =  8
8886, 87eqtri 2452 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 2  +  0 ) )  =  8
89 4cn 10689 . . . . . . . . . 10  |-  4  e.  CC
90 4t2e8 10765 . . . . . . . . . 10  |-  ( 4  x.  2 )  =  8
9189, 69, 90mulcomli 9652 . . . . . . . . 9  |-  ( 2  x.  4 )  =  8
9291oveq1i 6313 . . . . . . . 8  |-  ( ( 2  x.  4 )  +  1 )  =  ( 8  +  1 )
93 8p1e9 10742 . . . . . . . 8  |-  ( 8  +  1 )  =  9
9412dec0h 11069 . . . . . . . 8  |-  9  = ; 0 9
9592, 93, 943eqtri 2456 . . . . . . 7  |-  ( ( 2  x.  4 )  +  1 )  = ; 0
9
962, 3, 16, 15, 82, 68, 16, 12, 31, 88, 95decma2c 11093 . . . . . 6  |-  ( ( 2  x. ; 3 4 )  + ; 2
1 )  = ; 8 9
9716, 34, 4, 81, 96gcdi 15038 . . . . 5  |-  (; 8 9  gcd ; 3 4 )  =  1
98 eqid 2423 . . . . . 6  |- ; 8 9  = ; 8 9
99 4p3e7 10747 . . . . . . . . 9  |-  ( 4  +  3 )  =  7
10089, 51, 99addcomli 9827 . . . . . . . 8  |-  ( 3  +  4 )  =  7
101100oveq2i 6314 . . . . . . 7  |-  ( ( 4  x.  8 )  +  ( 3  +  4 ) )  =  ( ( 4  x.  8 )  +  7 )
102 7nn0 10893 . . . . . . . 8  |-  7  e.  NN0
103 8t4e32 11143 . . . . . . . . 9  |-  ( 8  x.  4 )  = ; 3
2
10454, 89, 103mulcomli 9652 . . . . . . . 8  |-  ( 4  x.  8 )  = ; 3
2
105 7cn 10695 . . . . . . . . 9  |-  7  e.  CC
106 7p2e9 10756 . . . . . . . . 9  |-  ( 7  +  2 )  =  9
107105, 69, 106addcomli 9827 . . . . . . . 8  |-  ( 2  +  7 )  =  9
1082, 16, 102, 104, 107decaddi 11097 . . . . . . 7  |-  ( ( 4  x.  8 )  +  7 )  = ; 3
9
109101, 108eqtri 2452 . . . . . 6  |-  ( ( 4  x.  8 )  +  ( 3  +  4 ) )  = ; 3
9
110 9cn 10699 . . . . . . . 8  |-  9  e.  CC
111 9t4e36 11150 . . . . . . . 8  |-  ( 9  x.  4 )  = ; 3
6
112110, 89, 111mulcomli 9652 . . . . . . 7  |-  ( 4  x.  9 )  = ; 3
6
113 6p4e10 10755 . . . . . . 7  |-  ( 6  +  4 )  =  10
1142, 10, 3, 112, 76, 113decaddci2 11099 . . . . . 6  |-  ( ( 4  x.  9 )  +  4 )  = ; 4
0
1159, 12, 2, 3, 98, 82, 3, 31, 3, 109, 114decma2c 11093 . . . . 5  |-  ( ( 4  x. ; 8 9 )  + ; 3
4 )  = ;; 3 9 0
1163, 4, 33, 97, 115gcdi 15038 . . . 4  |-  (;; 3 9 0  gcd ; 8 9 )  =  1
117 eqid 2423 . . . . 5  |- ;; 3 9 0  = ;; 3 9 0
118 eqid 2423 . . . . . 6  |- ; 3 9  = ; 3 9
11954addid1i 9822 . . . . . . 7  |-  ( 8  +  0 )  =  8
120119, 44eqtri 2452 . . . . . 6  |-  ( 8  +  0 )  = ; 0
8
12169addid2i 9823 . . . . . . . 8  |-  ( 0  +  2 )  =  2
12284, 121oveq12i 6315 . . . . . . 7  |-  ( ( 2  x.  3 )  +  ( 0  +  2 ) )  =  ( 6  +  2 )
123122, 87eqtri 2452 . . . . . 6  |-  ( ( 2  x.  3 )  +  ( 0  +  2 ) )  =  8
124 9t2e18 11148 . . . . . . . 8  |-  ( 9  x.  2 )  = ; 1
8
125110, 69, 124mulcomli 9652 . . . . . . 7  |-  ( 2  x.  9 )  = ; 1
8
126 8p8e16 11114 . . . . . . 7  |-  ( 8  +  8 )  = ; 1
6
12715, 9, 9, 125, 49, 10, 126decaddci 11098 . . . . . 6  |-  ( ( 2  x.  9 )  +  8 )  = ; 2
6
1282, 12, 31, 9, 118, 120, 16, 10, 16, 123, 127decma2c 11093 . . . . 5  |-  ( ( 2  x. ; 3 9 )  +  ( 8  +  0 ) )  = ; 8 6
129 2t0e0 10767 . . . . . . 7  |-  ( 2  x.  0 )  =  0
130129oveq1i 6313 . . . . . 6  |-  ( ( 2  x.  0 )  +  9 )  =  ( 0  +  9 )
131110addid2i 9823 . . . . . 6  |-  ( 0  +  9 )  =  9
132130, 131, 943eqtri 2456 . . . . 5  |-  ( ( 2  x.  0 )  +  9 )  = ; 0
9
13330, 31, 9, 12, 117, 98, 16, 12, 31, 128, 132decma2c 11093 . . . 4  |-  ( ( 2  x. ;; 3 9 0 )  + ; 8
9 )  = ;; 8 6 9
13416, 33, 32, 116, 133gcdi 15038 . . 3  |-  (;; 8 6 9  gcd ;; 3 9 0 )  =  1
13530nn0cni 10883 . . . . . . 7  |- ; 3 9  e.  CC
136135addid1i 9822 . . . . . 6  |-  (; 3 9  +  0 )  = ; 3 9
13754mulid2i 9648 . . . . . . . 8  |-  ( 1  x.  8 )  =  8
138137, 76oveq12i 6315 . . . . . . 7  |-  ( ( 1  x.  8 )  +  ( 3  +  1 ) )  =  ( 8  +  4 )
139 8p4e12 11110 . . . . . . 7  |-  ( 8  +  4 )  = ; 1
2
140138, 139eqtri 2452 . . . . . 6  |-  ( ( 1  x.  8 )  +  ( 3  +  1 ) )  = ; 1
2
141 6cn 10693 . . . . . . . . 9  |-  6  e.  CC
142141mulid2i 9648 . . . . . . . 8  |-  ( 1  x.  6 )  =  6
143142oveq1i 6313 . . . . . . 7  |-  ( ( 1  x.  6 )  +  9 )  =  ( 6  +  9 )
144 9p6e15 11119 . . . . . . . 8  |-  ( 9  +  6 )  = ; 1
5
145110, 141, 144addcomli 9827 . . . . . . 7  |-  ( 6  +  9 )  = ; 1
5
146143, 145eqtri 2452 . . . . . 6  |-  ( ( 1  x.  6 )  +  9 )  = ; 1
5
1479, 10, 2, 12, 25, 136, 15, 18, 15, 140, 146decma2c 11093 . . . . 5  |-  ( ( 1  x. ; 8 6 )  +  (; 3 9  +  0 ) )  = ;; 1 2 5
148110mulid2i 9648 . . . . . . 7  |-  ( 1  x.  9 )  =  9
149148oveq1i 6313 . . . . . 6  |-  ( ( 1  x.  9 )  +  0 )  =  ( 9  +  0 )
150110addid1i 9822 . . . . . 6  |-  ( 9  +  0 )  =  9
151149, 150, 943eqtri 2456 . . . . 5  |-  ( ( 1  x.  9 )  +  0 )  = ; 0
9
15211, 12, 30, 31, 27, 117, 15, 12, 31, 147, 151decma2c 11093 . . . 4  |-  ( ( 1  x. ;; 8 6 9 )  + ;; 3 9 0 )  = ;;; 1 2 5 9
153152, 14eqtr4i 2455 . . 3  |-  ( ( 1  x. ;; 8 6 9 )  + ;; 3 9 0 )  =  N
15415, 32, 13, 134, 153gcdi 15038 . 2  |-  ( N  gcd ;; 8 6 9 )  =  1
1558, 13, 22, 29, 154gcdmodi 15039 1  |-  ( ( ( 2 ^; 3 4 )  - 
1 )  gcd  N
)  =  1
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    <-> wb 188    = wceq 1438    e. wcel 1869   class class class wbr 4421  (class class class)co 6303   0cc0 9541   1c1 9542    + caddc 9544    x. cmul 9546    - cmin 9862   NNcn 10611   2c2 10661   3c3 10662   4c4 10663   5c5 10664   6c6 10665   7c7 10666   8c8 10667   9c9 10668   NN0cn0 10871   ZZcz 10939  ;cdc 11053   ^cexp 12273    || cdvds 14298    gcd cgcd 14461   Primecprime 14615
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1666  ax-4 1679  ax-5 1749  ax-6 1795  ax-7 1840  ax-8 1871  ax-9 1873  ax-10 1888  ax-11 1893  ax-12 1906  ax-13 2054  ax-ext 2401  ax-sep 4544  ax-nul 4553  ax-pow 4600  ax-pr 4658  ax-un 6595  ax-cnex 9597  ax-resscn 9598  ax-1cn 9599  ax-icn 9600  ax-addcl 9601  ax-addrcl 9602  ax-mulcl 9603  ax-mulrcl 9604  ax-mulcom 9605  ax-addass 9606  ax-mulass 9607  ax-distr 9608  ax-i2m1 9609  ax-1ne0 9610  ax-1rid 9611  ax-rnegex 9612  ax-rrecex 9613  ax-cnre 9614  ax-pre-lttri 9615  ax-pre-lttrn 9616  ax-pre-ltadd 9617  ax-pre-mulgt0 9618  ax-pre-sup 9619
This theorem depends on definitions:  df-bi 189  df-or 372  df-an 373  df-3or 984  df-3an 985  df-tru 1441  df-ex 1661  df-nf 1665  df-sb 1788  df-eu 2270  df-mo 2271  df-clab 2409  df-cleq 2415  df-clel 2418  df-nfc 2573  df-ne 2621  df-nel 2622  df-ral 2781  df-rex 2782  df-reu 2783  df-rmo 2784  df-rab 2785  df-v 3084  df-sbc 3301  df-csb 3397  df-dif 3440  df-un 3442  df-in 3444  df-ss 3451  df-pss 3453  df-nul 3763  df-if 3911  df-pw 3982  df-sn 3998  df-pr 4000  df-tp 4002  df-op 4004  df-uni 4218  df-int 4254  df-iun 4299  df-br 4422  df-opab 4481  df-mpt 4482  df-tr 4517  df-eprel 4762  df-id 4766  df-po 4772  df-so 4773  df-fr 4810  df-we 4812  df-xp 4857  df-rel 4858  df-cnv 4859  df-co 4860  df-dm 4861  df-rn 4862  df-res 4863  df-ima 4864  df-pred 5397  df-ord 5443  df-on 5444  df-lim 5445  df-suc 5446  df-iota 5563  df-fun 5601  df-fn 5602  df-f 5603  df-f1 5604  df-fo 5605  df-f1o 5606  df-fv 5607  df-riota 6265  df-ov 6306  df-oprab 6307  df-mpt2 6308  df-om 6705  df-1st 6805  df-2nd 6806  df-wrecs 7034  df-recs 7096  df-rdg 7134  df-1o 7188  df-2o 7189  df-oadd 7192  df-er 7369  df-en 7576  df-dom 7577  df-sdom 7578  df-fin 7579  df-sup 7960  df-inf 7961  df-pnf 9679  df-mnf 9680  df-xr 9681  df-ltxr 9682  df-le 9683  df-sub 9864  df-neg 9865  df-div 10272  df-nn 10612  df-2 10670  df-3 10671  df-4 10672  df-5 10673  df-6 10674  df-7 10675  df-8 10676  df-9 10677  df-10 10678  df-n0 10872  df-z 10940  df-dec 11054  df-uz 11162  df-rp 11305  df-fz 11787  df-fl 12029  df-mod 12098  df-seq 12215  df-exp 12274  df-cj 13156  df-re 13157  df-im 13158  df-sqrt 13292  df-abs 13293  df-dvds 14299  df-gcd 14462  df-prm 14616
This theorem is referenced by:  1259prm  15100
  Copyright terms: Public domain W3C validator