checkRule :: Rule -> TripleSet checkRule ants | bv2 = ants2 ++ ants1 | bv1 && bv2 = [] | bv1 = ants2 | otherwise = ruleOut: ants2 where Rule (ants, seq, nr) = rule ants1 = checkGrounded ants ants2 = [t| t <- ants, not (t Šlem` ants1] seq1 = checkGrounded [seq] bv1 = ants1 == [] bv2 = seq1 == [] ruleOut = Rule (ants1, seq, nr) 1