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

Method test_contrapositive_proof

tests/test_z3_ported.py:507–511  ·  view source on GitHub ↗

(p => q) => (Not(q) => Not(p))

(self, kernel)

Source from the content-addressed store, hash-verified

505 assert prove(claim)
506
507 def test_contrapositive_proof(self, kernel):
508 """(p => q) => (Not(q) => Not(p))"""
509 p, q = Bools("p q")
510 claim = ForAll([p, q], Implies(Implies(p, q), Implies(Not(q), Not(p))))
511 assert prove(claim)
512
513 def test_excluded_middle(self, kernel):
514 """p ∨ ¬p is always true."""

Callers

nothing calls this directly

Calls 5

BoolsFunction · 0.90
ForAllFunction · 0.90
ImpliesFunction · 0.90
NotFunction · 0.90
proveFunction · 0.90

Tested by

no test coverage detected