module Nominal.Formula (
Formula,
true,
false,
fromBool,
equals,
notEquals,
lessThan,
lessEquals,
greaterThan,
greaterEquals,
(/\),
and,
(\/),
or,
not,
(==>),
(<==),
implies,
(<==>),
iff,
existsVar,
(∃),
forAllVars,
(∀),
isTrue,
isFalse,
simplifyFormula,
solve) where
import Nominal.Atoms.Logic (existsVar, forAllVars, isFalse, isTrue, simplifyFormula)
import Nominal.Formula.Definition
import Nominal.Formula.Constructors
import Nominal.Formula.Operators
import Nominal.Variable (Variable)
import Prelude hiding (and, not, or)
(∃) :: Variable -> Formula -> Formula
(∃) = existsVar
(∀) :: Variable -> Formula -> Formula
(∀) = forAllVars
solve :: Formula -> Maybe Bool
solve f
| isTrue f = Just True
| isFalse f = Just False
| otherwise = Nothing