chop-logic-core
Version:
Core classes, methods and functions for calculating logical formulas and constructing proofs within the Chop Logic project.
29 lines (28 loc) • 1.05 kB
TypeScript
import type { PropFormula } from "../../../models";
import type { HilbertProof } from "../classes/hilbert-proof";
import type { HilbertProofBuilder } from "../classes/hilbert-proof-builder";
/**
* Creates a proof from a functional composition of step generators.
* Useful for building proofs from higher-order functions.
*
* @param goal - The target formula to prove
* @param stepGenerators - Functions that add steps to the proof
* @returns The completed HilbertProof instance
*
* @example
* ```typescript
* const createPremises = (builder: HilbertProofBuilder) => {
* builder.addPremise(p, "First premise")
* .addPremise(q, "Second premise");
* };
*
* const createAxioms = (builder: HilbertProofBuilder) => {
* builder.addAxiom(axiom1, "Axiom II");
* };
*
* const proof = composeHilbertProof(goal, createPremises, createAxioms);
* ```
*
* @category Hilbert Calculus
*/
export declare function composeHilbertProof(goal: PropFormula, ...stepGenerators: Array<(builder: HilbertProofBuilder) => void>): HilbertProof;