Interpret an executable WordMod residue as a Mathlib ZMod class.
Equations
Instances For
@[simp]
theorem
HexModArithMathlib.WordMod.val_toZMod
{m : UInt64}
{ctx : MontCtx m}
(a : Hex.WordMod ctx)
:
The canonical representative of a transferred class is the residue's value.
toZMod is injective: its ZMod value is the residue, which pins the word.
@[simp]
theorem
HexModArithMathlib.WordMod.toZMod_neg
{m : UInt64}
{ctx : MontCtx m}
(a : Hex.WordMod ctx)
:
@[instance_reducible]
instance
HexModArithMathlib.WordMod.instCommRingWordMod_hexModArithMathlib
{m : UInt64}
{ctx : MontCtx m}
:
CommRing (Hex.WordMod ctx)
The executable WordMod residue ring is a Mathlib CommRing, pulled back
along the injective toZMod.
Equations
toZMod packaged as a ring homomorphism.
Equations
- HexModArithMathlib.WordMod.toZModRingHom = { toFun := HexModArithMathlib.WordMod.toZMod, map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
@[simp]
theorem
HexModArithMathlib.WordMod.toZModRingHom_apply
{m : UInt64}
{ctx : MontCtx m}
(a : Hex.WordMod ctx)
: