Metakit / @doeixd/metakit/prove
fn
function · packages/metakit/src/prove/fn.ts:51
function fn<P extends ParamSchemas, R>(
fn: Fn<P, R>,
options?: ProveOptions,
): Effect.Effect<Proof, SolverUnavailableError>Prove that fn satisfies its Hoare contract for every input admitted by fn.paramsSchema
and fn.where: well-definedness (no refusal), fn.returns refinements/bounds, and fn.ensures.
Where Tier 3 cannot show a fact of a result Schema (a check it cannot read, a union member, a
finite number or an integer), the answer is its Unknown, and the solver is not asked.
With an Artifact.EvidenceStore provided, a proof kept under its key (the
function's contract hash, the solver's name, encoding and version, the
prover's version and timeoutMs) is returned without proving again, and a
new proof is kept; an Unknown or a refutation never is.