jacopy.proof.strategies.AgreementOnGenerators

class jacopy.proof.strategies.AgreementOnGenerators(algebra, *, sub_strategy=None)

Bases: Strategy

Operator equality from agreement on algebra generators.

Two graded derivations of the same degree that agree on a generating set of the algebra extend uniquely to equal operators everywhere. This strategy discharges that uniqueness argument automatically:

  1. Both operators must have the same (well-defined, homogeneous) degree.

  2. For each generator g in algebra.generators, a sub-proof closes the element-level equality lhs(g) == rhs(g).

  3. The parent ProofStep records the conclusion, with each sub-proof’s top step attached as a child so the transcript reads hierarchically.

The sub-strategy defaults to ExpandAndSimplify; callers who need a more specialized per-generator tactic can pass any Strategy. A ProofFailure in the sub-proof on any generator is re-raised, annotated with which generator failed, that pointer is usually the shortest path to the missing grading declaration or axiom.

Parameters:
  • algebra (_HasGenerators)

  • sub_strategy (Optional[Strategy])

__init__(algebra, *, sub_strategy=None)
Parameters:
  • algebra (_HasGenerators)

  • sub_strategy (Strategy | None)

Return type:

None

Methods

__init__(algebra, *[, sub_strategy])

prove(lhs, rhs, *[, registry, engine])

Produce a ProofChain witnessing lhs == rhs.

Attributes

name

prove(lhs, rhs, *, registry=None, engine=None)

Produce a ProofChain witnessing lhs == rhs.

Raises ProofFailure if the strategy cannot close the gap. Implementations may ignore either registry or engine depending on how they work.

Parameters:
Return type:

ProofChain