jacopy.proof.strategies.AgreementOnGenerators¶
- class jacopy.proof.strategies.AgreementOnGenerators(algebra, *, sub_strategy=None)¶
Bases:
StrategyOperator 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:
Both operators must have the same (well-defined, homogeneous) degree.
For each generator
ginalgebra.generators, a sub-proof closes the element-level equalitylhs(g) == rhs(g).The parent
ProofSteprecords 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 anyStrategy. AProofFailurein 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
ProofChainwitnessinglhs == rhs.Attributes
name- prove(lhs, rhs, *, registry=None, engine=None)¶
Produce a
ProofChainwitnessinglhs == rhs.Raises
ProofFailureif the strategy cannot close the gap. Implementations may ignore eitherregistryorenginedepending on how they work.- Parameters:
lhs (Expr)
rhs (Expr)
registry (PropertyRegistry | None)
engine (ExpansionEngine | None)
- Return type: