boolean-normal-forms-0.0.1.1: 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 # Instance detailsDefined in Data.Algebra.Boolean.Negable Methodsfmap :: (a -> b) -> Neg a -> Neg b #(<\$) :: a -> Neg b -> Neg a # Source # Instance detailsDefined in Data.Algebra.Boolean.Negable MethodstoBooleanWith :: Boolean c => (a -> c) -> Neg a -> c Source # Eq a => Eq (Neg a) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable Methods(==) :: Neg a -> Neg a -> Bool #(/=) :: Neg a -> Neg a -> Bool # Ord a => Ord (Neg a) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable 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 # Instance detailsDefined in Data.Algebra.Boolean.Negable MethodsreadsPrec :: Int -> ReadS (Neg a) #readList :: ReadS [Neg a] #readPrec :: ReadPrec (Neg a) # Show a => Show (Neg a) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable MethodsshowsPrec :: Int -> Neg a -> ShowS #show :: Neg a -> String #showList :: [Neg a] -> ShowS # NFData a => NFData (Neg a) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable Methodsrnf :: Neg a -> () # CoBoolean (Neg a) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable MethodstoBoolean :: Boolean b => Neg a -> b Source # Negable (Neg a) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable 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.

Methods

not :: x -> x Source #

Invert the value.

Instances
 Source # Instance detailsDefined in Data.Algebra.Boolean.Negable Methods Monoid m => Negable (Maybe m) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable Methodsnot :: Maybe m -> Maybe m Source # Negable (Neg a) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable Methodsnot :: Neg a -> Neg a Source # Source # Instance detailsDefined in Data.Algebra.Boolean.FreeBoolean Methods Negable a => Negable (NNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.NNF.Tree Methodsnot :: NNF a -> NNF a Source # (Ord a, Negable a) => Negable (NNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.NNF.Set Methodsnot :: NNF a -> NNF a Source # (Ord a, Negable a) => Negable (DNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.DNF.Set Methodsnot :: DNF a -> DNF a Source # Negable a => Negable (DNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.DNF.List Methodsnot :: DNF a -> DNF a Source # (Ord a, Negable a) => Negable (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.Set Methodsnot :: CNF a -> CNF a Source # Negable a => Negable (CNF a) Source # Instance detailsDefined in Data.Algebra.Boolean.CNF.List Methodsnot :: CNF a -> CNF a Source # (Negable a, Negable b) => Negable (Either a b) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable Methodsnot :: Either a b -> Either a b Source # (Negable a, Negable b) => Negable (a, b) Source # Instance detailsDefined in Data.Algebra.Boolean.Negable Methodsnot :: (a, b) -> (a, b) Source #