restklasser
Restklasser, or residue classes, are the equivalence classes of integers under congruence modulo a fixed positive integer n. Two integers a and b are in the same restklass modulo n if n divides their difference, written a ≡ b (mod n). The set of all integers congruent to a modulo n forms one restklass [a], and the restklasser modulo n partition the integers into exactly n distinct classes.
For a fixed n, the restklasser can be represented by the canonical representatives 0, 1, ..., n−1.
Operations on restklasser are well-defined: addition and multiplication are performed by adding or multiplying representatives and
When n is composite, not every restklass has an inverse. The units, i.e., the Restklasser with inverses,
Applications of restklasser include solving congruences, performing modular arithmetic, and uses in number theory and cryptography