ProofBuilder

gapt.proofs.ProofBuilder
See theProofBuilder companion object
class ProofBuilder[+Proof](proofStack: List[Proof])

Class for convenient construction of proofs. Allows you to write proofs post-order style (à la Bussproofs). Example:

(ProofBuilder
c LogicalAxiom(A)
c LogicalAxiom(B)
u (WeakeningLeftRule(_, C))
b (AndRightRule(_,_, And(A, B))
qed)

The constructor is private, so the only way to instantiate this class is by using the ProofBuilder object. This means that the stack will always be empty in the beginning.

Attributes

Companion
object
Source
ProofBuilder.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ProofBuilder.type

Members list

Value members

Concrete methods

def b[P >: Proof](inference: (Proof, Proof) => P): ProofBuilder[P]

Applies a binary inference to the top two elements of the proof stack.

Applies a binary inference to the top two elements of the proof stack.

Value parameters

inference

A function (LKProof, LKProof) => LKProof

Attributes

Source
ProofBuilder.scala
def c[P >: Proof](proof: P): ProofBuilder[P]

Pushes a proof onto the stack.

Pushes a proof onto the stack.

Value parameters

proof

An LKProof.

Attributes

Source
ProofBuilder.scala
def qed: Proof

If there is exactly one proof on the stack, returns that proof.

If there is exactly one proof on the stack, returns that proof.

Attributes

Source
ProofBuilder.scala
def t[P >: Proof](inference: (Proof, Proof, Proof) => P): ProofBuilder[P]

Applies a ternary inference to the top three elements of the proof stack.

Applies a ternary inference to the top three elements of the proof stack.

Value parameters

inference

A function (NDProof, NDProof, NDProof) => NDProof

Attributes

Source
ProofBuilder.scala
def u[P >: Proof](inference: Proof => P): ProofBuilder[P]

Applies a unary inference to the top element of the proof stack.

Applies a unary inference to the top element of the proof stack.

Value parameters

inference

A function LKProof => LKProof.

Attributes

Source
ProofBuilder.scala