Skip to content

Verify a hypothesis

The cross-check engine is the heart of Lemma: it takes a proposed principle (a hypothesis card) and runs it against universal priors — dimensional consistency, reference resolution, declared limits and conservation laws — before any human looks at it. This guide runs it on two proposals: one well-formed, one dimensionally broken.

A runnable version lives in the repo at examples/verify_hypothesis.py. No database and no API keys — it reads the bundled cards corpus in process.

Run it

Terminal window
pip install -e ./sdk-py
python examples/verify_hypothesis.py

What it does

It builds two hypothesis cards and calls the engine on each:

from artano_lemma import load_cards, parse_card, run_hypothesis_checks
corpus = load_cards()
broken = parse_card({
"kind": "hypothesis", "id": "broken-kinetic-energy", "version": "0.1.0",
"name": "Kinetic energy (incorrect)",
"proposal": "E = m v", "proposedFormulaTeX": "E = m v",
"origin": "llm", "references": ["none"],
"checks": {
"dimensional": {
"lhsLabel": "E [J]", "lhsDims": {"M": 1, "L": 2, "T": -2},
"rhsLabel": "m v", "rhsDims": {"M": 1, "L": 1, "T": -1},
},
},
})
result = run_hypothesis_checks(broken, corpus=corpus)
print(result.overall.severity) # HIGH

The verdicts

Well-formed hypothesis — planetary radiative-equilibrium temperature:
verdict: NONE (3/3 checks pass)
[pass] Hypothesis.dimensional_analysis
[pass] Hypothesis.reference_corpus
[pass] Hypothesis.derived_from
Broken hypothesis — E = m v (dimensionally inconsistent):
verdict: HIGH (0/1 checks pass)
[fail] Hypothesis.dimensional_analysis

The broken proposal is caught purely on dimensions — energy is M·L²·T⁻² while m v is M·L·T⁻¹. A HIGH verdict means reject before human review. That is the line Lemma draws: syntactically-valid output that is physically wrong gets stopped at the substrate, not in someone’s inbox.

Declared limit and conservation claims come back as warn rather than pass — they are recorded for symbolic verification (SymPy / PySR), which is a planned addition. See the engine and verdicts for the severity model.