ZMod n and quotient groups / rings #
This file relates ZMod n to the quotient ring ℤ ⧸ Ideal.span {(n : ℤ)}.
Main definitions #
ZMod.quotient_span_nat_equiv_zmodandZMod.quotientSpanEquivZMod:ZMod nis the ring quotient ofℤbyn ℤ : Ideal.span {n}(wheren : ℕandn : ℤrespectively)
Tags #
zmod, quotient ring, ideal quotient
@[simp]
@[simp]
theorem Int.quotientSpanNatEquivZMod_comp_castRingHom (n : ℕ) :
(↑(quotientSpanNatEquivZMod n).symm).comp (castRingHom (ZMod n)) = Ideal.Quotient.mk (Ideal.span {↑n})
@[simp]
@[simp]
theorem Int.quotientSpanEquivZMod_comp_castRingHom (n : ℤ) :
(↑n.quotientSpanEquivZMod.symm).comp (castRingHom (ZMod n.natAbs)) = Ideal.Quotient.mk (Ideal.span {n})
noncomputable def ZMod.prodEquivPi {ι : Type u_2} [Fintype ι] (a : ι → ℕ) (coprime : Pairwise (Function.onFun Nat.Coprime a)) :
The Chinese remainder theorem, elementary version for ZMod. See also
Mathlib/Data/ZMod/Basic.lean for versions involving only two numbers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem ZMod.prodEquivPi_apply {ι : Type u_2} [Fintype ι] (a : ι → ℕ) (coprime : Pairwise (Function.onFun Nat.Coprime a)) (b : ZMod (∏ i : ι, a i)) (i : ι) :
The Chinese remainder theorem, version for ZMod n.
Equations
- ZMod.equivPi n hn = (ZMod.ringEquivCongr ⋯).trans (ZMod.prodEquivPi (fun (p : ↥n.primeFactors) => ↑p ^ n.factorization ↑p) ⋯)