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

Definition df-mod 12891
Description: Define the modulo (remainder) operation. See modval 12892 for its value. For example, (5 mod 3) = 2 and (-7 mod 2) = 1 (ex-mod 27635). (Contributed by NM, 10-Nov-2008.)
Assertion
Ref Expression
df-mod mod = (𝑥 ∈ ℝ, 𝑦 ∈ ℝ+ ↦ (𝑥 − (𝑦 · (⌊‘(𝑥 / 𝑦)))))
Distinct variable group:   𝑥,𝑦

Detailed syntax breakdown of Definition df-mod
StepHypRef Expression
1 cmo 12890 . 2 class mod
2 vx . . 3 setvar 𝑥
3 vy . . 3 setvar 𝑦
4 cr 10218 . . 3 class
5 crp 12044 . . 3 class +
62cv 1636 . . . 4 class 𝑥
73cv 1636 . . . . 5 class 𝑦
8 cdiv 10967 . . . . . . 7 class /
96, 7, 8co 6872 . . . . . 6 class (𝑥 / 𝑦)
10 cfl 12813 . . . . . 6 class
119, 10cfv 6099 . . . . 5 class (⌊‘(𝑥 / 𝑦))
12 cmul 10224 . . . . 5 class ·
137, 11, 12co 6872 . . . 4 class (𝑦 · (⌊‘(𝑥 / 𝑦)))
14 cmin 10549 . . . 4 class
156, 13, 14co 6872 . . 3 class (𝑥 − (𝑦 · (⌊‘(𝑥 / 𝑦))))
162, 3, 4, 5, 15cmpt2 6874 . 2 class (𝑥 ∈ ℝ, 𝑦 ∈ ℝ+ ↦ (𝑥 − (𝑦 · (⌊‘(𝑥 / 𝑦)))))
171, 16wceq 1637 1 wff mod = (𝑥 ∈ ℝ, 𝑦 ∈ ℝ+ ↦ (𝑥 − (𝑦 · (⌊‘(𝑥 / 𝑦)))))
Colors of variables: wff setvar class
This definition is referenced by:  modval  12892
  Copyright terms: Public domain W3C validator