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

Data.Algebra.Boolean.CNF.Set

Description

Synopsis

# Documentation

newtype CNF a Source #

Boolean formula in Conjunction Normal Form

Constructors

 CNF FieldsunCNF :: Set (Set a)

Instances

 Source # 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 # MethodstoBooleanWith :: Boolean c => (a -> c) -> CNF a -> c Source # Source # 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 # Methods(==) :: CNF a -> CNF a -> Bool #(/=) :: CNF a -> CNF a -> Bool # Ord a => Ord (CNF a) Source # 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 # (Ord a, Read a) => Read (CNF a) Source # MethodsreadsPrec :: Int -> ReadS (CNF a) #readList :: ReadS [CNF a] #readPrec :: ReadPrec (CNF a) # Show a => Show (CNF a) Source # MethodsshowsPrec :: Int -> CNF a -> ShowS #show :: CNF a -> String #showList :: [CNF a] -> ShowS # (Ord a, Negable a) => Boolean (CNF a) Source # 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 => (a -> CNF a) -> t a -> CNF a #any :: Foldable t => (a -> CNF a) -> t a -> CNF a #nor :: Foldable t => t (CNF a) -> CNF a # CoBoolean a => CoBoolean (CNF a) Source # MethodstoBoolean :: Boolean b => CNF a -> b Source # (Ord a, Negable a) => Negable (CNF a) Source # Methodsnot :: CNF a -> CNF a Source # type NFConstraint CNF a Source # 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 #