import proveit
from proveit import defaults, B
from proveit.logic import TRUE, FALSE
from proveit.logic.booleans.conjunction import (
nand_if_right_but_not_left, nand_if_neither)
theory = proveit.Theory() # the theorem's theory
%proving nand_if_not_left
defaults.assumptions = nand_if_not_left.all_conditions()
nand_if_right_but_not_left
nand_if_neither
nand_if_right_but_not_left.instantiate({B:TRUE})
nand_if_neither.instantiate({B:FALSE})
%qed