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

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Logic.Classes.Atom

Description

Substitution and finding variables are two basic operations on formulas that contain terms and variables. If a formula type supports quantifiers we can also find free variables, otherwise all variables are considered free.

Documentation

class Atom atom term v | atom -> term v where Source

Methods

substitute :: Map v term -> atom -> atom Source

allVariables :: atom -> Set v Source

freeVariables :: atom -> Set v Source

unify :: Map v term -> atom -> atom -> Failing (Map v term) Source

match :: Map v term -> atom -> atom -> Failing (Map v term) Source

Very similar to unify, not quite sure if there is a difference

foldTerms :: (term -> r -> r) -> r -> atom -> r Source

isRename :: atom -> atom -> Bool Source

getSubst :: Map v term -> atom -> Map v term Source

Instances