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

Theorem vfermltl 16699
Description: Variant of Fermat's little theorem if 𝐴 is not a multiple of 𝑃, see theorem 5.18 in [ApostolNT] p. 113. (Contributed by AV, 21-Aug-2020.) (Proof shortened by AV, 5-Sep-2020.)
Assertion
Ref Expression
vfermltl ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → ((𝐴↑(𝑃 − 1)) mod 𝑃) = 1)

Proof of Theorem vfermltl
StepHypRef Expression
1 phiprm 16675 . . . . . 6 (𝑃 ∈ ℙ → (ϕ‘𝑃) = (𝑃 − 1))
21eqcomd 2737 . . . . 5 (𝑃 ∈ ℙ → (𝑃 − 1) = (ϕ‘𝑃))
323ad2ant1 1133 . . . 4 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → (𝑃 − 1) = (ϕ‘𝑃))
43oveq2d 7393 . . 3 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → (𝐴↑(𝑃 − 1)) = (𝐴↑(ϕ‘𝑃)))
54oveq1d 7392 . 2 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → ((𝐴↑(𝑃 − 1)) mod 𝑃) = ((𝐴↑(ϕ‘𝑃)) mod 𝑃))
6 prmnn 16576 . . . 4 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
763ad2ant1 1133 . . 3 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → 𝑃 ∈ ℕ)
8 simp2 1137 . . 3 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → 𝐴 ∈ ℤ)
9 prmz 16577 . . . . . . 7 (𝑃 ∈ ℙ → 𝑃 ∈ ℤ)
109anim1ci 616 . . . . . 6 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ) → (𝐴 ∈ ℤ ∧ 𝑃 ∈ ℤ))
11103adant3 1132 . . . . 5 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → (𝐴 ∈ ℤ ∧ 𝑃 ∈ ℤ))
12 gcdcom 16419 . . . . 5 ((𝐴 ∈ ℤ ∧ 𝑃 ∈ ℤ) → (𝐴 gcd 𝑃) = (𝑃 gcd 𝐴))
1311, 12syl 17 . . . 4 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → (𝐴 gcd 𝑃) = (𝑃 gcd 𝐴))
14 coprm 16613 . . . . 5 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ) → (¬ 𝑃𝐴 ↔ (𝑃 gcd 𝐴) = 1))
1514biimp3a 1469 . . . 4 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → (𝑃 gcd 𝐴) = 1)
1613, 15eqtrd 2771 . . 3 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → (𝐴 gcd 𝑃) = 1)
17 eulerth 16681 . . 3 ((𝑃 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑃) = 1) → ((𝐴↑(ϕ‘𝑃)) mod 𝑃) = (1 mod 𝑃))
187, 8, 16, 17syl3anc 1371 . 2 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → ((𝐴↑(ϕ‘𝑃)) mod 𝑃) = (1 mod 𝑃))
196nnred 12192 . . . . 5 (𝑃 ∈ ℙ → 𝑃 ∈ ℝ)
20 prmgt1 16599 . . . . 5 (𝑃 ∈ ℙ → 1 < 𝑃)
2119, 20jca 512 . . . 4 (𝑃 ∈ ℙ → (𝑃 ∈ ℝ ∧ 1 < 𝑃))
22213ad2ant1 1133 . . 3 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → (𝑃 ∈ ℝ ∧ 1 < 𝑃))
23 1mod 13833 . . 3 ((𝑃 ∈ ℝ ∧ 1 < 𝑃) → (1 mod 𝑃) = 1)
2422, 23syl 17 . 2 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → (1 mod 𝑃) = 1)
255, 18, 243eqtrd 2775 1 ((𝑃 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ ¬ 𝑃𝐴) → ((𝐴↑(𝑃 − 1)) mod 𝑃) = 1)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 396  w3a 1087   = wceq 1541  wcel 2106   class class class wbr 5125  cfv 6516  (class class class)co 7377  cr 11074  1c1 11076   < clt 11213  cmin 11409  cn 12177  cz 12523   mod cmo 13799  cexp 13992  cdvds 16162   gcd cgcd 16400  cprime 16573  ϕcphi 16662
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2702  ax-rep 5262  ax-sep 5276  ax-nul 5283  ax-pow 5340  ax-pr 5404  ax-un 7692  ax-cnex 11131  ax-resscn 11132  ax-1cn 11133  ax-icn 11134  ax-addcl 11135  ax-addrcl 11136  ax-mulcl 11137  ax-mulrcl 11138  ax-mulcom 11139  ax-addass 11140  ax-mulass 11141  ax-distr 11142  ax-i2m1 11143  ax-1ne0 11144  ax-1rid 11145  ax-rnegex 11146  ax-rrecex 11147  ax-cnre 11148  ax-pre-lttri 11149  ax-pre-lttrn 11150  ax-pre-ltadd 11151  ax-pre-mulgt0 11152  ax-pre-sup 11153
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 846  df-3or 1088  df-3an 1089  df-tru 1544  df-fal 1554  df-ex 1782  df-nf 1786  df-sb 2068  df-mo 2533  df-eu 2562  df-clab 2709  df-cleq 2723  df-clel 2809  df-nfc 2884  df-ne 2940  df-nel 3046  df-ral 3061  df-rex 3070  df-rmo 3364  df-reu 3365  df-rab 3419  df-v 3461  df-sbc 3758  df-csb 3874  df-dif 3931  df-un 3933  df-in 3935  df-ss 3945  df-pss 3947  df-nul 4303  df-if 4507  df-pw 4582  df-sn 4607  df-pr 4609  df-op 4613  df-uni 4886  df-int 4928  df-iun 4976  df-br 5126  df-opab 5188  df-mpt 5209  df-tr 5243  df-id 5551  df-eprel 5557  df-po 5565  df-so 5566  df-fr 5608  df-we 5610  df-xp 5659  df-rel 5660  df-cnv 5661  df-co 5662  df-dm 5663  df-rn 5664  df-res 5665  df-ima 5666  df-pred 6273  df-ord 6340  df-on 6341  df-lim 6342  df-suc 6343  df-iota 6468  df-fun 6518  df-fn 6519  df-f 6520  df-f1 6521  df-fo 6522  df-f1o 6523  df-fv 6524  df-riota 7333  df-ov 7380  df-oprab 7381  df-mpo 7382  df-om 7823  df-1st 7941  df-2nd 7942  df-frecs 8232  df-wrecs 8263  df-recs 8337  df-rdg 8376  df-1o 8432  df-2o 8433  df-oadd 8436  df-er 8670  df-en 8906  df-dom 8907  df-sdom 8908  df-fin 8909  df-sup 9402  df-inf 9403  df-dju 9861  df-card 9899  df-pnf 11215  df-mnf 11216  df-xr 11217  df-ltxr 11218  df-le 11219  df-sub 11411  df-neg 11412  df-div 11837  df-nn 12178  df-2 12240  df-3 12241  df-n0 12438  df-xnn0 12510  df-z 12524  df-uz 12788  df-rp 12940  df-fz 13450  df-fzo 13593  df-fl 13722  df-mod 13800  df-seq 13932  df-exp 13993  df-hash 14256  df-cj 15011  df-re 15012  df-im 15013  df-sqrt 15147  df-abs 15148  df-dvds 16163  df-gcd 16401  df-prm 16574  df-phi 16664
This theorem is referenced by:  sfprmdvdsmersenne  45948
  Copyright terms: Public domain W3C validator