engine.proof

Schema-facing proof, derivation, and rule-description models.

Attributes

ProofPayload

ProofNode

Classes

ProofModel

Base model for proof and derivation structures using rdflib node types.

ProofPayloadKind

Discriminator values for proof payload claim kinds.

TripleFact

A graph-scoped claim represented directly as a triple.

StructuralClaim

A graph-scoped claim represented as a structural element.

ContradictionClaim

A graph-scoped contradiction witness used in proof outputs.

TextClaim

A free-text claim for baseline or partially structured proofs.

RuleDescription

Structured semantic metadata attached to a rule or proof step.

RuleId

Stable engine-level identifier for an applied rule.

AuthorityReference

Reference to an authoritative or explanatory source for a rule.

VariableBinding

One variable binding captured when a rule application fired.

ContradictionRecord

Engine-native trace for one contradiction-triggering rule application.

DerivationRecord

Engine-native trace for one fired rule application.

SourceSpan

Optional grounding metadata back to an input document.

ProofLeaf

A leaf proof node containing a claim and optional grounding.

RuleApplication

One direct proof step combining premises, rule attribution, and conclusions.

DirectProof

A reconstructed or agent-proposed direct proof for evaluation.

Module Contents

class engine.proof.ProofModel(/, **data: Any)

Bases: pydantic.BaseModel

Base model for proof and derivation structures using rdflib node types.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class engine.proof.ProofPayloadKind

Bases: enum.StrEnum

Discriminator values for proof payload claim kinds.

TRIPLE = 'triple'
STRUCTURAL_ELEMENT = 'structural_element'
CONTRADICTION = 'contradiction'
TEXT_CLAIM = 'text_claim'
class engine.proof.TripleFact(/, **data: Any)

Bases: axiom.structural_element.GraphBacked

A graph-scoped claim represented directly as a triple.

kind: Literal['triple'] = 'triple'
triple: axiom.common.Triple = None
class engine.proof.StructuralClaim(/, **data: Any)

Bases: axiom.structural_element.GraphBacked

A graph-scoped claim represented as a structural element.

kind: Literal['structural_element'] = 'structural_element'
element: axiom.structural_element.StructuralElement = None
class engine.proof.ContradictionClaim(/, **data: Any)

Bases: axiom.structural_element.GraphBacked

A graph-scoped contradiction witness used in proof outputs.

kind: Literal['contradiction'] = 'contradiction'
witness: TripleFact = None
class engine.proof.TextClaim(/, **data: Any)

Bases: axiom.structural_element.GraphBacked

A free-text claim for baseline or partially structured proofs.

kind: Literal['text_claim'] = 'text_claim'
text: str = None
engine.proof.ProofPayload
class engine.proof.RuleDescription(/, **data: Any)

Bases: ProofModel

Structured semantic metadata attached to a rule or proof step.

label: str = None
description: str | None = None
references: list[AuthorityReference] = None
class engine.proof.RuleId(/, **data: Any)

Bases: ProofModel

Stable engine-level identifier for an applied rule.

ruleset: str = None
rule_id: str = None
class engine.proof.AuthorityReference(/, **data: Any)

Bases: ProofModel

Reference to an authoritative or explanatory source for a rule.

kind: Literal['normative_spec', 'non_normative_spec', 'implementation_reference', 'structural_interpretation'] = None
uri: rdflib.term.URIRef = None
label: str = None
class engine.proof.VariableBinding(/, **data: Any)

Bases: ProofModel

One variable binding captured when a rule application fired.

name: str = None
value: rdflib.term.Node = None
class engine.proof.ContradictionRecord(/, **data: Any)

Bases: ProofModel

Engine-native trace for one contradiction-triggering rule application.

context: axiom.common.ContextIdentifier = None
rule_id: RuleId = None
premises: list[TripleFact] = None
bindings: list[VariableBinding] = None
sequence_id: int = None
witness: TripleFact | None = None
category: str | None = None
detail: str | None = None
class engine.proof.DerivationRecord(/, **data: Any)

Bases: ProofModel

Engine-native trace for one fired rule application.

context: axiom.common.ContextIdentifier = None
conclusions: list[TripleFact] = None
premises: list[TripleFact] = None
rule_id: RuleId = None
bindings: list[VariableBinding] = None
depth: int | None = None
silent: bool = None
bootstrap: bool = None
class engine.proof.SourceSpan(/, **data: Any)

Bases: ProofModel

Optional grounding metadata back to an input document.

document_id: str | None = None
quote: str | None = None
start_char: int | None = None
end_char: int | None = None
class engine.proof.ProofLeaf(/, **data: Any)

Bases: ProofModel

A leaf proof node containing a claim and optional grounding.

node_kind: Literal['leaf'] = 'leaf'
claim: ProofPayload = None
grounding: list[SourceSpan] = None
class engine.proof.RuleApplication(/, **data: Any)

Bases: ProofModel

One direct proof step combining premises, rule attribution, and conclusions.

node_kind: Literal['rule_application'] = 'rule_application'
conclusions: list[ProofPayload] = None
premises: list[ProofNode] = None
rule_id: RuleId | None = None
description: RuleDescription | None = None
derivation: DerivationRecord | None = None
rationale: str | None = None
stated_theorem_name: str | None = None
classmethod from_rule(rule: engine.rules.Rule, *, conclusions: list[ProofPayload], premises: list[ProofNode] | None = None, derivation: DerivationRecord | None = None, rationale: str | None = None, stated_theorem_name: str | None = None) → RuleApplication

Construct a proof step from a defined rule and its shared description.

classmethod from_description(description: RuleDescription, *, conclusions: list[ProofPayload], premises: list[ProofNode] | None = None, derivation: DerivationRecord | None = None, rationale: str | None = None, stated_theorem_name: str | None = None) → RuleApplication

Construct a proof step from agent-provided descriptive semantics alone.

check_derivation_alignment() → RuleApplication

Require rule_id or description and keep attached derivation metadata aligned.

engine.proof.ProofNode
class engine.proof.DirectProof(/, **data: Any)

Bases: ProofModel

A reconstructed or agent-proposed direct proof for evaluation.

context: axiom.common.ContextIdentifier = None
goal: ProofPayload = None
proof: ProofNode = None
verdict: Literal['proved', 'disproved', 'contradiction', 'incomplete'] | None = None
notes: str | None = None