Copyright | (c) Eric Crockett 2011-2017 Chris Peikert 2011-2017 |
---|---|
License | GPL-3 |
Maintainer | ecrockett0@email.com |
Stability | experimental |
Portability | POSIX \( \def\Z{\mathbb{Z}} \) |
Safe Haskell | None |
Language | Haskell2010 |
A collection of helper functions for working with \(\Z_m^*\).
Documentation
order :: forall m. Reflects m Int => Int -> Int Source #
The multiplicative order of \(p\) (the argument) modulo \(m\). Requires \(\gcd(p,m)=1\).
partitionCosets :: forall m m'. m `Divides` m' => Int -> [[Int]] Source #
Given \(p\), returns a partition of the cosets of \(\Z_{m'}^* / <p>\) (specified by representatives), where the cosets in each component are in bijective correspondence with the cosets of \(\Z_m^* / <p>\) under the natural ((bmod m)) homomorphism.