Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The IsFormula
class contains definitions for the boolean true
and false values, and methods for traversing the atoms of a formula.
Synopsis
- class (Ord atom, Show atom, HasFixity atom, Pretty atom) => IsAtom atom
- class (Pretty formula, HasFixity formula, IsAtom (AtomOf formula)) => IsFormula formula where
- (⊥) :: IsFormula p => p
- (⊤) :: IsFormula p => p
- fromBool :: IsFormula formula => Bool -> formula
- prettyBool :: Bool -> Doc
- atom_union :: (IsFormula formula, Ord r) => (AtomOf formula -> Set r) -> formula -> Set r
Documentation
class (Ord atom, Show atom, HasFixity atom, Pretty atom) => IsAtom atom Source #
Basic properties of an atomic formula
Instances
IsAtom Atom Source # | |
Defined in Data.Logic.ATP.DefCNF | |
IsAtom Prop Source # | |
Defined in Data.Logic.ATP.Prop | |
IsAtom (Knows Integer) Source # | |
Defined in Data.Logic.ATP.PropExamples | |
(IsPredicate predicate, IsTerm term) => IsAtom (FOLAP predicate term) Source # | |
Defined in Data.Logic.ATP.Apply | |
(IsPredicate predicate, IsTerm term) => IsAtom (FOL predicate term) Source # | |
Defined in Data.Logic.ATP.Equate |
class (Pretty formula, HasFixity formula, IsAtom (AtomOf formula)) => IsFormula formula where Source #
Class associating a formula type with its atom (atomic formula) type.
AtomOf is a function that maps the formula type to the associated atomic formula type
The true element
The false element
asBool :: formula -> Maybe Bool Source #
atomic :: AtomOf formula -> formula Source #
Build a formula from an atom.
overatoms :: (AtomOf formula -> r -> r) -> formula -> r -> r Source #
Formula analog of iterator foldr
.
onatoms :: (AtomOf formula -> AtomOf formula) -> formula -> formula Source #
Apply a function to the atoms, otherwise keeping structure (new sig)
Instances
prettyBool :: Bool -> Doc Source #