hex

7.8. Cross-references🔗

HexModArith depends on HexArith and underpins the finite-field libraries:

  • HexArith supplies the machine-word Barrett and Montgomery kernels that the hot-loop contexts wrap. The _root_.BarrettCtx and _root_.MontCtx types referenced by Hex.BarrettCtx and Hex.MontCtx are the untyped UInt64 kernels from that library.

  • The finite-field library HexGFqRing and the prime-field polynomial library HexPolyFp consume ZMod64 p as their coefficient type, inheriting the ring structure and the field facts above for prime p.

For arbitrary moduli, Hex.ZMod64.inv? returns an inverse only after checking its product with the input is one. The success theorem Hex.ZMod64.inv?_eq_some supplies that equation for elimination.