pub struct QuadNum<const P: u128>(pub FpNum<P>, pub FpNum<P>);
Expand description
An integer modulo P^2
. An element $x$ is represented as $x = a_0 + a_1\sqrt{r}$, where $r$ is
the fixed basis element.
See Lubeck, Frank. (2003). “Standard generators of finite fields and their cyclic subgroups.”
Journal of Symbolic Computation (117) 51-67.
Note that the SylowDecomposable
implementation for a QuadNum
returns the decomposition for
the subgroup with $p + 1$ elements, not the full group $\mathbb{F}_{p^2}^\times$.
Also, <QuadNum<P> as GroupElem>::SIZE == P + 1
, again refering to the subgroup.
For these reasons, this API is likely to change in the future to bring the definitions of QuadNum<P> as GroupElem
and the SylowDecomp
instance in line with describing the full group.
Tuple Fields§
§0: FpNum<P>
The value $a_0$, when writing this QuadNum
as $a_0 + a_1\sqrt{r}$.
1: FpNum<P>
The value $a_1$, when writing this QuadNum
as $a_0 + a_1\sqrt{r}$.
Implementations§
source§impl<const P: u128> QuadNum<P>
impl<const P: u128> QuadNum<P>
sourcepub fn steinitz(i: u128) -> QuadNum<P>
pub fn steinitz(i: u128) -> QuadNum<P>
Returns the Steinitz element of $\mathbb{F}_{p^2}$ with index i
.
Trait Implementations§
source§impl<const P: u128> AddAssign<QuadNum<P>> for QuadNum<P>
impl<const P: u128> AddAssign<QuadNum<P>> for QuadNum<P>
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
+=
operation. Read moresource§impl<S, const P: u128> FromChi<S, P> for QuadNum<P>where
QuadNum<P>: Factor<S>,
impl<S, const P: u128> FromChi<S, P> for QuadNum<P>where QuadNum<P>: Factor<S>,
source§fn from_chi<const L: usize>(
chi: &SylowElem<S, L, QuadNum<P>>,
decomp: &SylowDecomp<S, L, QuadNum<P>>
) -> FpNum<P>
fn from_chi<const L: usize>( chi: &SylowElem<S, L, QuadNum<P>>, decomp: &SylowDecomp<S, L, QuadNum<P>> ) -> FpNum<P>
source§fn from_chi_conj<const L: usize>(
chi: &SylowElem<S, L, QuadNum<P>>,
decomp: &SylowDecomp<S, L, QuadNum<P>>
) -> FpNum<P>
fn from_chi_conj<const L: usize>( chi: &SylowElem<S, L, QuadNum<P>>, decomp: &SylowDecomp<S, L, QuadNum<P>> ) -> FpNum<P>
source§impl<const P: u128> GroupElem for QuadNum<P>
impl<const P: u128> GroupElem for QuadNum<P>
source§fn multiply(&self, other: &QuadNum<P>) -> QuadNum<P>
fn multiply(&self, other: &QuadNum<P>) -> QuadNum<P>
a.multiply(b.multiply(c)) == a.multiply(b).multiply(c)
.source§fn inverse(&self) -> QuadNum<P>
fn inverse(&self) -> QuadNum<P>
x.inverse().multiply(x)
and
x.multiply(x.inverse())
both evaluate to ONE
.source§const ONE_256: [Self; 256] = _
const ONE_256: [Self; 256] = _
const
expressions once stabilized.Self::ONE
in an array.source§impl<const P: u128> PartialEq<QuadNum<P>> for QuadNum<P>
impl<const P: u128> PartialEq<QuadNum<P>> for QuadNum<P>
source§impl<const P: u128> PartialEq<u128> for QuadNum<P>
impl<const P: u128> PartialEq<u128> for QuadNum<P>
source§impl<S, const P: u128> SylowDecomposable<S> for QuadNum<P>where
QuadNum<P>: Factor<S>,
impl<S, const P: u128> SylowDecomposable<S> for QuadNum<P>where QuadNum<P>: Factor<S>,
source§fn find_sylow_generator(i: usize) -> QuadNum<P>
fn find_sylow_generator(i: usize) -> QuadNum<P>
i
.source§fn is_sylow_generator(candidate: &Self, d: (u128, usize)) -> Option<Self>
fn is_sylow_generator(candidate: &Self, d: (u128, usize)) -> Option<Self>
d
.