jacopy.Theorem

class jacopy.Theorem(name, statement, lhs, rhs, proof, generality='generic-function', from_axioms=<factory>, notes='', owner=None, requires=(), requires_verified=False, source=None)

Bases: object

A named, proven equation.

Parameters:
  • name (str) – Unique short handle ("cartan_magic"), the Book lookup key.

  • statement (str) – Human-readable statement, e.g. "L_X = d ι_X + ι_X d".

  • lhs (Expr) – The two sides of the proven equation, as Exprs. lhs is the side a citation rewrites from by default.

  • rhs (Expr) – The two sides of the proven equation, as Exprs. lhs is the side a citation rewrites from by default.

  • proof (jacopy.proof.chain.ProofChain) – The ProofChain establishing lhs = rhs.

  • generality (str) – One of GENERALITY_TAGS — at which level the proof closed.

  • from_axioms (Tuple[str, ...]) – Descriptive tuple of the definitional-rule names the proof relies on.

  • notes (str) – Optional exposition.

  • owner (object)

  • requires (Tuple[object, ...])

  • requires_verified (bool)

  • source (object)

__init__(name, statement, lhs, rhs, proof, generality='generic-function', from_axioms=<factory>, notes='', owner=None, requires=(), requires_verified=False, source=None)
Parameters:
Return type:

None

Methods

__init__(name, statement, lhs, rhs, proof[, ...])

unreplayed_reasons()

unverified_reasons()

with_structural_requires()

The record with requires derived from its own chain: declared axiom instances (owner + count), the structures behind them, the scope, the transitive requirements of cited theorems, and legacy entries for what the chain does not account for.

Attributes

chain_replayed

True when the requirements were derived AND the chain (and, transitively, every cited record's chain) replays into lhs = rhs with accountable steps only (jacopy.proof.replay.chain_verdict()).

generality

legacy

True when the requirements are not structurally verified — an unmigrated record, or one whose verified requirements contain a legacy entry (a hand-built assumption step, an unmatched from_axioms text, an unverified citation).

notes

owner

The structure the theorem was proved in; None = unowned / legacy record (legacy marks these).

registry_facts

a citation must happen in a registry that agrees.

requirements_derived

the requirement records were DERIVED from the chain — it says nothing about whether the chain proves the claim (that is chain_replayed).

requires

the Assumption records the proof depends on — declared axiom instances with their owners, the structures behind them, the scope, and anything legacy — including, transitively, the requirements of every theorem the proof cites.

requires_verified

True only when requires was derived structurally (or supplied as such by a 3b-aware prover).

source

a jacopy.bibliography.Citation or a tuple of them.

name

statement

lhs

rhs

proof

from_axioms

owner: object = None

The structure the theorem was proved in; None = unowned / legacy record (legacy marks these).

requires: Tuple[object, ...] = ()

the Assumption records the proof depends on — declared axiom instances with their owners, the structures behind them, the scope, and anything legacy — including, transitively, the requirements of every theorem the proof cites. Derived from the chain by with_structural_requires(); never parsed from text.

Type:

STRUCTURAL requirements

requires_verified: bool = False

True only when requires was derived structurally (or supplied as such by a 3b-aware prover). A record without it is a LEGACY / unverified-requirements record: it is not cited automatically (TheoremDefinition(..., allow_legacy=True) is the explicit opt-in, and the result then carries the marker).

source: object = None

a jacopy.bibliography.Citation or a tuple of them. A citation of this theorem (TheoremDefinition) carries it onto its proof steps; nothing in the proof logic reads it.

Type:

Literature source of the result (metadata only)

property legacy: bool

True when the requirements are not structurally verified — an unmigrated record, or one whose verified requirements contain a legacy entry (a hand-built assumption step, an unmatched from_axioms text, an unverified citation).

with_structural_requires()

The record with requires derived from its own chain: declared axiom instances (owner + count), the structures behind them, the scope, the transitive requirements of cited theorems, and legacy entries for what the chain does not account for. Marks requires_verified; the record is still legacy if a legacy entry survives — that is the honest state.

Return type:

Theorem

property requirements_derived: bool

the requirement records were DERIVED from the chain — it says nothing about whether the chain proves the claim (that is chain_replayed).

Type:

The honest name of requires_verified

property chain_replayed: bool

True when the requirements were derived AND the chain (and, transitively, every cited record’s chain) replays into lhs = rhs with accountable steps only (jacopy.proof.replay.chain_verdict()).

property registry_facts: tuple

a citation must happen in a registry that agrees.

Type:

The registry answers the proof relied on