Assumptions:
TeX:
\gcd\!\left(a, b\right) = \min \left\{ a x + b y : x \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; y \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; a x + b y \ge 1 \right\} a \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; b \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; \left(a \ne 0 \;\mathbin{\operatorname{or}}\; b \ne 0\right)
Definitions:
Fungrim symbol | Notation | Short description |
---|---|---|
GCD | Greatest common divisor | |
Minimum | Minimum value of a set or function | |
ZZ | Integers |
Source code for this entry:
Entry(ID("e922c4"), Formula(Equal(GCD(a, b), Minimum(Set(Add(Mul(a, x), Mul(b, y)), For(Tuple(x, y)), And(Element(x, ZZ), Element(y, ZZ), GreaterEqual(Add(Mul(a, x), Mul(b, y)), 1)))))), Variables(a, b), Assumptions(And(Element(a, ZZ), Element(b, ZZ), Or(NotEqual(a, 0), NotEqual(b, 0)))))