boolean-normal-forms-0.0.1.1: 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.

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 # Instance detailsDefined in Data.Algebra.Boolean.NormalForm Associated Types MethodstoNormalForm :: a -> FreeBoolean a Source #simplify :: NFConstraint FreeBoolean a => (a -> Maybe Bool) -> FreeBoolean a -> FreeBoolean a Source # Source # Instance detailsDefined in Data.Algebra.Boolean.NNF.Tree 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 # Instance detailsDefined in Data.Algebra.Boolean.NNF.Set 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 # Instance detailsDefined in Data.Algebra.Boolean.DNF.Set 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 # Instance detailsDefined in Data.Algebra.Boolean.DNF.List 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 # Instance detailsDefined in Data.Algebra.Boolean.CNF.Set 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 # Instance detailsDefined in Data.Algebra.Boolean.CNF.List Associated Typestype NFConstraint CNF a :: Constraint Source # MethodstoNormalForm :: a -> CNF a Source #simplify :: NFConstraint CNF a => (a -> Maybe Bool) -> CNF a -> CNF a Source #