AngouriMath

Navigation

ResidueClasses


← Back to list of classes

Description

Summary

The residue classes modulo n as sets, and the arithmetic Sullivan and Mackey's proofs book does on them:
a class is written { x in ZZ : x = r (mod n) }, with r in [0, n), and
that is what solving a linear congruence answers, what two congruences intersect to by
the Chinese remainder theorem, and what an interval cuts a finite set out of.

Remarks

A multiplicative inverse modulo n is a class, never a number 1/a: the
representative in [1, n - 1] is what Inverse(PeterO.Numbers.EInteger,PeterO.Numbers.EInteger) gives, and nothing where
a and n share a factor, since then a x = 1 (mod n) has no solution.
A linear congruence a x = b (mod n) is solved through the gcd: with
g = gcd(a, n) it has solutions exactly when g divides b, and they form
one class modulo n / g. Two classes x = a (mod m), x = b (mod n) meet
in one class modulo lcm(m, n) when a = b (mod gcd(m, n)) and nowhere
otherwise, which is the Chinese remainder theorem with the coprime case as the case
where the condition is empty.
https://github.com/asc-community/AngouriMath/issues/1409

Members

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online