propTakeToFirst :: Int -> Int -> [Int] -> Property
propTakeToFirst i j xs = (0 /= i && j < i && (not . null) xs) ==> takeWhile (not . p) xs == (l . takeToFirst p) xs where
    p x = x `mod` i == j
    l
        | any p xs = init
        | otherwise = id

-- | @((\(as, bs) -> as ++ [x] ++ bs) . propSplitOnFirst x) xs == xs@
propTakeToFirst :: Int -> Int -> [Int] -> Property
propTakeToFirst i j xs = (0 /= i && j < i && (not . null) xs) ==> takeWhile (not . p) xs == (l . takeToFirst p) xs where
    p x = x `mod` i == j
    l
        | any p xs = init
        | otherwise = id

-- | @((\(as, bs) -> as ++ [x] ++ bs) . propSplitOnFirst x) xs == xs@
propTakeToFirst i j xs = (0 /= i && j < i && (not . null) xs) ==> takeWhile (not . p) xs == (l . takeToFirst p) xs where
    p x = x `mod` i == j
    l
        | any p xs = init
        | otherwise = id

-- | @((\(as, bs) -> as ++ [x] ++ bs) . propSplitOnFirst x) xs == xs@