BoolRing

trait BoolRing[A] extends BoolRng[A] with CommutativeRing[A]

A Boolean ring is a ring whose multiplication is idempotent, that is a⋅a = a for all elements ''a''. This property also implies a+a = 0 for all ''a'', and a⋅b = b⋅a (commutativity of multiplication).

A Boolean ring is a ring whose multiplication is idempotent, that is a⋅a = a for all elements ''a''. This property also implies a+a = 0 for all ''a'', and a⋅b = b⋅a (commutativity of multiplication).

Every Boolean ring is equivalent to a Boolean algebra. See algebra.lattice.BoolFromBoolRing for details.

Companion
object

Value members

Inherited methods

def fromBigInt(n: BigInt): A

Convert the given BigInt to an instance of A.

Convert the given BigInt to an instance of A.

This is equivalent to n repeated summations of this ring's one, or -n summations of -one if n is negative.

Most type class instances should consider overriding this method for performance reasons.

Inherited from
Ring
def fromInt(n: Int): A

Convert the given integer to an instance of A.

Convert the given integer to an instance of A.

Defined to be equivalent to sumN(one, n).

That is, n repeated summations of this ring's one, or -n summations of -one if n is negative.

Most type class instances should consider overriding this method for performance reasons.

Inherited from
Ring
def isOne(a: A)(ev: Eq[A]): Boolean

Tests if a is one.

Tests if a is one.

Inherited from
MultiplicativeMonoid
def isZero(a: A)(ev: Eq[A]): Boolean

Tests if a is zero.

Tests if a is zero.

Inherited from
AdditiveMonoid
def minus(x: A, y: A): A
Inherited from
AdditiveGroup
final override def negate(x: A): A
Definition Classes
Inherited from
BoolRng
def one: A
Inherited from
MultiplicativeMonoid
def plus(x: A, y: A): A
Inherited from
AdditiveSemigroup
override def pow(a: A, n: Int): A
def product(as: IterableOnce[A]): A

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Inherited from
MultiplicativeMonoid
def sum(as: IterableOnce[A]): A

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from
AdditiveMonoid
override def sumN(a: A, n: Int): A
Definition Classes
Inherited from
AdditiveGroup
def times(x: A, y: A): A
override def tryProduct(as: IterableOnce[A]): Option[A]
override def trySum(as: IterableOnce[A]): Option[A]
Definition Classes
Inherited from
AdditiveMonoid
def zero: A
Inherited from
AdditiveMonoid