tstp2agda-0.1.0.0: Proof-term reconstruction from TSTP to Agda

Safe HaskellNone
LanguageHaskell2010

Data.TSTP

Contents

Synopsis

Documentation

data F

Main formula type, it contains all the elements and information of a TSTP formula definition. While name, role, and formula are self-explanatory, source is a messy meta-language in itself, different ATPs may embed different amounts of information in it.

Constructors

F 

Fields

name :: String
 
role :: Role
 
formula :: Formula
 
source :: Source
 

Instances

Eq F 
Ord F 
Read F 
Show F 

Formulas and terms

data Formula

first-order logic formula.

Constructors

BinOp Formula BinOp Formula

Binary connective application

InfixPred Term InfixPred Term

Infix predicate application

PredApp AtomicWord [Term]

Predicate application

Quant Quant [V] Formula

Quantified Formula

(:~:) Formula

Negation

data Term

First-order logic terms.

Constructors

Var V

Variable

NumberLitTerm Rational

Number literal

DistinctObjectTerm String

Double-quoted item

FunApp AtomicWord [Term]

Function symbol application (constants are encoded as nullary functions)

Instances

Show instances

Formula, Term and other data types in this section have Show instances that allow pretty-printing of Formulas and Show [Formula] is an especial instance that print its contents as sequence of implications

>>> let f1 = PredApp (AtomicWord "a") []
>>> let f2 = PredApp (AtomicWord "b") []
>>> let f3 = (BinOp (PredApp (AtomicWord "a") []) (:&:) (PredApp (AtomicWord "b") []))
>>> f1
a
>>> f2
b
>>> f3
a ∧ b
>>> [f1,f2,f3]
{ a b : Set} → a → b → a ∧ b

Some syntax sugar is also present

>>> PredApp (AtomicWord "$false") []

newtype V

Variable

Constructors

V String 

Instances

Eq V 
Ord V 
Read V 
Show V 

data BinOp

Binary formula connectives.

Constructors

(:<=>:)

Equivalence

(:=>:)

Implication

(:<=:)

Reverse Implication

(:&:)

AND

(:|:)

OR

(:~&:)

NAND

(:~|:)

NOR

(:<~>:)

XOR

data InfixPred

Infix connectives of the form Term -> Term -> Formula.

Constructors

(:=:)

=

(:!=:)

data Quant

Quantifier specification.

Constructors

All

Exists

Source information

data Source

Source main purpose is to provide all the information regarding the deductive process that lead to a given formula. Information about the rules applied along with parent formulas and SZS status are among the information you might expect from this field.

data Rule

Deduction rule applied.

Instances

data Parent

Parent formula information.

Constructors

Parent String [GTerm] 

Functions

isBottom :: F -> Bool

isBottom f, test whether f = ⊥.

freeVarsF :: Formula -> Set V

freeVarsF f, returns a Set of all free variables of f.

freeVarsT :: Term -> Set V

freeVarsT t, returns a Set of all free variables of t.

getFreeVars :: [Formula] -> [V]

getFreeVars f, given a list of formulas f return all free variables in the formulas.

Unused types

The following types are required to have full support of the TSTP syntax but haven't been used yet in tstp2agda aside from the parser.

data Theory

Constructors

Equality 
AC 

data Status

Constructors

Suc 
Unp 
Sap 
Esa 
Sat 
Fsa 
Thm 
Eqv 
Tac 
Wec 
Eth 
Tau 
Wtc 
Wth 
Cax 
Sca 
Tca 
Wca 
Cup 
Csp 
Ecs 
Csa 
Cth 
Ceq 
Unc 
Wcc 
Ect 
Fun 
Uns 
Wuc 
Wct 
Scc 
Uca 
Noc 
Unk 

data GData

Metadata (the general_data rule in TPTP's grammar)

data GTerm

Metadata (the general_term rule in TPTP's grammar)