MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / check

Method check

lean_py/z3/solver.py:581–594  ·  view source on GitHub ↗
(self, *assumptions: BoolRef)

Source from the content-addressed store, hash-verified

579 return len(self._stack)
580
581 def check(self, *assumptions: BoolRef) -> CheckSatResult:
582 asserts = list(self._assertions)
583 asserts.extend(assumptions)
584 if not asserts:
585 return sat
586 conj = And(*asserts)
587 # Try proving negation → unsat
588 negated = Not(conj)
589 if _try_prove(negated):
590 return unsat
591 # Try proving conjunction directly → sat (tautologically true)
592 if _try_prove(conj):
593 return sat
594 return unknown
595
596 def model(self) -> ModelRef:
597 raise NotImplementedError(

Callers 15

solveFunction · 0.95
test_solver_basicMethod · 0.95
test_solver_push_popMethod · 0.95
test_1queen_satMethod · 0.95
test_2queens_unsatMethod · 0.95
test_3queens_unsatMethod · 0.95

Calls 3

AndFunction · 0.90
NotFunction · 0.90
_try_proveFunction · 0.85