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

Theorem congr 15099
Description: Definition of congruence by integer multiple (see ProofWiki "Congruence (Number Theory)", 11-Jul-2021, https://proofwiki.org/wiki/Definition:Congruence_(Number_Theory)): An integer 𝐴 is congruent to an integer 𝐵 modulo 𝑀 if their difference is a multiple of 𝑀. See also the definition in [ApostolNT] p. 104: "... 𝑎 is congruent to 𝑏 modulo 𝑚, and we write 𝑎𝑏 (mod 𝑚) if 𝑚 divides the difference 𝑎𝑏", or Wikipedia "Modular arithmetic - Congruence", https://en.wikipedia.org/wiki/Modular_arithmetic#Congruence, 11-Jul-2021,: "Given an integer n > 1, called a modulus, two integers are said to be congruent modulo n, if n is a divisor of their difference (i.e., if there is an integer k such that a-b = kn)". (Contributed by AV, 11-Jul-2021.)
Assertion
Ref Expression
congr ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝑀 ∈ ℕ) → ((𝐴 mod 𝑀) = (𝐵 mod 𝑀) ↔ ∃𝑛 ∈ ℤ (𝑛 · 𝑀) = (𝐴𝐵)))
Distinct variable groups:   𝐴,𝑛   𝐵,𝑛   𝑛,𝑀

Proof of Theorem congr
StepHypRef Expression
1 moddvds 14696 . . 3 ((𝑀 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((𝐴 mod 𝑀) = (𝐵 mod 𝑀) ↔ 𝑀 ∥ (𝐴𝐵)))
213coml 1263 . 2 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝑀 ∈ ℕ) → ((𝐴 mod 𝑀) = (𝐵 mod 𝑀) ↔ 𝑀 ∥ (𝐴𝐵)))
3 simp3 1055 . . . 4 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝑀 ∈ ℕ) → 𝑀 ∈ ℕ)
43nnzd 11219 . . 3 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝑀 ∈ ℕ) → 𝑀 ∈ ℤ)
5 zsubcl 11158 . . . 4 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐴𝐵) ∈ ℤ)
653adant3 1073 . . 3 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝑀 ∈ ℕ) → (𝐴𝐵) ∈ ℤ)
7 divides 14690 . . 3 ((𝑀 ∈ ℤ ∧ (𝐴𝐵) ∈ ℤ) → (𝑀 ∥ (𝐴𝐵) ↔ ∃𝑛 ∈ ℤ (𝑛 · 𝑀) = (𝐴𝐵)))
84, 6, 7syl2anc 690 . 2 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝑀 ∈ ℕ) → (𝑀 ∥ (𝐴𝐵) ↔ ∃𝑛 ∈ ℤ (𝑛 · 𝑀) = (𝐴𝐵)))
92, 8bitrd 266 1 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝑀 ∈ ℕ) → ((𝐴 mod 𝑀) = (𝐵 mod 𝑀) ↔ ∃𝑛 ∈ ℤ (𝑛 · 𝑀) = (𝐴𝐵)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 194  w3a 1030   = wceq 1474  wcel 1938  wrex 2801   class class class wbr 4481  (class class class)co 6425   · cmul 9694  cmin 10015  cn 10773  cz 11116   mod cmo 12395  cdvds 14688
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1700  ax-4 1713  ax-5 1793  ax-6 1838  ax-7 1885  ax-8 1940  ax-9 1947  ax-10 1966  ax-11 1971  ax-12 1983  ax-13 2137  ax-ext 2494  ax-sep 4607  ax-nul 4616  ax-pow 4668  ax-pr 4732  ax-un 6721  ax-cnex 9745  ax-resscn 9746  ax-1cn 9747  ax-icn 9748  ax-addcl 9749  ax-addrcl 9750  ax-mulcl 9751  ax-mulrcl 9752  ax-mulcom 9753  ax-addass 9754  ax-mulass 9755  ax-distr 9756  ax-i2m1 9757  ax-1ne0 9758  ax-1rid 9759  ax-rnegex 9760  ax-rrecex 9761  ax-cnre 9762  ax-pre-lttri 9763  ax-pre-lttrn 9764  ax-pre-ltadd 9765  ax-pre-mulgt0 9766  ax-pre-sup 9767
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1699  df-sb 1831  df-eu 2366  df-mo 2367  df-clab 2501  df-cleq 2507  df-clel 2510  df-nfc 2644  df-ne 2686  df-nel 2687  df-ral 2805  df-rex 2806  df-reu 2807  df-rmo 2808  df-rab 2809  df-v 3079  df-sbc 3307  df-csb 3404  df-dif 3447  df-un 3449  df-in 3451  df-ss 3458  df-pss 3460  df-nul 3778  df-if 3940  df-pw 4013  df-sn 4029  df-pr 4031  df-tp 4033  df-op 4035  df-uni 4271  df-iun 4355  df-br 4482  df-opab 4542  df-mpt 4543  df-tr 4579  df-eprel 4843  df-id 4847  df-po 4853  df-so 4854  df-fr 4891  df-we 4893  df-xp 4938  df-rel 4939  df-cnv 4940  df-co 4941  df-dm 4942  df-rn 4943  df-res 4944  df-ima 4945  df-pred 5487  df-ord 5533  df-on 5534  df-lim 5535  df-suc 5536  df-iota 5653  df-fun 5691  df-fn 5692  df-f 5693  df-f1 5694  df-fo 5695  df-f1o 5696  df-fv 5697  df-riota 6387  df-ov 6428  df-oprab 6429  df-mpt2 6430  df-om 6832  df-wrecs 7167  df-recs 7229  df-rdg 7267  df-er 7503  df-en 7716  df-dom 7717  df-sdom 7718  df-sup 8105  df-inf 8106  df-pnf 9829  df-mnf 9830  df-xr 9831  df-ltxr 9832  df-le 9833  df-sub 10017  df-neg 10018  df-div 10432  df-nn 10774  df-n0 11046  df-z 11117  df-uz 11424  df-rp 11571  df-fl 12320  df-mod 12396  df-dvds 14689
This theorem is referenced by:  cncongr1  15102
  Copyright terms: Public domain W3C validator