Congruences modulo a natural number #
This file defines the equivalence relation a ≡ b [MOD n] on the natural numbers,
and proves basic properties about it such as the Chinese Remainder Theorem
modEq_and_modEq_iff_modEq_mul.
Notation #
a ≡ b [MOD n] is notation for Nat.ModEq n a b, which is defined to mean a % n = b % n.
Tags #
ModEq, congruence, mod, MOD, modulo
Modular equality. n.ModEq a b, or a ≡ b [MOD n], means that a % n = b % n.
Instances For
Modular equality. n.ModEq a b, or a ≡ b [MOD n], means that a % n = b % n.
Instances For
Alias of the forward direction of AddCommGroup.natCast_modEq_natCast.
Alias of the forward direction of Nat.modEq_iff_dvd.
Alias of the reverse direction of Nat.modEq_iff_dvd.
A variant of modEq_iff_dvd with Nat divisibility
Alias of Nat.ModEq.modulus_mul_add.
Cancel left multiplication on both sides of the ≡ and in the modulus.
For cancelling left multiplication in the modulus, see Nat.ModEq.of_mul_left.
Cancel right multiplication on both sides of the ≡ and in the modulus.
For cancelling right multiplication in the modulus, see Nat.ModEq.of_mul_right.
Cancel left multiplication in the modulus.
For cancelling left multiplication on both sides of the ≡, see nat.modeq.mul_left_cancel'.
Cancel right multiplication in the modulus.
For cancelling right multiplication on both sides of the ≡, see nat.modeq.mul_right_cancel'.
A common factor that's coprime with the modulus can be cancelled from a ModEq
A common factor that's coprime with the modulus can be cancelled from a ModEq
The natural number less than n*m congruent to a mod n and b mod m
Instances For
A natural number is odd iff it has residue 1 or 3 mod 4.