Equality modulo an element #
This file defines equality modulo an element in an additive commutative monoid.
In case of a group, a and b are congruent modulo p iff b - a ∈ zmultiples p.
In case of a monoid, the definition is a bit more complicated, and it is given with the use case of natural numbers in mind.
Main definitions #
a ≡ b [PMOD p]:aandbare congruent modulop.
See also #
SModEq is a generalisation to arbitrary submodules.
TODO #
- Delete
Nat.ModEqandInt.ModEqin favour ofAddCommGroup.ModEq. - Relate to
SModEq.
a ≡ b [PMOD p] means that b is congruent to a modulo p.
If a, b are elements of an additive group,
then a ≡ b [PMOD p] iff m • p = b - a for some m : ℤ, see modEq_iff_zsmul below.
For additive commutative monoid, the definition is given by modEq_iff_nsmul.
Equivalently (as shown in Algebra.Order.ToIntervalMod), b does not lie in the open interval
(a, a + p) modulo p, or toIcoMod hp a disagrees with toIocMod hp a at b, or
toIcoDiv hp a disagrees with toIocDiv hp a at b.
Instances For
a ≡ b [PMOD p] means that b is congruent to a modulo p.
If a, b are elements of an additive group,
then a ≡ b [PMOD p] iff m • p = b - a for some m : ℤ, see modEq_iff_zsmul below.
For additive commutative monoid, the definition is given by modEq_iff_nsmul.
Equivalently (as shown in Algebra.Order.ToIntervalMod), b does not lie in the open interval
(a, a + p) modulo p, or toIcoMod hp a disagrees with toIocMod hp a at b, or
toIcoDiv hp a disagrees with toIocDiv hp a at b.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Alias of the forward direction of AddCommGroup.nsmul_modEq_nsmul.
Alias of the forward direction of AddCommGroup.neg_modEq_neg.
Alias of the reverse direction of AddCommGroup.neg_modEq_neg.
Alias of the forward direction of AddCommGroup.modEq_neg.
Alias of the reverse direction of AddCommGroup.modEq_neg.
Alias of the forward direction of AddCommGroup.zsmul_modEq_zsmul.
Alias of the forward direction of AddCommGroup.natCast_modEq_natCast.
Alias of the reverse direction of AddCommGroup.intCast_modEq_intCast.
Alias of the forward direction of AddCommGroup.intCast_modEq_intCast.