qlogic-0.9: A Haskell Library for Propositional Logic.

Safe HaskellSafe-Infered

Qlogic.Boolean

Synopsis

Documentation

class Boolean a where

Methods

(&&) :: a -> a -> a

(||) :: a -> a -> a

not :: a -> a

top :: a

bot :: a

(<->) :: a -> a -> a

(-->) :: a -> a -> a

ite :: a -> a -> a -> a

maj :: a -> a -> a -> a

odd3 :: a -> a -> a -> a

forall :: Foldable t => t e -> (e -> a) -> a

exist :: Foldable t => t e -> (e -> a) -> a

bigAnd :: Foldable t => t a -> a

bigOr :: Foldable t => t a -> a

Instances

Boolean Bool 
Boolean b => Boolean (a -> b) 
(Eq a, Eq l) => Boolean (Formula l a) 
(Eq a, Eq l) => Boolean (Formula l a) 
(Monad s, Eq l) => Boolean (MemoFormula arg s l) 
(Solver s l, Boolean r) => Boolean (NatMonad s l r) 

class Boolean f => NGBoolean f a | f -> a where

Methods

atom :: a -> f

Instances

(Eq l, PropAtom a) => NGBoolean (PropFormula l) a 
(Eq a, Eq l) => NGBoolean (Formula l a) a 
(Monad s, Eq l, PropAtom a) => NGBoolean (MemoFormula arg s l) a 
(Eq l, PropAtom a, Eq b) => NGBoolean (DioFormula l DioVar b) a 

liftF :: (b -> b -> b) -> (a -> b) -> (a -> b) -> a -> b

fm :: Boolean a => Bool -> a

exactlyNone :: Boolean a => [a] -> a

exactlyOne :: Boolean a => [a] -> a

atmostOne :: Boolean a => [a] -> a

oneOrThree :: Boolean a => a -> a -> a -> a

demands that exacly one or all three formulas hold

twoOrThree :: Boolean a => a -> a -> a -> a

demands that exacly two or all three formulas hold.