Check that x represents a modulo m and satisfies the requested
numerator and denominator bounds. This is split from the Euclidean search so
certificate replay need not unfold that search.
Equations
Instances For
Reconstruct a mod m as a rational with numerator absolute value at most
P and positive denominator at most Q. The truncated Euclidean candidate is
normalized and all output conditions are checked before it is returned.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Rational reconstruction is unique whenever twice the product of the two bounds is strictly smaller than the modulus.
Reconstruct k residues as rationals with a common denominator. The first
entry seeds the denominator. Later entries first try one symmetric
multiplication at that denominator, falling back to their own Euclidean run
only when necessary. Denominators are combined with lcm, and the final
numerator vector and denominator are reduced by their common gcd.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A successful common-denominator vector reconstruction has a positive bounded denominator, and every coordinate satisfies its congruence and numerator bound.
Under the uniqueness bound, common-denominator reconstruction finds every
pair that is reduced as a whole, positive and bounded in its denominator,
and congruent and bounded in every coordinate. Reducedness is not
decoration: at m = 18, a = (10), the pair (2, 2) satisfies every other
hypothesis, but its reduced rational 1 does not satisfy the congruence and
the reconstruction returns none.