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

    Function composeNaturalProof

    • Creates a proof from a functional composition of step generators. Useful for building proofs from higher-order functions and callbacks.

      Parameters

      Returns NaturalProof

      The completed NaturalProof instance

      const createPremises = (builder: NaturalProofBuilder) => {
      builder.addPremise(p, "First premise")
      .addPremise(q, "Second premise");
      };

      const createSubProof = (builder: NaturalProofBuilder) => {
      builder.addAssumption(r, "Assume r")
      .addDerivedStep(derivedPayload, "Rule application")
      .closeSubProof("Implication Introduction");
      };

      const proof = composeNaturalProof(goal, createPremises, createSubProof);