Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Proof

Class representing a natural deduction proof.

Hierarchy

  • Proof

Implements

Index

Constructors

constructor

  • Constructor

    Returns Proof

Properties

conclusion

conclusion: Formula

A conclusion is a single Formula.

lines

lines: LineOfProof[]

The actual lines of the proof.

premises

premises: Formula[]

The list of premises of the proof.

Methods

addLineToProof

addPremiseToProof

  • addPremiseToProof(formulaString: string): void
  • Add a premise to the proof.

    Parameters

    • formulaString: string

      String representation of the premise.

    Returns void

evaluateProof

  • Check whether all moves are valid and the conclusion is reached.

    Returns EvaluateProofInterface

    • Are all moves valid and the conclusion has been reached?

getAssumptions

  • Get the assumptions that a line of proof assumes.

    We search recursively through the cited lines and look for a line that is justified as an Assumption. We store any such assumptions in an array. If a line refers directly to an Assumption, but it correctly applies either Conditional Proof or Indirect Proof, then the assumption is "discharged" at that point. The new line would refer to the assumption as a cited line, but it will not assume the assumptions as one of its non-discharged assumptions.

    Parameters

    Returns number[]

    • An array of line numbers representing the non-discharged assumptions of the input line.

setConclusion

  • setConclusion(conclusion: Formula | string): void
  • Set the conclusion of the proof.

    Parameters

    • conclusion: Formula | string

      The conclusion.

    Returns void

Generated using TypeDoc