12 virtual bool is_one()
const = 0;
14 virtual bool is_zero()
const = 0;
virtual bool is_commutative() const
should be True iff element commutes under multiplication
Definition: rings.hpp:18
elements of this type should have commutative multiplication
Definition: rings.hpp:39
virtual const Ring_Element & operator-(const Ring_Element &) const =0
subtraction: other element should be of same type, use a cast
a field is an integral domain whose nonzero elements have inverses
Definition: rings.hpp:63
virtual bool is_cancellable() const override
integral domains are commutative rings without zero divisors, so the element should be cancellable (s...
Definition: rings.hpp:59
virtual bool is_zero() const =0
should be True iff element is additive identity
virtual bool is_one() const =0
should be True iff element is multiplicative identity
elements of this type should be cancellable; there should be no zero divisors
Definition: rings.hpp:53
Definition: integer.hpp:6
virtual bool operator==(const Ring_Element &) const =0
comparison: other element has same value
virtual const Ring_Element & operator+(const Ring_Element &) const =0
addition: other element should be of same type, use a cast
virtual bool has_inverse() const =0
should be True iff element has a multiplicative inverse
virtual bool is_cancellable() const
should be True iff element can cancel across an equation; e.g., .
Definition: rings.hpp:23
virtual bool is_commutative() const override
Duh.
Definition: rings.hpp:42
virtual const Ring_Element & operator*(const Ring_Element &) const =0
multiplicationL other element should be of same type, use a cast
a class for elements with the capabilities of ring arithmetic
Definition: rings.hpp:9
virtual bool has_inverse() const override
fields are integral domains where nonzero elements have inverses
Definition: rings.hpp:68
virtual bool operator!=(const Ring_Element &) const =0
comparison: other element has different value