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

Method test_solver_basic

tests/test_z3_ported.py:840–846  ·  view source on GitHub ↗

Guide: create, add, check.

(self, kernel)

Source from the content-addressed store, hash-verified

838 """From z3py guide: Solver push/pop, assertions, model stub."""
839
840 def test_solver_basic(self, kernel):
841 """Guide: create, add, check."""
842 s = Solver()
843 x = Int("x")
844 s.add(x > 10)
845 s.add(x < 5)
846 assert s.check() == unsat
847
848 def test_solver_satisfiable_empty(self, kernel):
849 """Empty solver is sat."""

Callers

nothing calls this directly

Calls 4

addMethod · 0.95
checkMethod · 0.95
SolverClass · 0.90
IntFunction · 0.90

Tested by

no test coverage detected