use std::fmt;
pub trait BinaryFieldElement:
Copy + Clone + PartialEq + Eq + Send + Sync +
fmt::Debug + fmt::Display
{
fn zero() -> Self;
fn one() -> Self;
fn add(&self, other: &Self) -> Self;
fn mul(&self, other: &Self) -> Self;
fn inv(&self) -> Self;
fn from_bits(bits: u64) -> Self;
}
impl<T: BinaryFieldElement> From<bool> for T {
fn from(b: bool) -> Self {
if b { Self::one() } else { Self::zero() }
}
}