picologic-0.1.2: Utilities for symbolic predicate logic expressions
Picologic.AST
Synopsis
data Expr Source
Constructors
Variable
Logical negation
Logical conjunction
Logical disjunction
Logical biconditional
Material implication
Instances
newtype Ident Source
newtype Solutions Source
type Ctx = Map Ident Bool Source
variables :: Expr -> [Ident] Source
Variables in expression
eval :: Ctx -> Expr -> Bool Source
Evaluate expression.
cnf :: Expr -> Expr Source
Conjunctive normal form. (May result in exponential growth)
nnf :: Expr -> Expr Source
Negation normal form. (May result in exponential growth)
simp :: Expr -> Expr Source
Remove tautologies.