Metakit / @doeixd/metakit/prove

invariant

function · packages/metakit/src/prove.ts:58

function invariant<S extends Schema.Top>(
  schema: S,
  goal: Expr.Expr<S['Type'], boolean | null>,
  options?: ProveOptions,
): Effect.Effect<Proof, SolverUnavailableError>

Prove that every value schema accepts satisfies goal: that it is true, not null and not refused. Runs Tier 3 first; asks Z3 where it is undecided, and for a witness where it refutes the goal. A refutation Tier 3 decided stands without the solver.