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

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

 Source # Methodsfmap :: (a -> b) -> NNF a -> NNF b #(<\$) :: a -> NNF b -> NNF a # Source # Methodsfold :: 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 # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> NNF a -> c Source # Source # Associated Typestype NFConstraint (NNF :: * -> *) a :: Constraint Source # MethodstoNormalForm :: a -> NNF a Source #simplify :: NFConstraint NNF a => (a -> Maybe Bool) -> NNF a -> NNF a Source # Eq a => Eq (NNF a) Source # Methods(==) :: NNF a -> NNF a -> Bool #(/=) :: NNF a -> NNF a -> Bool # Ord a => Ord (NNF a) Source # Methodscompare :: 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 # MethodsreadsPrec :: Int -> ReadS (NNF a) #readList :: ReadS [NNF a] #readPrec :: ReadPrec (NNF a) # Show a => Show (NNF a) Source # MethodsshowsPrec :: Int -> NNF a -> ShowS #show :: NNF a -> String #showList :: [NNF a] -> ShowS # Negable a => Boolean (NNF a) Source # Methodstrue :: 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 => (a -> NNF a) -> t a -> NNF a #any :: Foldable t => (a -> NNF a) -> t a -> NNF a #nor :: Foldable t => t (NNF a) -> NNF a # NFData a => NFData (NNF a) Source # Methodsrnf :: NNF a -> () # CoBoolean a => CoBoolean (NNF a) Source # MethodstoBoolean :: Boolean b => NNF a -> b Source # Negable a => Negable (NNF a) Source # Methodsnot :: NNF a -> NNF a Source # type NFConstraint NNF a Source # type NFConstraint NNF a = Negable a