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

Copyright© Oleg Grenrus 2014
LicenseMIT
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Algebra.Boolean.NormalForm

Description

 

Synopsis

Documentation

class CoBoolean1 nf => NormalForm nf where Source #

Class unifying different boolean normal forms.

Minimal complete definition

toNormalForm, simplify, fromFreeBoolean

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

NormalForm FreeBoolean Source # 
NormalForm NNF Source # 

Associated Types

type NFConstraint (NNF :: * -> *) a :: Constraint Source #

NormalForm NNF Source # 

Associated Types

type NFConstraint (NNF :: * -> *) a :: Constraint Source #

NormalForm DNF Source # 

Associated Types

type NFConstraint (DNF :: * -> *) a :: Constraint Source #

NormalForm DNF Source # 

Associated Types

type NFConstraint (DNF :: * -> *) a :: Constraint Source #

NormalForm CNF Source # 

Associated Types

type NFConstraint (CNF :: * -> *) a :: Constraint Source #

NormalForm CNF Source # 

Associated Types

type NFConstraint (CNF :: * -> *) a :: Constraint Source #