Chop Logic Core - v1.6.0
    Preparing search index...

    Represents a complete proof in Natural Deduction style calculus. Manages a sequence of proof steps where the final step is the goal formula. Supports premises, assumptions (sub-proofs), and derived steps using natural deduction rules. Tracks nesting levels to manage sub-proofs and ensures proofs are properly closed at level 0.

    Index

    Constructors

    Methods

    • Reiterates (repeats) a previously proved step at the current level (inside a sub-proof). Allows referring to a formula from an outer level within an inner sub-proof.

      Parameters

      • fromIndex: number

        The index of the step to reiterate (1-based)

      • Optionalcomment: string

        Optional explanation for the reiteration

      Returns PropProofStep

      The added reiteration step

      if the step index is invalid

    • Closes a sub-proof by applying Implication Introduction. Automatically takes the assumption (most recent step at current level) and the derived conclusion (last step at current level) to create an implication F=>G, then adds this implication at level-1.

      Parameters

      • Optionalcomment: string

        Optional explanation for the implication closure

      Returns PropProofStep

      The added proof step

    • Checks if the proof is complete. A proof is complete when:

      1. The last step's formula structurally equals the goal formula
      2. All sub-proofs are closed (current level is 0)

      Returns boolean

      True if the proof is complete