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

Data.Algebra.Boolean.Negable

Description

Synopsis

# Documentation

data Neg a Source #

Free Negable.

Constructors

 Pos a Positive value Neg a Negative value

Instances

 Source # Methodsfmap :: (a -> b) -> Neg a -> Neg b #(<\$) :: a -> Neg b -> Neg a # Source # MethodstoBooleanWith :: Boolean c => (a -> c) -> Neg a -> c Source # Eq a => Eq (Neg a) Source # Methods(==) :: Neg a -> Neg a -> Bool #(/=) :: Neg a -> Neg a -> Bool # Ord a => Ord (Neg a) Source # Methodscompare :: Neg a -> Neg a -> Ordering #(<) :: Neg a -> Neg a -> Bool #(<=) :: Neg a -> Neg a -> Bool #(>) :: Neg a -> Neg a -> Bool #(>=) :: Neg a -> Neg a -> Bool #max :: Neg a -> Neg a -> Neg a #min :: Neg a -> Neg a -> Neg a # Read a => Read (Neg a) Source # MethodsreadsPrec :: Int -> ReadS (Neg a) #readList :: ReadS [Neg a] #readPrec :: ReadPrec (Neg a) # Show a => Show (Neg a) Source # MethodsshowsPrec :: Int -> Neg a -> ShowS #show :: Neg a -> String #showList :: [Neg a] -> ShowS # CoBoolean (Neg a) Source # MethodstoBoolean :: Boolean b => Neg a -> b Source # Negable (Neg a) Source # Methodsnot :: Neg a -> Neg a Source #

class Negable x where Source #

Class to represent invertible values.

Must obey the double negation law: not (not x) = x

The negation appears only in leafs of normal forms, and the underlying proposition class might have built-in negation, thus we use Negable.

Minimal complete definition

not

Methods

not :: x -> x Source #

Invert the value.

Instances

 Source # Methods Monoid m => Negable (Maybe m) Source # Methodsnot :: Maybe m -> Maybe m Source # Negable (Neg a) Source # Methodsnot :: Neg a -> Neg a Source # Source # Methods (Ord a, Negable a) => Negable (NNF a) Source # Methodsnot :: NNF a -> NNF a Source # Negable a => Negable (NNF a) Source # Methodsnot :: NNF a -> NNF a Source # Negable a => Negable (DNF a) Source # Methodsnot :: DNF a -> DNF a Source # (Ord a, Negable a) => Negable (DNF a) Source # Methodsnot :: DNF a -> DNF a Source # (Ord a, Negable a) => Negable (CNF a) Source # Methodsnot :: CNF a -> CNF a Source # Negable a => Negable (CNF a) Source # Methodsnot :: CNF a -> CNF a Source # (Negable a, Negable b) => Negable (Either a b) Source # Methodsnot :: Either a b -> Either a b Source # (Negable a, Negable b) => Negable (a, b) Source # Methodsnot :: (a, b) -> (a, b) Source #