Creates a new premise with an auto-generated UUID and registers it with this engine.
Two call styles are supported:
Typed-bag (preferred, since 0.11.0):
engine.createPremise({
type: "freeform", // or "derivation"
derivedClaimId: claimId, // required when type === "derivation"
extras: { label: "P1" },
symbol: "P1",
})
Legacy positional (kept for compatibility):
engine.createPremise(extras, symbol) // creates a freeform premise
When type === "derivation", the engine looks up derivedClaimId in
the claim library, materializes a claim-bound variable for it (via
ensureClaimBoundVariable) if one does not already exist, and
initializes the premise's expression tree to the naked-Q form — a
single variable expression at the root referencing the consequent.
The newly created PremiseEngine instance and changeset.
Optionalsymbol: stringCreates a premise with a caller-supplied ID and registers it with
this engine. Mirrors createPremise exactly, but accepts an explicit
id as the first argument instead of generating one.
Two call styles are supported:
Typed-bag (preferred, since 0.11.0):
engine.createPremiseWithId(id, {
type: "freeform", // or "derivation"
derivedClaimId: claimId, // required when type === "derivation"
extras: { label: "P1" },
symbol: "P1",
})
Legacy positional (kept for compatibility):
engine.createPremiseWithId(id, extras, symbol) // creates a freeform premise
When type === "derivation", the same derivation initialization as
createPremise runs: variable materialization and naked-Q tree setup.
The ID to assign to the new premise.
Optionalextras: Record<string, unknown>Optionalsymbol: stringReturns the PremiseEngine containing the given expression, or
undefined.
The expression ID to search for.
The owning PremiseEngine, or undefined.
Returns the premise with the given ID, or undefined if not found.
The ID of the premise to retrieve.
The PremiseEngine instance, or undefined.
Returns true if a premise with the given ID exists.
The ID to check.
Whether the premise exists.
Returns all premise IDs in lexicographic order.
An array of premise ID strings.
Returns all premises in lexicographic ID order.
An array of PremiseEngine instances.
Premise creation, removal, and lookup.