-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A library of constructive algebra. -- -- A library of constructive algebra. @package constructive-algebra @version 0.1 -- | The representation of the ring structure. module Algebra.Structures.Ring -- | Definition of rings class Ring a (<+>) :: (Ring a) => a -> a -> a (<*>) :: (Ring a) => a -> a -> a neg :: (Ring a) => a -> a zero :: (Ring a) => a one :: (Ring a) => a -- | Specification of rings. Test that the arguments satisfy the ring -- axioms. propRing :: (Ring a, Eq a) => a -> a -> a -> Property -- | Subtraction (<->) :: (Ring a) => a -> a -> a -- | Exponentiation (<^>) :: (Ring a) => a -> Integer -> a -- | Summation sumRing :: (Ring a) => [a] -> a -- | Product productRing :: (Ring a) => [a] -> a module Algebra.Structures.CommutativeRing -- | Definition of commutative rings class (Ring a) => CommutativeRing a -- | Specification of commutative rings. Test that multiplication is -- commutative and that it satisfies the ring axioms. propCommutativeRing :: (CommutativeRing a, Eq a) => a -> a -> a -> Property -- | Finitely generated ideals in commutative rings. module Algebra.Ideal -- | Ideals characterized by their list of generators. data (CommutativeRing a) => Ideal a Id :: [a] -> Ideal a -- | The zero ideal. zeroIdeal :: (CommutativeRing a) => Ideal a -- | Test if an ideal is principal. isPrincipal :: (CommutativeRing a) => Ideal a -> Bool -- | Evaluate the ideal at a certain point. eval :: (CommutativeRing a) => a -> Ideal a -> a -- | Addition of ideals. addId :: (CommutativeRing a, Eq a) => Ideal a -> Ideal a -> Ideal a -- | Multiplication of ideals. mulId :: (CommutativeRing a, Eq a) => Ideal a -> Ideal a -> Ideal a instance (CommutativeRing a, Arbitrary a, Eq a) => Arbitrary (Ideal a) instance (CommutativeRing a, Show a) => Show (Ideal a) module Algebra.Structures.StronglyDiscrete -- | Strongly discrete rings -- -- A ring is called strongly discrete if ideal membership is decidable. -- Nothing correspond to that x is not in the ideal and Just is the -- witness. Examples include all euclidean domains and the polynomial -- ring. class (Ring a) => StronglyDiscrete a member :: (StronglyDiscrete a) => a -> Ideal a -> Maybe [a] -- | Test that the witness is actually a witness that the element is in the -- ideal. propStronglyDiscrete :: (CommutativeRing a, StronglyDiscrete a, Eq a) => a -> Ideal a -> Bool module Algebra.Structures.IntegralDomain -- | Definition of integral domains class (CommutativeRing a) => IntegralDomain a -- | Specification of commutative rings. Test that there are no -- zero-divisors commutative and that it satisfies the axioms of -- commutative rings. propIntegralDomain :: (IntegralDomain a, Eq a) => a -> a -> a -> Property module Algebra.Z -- | Type synonym for integers. type Z = Integer instance IntegralDomain Z instance CommutativeRing Z instance Ring Z module Algebra.Structures.Field -- | Definition of fields class (IntegralDomain a) => Field a inv :: (Field a) => a -> a -- | Specification of fields. Test that the multiplicative inverses behave -- as expected and that it satisfies the axioms of integral domains. propField :: (Field a, Eq a) => a -> a -> a -> Property -- | Division () :: (Field a) => a -> a -> a