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
%proving nand_if_not_right
defaults.assumptions = nand_if_not_right.conditions
nand_if_left_but_not_right.instantiate({A:TRUE}, auto_simplify=False)
nand_if_neither.instantiate({A:FALSE}, auto_simplify=False)
nand_if_not_right.conclude_by_cases()
%qed