constructive-algebra-0.3.0: A library of constructive algebra.

Algebra.Structures.Ring

Description

The representation of the ring structure.

Synopsis

Documentation

class Ring a whereSource

Definition of rings.

Methods

(<+>) :: a -> a -> aSource

Addition

(<*>) :: a -> a -> aSource

Multiplication

neg :: a -> aSource

Compute additive inverse

zero :: aSource

The additive identity

one :: aSource

The multiplicative identity

Instances

propAddAssoc :: (Ring a, Eq a) => a -> a -> a -> (Bool, String)Source

Addition is associative.

propAddIdentity :: (Ring a, Eq a) => a -> (Bool, String)Source

Zero is the additive identity.

propAddInv :: (Ring a, Eq a) => a -> (Bool, String)Source

Negation give the additive inverse.

propAddComm :: (Ring a, Eq a) => a -> a -> (Bool, String)Source

Addition is commutative.

propMulAssoc :: (Ring a, Eq a) => a -> a -> a -> (Bool, String)Source

Multiplication is associative.

propMulIdentity :: (Ring a, Eq a) => a -> (Bool, String)Source

One is the multiplicative identity.

propRightDist :: (Ring a, Eq a) => a -> a -> a -> (Bool, String)Source

Multiplication is right-distributive over addition.

propLeftDist :: (Ring a, Eq a) => a -> a -> a -> (Bool, String)Source

Multiplication is left-ditributive over addition.

propRing :: (Ring a, Eq a) => a -> a -> a -> PropertySource

Specification of rings. Test that the arguments satisfy the ring axioms.

(<->) :: Ring a => a -> a -> aSource

Subtraction

(<^>) :: Ring a => a -> Integer -> aSource

Exponentiation

sumRing :: Ring a => [a] -> aSource

Summation

productRing :: Ring a => [a] -> aSource

Product