Module

Test.QuickCheck.Laws.Data.EuclideanRing

Package
purescript-quickcheck-laws
Repository
purescript-contrib/purescript-quickcheck-laws

#checkEuclideanRing Source

checkEuclideanRing :: forall a. EuclideanRing a => Arbitrary a => Eq a => Proxy a -> Effect Unit
  • Integral domain: one /= zero, and if a and b are both nonzero then so is their product a * b
  • Euclidean function degree:
    • Nonnegativity: For all nonzero a, degree a >= 0
    • Quotient/remainder: For all a and b, where b is nonzero, let q = a / b and r = a `mod` b; then a = q*b + r, and also either r = zero or degree r < degree b
  • Submultiplicative euclidean function:
    • For all nonzero a and b, degree a <= degree (a * b)

#checkEuclideanRingGen Source

checkEuclideanRingGen :: forall a. EuclideanRing a => Eq a => Gen a -> Effect Unit