pub trait ExtensionField<Base>:
Field
+ Algebra<Base>
+ BasedVectorSpace<Base>where
Base: Field,{
type ExtensionPacking: PackedFieldExtension<Base, Self> + 'static + Copy + Send + Sync;
// Required methods
fn is_in_basefield(&self) -> bool;
fn as_base(&self) -> Option<Base>;
// Provided method
fn from_ext_basis_coefficients(coeffs: &[Self]) -> Option<Self> { ... }
}Expand description
A field EF which is also an algebra over a field F.
This provides a couple of convenience methods on top of the
standard methods provided by Field, Algebra<F> and BasedVectorSpace<F>.
It also provides a type which handles packed vectors of extension field elements.
Required Associated Types§
type ExtensionPacking: PackedFieldExtension<Base, Self> + 'static + Copy + Send + Sync
Required Methods§
Sourcefn is_in_basefield(&self) -> bool
fn is_in_basefield(&self) -> bool
Determine if the given element lies in the base field.
Provided Methods§
Sourcefn from_ext_basis_coefficients(coeffs: &[Self]) -> Option<Self>
fn from_ext_basis_coefficients(coeffs: &[Self]) -> Option<Self>
Reassemble an element of Self from D = DIMENSION coefficients in Self
via Σⱼ basisⱼ · coeffsⱼ. Returns None if coeffs.len() != Self::DIMENSION.
This is the Self-coefficient counterpart to
BasedVectorSpace::from_basis_coefficients_slice, which takes coefficients
in Base. It is the natural “lifting” operation in commit-and-open protocols:
if an extension polynomial decomposes as f(X) = Σⱼ basisⱼ · fⱼ(X) with
fⱼ over Base, then f(z) = Σⱼ basisⱼ · fⱼ(z) for any z ∈ Self.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".