jacopy.proof.strategies.ExpandAndSimplify¶
- class jacopy.proof.strategies.ExpandAndSimplify¶
Bases:
StrategyDefault strategy: form the obstruction, expand, simplify, check
0.The plan names this ExpandAndSimplify: unfold every definition the engine knows about, then drive the canonical-form pipeline (
flatten/canonicalize/distribute/sort_product/collect_terms) until the residual settles. If it lands onInteger0the proof closes; otherwiseProofFailurecarries the surviving residual.product_ruleis run in between, definition rewrites often leaveActoverProductcomposition andActoverSumshapes thatsimplify()alone doesn’t unfold. Running Leibniz / linearity expansion once is the minimum needed to reduce everyday Cartan-calculus equalities to cancellation.- __init__()¶
Methods
__init__()prove(lhs, rhs, *[, registry, engine, max_steps])Produce a
ProofChainwitnessinglhs == rhs.Attributes
name- prove(lhs, rhs, *, registry=None, engine=None, max_steps=1024)¶
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)
max_steps (int)
- Return type: