Algebra

Trait Algebra 

Source
pub trait Algebra<F>:
    PrimeCharacteristicRing
    + From<F>
    + Add<F, Output = Self>
    + AddAssign<F>
    + Sub<F, Output = Self>
    + SubAssign<F>
    + Mul<F, Output = Self>
    + MulAssign<F> { }
Expand description

A ring R implements Algebra<F> if there is an injective homomorphism from F into R; in particular only F::ZERO maps to R::ZERO.

For the most part, we will usually expect F to be a field but there are a few cases where it is handy to allow it to just be a ring. In particular, every ring naturally implements Algebra<Self>.

§Mathematical Description

Let x and y denote arbitrary elements of F. Then we require that our map from has the properties:

  • Preserves Identity: from(F::ONE) = R::ONE
  • Commutes with Addition: from(x + y) = from(x) + from(y)
  • Commutes with Multiplication: from(x * y) = from(x) * from(y)

Such maps are known as ring homomorphisms and are injective if the only element which maps to R::ZERO is F::ZERO.

The existence of this map makes R into an F-module and hence an F-algebra. If, additionally, R is a field, then this makes R a field extension of F.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<F: BinomiallyExtendable<D>, PF: PackedField<Scalar = F>, const D: usize> Algebra<BinomialExtensionField<F, D>> for PackedBinomialExtensionField<F, PF, D>

Source§

impl<F: BinomiallyExtendable<D>, PF: PackedField<Scalar = F>, const D: usize> Algebra<PF> for PackedBinomialExtensionField<F, PF, D>

Source§

impl<F: BinomiallyExtendable<D>, const D: usize> Algebra<F> for BinomialExtensionField<F, D>

Source§

impl<F: Field, const N: usize> Algebra<F> for FieldArray<F, N>

Source§

impl<R: PrimeCharacteristicRing> Algebra<R> for R