Model oracle

The model oracle jacopy.oracle evaluates both sides of a closed equation in random concrete coordinate models (SymPy polynomials) and compares them. Agreement means the equation was not refuted in the models tried; it is not a proof. The oracle requires the optional sympy dependency.

Entry points

jacopy.oracle.check_equal(lhs, rhs, *[, ...])

Compare lhs and rhs in random concrete models.

jacopy.oracle.check_chain(chain, **kw)

Check every step before = after of a proof chain; the first refuted step names the rule that broke the equation.

jacopy.oracle.OracleReport(verdict[, lhs, ...])

The oracle's verdict on one equation lhs = rhs.

jacopy.oracle.ChainReport(steps[, ...])

Step-by-step check of a proof chain: the first refuted step names the rule that broke the equation.

Engine hook

Called by the proof engine when an equation closes; controlled by the environment variable JACOPY_ORACLE (off, warn or strict; default off).

jacopy.oracle.hook.on_closed(lhs, rhs, *[, ...])

Run the oracle on a just-closed equation lhs = rhs.