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

Definition df-gcd 14997
Description: Define the gcd operator. For example, (-6 gcd 9) = 3 (ex-gcd 26468). For an alternate definition, based on the definition in [ApostolNT] p. 15, see dfgcd2 15043. (Contributed by Paul Chapman, 21-Mar-2011.)
Assertion
Ref Expression
df-gcd gcd = (𝑥 ∈ ℤ, 𝑦 ∈ ℤ ↦ if((𝑥 = 0 ∧ 𝑦 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑥𝑛𝑦)}, ℝ, < )))
Distinct variable group:   𝑥,𝑛,𝑦

Detailed syntax breakdown of Definition df-gcd
StepHypRef Expression
1 cgcd 14996 . 2 class gcd
2 vx . . 3 setvar 𝑥
3 vy . . 3 setvar 𝑦
4 cz 11206 . . 3 class
52cv 1473 . . . . . 6 class 𝑥
6 cc0 9788 . . . . . 6 class 0
75, 6wceq 1474 . . . . 5 wff 𝑥 = 0
83cv 1473 . . . . . 6 class 𝑦
98, 6wceq 1474 . . . . 5 wff 𝑦 = 0
107, 9wa 382 . . . 4 wff (𝑥 = 0 ∧ 𝑦 = 0)
11 vn . . . . . . . . 9 setvar 𝑛
1211cv 1473 . . . . . . . 8 class 𝑛
13 cdvds 14763 . . . . . . . 8 class
1412, 5, 13wbr 4573 . . . . . . 7 wff 𝑛𝑥
1512, 8, 13wbr 4573 . . . . . . 7 wff 𝑛𝑦
1614, 15wa 382 . . . . . 6 wff (𝑛𝑥𝑛𝑦)
1716, 11, 4crab 2895 . . . . 5 class {𝑛 ∈ ℤ ∣ (𝑛𝑥𝑛𝑦)}
18 cr 9787 . . . . 5 class
19 clt 9926 . . . . 5 class <
2017, 18, 19csup 8202 . . . 4 class sup({𝑛 ∈ ℤ ∣ (𝑛𝑥𝑛𝑦)}, ℝ, < )
2110, 6, 20cif 4031 . . 3 class if((𝑥 = 0 ∧ 𝑦 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑥𝑛𝑦)}, ℝ, < ))
222, 3, 4, 4, 21cmpt2 6525 . 2 class (𝑥 ∈ ℤ, 𝑦 ∈ ℤ ↦ if((𝑥 = 0 ∧ 𝑦 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑥𝑛𝑦)}, ℝ, < )))
231, 22wceq 1474 1 wff gcd = (𝑥 ∈ ℤ, 𝑦 ∈ ℤ ↦ if((𝑥 = 0 ∧ 𝑦 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑥𝑛𝑦)}, ℝ, < )))
Colors of variables: wff setvar class
This definition is referenced by:  gcdval  14998  gcdf  15014
  Copyright terms: Public domain W3C validator