The target formula to prove
Functions that add steps to the proof
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);
Creates a proof from a functional composition of step generators. Useful for building proofs from higher-order functions and callbacks.