The representation of the ring structure.

- class Ring a where
- propAddAssoc :: (Ring a, Eq a) => a -> a -> a -> (Bool, String)
- propAddIdentity :: (Ring a, Eq a) => a -> (Bool, String)
- propAddInv :: (Ring a, Eq a) => a -> (Bool, String)
- propAddComm :: (Ring a, Eq a) => a -> a -> (Bool, String)
- propMulAssoc :: (Ring a, Eq a) => a -> a -> a -> (Bool, String)
- propMulIdentity :: (Ring a, Eq a) => a -> (Bool, String)
- propRightDist :: (Ring a, Eq a) => a -> a -> a -> (Bool, String)
- propLeftDist :: (Ring a, Eq a) => a -> a -> a -> (Bool, String)
- propRing :: (Ring a, Eq a) => a -> a -> a -> Property
- (<->) :: Ring a => a -> a -> a
- (<^>) :: Ring a => a -> Integer -> a
- sumRing :: Ring a => [a] -> a
- productRing :: Ring a => [a] -> a

# Documentation

Definition of rings.

Addition

Multiplication

Compute additive inverse

The additive identity

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.

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

Product