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

Copyright © Oleg Grenrus 2014 MIT Oleg Grenrus experimental non-portable None Haskell2010

Data.Algebra.Boolean.CNF.List

Description

Synopsis

# Documentation

newtype CNF a Source #

Boolean formula in Conjunction Normal Form

Constructors

 CNF FieldsunCNF :: [[a]]
Instances
 Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List Methodsfmap :: (a -> b) -> CNF a -> CNF b #(<\$) :: a -> CNF b -> CNF a # Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List Methodsfold :: 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 # Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List MethodstoBooleanWith :: Boolean c => (a -> c) -> CNF a -> c 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 # Eq a => Eq (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List Methods(==) :: CNF a -> CNF a -> Bool #(/=) :: CNF a -> CNF a -> Bool # Ord a => Ord (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List Methodscompare :: 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 => Read (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List MethodsreadsPrec :: Int -> ReadS (CNF a) #readList :: ReadS [CNF a] #readPrec :: ReadPrec (CNF a) # Show a => Show (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List MethodsshowsPrec :: Int -> CNF a -> ShowS #show :: CNF a -> String #showList :: [CNF a] -> ShowS # Negable a => Boolean (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List Methodstrue :: 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 detailsDefined in Data.Algebra.Boolean.CNF.List Methodsrnf :: CNF a -> () # CoBoolean a => CoBoolean (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List MethodstoBoolean :: Boolean b => CNF a -> b Source # Negable a => Negable (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List Methodsnot :: CNF a -> CNF a Source # type NFConstraint CNF a Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List type NFConstraint CNF a = Negable a

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

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

fromNNF :: Negable a => NNF a -> CNF a Source #