//! Abstraction of ring structure\
use ;
use crateAbelianGroup;
/// (R, add, mul) is a ring if
///
/// 1. (R, add) is an abelian group
/// 2. R is closed under multiplication
/// 3. multiplication in R is associative
/// 4. multiplication is distributed over addition
/// # Safety
///
/// this trait is safe only when for all a, b, c: a * (b * c) = (a * b) * c
/// # Safety
///
/// this trait is safe only when for all a, b, c: a * (b + c) = a * b + a * c