prop_filter :: BagTest Int bag => bag Int -> Int -> bag Int -> Bool
prop_filter bag x xs =
    si bagLT && si bagLE && si bagGT && si bagGE
    &&
    toOrdList bagLT == Prelude.filter (< x) (toOrdList xs)
    &&
    toOrdList bagLE == Prelude.filter (<= x) (toOrdList xs)
    &&
    toOrdList bagGT == Prelude.filter (> x) (toOrdList xs)
    &&
    toOrdList bagGE == Prelude.filter (>= x) (toOrdList xs)

  where bagLT = filterLT x xs
        bagLE = filterLE x xs
        bagGT = filterGT x xs
        bagGE = filterGE x xs
prop_filter :: BagTest Int bag => bag Int -> Int -> bag Int -> Bool
prop_filter bag x xs =
    si bagLT && si bagLE && si bagGT && si bagGE
    &&
    toOrdList bagLT == Prelude.filter (< x) (toOrdList xs)
    &&
    toOrdList bagLE == Prelude.filter (<= x) (toOrdList xs)
    &&
    toOrdList bagGT == Prelude.filter (> x) (toOrdList xs)
    &&
    toOrdList bagGE == Prelude.filter (>= x) (toOrdList xs)

  where bagLT = filterLT x xs
        bagLE = filterLE x xs
        bagGT = filterGT x xs
        bagGE = filterGE x xs
prop_filter bag x xs =
    si bagLT && si bagLE && si bagGT && si bagGE
    &&
    toOrdList bagLT == Prelude.filter (< x) (toOrdList xs)
    &&
    toOrdList bagLE == Prelude.filter (<= x) (toOrdList xs)
    &&
    toOrdList bagGT == Prelude.filter (> x) (toOrdList xs)
    &&
    toOrdList bagGE == Prelude.filter (>= x) (toOrdList xs)

  where bagLT = filterLT x xs
        bagLE = filterLE x xs
        bagGT = filterGT x xs
        bagGE = filterGE x xs