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

Description

 
Synopsis

Documentation

newtype DNF a Source #

Boolean formula in Disjunction Normal Form

Constructors

DNF 

Fields

Instances
Foldable DNF Source # 
Instance details

Defined in Data.Algebra.Boolean.DNF.Set

Methods

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

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

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

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

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

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

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

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

toList :: DNF a -> [a] #

null :: DNF a -> Bool #

length :: DNF a -> Int #

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

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

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

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

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

CoBoolean1 DNF Source # 
Instance details

Defined in Data.Algebra.Boolean.DNF.Set

Methods

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

NormalForm DNF Source # 
Instance details

Defined in Data.Algebra.Boolean.DNF.Set

Associated Types

type NFConstraint DNF a :: Constraint Source #

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

Defined in Data.Algebra.Boolean.DNF.Set

Methods

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

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

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

Defined in Data.Algebra.Boolean.DNF.Set

Methods

compare :: DNF a -> DNF a -> Ordering #

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

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

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

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

max :: DNF a -> DNF a -> DNF a #

min :: DNF a -> DNF a -> DNF a #

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

Defined in Data.Algebra.Boolean.DNF.Set

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

Defined in Data.Algebra.Boolean.DNF.Set

Methods

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

show :: DNF a -> String #

showList :: [DNF a] -> ShowS #

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

Defined in Data.Algebra.Boolean.DNF.Set

Methods

true :: DNF a #

false :: DNF a #

not :: DNF a -> DNF a #

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

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

xor :: DNF a -> DNF a -> DNF a #

(-->) :: DNF a -> DNF a -> DNF a #

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

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

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

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

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

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

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

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

Defined in Data.Algebra.Boolean.DNF.Set

Methods

rnf :: DNF a -> () #

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

Defined in Data.Algebra.Boolean.DNF.Set

Methods

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

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

Defined in Data.Algebra.Boolean.DNF.Set

Methods

not :: DNF a -> DNF a Source #

type NFConstraint DNF a Source # 
Instance details

Defined in Data.Algebra.Boolean.DNF.Set

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

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

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

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