prop_cartProduct len1 len2 =
    let a = [1 .. len1]
        b = [1 .. len2]
        prod = cartProduct a b
        sameLength = length prod == (length a) * (length b)
        onlyOnce = length prod == length (nub prod)
        known = and $ map (\(x, y) -> (elem x a) && (elem y b)) prod
    in  len1 > 1 && len2 > 1 ==>
        sameLength && onlyOnce && known
prop_cartProduct len1 len2 =
    let a = [1 .. len1]
        b = [1 .. len2]
        prod = cartProduct a b
        sameLength = length prod == (length a) * (length b)
        onlyOnce = length prod == length (nub prod)
        known = and $ map (\(x, y) -> (elem x a) && (elem y b)) prod
    in  len1 > 1 && len2 > 1 ==>
        sameLength && onlyOnce && known
prop_cartProduct len1 len2 =
    let a = [1 .. len1]
        b = [1 .. len2]
        prod = cartProduct a b
        sameLength = length prod == (length a) * (length b)
        onlyOnce = length prod == length (nub prod)
        known = and $ map (\(x, y) -> (elem x a) && (elem y b)) prod
    in  len1 > 1 && len2 > 1 ==>
        sameLength && onlyOnce && known