-- | Number is zero or is equal to the product of its factors.
factoriseProperty :: Integer -> Integer -> Bool
factoriseProperty x y
  =  x == 0 && y == 0
  || g == g'
  where
    g = x :+ y
    factors = factorise g
    g' = product $ map (uncurry (.^)) factors

-- | Number is prime iff it is non-zero
--   and has exactly one (non-unit) factor.
factoriseProperty :: Integer -> Integer -> Bool
factoriseProperty x y
  =  x == 0 && y == 0
  || g == g'
  where
    g = x :+ y
    factors = factorise g
    g' = product $ map (uncurry (.^)) factors

-- | Number is prime iff it is non-zero
--   and has exactly one (non-unit) factor.
factoriseProperty x y
  =  x == 0 && y == 0
  || g == g'
  where
    g = x :+ y
    factors = factorise g
    g' = product $ map (uncurry (.^)) factors

-- | Number is prime iff it is non-zero
--   and has exactly one (non-unit) factor.