jacopy.ProofStep

class jacopy.ProofStep(before, after, rule, justification='', children=None, *, provenance_tag=None, owner=None, role=None, cites=None, key=None, registry_facts=(), source=None)

Bases: object

One rewrite: before → after under rule.

Parameters:
  • before (Expr)

  • after (Expr)

  • rule (str)

  • justification (str)

  • children (Optional[List['ProofStep']])

  • provenance_tag (Optional[str])

  • role (Optional[str])

__init__(before, after, rule, justification='', children=None, *, provenance_tag=None, owner=None, role=None, cites=None, key=None, registry_facts=(), source=None)
Parameters:
Return type:

None

Methods

__init__(before, after, rule[, ...])

add_child(step)

Nest step under this one as a sub-proof.

format([indent, max_depth])

Render this step as text; recurse into children up to max_depth.

Attributes

after

before

children

cites

The cited Theorem when this step is a theorem citation, else None.

classification

"definition", "assumption", "theorem", "axiom" (no role recorded), "computation" or None — see classification_label().

justification

key

Structural key of the rule that fired (Definition.key); None for a hand-built step.

owner

The structure whose rule fired this step (None when the rule is structure-free or the step was built by hand).

provenance_tag

"axiom", "theorem", or None.

registry_facts

The registry answers (RegistryFact) this step's computation consulted; () when it consulted none or its producer does not record them.

role

"definition", "assumption" (a declared axiom), "theorem", or None when the step recorded none (hand-built / legacy).

rule

source

The literature citations of the rule that fired — a tuple of jacopy.bibliography.Citation, or None when the rule names no source (structural rewrites, hand-built steps).

property provenance_tag: str | None

"axiom", "theorem", or None.

Set by the expansion engine when a Definition fires, the tag records whether the rewrite was taken axiomatically or whether it’s derivable, which UnrollToFoundations reads to decide whether to attach a sub-proof.

Type:

Classification of this step

property classification: str | None

"definition", "assumption", "theorem", "axiom" (no role recorded), "computation" or None — see classification_label(). The renderers print it as (definition) etc.

Type:

Reader-facing label

property owner

The structure whose rule fired this step (None when the rule is structure-free or the step was built by hand).

property role: str | None

"definition", "assumption" (a declared axiom), "theorem", or None when the step recorded none (hand-built / legacy).

Type:

Logical role of the fired rule

property cites

The cited Theorem when this step is a theorem citation, else None.

property key

Structural key of the rule that fired (Definition.key); None for a hand-built step.

property registry_facts: tuple

The registry answers (RegistryFact) this step’s computation consulted; () when it consulted none or its producer does not record them.

property source

The literature citations of the rule that fired — a tuple of jacopy.bibliography.Citation, or None when the rule names no source (structural rewrites, hand-built steps). Display metadata only.

add_child(step)

Nest step under this one as a sub-proof.

Parameters:

step (ProofStep)

Return type:

None

format(indent=0, max_depth=64)

Render this step as text; recurse into children up to max_depth.

Parameters:
  • indent (int)

  • max_depth (int)

Return type:

str