logic-classes-1.5.2: Framework for propositional and first order logic, theorem proving

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Logic.Classes.Negate

Synopsis

Documentation

class Negatable formula where Source

The class of formulas that can be negated. There are some types that can be negated but do not support the other Boolean Logic operators, such as the Literal class.

Methods

negatePrivate :: formula -> formula Source

Negate a formula in a naive fashion, the operators below prevent double negation.

foldNegation Source

Arguments

:: (formula -> r)

called for normal formulas

-> (formula -> r)

called for negated formulas

-> formula 
-> r 

Test whether a formula is negated or normal

negated :: Negatable formula => formula -> Bool Source

Is this formula negated at the top level?

(.~.) :: Negatable formula => formula -> formula infix 5 Source

Negate the formula, avoiding double negation

(¬) :: Negatable formula => formula -> formula infix 5 Source

negative :: Negatable formula => formula -> Bool Source

positive :: Negatable formula => formula -> Bool Source