Skip to main content

FiniteChar2Field

Trait FiniteChar2Field 

Source
pub trait FiniteChar2Field: ExactFieldScalar + Copy {
    // Required methods
    fn field_order() -> u128;
    fn is_supported_char2_field() -> bool;
    fn from_index(i: u128) -> Self;
    fn artin_schreier_class(x: Self) -> u128;

    // Provided methods
    fn characteristic_prime() -> u128 { ... }
    fn ensure_supported() -> Option<()> { ... }
}
Expand description

Finite fields of characteristic 2, with the operations char-2 form theory needs: field-order metadata, an enumeration, and the Artin–Schreier class (the additive analogue of the odd-characteristic square class). Intentionally narrower than Scalar: a form-theory capability parallel to FiniteOddField.

Required Methods§

Source

fn field_order() -> u128

Field order q = 2^m.

Source

fn is_supported_char2_field() -> bool

Whether this type is a supported finite field of characteristic 2.

Source

fn from_index(i: u128) -> Self

Enumerate the field: index i ∈ [0, field_order()) ↦ a distinct element, covering all of F_q exactly once (base-2 digits of i are the polynomial-basis coordinates). The char-2 mirror of FiniteOddField::from_index.

Source

fn artin_schreier_class(x: Self) -> u128

The Artin–Schreier class Tr_{F_q/F₂}(x) ∈ {0, 1} — the additive analogue of the odd-characteristic square class. x ∈ ℘(F_q) (the image of y ↦ y² + y) iff this is 0; equivalently y² + y = x is solvable iff the class is 0. F₂-linear in x.

Provided Methods§

Source

fn characteristic_prime() -> u128

Characteristic prime — always 2 (provided; the trait is char-2 only).

Source

fn ensure_supported() -> Option<()>

Some(()) iff this is a supported char-2 finite field (the char-2 mirror of FiniteOddField::ensure_supported).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl FiniteChar2Field for Fp<2>

Source§

impl<const N: usize> FiniteChar2Field for Fpn<2, N>