Fungrim home page

Fungrim entry: f20503

d=ax+by   where (d,u,v)=xgcd ⁣(a,b),(x,y)=(u+kbd,vkad)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)
Assumptions:aZandbZandkZand(a0orb0)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)
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
XGCDxgcd ⁣(a,b)\operatorname{xgcd}\!\left(a, b\right) Extended greatest common divisor
ZZZ\mathbb{Z} 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(Unequal(a, 0), Unequal(b, 0)))))

Topics using this entry

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2019-11-11 15:50:15.016492 UTC