moduleAlgebra.Structures.IntegralDomain(moduleAlgebra.Structures.CommutativeRing,IntegralDomain,propZeroDivisors,propIntegralDomain)whereimportTest.QuickCheckimportAlgebra.Structures.RingimportAlgebra.Structures.CommutativeRing--------------------------------------------------------------------------------- | Definition of integral domains.classCommutativeRinga=>IntegralDomaina-- An integral domain is a ring in which there are no zero divisors.propZeroDivisors::(IntegralDomaina,Eqa)=>a->a->BoolpropZeroDivisorsab=ifa<*>b==zerothena==zero||b==zeroelseTrue-- | Specification of integral domains. Test that there are no zero-divisors-- and that it satisfies the axioms of commutative rings.propIntegralDomain::(IntegralDomaina,Eqa)=>a->a->a->PropertypropIntegralDomainabc=ifpropZeroDivisorsabthenpropCommutativeRingabcelsewhenFail(print"propZeroDivisors")False