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:aZ  and  bZ  and  kZ  and  (a0  or  b0)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(NotEqual(a, 0), NotEqual(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.

2021-03-15 19:12:00.328586 UTC