boolean-normal-forms-0.0.1.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.NNF.Tree

Description

 
Synopsis

Documentation

data NNF a Source #

Boolean formula in Negation Normal Form

Boolean operations will perform transformations as below:

Constructors

NNFTrue 
NNFFalse 
NNFValue a 
NNFOr (NNF a) (NNF a) 
NNFAnd (NNF a) (NNF a) 
Instances
Functor NNF Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

fmap :: (a -> b) -> NNF a -> NNF b #

(<$) :: a -> NNF b -> NNF a #

Foldable NNF Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

fold :: Monoid m => NNF m -> m #

foldMap :: Monoid m => (a -> m) -> NNF a -> m #

foldr :: (a -> b -> b) -> b -> NNF a -> b #

foldr' :: (a -> b -> b) -> b -> NNF a -> b #

foldl :: (b -> a -> b) -> b -> NNF a -> b #

foldl' :: (b -> a -> b) -> b -> NNF a -> b #

foldr1 :: (a -> a -> a) -> NNF a -> a #

foldl1 :: (a -> a -> a) -> NNF a -> a #

toList :: NNF a -> [a] #

null :: NNF a -> Bool #

length :: NNF a -> Int #

elem :: Eq a => a -> NNF a -> Bool #

maximum :: Ord a => NNF a -> a #

minimum :: Ord a => NNF a -> a #

sum :: Num a => NNF a -> a #

product :: Num a => NNF a -> a #

CoBoolean1 NNF Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

toBooleanWith :: Boolean c => (a -> c) -> NNF a -> c Source #

NormalForm NNF Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Associated Types

type NFConstraint NNF a :: Constraint Source #

Eq a => Eq (NNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

(==) :: NNF a -> NNF a -> Bool #

(/=) :: NNF a -> NNF a -> Bool #

Ord a => Ord (NNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

compare :: NNF a -> NNF a -> Ordering #

(<) :: NNF a -> NNF a -> Bool #

(<=) :: NNF a -> NNF a -> Bool #

(>) :: NNF a -> NNF a -> Bool #

(>=) :: NNF a -> NNF a -> Bool #

max :: NNF a -> NNF a -> NNF a #

min :: NNF a -> NNF a -> NNF a #

Read a => Read (NNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Show a => Show (NNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

showsPrec :: Int -> NNF a -> ShowS #

show :: NNF a -> String #

showList :: [NNF a] -> ShowS #

Negable a => Boolean (NNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

true :: NNF a #

false :: NNF a #

not :: NNF a -> NNF a #

(&&) :: NNF a -> NNF a -> NNF a #

(||) :: NNF a -> NNF a -> NNF a #

xor :: NNF a -> NNF a -> NNF a #

(-->) :: NNF a -> NNF a -> NNF a #

(<-->) :: NNF a -> NNF a -> NNF a #

and :: Foldable t => t (NNF a) -> NNF a #

or :: Foldable t => t (NNF a) -> NNF a #

nand :: Foldable t => t (NNF a) -> NNF a #

all :: Foldable t => (a0 -> NNF a) -> t a0 -> NNF a #

any :: Foldable t => (a0 -> NNF a) -> t a0 -> NNF a #

nor :: Foldable t => t (NNF a) -> NNF a #

NFData a => NFData (NNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

rnf :: NNF a -> () #

CoBoolean a => CoBoolean (NNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

toBoolean :: Boolean b => NNF a -> b Source #

Negable a => Negable (NNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree

Methods

not :: NNF a -> NNF a Source #

type NFConstraint NNF a Source # 
Instance details

Defined in Data.Algebra.Boolean.NNF.Tree