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

Portabilitynon-portable
Stabilityexperimental
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone

Data.Algebra.Boolean.Negable

Description

 

Synopsis

Documentation

data Neg a Source

Free Negable.

Constructors

Pos a

Positive value

Neg a

Negative value

Instances

Functor Neg 
Typeable1 Neg 
CoBoolean1 Neg 
Eq a => Eq (Neg a) 
Ord a => Ord (Neg a) 
Read a => Read (Neg a) 
Show a => Show (Neg a) 
CoBoolean (Neg a) 
Negable (Neg a) 

class Negable x whereSource

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 -> xSource

Invert the value.

Instances

Negable Bool 
Monoid m => Negable (Maybe m) 
Negable (Neg a) 
Negable (FreeBoolean a) 
Negable a => Negable (NNF a) 
(Ord a, Negable a) => Negable (DNF a) 
(Ord a, Negable a) => Negable (CNF a) 
(Ord a, Negable a) => Negable (NNF a) 
Negable a => Negable (DNF a) 
Negable a => Negable (CNF a) 
(Negable a, Negable b) => Negable (Either a b) 
(Negable a, Negable b) => Negable (a, b)