jacopy.TheoremBook

class jacopy.TheoremBook

Bases: object

Ordered registry of Theorem records keyed by name.

Insertion order is preserved (a rendered “table of results” reads in registration order). Duplicate names raise on add(); use replace() for a deliberate override.

__init__()
Return type:

None

Methods

__init__()

add(theorem, *[, unverified])

Register theorem; raise KeyError on name clash.

clear()

get(name, *[, owner])

The theorem name; with owner given, only when the record is owned by that structure (an owned record asked for under a different same-named structure is refused, never silently reused).

is_chain_replayed(name)

Accepted with derived requirements AND a chain that replays into its claim (Theorem.chain_replayed).

is_requirements_derived(name)

The honest name of is_verified().

is_verified(name)

True when the record was accepted with DERIVED requirements (not as an explicit unverified assumption).

names()

remove(name)

replace(theorem, *[, unverified])

Register theorem, overwriting an existing same-name entry.

unverified_names()

add(theorem, *, unverified=False)

Register theorem; raise KeyError on name clash.

A legacy record (requirements not structurally verified) is NOT accepted as a verified theorem: it raises LegacyTheoremError unless unverified=True records it explicitly as an unverified assumption — every result that cites it then depends on that assumption visibly.

Parameters:
Return type:

None

replace(theorem, *, unverified=False)

Register theorem, overwriting an existing same-name entry.

Parameters:
Return type:

None

is_verified(name)

True when the record was accepted with DERIVED requirements (not as an explicit unverified assumption). Historical name: it does not mean the chain was replayed — see is_chain_replayed().

Parameters:

name (str)

Return type:

bool

is_requirements_derived(name)

The honest name of is_verified().

Parameters:

name (str)

Return type:

bool

is_chain_replayed(name)

Accepted with derived requirements AND a chain that replays into its claim (Theorem.chain_replayed).

Parameters:

name (str)

Return type:

bool

get(name, *, owner=None)

The theorem name; with owner given, only when the record is owned by that structure (an owned record asked for under a different same-named structure is refused, never silently reused).

Parameters:

name (str)

Return type:

Theorem