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

Data.Algebra.Boolean.DNF.Set

Description

Synopsis

# Documentation

newtype DNF a Source #

Boolean formula in Disjunction Normal Form

Constructors

 DNF FieldsunDNF :: Set (Set a)

Instances

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