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

Theorem mulp1mod1 13943
Description: The product of an integer and an integer greater than 1 increased by 1 is 1 modulo the integer greater than 1. (Contributed by AV, 15-Jul-2021.)
Assertion
Ref Expression
mulp1mod1 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → (((𝑁 · 𝐴) + 1) mod 𝑁) = 1)

Proof of Theorem mulp1mod1
StepHypRef Expression
1 eluzelcn 12869 . . . . . . . . 9 (𝑁 ∈ (ℤ‘2) → 𝑁 ∈ ℂ)
21adantl 486 . . . . . . . 8 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → 𝑁 ∈ ℂ)
3 zcn 12591 . . . . . . . . 9 (𝐴 ∈ ℤ → 𝐴 ∈ ℂ)
43adantr 485 . . . . . . . 8 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → 𝐴 ∈ ℂ)
52, 4mulcomd 11225 . . . . . . 7 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → (𝑁 · 𝐴) = (𝐴 · 𝑁))
65oveq1d 7425 . . . . . 6 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → ((𝑁 · 𝐴) mod 𝑁) = ((𝐴 · 𝑁) mod 𝑁))
7 eluz2nn 12907 . . . . . . . 8 (𝑁 ∈ (ℤ‘2) → 𝑁 ∈ ℕ)
87nnrpd 13053 . . . . . . 7 (𝑁 ∈ (ℤ‘2) → 𝑁 ∈ ℝ+)
9 mulmod0 13906 . . . . . . 7 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℝ+) → ((𝐴 · 𝑁) mod 𝑁) = 0)
108, 9sylan2 604 . . . . . 6 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → ((𝐴 · 𝑁) mod 𝑁) = 0)
116, 10eqtrd 2798 . . . . 5 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → ((𝑁 · 𝐴) mod 𝑁) = 0)
1211oveq1d 7425 . . . 4 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → (((𝑁 · 𝐴) mod 𝑁) + 1) = (0 + 1))
13 0p1e1 12356 . . . 4 (0 + 1) = 1
1412, 13eqtrdi 2814 . . 3 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → (((𝑁 · 𝐴) mod 𝑁) + 1) = 1)
1514oveq1d 7425 . 2 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → ((((𝑁 · 𝐴) mod 𝑁) + 1) mod 𝑁) = (1 mod 𝑁))
16 eluzelre 12868 . . . . 5 (𝑁 ∈ (ℤ‘2) → 𝑁 ∈ ℝ)
1716adantl 486 . . . 4 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → 𝑁 ∈ ℝ)
18 zre 12590 . . . . 5 (𝐴 ∈ ℤ → 𝐴 ∈ ℝ)
1918adantr 485 . . . 4 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → 𝐴 ∈ ℝ)
2017, 19remulcld 11234 . . 3 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → (𝑁 · 𝐴) ∈ ℝ)
21 1red 11204 . . 3 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → 1 ∈ ℝ)
228adantl 486 . . 3 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → 𝑁 ∈ ℝ+)
23 modaddmod 13941 . . 3 (((𝑁 · 𝐴) ∈ ℝ ∧ 1 ∈ ℝ ∧ 𝑁 ∈ ℝ+) → ((((𝑁 · 𝐴) mod 𝑁) + 1) mod 𝑁) = (((𝑁 · 𝐴) + 1) mod 𝑁))
2420, 21, 22, 23syl3anc 1398 . 2 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → ((((𝑁 · 𝐴) mod 𝑁) + 1) mod 𝑁) = (((𝑁 · 𝐴) + 1) mod 𝑁))
25 eluz2gt1 12939 . . . . 5 (𝑁 ∈ (ℤ‘2) → 1 < 𝑁)
2616, 25jca 520 . . . 4 (𝑁 ∈ (ℤ‘2) → (𝑁 ∈ ℝ ∧ 1 < 𝑁))
2726adantl 486 . . 3 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → (𝑁 ∈ ℝ ∧ 1 < 𝑁))
28 1mod 13932 . . 3 ((𝑁 ∈ ℝ ∧ 1 < 𝑁) → (1 mod 𝑁) = 1)
2927, 28syl 18 . 2 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → (1 mod 𝑁) = 1)
3015, 24, 293eqtr3d 2806 1 ((𝐴 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘2)) → (((𝑁 · 𝐴) + 1) mod 𝑁) = 1)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 400   = wceq 1570  wcel 2143   class class class wbr 5109  cfv 6536  (class class class)co 7410  cc 11093  cr 11094  0cc0 11095  1c1 11096   + caddc 11098   · cmul 11100   < clt 11238  2c2 12290  cz 12586  cuz 12857  +crp 13011   mod cmo 13898
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1825  ax-4 1839  ax-5 1940  ax-6 1997  ax-7 2038  ax-8 2145  ax-9 2153  ax-10 2176  ax-11 2192  ax-12 2213  ax-ext 2735  ax-sep 5257  ax-nul 5269  ax-pow 5336  ax-pr 5404  ax-un 7732  ax-cnex 11151  ax-resscn 11152  ax-1cn 11153  ax-icn 11154  ax-addcl 11155  ax-addrcl 11156  ax-mulcl 11157  ax-mulrcl 11158  ax-mulcom 11159  ax-addass 11160  ax-mulass 11161  ax-distr 11162  ax-i2m1 11163  ax-1ne0 11164  ax-1rid 11165  ax-rnegex 11166  ax-rrecex 11167  ax-cnre 11168  ax-pre-lttri 11169  ax-pre-lttrn 11170  ax-pre-ltadd 11171  ax-pre-mulgt0 11172  ax-pre-sup 11173
This theorem depends on definitions:  df-bi 210  df-an 401  df-or 861  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1810  df-nf 1814  df-sb 2097  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2838  df-nfc 2912  df-ne 2959  df-nel 3065  df-ral 3080  df-rex 3090  df-rmo 3369  df-reu 3370  df-rab 3417  df-v 3457  df-sbc 3745  df-csb 3854  df-dif 3908  df-un 3910  df-in 3912  df-ss 3922  df-pss 3925  df-nul 4287  df-if 4488  df-pw 4564  df-sn 4590  df-pr 4592  df-op 4596  df-uni 4873  df-iun 4958  df-br 5110  df-opab 5174  df-mpt 5193  df-tr 5219  df-id 5556  df-eprel 5561  df-po 5569  df-so 5570  df-fr 5614  df-we 5616  df-xp 5667  df-rel 5668  df-cnv 5669  df-co 5670  df-dm 5671  df-rn 5672  df-res 5673  df-ima 5674  df-pred 6302  df-ord 6363  df-on 6364  df-lim 6365  df-suc 6366  df-iota 6492  df-fun 6538  df-fn 6539  df-f 6540  df-f1 6541  df-fo 6542  df-f1o 6543  df-fv 6544  df-riota 7367  df-ov 7413  df-oprab 7414  df-mpo 7415  df-om 7859  df-2nd 7983  df-frecs 8274  df-wrecs 8305  df-recs 8354  df-rdg 8393  df-er 8690  df-en 8940  df-dom 8941  df-sdom 8942  df-sup 9398  df-inf 9399  df-pnf 11240  df-mnf 11241  df-xr 11242  df-ltxr 11243  df-le 11244  df-sub 11438  df-neg 11439  df-div 11867  df-nn 12229  df-2 12298  df-n0 12500  df-z 12587  df-uz 12858  df-rp 13012  df-fl 13821  df-mod 13899
This theorem is referenced by:  fmtnoprmfac2lem1  48318
  Copyright terms: Public domain W3C validator