Assumptions:
TeX:
d = a x + b y\; \text{ where } \left(d, u, v\right) = \operatorname{xgcd}\!\left(a, b\right),\;\left(x, y\right) = \left(u + \frac{k b}{d}, v - \frac{k a}{d}\right) a \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; b \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; k \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; \left(a \ne 0 \;\mathbin{\operatorname{or}}\; b \ne 0\right)
Definitions:
Fungrim symbol | Notation | Short description |
---|---|---|
XGCD | Extended greatest common divisor | |
ZZ | Integers |
Source code for this entry:
Entry(ID("f20503"), Formula(Where(Equal(d, Add(Mul(a, x), Mul(b, y))), Equal(Tuple(d, u, v), XGCD(a, b)), Equal(Tuple(x, y), Tuple(Add(u, Div(Mul(k, b), d)), Sub(v, Div(Mul(k, a), d)))))), Variables(a, b, k), Assumptions(And(Element(a, ZZ), Element(b, ZZ), Element(k, ZZ), Or(NotEqual(a, 0), NotEqual(b, 0)))))