MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  dirith Structured version   Visualization version   GIF version

Theorem dirith 27465
Description: Dirichlet's theorem: there are infinitely many primes in any arithmetic progression coprime to 𝑁. Theorem 9.4.1 of [Shapiro], p. 375. See https://metamath-blog.blogspot.com/2016/05/dirichlets-theorem.html for an informal exposition. This is Metamath 100 proof #48. (Contributed by Mario Carneiro, 12-May-2016.)
Assertion
Ref Expression
dirith ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → {𝑝 ∈ ℙ ∣ 𝑁 ∥ (𝑝𝐴)} ≈ ℕ)
Distinct variable groups:   𝐴,𝑝   𝑁,𝑝

Proof of Theorem dirith
StepHypRef Expression
1 simp1 1136 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → 𝑁 ∈ ℕ)
21nnnn0d 12439 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → 𝑁 ∈ ℕ0)
32adantr 480 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) ∧ 𝑝 ∈ ℙ) → 𝑁 ∈ ℕ0)
4 eqid 2731 . . . . . . 7 (ℤ/nℤ‘𝑁) = (ℤ/nℤ‘𝑁)
5 eqid 2731 . . . . . . 7 (Base‘(ℤ/nℤ‘𝑁)) = (Base‘(ℤ/nℤ‘𝑁))
6 eqid 2731 . . . . . . 7 (ℤRHom‘(ℤ/nℤ‘𝑁)) = (ℤRHom‘(ℤ/nℤ‘𝑁))
74, 5, 6znzrhfo 21482 . . . . . 6 (𝑁 ∈ ℕ0 → (ℤRHom‘(ℤ/nℤ‘𝑁)):ℤ–onto→(Base‘(ℤ/nℤ‘𝑁)))
8 fofn 6737 . . . . . 6 ((ℤRHom‘(ℤ/nℤ‘𝑁)):ℤ–onto→(Base‘(ℤ/nℤ‘𝑁)) → (ℤRHom‘(ℤ/nℤ‘𝑁)) Fn ℤ)
93, 7, 83syl 18 . . . . 5 (((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) ∧ 𝑝 ∈ ℙ) → (ℤRHom‘(ℤ/nℤ‘𝑁)) Fn ℤ)
10 prmz 16583 . . . . . 6 (𝑝 ∈ ℙ → 𝑝 ∈ ℤ)
1110adantl 481 . . . . 5 (((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) ∧ 𝑝 ∈ ℙ) → 𝑝 ∈ ℤ)
12 fniniseg 6993 . . . . . 6 ((ℤRHom‘(ℤ/nℤ‘𝑁)) Fn ℤ → (𝑝 ∈ ((ℤRHom‘(ℤ/nℤ‘𝑁)) “ {((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)}) ↔ (𝑝 ∈ ℤ ∧ ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝑝) = ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴))))
1312baibd 539 . . . . 5 (((ℤRHom‘(ℤ/nℤ‘𝑁)) Fn ℤ ∧ 𝑝 ∈ ℤ) → (𝑝 ∈ ((ℤRHom‘(ℤ/nℤ‘𝑁)) “ {((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)}) ↔ ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝑝) = ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)))
149, 11, 13syl2anc 584 . . . 4 (((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) ∧ 𝑝 ∈ ℙ) → (𝑝 ∈ ((ℤRHom‘(ℤ/nℤ‘𝑁)) “ {((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)}) ↔ ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝑝) = ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)))
15 simp2 1137 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → 𝐴 ∈ ℤ)
1615adantr 480 . . . . 5 (((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) ∧ 𝑝 ∈ ℙ) → 𝐴 ∈ ℤ)
174, 6zndvds 21484 . . . . 5 ((𝑁 ∈ ℕ0𝑝 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝑝) = ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴) ↔ 𝑁 ∥ (𝑝𝐴)))
183, 11, 16, 17syl3anc 1373 . . . 4 (((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) ∧ 𝑝 ∈ ℙ) → (((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝑝) = ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴) ↔ 𝑁 ∥ (𝑝𝐴)))
1914, 18bitrd 279 . . 3 (((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) ∧ 𝑝 ∈ ℙ) → (𝑝 ∈ ((ℤRHom‘(ℤ/nℤ‘𝑁)) “ {((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)}) ↔ 𝑁 ∥ (𝑝𝐴)))
2019rabbi2dva 4176 . 2 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → (ℙ ∩ ((ℤRHom‘(ℤ/nℤ‘𝑁)) “ {((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)})) = {𝑝 ∈ ℙ ∣ 𝑁 ∥ (𝑝𝐴)})
21 eqid 2731 . . 3 (Unit‘(ℤ/nℤ‘𝑁)) = (Unit‘(ℤ/nℤ‘𝑁))
22 simp3 1138 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → (𝐴 gcd 𝑁) = 1)
234, 21, 6znunit 21498 . . . . 5 ((𝑁 ∈ ℕ0𝐴 ∈ ℤ) → (((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴) ∈ (Unit‘(ℤ/nℤ‘𝑁)) ↔ (𝐴 gcd 𝑁) = 1))
242, 15, 23syl2anc 584 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → (((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴) ∈ (Unit‘(ℤ/nℤ‘𝑁)) ↔ (𝐴 gcd 𝑁) = 1))
2522, 24mpbird 257 . . 3 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → ((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴) ∈ (Unit‘(ℤ/nℤ‘𝑁)))
26 eqid 2731 . . 3 ((ℤRHom‘(ℤ/nℤ‘𝑁)) “ {((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)}) = ((ℤRHom‘(ℤ/nℤ‘𝑁)) “ {((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)})
274, 6, 1, 21, 25, 26dirith2 27464 . 2 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → (ℙ ∩ ((ℤRHom‘(ℤ/nℤ‘𝑁)) “ {((ℤRHom‘(ℤ/nℤ‘𝑁))‘𝐴)})) ≈ ℕ)
2820, 27eqbrtrrd 5115 1 ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1) → {𝑝 ∈ ℙ ∣ 𝑁 ∥ (𝑝𝐴)} ≈ ℕ)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 206  wa 395  w3a 1086   = wceq 1541  wcel 2111  {crab 3395  cin 3901  {csn 4576   class class class wbr 5091  ccnv 5615  cima 5619   Fn wfn 6476  ontowfo 6479  cfv 6481  (class class class)co 7346  cen 8866  1c1 11004  cmin 11341  cn 12122  0cn0 12378  cz 12465  cdvds 16160   gcd cgcd 16402  cprime 16579  Basecbs 17117  Unitcui 20271  ℤRHomczrh 21434  ℤ/nczn 21437
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1968  ax-7 2009  ax-8 2113  ax-9 2121  ax-10 2144  ax-11 2160  ax-12 2180  ax-ext 2703  ax-rep 5217  ax-sep 5234  ax-nul 5244  ax-pow 5303  ax-pr 5370  ax-un 7668  ax-inf2 9531  ax-cnex 11059  ax-resscn 11060  ax-1cn 11061  ax-icn 11062  ax-addcl 11063  ax-addrcl 11064  ax-mulcl 11065  ax-mulrcl 11066  ax-mulcom 11067  ax-addass 11068  ax-mulass 11069  ax-distr 11070  ax-i2m1 11071  ax-1ne0 11072  ax-1rid 11073  ax-rnegex 11074  ax-rrecex 11075  ax-cnre 11076  ax-pre-lttri 11077  ax-pre-lttrn 11078  ax-pre-ltadd 11079  ax-pre-mulgt0 11080  ax-pre-sup 11081  ax-addf 11082  ax-mulf 11083
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 848  df-3or 1087  df-3an 1088  df-tru 1544  df-fal 1554  df-ex 1781  df-nf 1785  df-sb 2068  df-mo 2535  df-eu 2564  df-clab 2710  df-cleq 2723  df-clel 2806  df-nfc 2881  df-ne 2929  df-nel 3033  df-ral 3048  df-rex 3057  df-rmo 3346  df-reu 3347  df-rab 3396  df-v 3438  df-sbc 3742  df-csb 3851  df-dif 3905  df-un 3907  df-in 3909  df-ss 3919  df-pss 3922  df-nul 4284  df-if 4476  df-pw 4552  df-sn 4577  df-pr 4579  df-tp 4581  df-op 4583  df-uni 4860  df-int 4898  df-iun 4943  df-iin 4944  df-disj 5059  df-br 5092  df-opab 5154  df-mpt 5173  df-tr 5199  df-id 5511  df-eprel 5516  df-po 5524  df-so 5525  df-fr 5569  df-se 5570  df-we 5571  df-xp 5622  df-rel 5623  df-cnv 5624  df-co 5625  df-dm 5626  df-rn 5627  df-res 5628  df-ima 5629  df-pred 6248  df-ord 6309  df-on 6310  df-lim 6311  df-suc 6312  df-iota 6437  df-fun 6483  df-fn 6484  df-f 6485  df-f1 6486  df-fo 6487  df-f1o 6488  df-fv 6489  df-isom 6490  df-riota 7303  df-ov 7349  df-oprab 7350  df-mpo 7351  df-of 7610  df-rpss 7656  df-om 7797  df-1st 7921  df-2nd 7922  df-supp 8091  df-tpos 8156  df-frecs 8211  df-wrecs 8242  df-recs 8291  df-rdg 8329  df-1o 8385  df-2o 8386  df-oadd 8389  df-omul 8390  df-er 8622  df-ec 8624  df-qs 8628  df-map 8752  df-pm 8753  df-ixp 8822  df-en 8870  df-dom 8871  df-sdom 8872  df-fin 8873  df-fsupp 9246  df-fi 9295  df-sup 9326  df-inf 9327  df-oi 9396  df-dju 9791  df-card 9829  df-acn 9832  df-pnf 11145  df-mnf 11146  df-xr 11147  df-ltxr 11148  df-le 11149  df-sub 11343  df-neg 11344  df-div 11772  df-nn 12123  df-2 12185  df-3 12186  df-4 12187  df-5 12188  df-6 12189  df-7 12190  df-8 12191  df-9 12192  df-n0 12379  df-xnn0 12452  df-z 12466  df-dec 12586  df-uz 12730  df-q 12844  df-rp 12888  df-xneg 13008  df-xadd 13009  df-xmul 13010  df-ioo 13246  df-ioc 13247  df-ico 13248  df-icc 13249  df-fz 13405  df-fzo 13552  df-fl 13693  df-mod 13771  df-seq 13906  df-exp 13966  df-fac 14178  df-bc 14207  df-hash 14235  df-word 14418  df-concat 14475  df-s1 14501  df-shft 14971  df-cj 15003  df-re 15004  df-im 15005  df-sqrt 15139  df-abs 15140  df-limsup 15375  df-clim 15392  df-rlim 15393  df-o1 15394  df-lo1 15395  df-sum 15591  df-ef 15971  df-e 15972  df-sin 15973  df-cos 15974  df-tan 15975  df-pi 15976  df-dvds 16161  df-gcd 16403  df-prm 16580  df-numer 16643  df-denom 16644  df-phi 16674  df-pc 16746  df-struct 17055  df-sets 17072  df-slot 17090  df-ndx 17102  df-base 17118  df-ress 17139  df-plusg 17171  df-mulr 17172  df-starv 17173  df-sca 17174  df-vsca 17175  df-ip 17176  df-tset 17177  df-ple 17178  df-ds 17180  df-unif 17181  df-hom 17182  df-cco 17183  df-rest 17323  df-topn 17324  df-0g 17342  df-gsum 17343  df-topgen 17344  df-pt 17345  df-prds 17348  df-xrs 17403  df-qtop 17408  df-imas 17409  df-qus 17410  df-xps 17411  df-mre 17485  df-mrc 17486  df-acs 17488  df-mgm 18545  df-sgrp 18624  df-mnd 18640  df-mhm 18688  df-submnd 18689  df-grp 18846  df-minusg 18847  df-sbg 18848  df-mulg 18978  df-subg 19033  df-nsg 19034  df-eqg 19035  df-ghm 19123  df-gim 19169  df-ga 19200  df-cntz 19227  df-oppg 19256  df-od 19438  df-gex 19439  df-pgp 19440  df-lsm 19546  df-pj1 19547  df-cmn 19692  df-abl 19693  df-cyg 19788  df-dprd 19907  df-dpj 19908  df-mgp 20057  df-rng 20069  df-ur 20098  df-ring 20151  df-cring 20152  df-oppr 20253  df-dvdsr 20273  df-unit 20274  df-invr 20304  df-dvr 20317  df-rhm 20388  df-subrng 20459  df-subrg 20483  df-drng 20644  df-lmod 20793  df-lss 20863  df-lsp 20903  df-sra 21105  df-rgmod 21106  df-lidl 21143  df-rsp 21144  df-2idl 21185  df-psmet 21281  df-xmet 21282  df-met 21283  df-bl 21284  df-mopn 21285  df-fbas 21286  df-fg 21287  df-cnfld 21290  df-zring 21382  df-zrh 21438  df-zn 21441  df-top 22807  df-topon 22824  df-topsp 22846  df-bases 22859  df-cld 22932  df-ntr 22933  df-cls 22934  df-nei 23011  df-lp 23049  df-perf 23050  df-cn 23140  df-cnp 23141  df-haus 23228  df-cmp 23300  df-tx 23475  df-hmeo 23668  df-fil 23759  df-fm 23851  df-flim 23852  df-flf 23853  df-xms 24233  df-ms 24234  df-tms 24235  df-cncf 24796  df-0p 25596  df-limc 25792  df-dv 25793  df-ply 26118  df-idp 26119  df-coe 26120  df-dgr 26121  df-quot 26224  df-ulm 26311  df-log 26490  df-cxp 26491  df-atan 26802  df-em 26928  df-cht 27032  df-vma 27033  df-chp 27034  df-ppi 27035  df-mu 27036  df-dchr 27169
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator