Integers mod n #
Definition of the integers mod n, and the field structure on the integers mod p.
Definitions #
This lemma works in the case in which ZMod n is not infinite, i.e. n ≠ 0. The version
where a ≠ 0 is addOrderOf_coe'.
This lemma works in the case in which a ≠ 0. The version where
ZMod n is not infinite, i.e. n ≠ 0, is addOrderOf_coe.
Cast an integer modulo n to another semiring.
This function is a morphism if the characteristic of R divides n.
See ZMod.castHom for a bundled version.
Equations
Instances For
So-named because the outer coercion is Int.cast into ZMod. For Int.cast into an arbitrary
ring, see ZMod.intCast_cast.
If the characteristic of R divides n, then cast is a homomorphism.
Some specialised simp lemmas which apply when R has characteristic n.
The unique ring isomorphism between ZMod p and a ring R of cardinality a prime p.
If you need any property of this isomorphism, first of all use ringEquivOfPrime_eq_ringEquiv
below (after have : CharP R p := ...) and deduce it by the results about ZMod.ringEquiv.
Equations
Instances For
Alias of ZMod.natCast_eq_zero_iff.
unitOfCoprime makes an element of (ZMod n)ˣ given
a natural number x and a proof that x is coprime to n
Equations
Instances For
Any ring homomorphism into ZMod n has a right inverse.
Any ring homomorphism into ZMod n is surjective.
Groups of bounded torsion #
For G a group and n a natural number, G having torsion dividing n
(∀ x : G, n • x = 0) can be derived from Module R G where R has characteristic dividing n.
It is however painful to have the API for such groups G stated in this generality, as R does not
appear anywhere in the lemmas' return type. Instead of writing the API in terms of a general R, we
therefore specialise to the canonical ring of order n, namely ZMod n.
This spelling Module (ZMod n) G has the extra advantage of providing the canonical action by
ZMod n. It is however Type-valued, so we might want to acquire a Prop-valued version in the
future.
This cannot be made an instance because of the [Module (ZMod n) G] argument and the fact that
n only appears in the second argument of SMulMemClass, which is an OutParam.