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.CNF.Set

Description

 
Synopsis

Documentation

newtype CNF a Source #

Boolean formula in Conjunction Normal Form

Constructors

CNF 

Fields

Instances
Foldable CNF Source # 
Instance details

Defined in Data.Algebra.Boolean.CNF.Set

Methods

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

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

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

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

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

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

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

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

toList :: CNF a -> [a] #

null :: CNF a -> Bool #

length :: CNF a -> Int #

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

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

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

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

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

CoBoolean1 CNF Source # 
Instance details

Defined in Data.Algebra.Boolean.CNF.Set

Methods

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

NormalForm CNF Source # 
Instance details

Defined in Data.Algebra.Boolean.CNF.Set

Associated Types

type NFConstraint CNF a :: Constraint Source #

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

Defined in Data.Algebra.Boolean.CNF.Set

Methods

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

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

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

Defined in Data.Algebra.Boolean.CNF.Set

Methods

compare :: CNF a -> CNF a -> Ordering #

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

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

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

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

max :: CNF a -> CNF a -> CNF a #

min :: CNF a -> CNF a -> CNF a #

(Read a, Ord a) => Read (CNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.CNF.Set

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

Defined in Data.Algebra.Boolean.CNF.Set

Methods

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

show :: CNF a -> String #

showList :: [CNF a] -> ShowS #

(Ord a, Negable a) => Boolean (CNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.CNF.Set

Methods

true :: CNF a #

false :: CNF a #

not :: CNF a -> CNF a #

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

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

xor :: CNF a -> CNF a -> CNF a #

(-->) :: CNF a -> CNF a -> CNF a #

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

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

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

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

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

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

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

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

Defined in Data.Algebra.Boolean.CNF.Set

Methods

rnf :: CNF a -> () #

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

Defined in Data.Algebra.Boolean.CNF.Set

Methods

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

(Ord a, Negable a) => Negable (CNF a) Source # 
Instance details

Defined in Data.Algebra.Boolean.CNF.Set

Methods

not :: CNF a -> CNF a Source #

type NFConstraint CNF a Source # 
Instance details

Defined in Data.Algebra.Boolean.CNF.Set

type NFConstraint CNF a = (Negable a, Ord a)

fromDoubleList :: Ord a => [[a]] -> CNF a Source #

toDoubleList :: CNF a -> [[a]] Source #

fromNNF :: (Ord a, Negable a) => NNF a -> CNF a Source #