Proofs

Proof entry points, proof chains, results, theorems and the rewrite engine. Every name on this page is importable directly from jacopy.

Proving an identity

jacopy.show_equal(lhs, rhs, *[, registry, ...])

Prove lhs == rhs and return the transcript.

jacopy.prove(lhs, rhs, *[, prefer, ...])

Prove lhs == rhs, optionally choosing among found proofs.

jacopy.normalize(engine, expr[, registry, ...])

Drive expr to a fixpoint of engine + passes.

jacopy.NormalForm(expr, stopped_by, rounds, ...)

What a normalization reached and why it stopped.

Proof chains and results

jacopy.ProofChain([steps])

Ordered list of ProofStep forming a single proof transcript.

jacopy.ProofStep(before, after, rule[, ...])

One rewrite: before → after under rule.

jacopy.ProofFailure(message, *[, report, ...])

Raised when a strategy cannot close the gap between two expressions.

jacopy.ProofResult(goal, status, requires, ...)

jacopy.Goal(lhs, rhs)

jacopy.Assumption(kind, name[, owner, ...])

One logical dependency of a result (module docstring).

Proof strategies

Strategies decide the order in which sound rules fire; see Choosing a proof strategy. These names are imported from their modules.

jacopy.proof.strategies.Strategy()

Abstract base for equality proof strategies.

jacopy.proof.strategies.ExpandAndSimplify()

Default strategy: form the obstruction, expand, simplify, check 0.

jacopy.proof.search.SearchStrategy(*[, ...])

Find a proof by graph search and return the best one found.

jacopy.proof.strategies.PortfolioStrategy(...)

Try a sequence of strategies; the first that closes wins.

jacopy.proof.strategies.UnrollToFoundations(inner)

Meta-strategy: run an inner strategy against a foundational engine.

jacopy.proof.strategies.AgreementOnGenerators(...)

Operator equality from agreement on algebra generators.

jacopy.proof.strategies.DerivedBracketStrategy()

Apply the Derived Bracket Theorem to discharge Jacobi.

Theorems

jacopy.Theorem(name, statement, lhs, rhs, proof)

A named, proven equation.

jacopy.TheoremBook()

Ordered registry of Theorem records keyed by name.

jacopy.cite(engine, book, *names[, reverse, ...])

Register the named theorems on engine as derived rules.

Rules and engines

Definition is the extension protocol for new rewrite rules.

jacopy.Definition()

A single rewrite rule keyed to a local pattern.

jacopy.ExpansionEngine([definitions, mode])

Apply registered Definition rules bottom-up to fix-point.