logo
In [1]:
import proveit
from proveit import defaults, A
from proveit.logic import TRUE, FALSE
from proveit.logic.booleans.conjunction import (
        nand_if_left_but_not_right, nand_if_neither)
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving nand_if_not_right
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
nand_if_not_right:
(see dependencies)
nand_if_not_right may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [3]:
defaults.assumptions = nand_if_not_right.conditions
defaults.assumptions:
In [4]:
nand_if_left_but_not_right.instantiate({A:TRUE}, auto_simplify=False)
In [5]:
nand_if_neither.instantiate({A:FALSE}, auto_simplify=False)
In [6]:
nand_if_not_right.conclude_by_cases()
In [7]:
%qed
proveit.logic.booleans.conjunction.nand_if_not_right has been proven.