Interface: SolutionDto
@kortexya/reasoninglayer / SolutionDto
Interface: SolutionDto
Section titled “Interface: SolutionDto”Defined in: src/types/inference.ts:293
A solution from backward chaining.
Contains variable bindings, an optional proof tree, certainty score, and open-world inference metadata.
Properties
Section titled “Properties”certainty
Section titled “certainty”certainty:
number
Defined in: src/types/inference.ts:305
Certainty score (0.0 to 1.0).
conclusion?
Section titled “conclusion?”
optionalconclusion?:ProofConclusionDto
Defined in: src/types/inference.ts:303
The conclusion this solution established, as a structured term: the proof root’s ProofDto.conclusion. Present also when the conclusion was never stored. Absent only when the solution names no term.
evidenceMatched?
Section titled “evidenceMatched?”
optionalevidenceMatched?:number|null
Defined in: src/types/inference.ts:307
Number of matched antecedents (open-world only).
evidenceRatio?
Section titled “evidenceRatio?”
optionalevidenceRatio?:number|null
Defined in: src/types/inference.ts:309
Evidence ratio for open-world inference (matched/total antecedents). Null in closed-world mode.
evidenceSupport?
Section titled “evidenceSupport?”
optionalevidenceSupport?:number|null
Defined in: src/types/inference.ts:322
Deep evidential support in [0, 1] (open-world only): the fraction of
ground-fact leaves the proof rests on that are actually witnessed by facts,
computed recursively over the proof tree.
Remarks
Section titled “Remarks”Unlike evidenceRatio (shallow, top-level), this sees through chained derivations, so residuation inside a derived sub-goal is reflected. It is the epistemic ranking axis, orthogonal to certainty (the residuation-faithful degree): rank candidate solutions by this to prefer the ones actually grounded in evidence.
matchedSorts?
Section titled “matchedSorts?”
optionalmatchedSorts?:string[]
Defined in: src/types/inference.ts:333
Sort names of the matched (witnessed or derived) antecedents. Open-world only.
Remarks
Section titled “Remarks”The named counterpart of evidenceMatched, so a sealed differential can be re-verified from the response alone. The engine omits the key when the list is empty.
proof?
Section titled “proof?”
optionalproof?:ProofDto|null
Defined in: src/types/inference.ts:297
Proof tree showing how the solution was derived. Null if proof generation was disabled.
residuatedSorts?
Section titled “residuatedSorts?”
optionalresiduatedSorts?:string[]
Defined in: src/types/inference.ts:324
Sort names that were residuated (suspended due to missing information). Open-world only.
scoreDecomposition?
Section titled “scoreDecomposition?”
optionalscoreDecomposition?:LogOddsScoreDecompositionDto
Defined in: src/types/inference.ts:343
How certainty was arrived at, term by term.
Remarks
Section titled “Remarks”Present when the solution was scored by the log-odds model. It is the audit trail for a ranking: which antecedents were credited, which facts witnessed them, and what each contributed — so a caller can say WHY one solution outranked another rather than only that it did.
substitution
Section titled “substitution”substitution:
HomoiconicSubstitutionDto
Defined in: src/types/inference.ts:295
Variable substitution (bindings from variables to values).