Find out which rules are causing rule_name(s) to be redundant.
is_implied_by(x, rule_name, ...)
validator
object with rule
character
with the names of the rules to be checked
not used
character
with the names of the rule that cause the implication.
Other redundancy:
detect_fixed_variables()
,
detect_redundancy()
,
remove_redundancy()
,
simplify_fixed_variables()
,
simplify_rules()
rules <- validator( rule1 = x > 1
, rule2 = x > 2
)
# rule1 is superfluous
remove_redundancy(rules)
#> Object of class 'validator' with 1 elements:
#> rule2: x > 2
# rule 1 is implied by rule 2
is_implied_by(rules, "rule1")
#> [1] "rule2"
rules <- validator( rule1 = x > 2
, rule2 = x > 2
)
# standout: rule1 and rule2, oldest rules wins
remove_redundancy(rules)
#> Object of class 'validator' with 1 elements:
#> rule1: x > 2
# Note that detection signifies both rules!
detect_redundancy(rules)
#> rule1 rule2
#> TRUE TRUE