boolean-normal-forms-0.0.0.2: Boolean normal form: NNF, DNF & CNF

Data.Algebra.Boolean.NormalForm

Description

Synopsis

# Documentation

class CoBoolean1 nf => NormalForm nf where Source #

Class unifying different boolean normal forms.

Minimal complete definition

Associated Types

type NFConstraint nf a :: Constraint Source #

NormalForm could be constrained, so the Set based implementations could be included.

Methods

toNormalForm :: a -> nf a Source #

Lift a value into normal form.

simplify :: NFConstraint nf a => (a -> Maybe Bool) -> nf a -> nf a Source #

Simplify the formula, if some terms are ⊥ or ⊤.

fromFreeBoolean :: NFConstraint nf a => FreeBoolean a -> nf a Source #

transform from free boolean form

Instances

 Source # Associated Typestype NFConstraint (FreeBoolean :: * -> *) a :: Constraint Source # MethodstoNormalForm :: a -> FreeBoolean a Source #simplify :: NFConstraint FreeBoolean a => (a -> Maybe Bool) -> FreeBoolean a -> FreeBoolean a Source # Source # Associated Typestype NFConstraint (NNF :: * -> *) a :: Constraint Source # MethodstoNormalForm :: a -> NNF a Source #simplify :: NFConstraint NNF a => (a -> Maybe Bool) -> NNF a -> NNF a Source # Source # Associated Typestype NFConstraint (NNF :: * -> *) a :: Constraint Source # MethodstoNormalForm :: a -> NNF a Source #simplify :: NFConstraint NNF a => (a -> Maybe Bool) -> NNF a -> NNF a Source # Source # Associated Typestype NFConstraint (DNF :: * -> *) a :: Constraint Source # MethodstoNormalForm :: a -> DNF a Source #simplify :: NFConstraint DNF a => (a -> Maybe Bool) -> DNF a -> DNF a Source # Source # Associated Typestype NFConstraint (DNF :: * -> *) a :: Constraint Source # MethodstoNormalForm :: a -> DNF a Source #simplify :: NFConstraint DNF a => (a -> Maybe Bool) -> DNF a -> DNF a Source # Source # Associated Typestype NFConstraint (CNF :: * -> *) a :: Constraint Source # MethodstoNormalForm :: a -> CNF a Source #simplify :: NFConstraint CNF a => (a -> Maybe Bool) -> CNF a -> CNF a Source # Source # Associated Typestype NFConstraint (CNF :: * -> *) a :: Constraint Source # MethodstoNormalForm :: a -> CNF a Source #simplify :: NFConstraint CNF a => (a -> Maybe Bool) -> CNF a -> CNF a Source #