core/evals/deductive_logic
Shay 5f274b75b7 feat(deductive): binary relations + multi-variable grounding (finite propositional)
Extends evals/deductive_logic/grounding.py from unary predicates / single-var rules to
binary relations + multi-variable universal rules, still by FINITE PROPOSITIONAL
grounding into the regime the ROBDD engine + the independent truth-table oracle both
decide. wrong==0 stays structural. This is the real capability step a RuleTaker/
ProofWriter-style mirror needs (the unary fragment alone is trivial).

- atom_n lowers pred(a,b) -> pred__a__b; arity-1 is byte-identical to the old atom, so
  the live unary panel lowers unchanged (proven by an exact-string back-compat test).
- multi-variable universal rules ground over n^k assignments — transitivity now decides.
- range-restriction: a rule with a head variable unbound in the body refuses (unsafe_rule)
  — it grounds soundly but is outside the clean regime real benchmarks use.
- typed refusals: arity>=3/functions, explicit quantifiers, variable-free rules, bounds.

Honest ceilings (documented in docs/analysis/relational-grounding-extension-2026-06-04.md):
- THE binding constraint is the GOLD, not the grammar: the truth-table oracle is
  O(2^atoms), so grounding refuses above MAX_GROUND_ATOMS=20 => binary problems cap at
  ~4 entities/predicate. A real lift needs a 2nd genuinely-independent sub-enumeration
  oracle (not built).
- OPEN-WORLD only: RuleTaker/ProofWriter's main splits are closed-world + NAF; a future
  adapter MUST refuse CWA/NAF (mapping CWA "False"->"refuted" is a wrong=0 breach).
- arity <= 2, function-free.

Validated: held-out differential fuzz (400 random binary problems, oracle-golded) = 0
engine/oracle mismatches; unary back-compat byte-identical; INV-25b reproducibility green;
deductive lane wrong=0 16/16; smoke 87.
2026-06-04 20:17:33 -07:00
..
dev feat: sound+complete propositional entailment operator + deductive-logic lane 2026-06-04 07:47:01 -07:00
external/v1 feat: add deductive proof evidence gates 2026-06-04 08:37:51 -07:00
finite_entity/v1 feat: Phase 2 — finite-entity grounding compiler + Phase 1.5 finding 2026-06-04 16:32:03 -07:00
holdout/v1 feat: sound+complete propositional entailment operator + deductive-logic lane 2026-06-04 07:47:01 -07:00
refusal/v1 feat: add deductive proof evidence gates 2026-06-04 08:37:51 -07:00
__init__.py feat: sound+complete propositional entailment operator + deductive-logic lane 2026-06-04 07:47:01 -07:00
contract.md feat: ratify independent-gold invariant (INV-25) + SHA-pin deductive lane 2026-06-04 15:56:28 -07:00
generate.py feat: sound+complete propositional entailment operator + deductive-logic lane 2026-06-04 07:47:01 -07:00
grounding.py feat(deductive): binary relations + multi-variable grounding (finite propositional) 2026-06-04 20:17:33 -07:00
oracle.py feat: sound+complete propositional entailment operator + deductive-logic lane 2026-06-04 07:47:01 -07:00
report.json feat: ratify independent-gold invariant (INV-25) + SHA-pin deductive lane 2026-06-04 15:56:28 -07:00
runner.py feat: ratify independent-gold invariant (INV-25) + SHA-pin deductive lane 2026-06-04 15:56:28 -07:00