logo
In [1]:
import proveit
from proveit import A, B
from proveit import defaults
from proveit.logic.booleans.conjunction import true_and_false_negated
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving nand_if_left_but_not_right
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
nand_if_left_but_not_right:
(see dependencies)
nand_if_left_but_not_right may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [3]:
defaults.assumptions = nand_if_left_but_not_right.all_conditions()
defaults.assumptions:
In [4]:
AeqT = A.evaluation(assumptions=[A])
AeqT:  ⊢  
In [5]:
BeqF = B.evaluation()
BeqF:  ⊢  
In [6]:
true_and_false_negated
In [7]:
AnandF = AeqT.sub_left_side_into(true_and_false_negated, auto_simplify=False)
AnandF:  ⊢  
In [8]:
BeqF.sub_left_side_into(AnandF, auto_simplify=False)
In [9]:
%qed
proveit.logic.booleans.conjunction.nand_if_left_but_not_right has been proven.
Out[9]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 3, 4,  ⊢  
  : , :
2theorem  ⊢  
 proveit.logic.equality.substitute_falsehood
3instantiation5, 6, 7  ⊢  
  : , :
4assumption  ⊢  
5theorem  ⊢  
 proveit.logic.equality.substitute_truth
6theorem  ⊢  
 proveit.logic.booleans.conjunction.true_and_false_negated
7assumption  ⊢