# Logical redundancies.
cond1 <- "A*b + a*B + A*C + B*C"
rreduce(cond1)
rreduce(cond1, niter = 10)
cond2 <- "A*b + a*B + A*B + a*b"
rreduce(cond2, simplify2constant = FALSE)
# Any Boolean expressions.
cond <- "!(A*B*C)*!(a*b*c)" # or "A + B*!(D + e) <-> C"
x <- selectCases(cond)
cond <- getCond(x) # Returns a DNF equivalent to cond, but with many redundancies.
rreduce(cond) # Repeated execution results in different outputs.
rreduce(cond, verbose = TRUE)
rreduce(cond, niter = 20) # 20 iterations yield 5 minimal forms.
Run the code above in your browser using DataLab