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

Method test_xor_definition

tests/test_z3_ported.py:519–523  ·  view source on GitHub ↗

Xor(p,q) == And(Or(p,q), Not(And(p,q)))

(self, kernel)

Source from the content-addressed store, hash-verified

517 assert prove(claim)
518
519 def test_xor_definition(self, kernel):
520 """Xor(p,q) == And(Or(p,q), Not(And(p,q)))"""
521 p, q = Bools("p q")
522 claim = ForAll([p, q], Xor(p, q) == And(Or(p, q), Not(And(p, q))))
523 assert prove(claim)
524
525 def test_bool_biimplication(self, kernel):
526 """(p == q) == And(Implies(p,q), Implies(q,p))"""

Callers

nothing calls this directly

Calls 7

BoolsFunction · 0.90
ForAllFunction · 0.90
XorFunction · 0.90
AndFunction · 0.90
OrFunction · 0.90
NotFunction · 0.90
proveFunction · 0.90

Tested by

no test coverage detected