omnibias.boolean.inequality
Boolean truth tables, multilinear extensions, algebraic spectra, and finite-temperature gate systems.
import omnibias.boolean.inequalityModule contract & mathematical conventions
Boolean inequality adapter (theory 09-30).
Exact solve_system on a finite cube. Propose is skipped.
budget == 0 is search_incomplete.
Shared formulas do not imply universal floating-point identity. Verify dtype, shape, derivative-order support, and the stated numerical assumptions for the path you use.
BooleanInequalityBackend
omnibias.boolean.BooleanInequalityBackendSource ↗class BooleanInequalityBackendThe module contract describes the context for this operation. Its signature, explicit validation, return expressions, and implementation are recorded below.
Executed regression · boolean three verdicts
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_boolean_three_verdicts() -> None:
register_inequality_backend(BooleanInequalityBackend())
proved = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[0, 0, 0, 1]]},
)
disproved = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[1, 1]]},
)
blocked = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[0, 0, 0, 1]], "budget": 0},
)
assert run_inequality_pipeline(proved)[0] == "PROVED"
assert run_inequality_pipeline(disproved)[0] == "DISPROVED"
assert run_inequality_pipeline(blocked)[0] == "BLOCKED"python -m pytest "packages/omnibias-boolean/tests/test_inequality_adapter.py::test_boolean_three_verdicts" -qFields & methods
sortfield
sort: ClassVar[InequalitySort] = 'boolean'Declared ClassVar[InequalitySort] field on BooleanInequalityBackend. Default expression: 'boolean'.
proposemethod
propose(self, system: InequalitySystem) -> ProposalSee the class contract above and the exact method implementation below.
Parameters
| Name | Type & default | Contract |
|---|---|---|
systempositional-or-keyword | InequalitySystemRequired | See the operation contract and implementation below. |
Returns: Proposal
Executed regression · boolean three verdicts
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_boolean_three_verdicts() -> None:
register_inequality_backend(BooleanInequalityBackend())
proved = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[0, 0, 0, 1]]},
)
disproved = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[1, 1]]},
)
blocked = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[0, 0, 0, 1]], "budget": 0},
)
assert run_inequality_pipeline(proved)[0] == "PROVED"
assert run_inequality_pipeline(disproved)[0] == "DISPROVED"
assert run_inequality_pipeline(blocked)[0] == "BLOCKED"python -m pytest "packages/omnibias-boolean/tests/test_inequality_adapter.py::test_boolean_three_verdicts" -qMethod implementation
def propose(self, system: InequalitySystem) -> Proposal:
return Proposal(method="exact_skip", skipped=True)rationalizemethod
rationalize(self, system: InequalitySystem, proposal: Proposal) -> RationalWitnessSee the class contract above and the exact method implementation below.
Parameters
| Name | Type & default | Contract |
|---|---|---|
systempositional-or-keyword | InequalitySystemRequired | See the operation contract and implementation below. |
proposalpositional-or-keyword | ProposalRequired | See the operation contract and implementation below. |
Returns: RationalWitness
Executed regression · boolean three verdicts
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_boolean_three_verdicts() -> None:
register_inequality_backend(BooleanInequalityBackend())
proved = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[0, 0, 0, 1]]},
)
disproved = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[1, 1]]},
)
blocked = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[0, 0, 0, 1]], "budget": 0},
)
assert run_inequality_pipeline(proved)[0] == "PROVED"
assert run_inequality_pipeline(disproved)[0] == "DISPROVED"
assert run_inequality_pipeline(blocked)[0] == "BLOCKED"python -m pytest "packages/omnibias-boolean/tests/test_inequality_adapter.py::test_boolean_three_verdicts" -qMethod implementation
def rationalize(
self, system: InequalitySystem, proposal: Proposal
) -> RationalWitness:
return RationalWitness(method="none")checkmethod
check(self, system: InequalitySystem, witness: RationalWitness) -> ExactCheckSee the class contract above and the exact method implementation below.
Parameters
| Name | Type & default | Contract |
|---|---|---|
systempositional-or-keyword | InequalitySystemRequired | See the operation contract and implementation below. |
witnesspositional-or-keyword | RationalWitnessRequired | See the operation contract and implementation below. |
Returns: ExactCheck
Executed regression · boolean three verdicts
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_boolean_three_verdicts() -> None:
register_inequality_backend(BooleanInequalityBackend())
proved = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[0, 0, 0, 1]]},
)
disproved = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[1, 1]]},
)
blocked = InequalitySystem(
sort="boolean",
existential=True,
data={"tables": [[0, 0, 0, 1]], "budget": 0},
)
assert run_inequality_pipeline(proved)[0] == "PROVED"
assert run_inequality_pipeline(disproved)[0] == "DISPROVED"
assert run_inequality_pipeline(blocked)[0] == "BLOCKED"python -m pytest "packages/omnibias-boolean/tests/test_inequality_adapter.py::test_boolean_three_verdicts" -qMethod implementation
def check(
self, system: InequalitySystem, witness: RationalWitness
) -> ExactCheck:
if int(system.data.get("budget", 1)) == 0:
return ExactCheck(
ok=False,
payload={
"role": "inconclusive",
"method": "search_incomplete",
"honesty": {
"complete_solver": False,
},
"detail": "search_incomplete",
},
)
tables = _tables(system.data.get("tables", ()))
if not tables:
return ExactCheck(
ok=False,
payload={
"role": "inconclusive",
"method": "empty_system",
"honesty": {"complete_solver": False},
"detail": "no_tables",
},
)
solution = solve_system(tables)
honesty = {
"complete_solver": True,
"unsat_proof": not solution.consistent,
}
if solution.consistent:
sols = solution.enumerate_solutions()
return ExactCheck(
ok=True,
payload={
"role": "witness",
"method": "solve_system",
"honesty": honesty,
"detail": "boolean_sat",
"n_solutions": len(sols),
},
)
return ExactCheck(
ok=False,
payload={
"role": "empty",
"method": "solve_system",
"honesty": honesty,
"detail": "boolean_unsat",
"complete": True,
},
)Read the implementation
class BooleanInequalityBackend:
sort: ClassVar[InequalitySort] = "boolean"
def propose(self, system: InequalitySystem) -> Proposal:
return Proposal(method="exact_skip", skipped=True)
def rationalize(
self, system: InequalitySystem, proposal: Proposal
) -> RationalWitness:
return RationalWitness(method="none")
def check(
self, system: InequalitySystem, witness: RationalWitness
) -> ExactCheck:
if int(system.data.get("budget", 1)) == 0:
return ExactCheck(
ok=False,
payload={
"role": "inconclusive",
"method": "search_incomplete",
"honesty": {
"complete_solver": False,
},
"detail": "search_incomplete",
},
)
tables = _tables(system.data.get("tables", ()))
if not tables:
return ExactCheck(
ok=False,
payload={
"role": "inconclusive",
"method": "empty_system",
"honesty": {"complete_solver": False},
"detail": "no_tables",
},
)
solution = solve_system(tables)
honesty = {
"complete_solver": True,
"unsat_proof": not solution.consistent,
}
if solution.consistent:
sols = solution.enumerate_solutions()
return ExactCheck(
ok=True,
payload={
"role": "witness",
"method": "solve_system",
"honesty": honesty,
"detail": "boolean_sat",
"n_solutions": len(sols),
},
)
return ExactCheck(
ok=False,
payload={
"role": "empty",
"method": "solve_system",
"honesty": honesty,
"detail": "boolean_unsat",
"complete": True,
},
)Other public import paths
omnibias.boolean.BooleanInequalityBackendomnibias.boolean.inequality.BooleanInequalityBackend