File size: 799 Bytes
e3ea9f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""Theory proofing suite tests — every proof must pass."""

import sys
from pathlib import Path

import pytest

ROOT = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(ROOT))
sys.path.insert(0, str(ROOT / "proofs"))

import theory_proofs as tp  # noqa: E402


@pytest.mark.parametrize("fn", [
    tp.p1, tp.p2, tp.p3, tp.p4, tp.p5, tp.p6, tp.p7,
])
def test_proof(fn):
    """Each proof must evaluate to True (see proofs/theory_proofs.py)."""
    assert fn() is True, f"proof failed: {fn.__name__}"


def test_all_proofs_defined():
    names = {r["proof"] for r in tp.RESULTS}
    assert names == {
        "P1 IPT gradient", "P2 Phi-5 Kronecker", "P3 Progression honesty",
        "P4 CHSH Bell", "P5 HOLO-MEM Φ-symmetry", "P6 Kyrexis anchors",
        "P7 Coral invariants",
    }