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

    Class HilbertProofBuilder

    A builder class for constructing Hilbert-style proofs. Provides a chainable API for adding proof steps.

    const proof = new HilbertProofBuilder(implicationAB)
    .addPremise(A, "First premise")
    .addPremise(B, "Second premise")
    .build();
    Index

    Constructors

    Methods

    • Reiterates (repeats) a previously proved step. Allows referring to a formula from an earlier step in the proof.

      Parameters

      • fromIndex: number

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

      • Optionalcomment: string

        Optional explanation for the reiteration

      Returns this

      This builder instance for chaining

    • Adds multiple steps in sequence using a callback function. Useful for building complex proofs programmatically.

      Parameters

      • stepsFn: (builder: this) => void

        A callback that receives the current builder and adds steps

      Returns this

      This builder instance for chaining

      proof.buildSteps((builder) => {
      builder.addPremise(p);
      builder.addAxiom(axiom1);
      builder.addDerivedStep(derived1);
      });