logo
In [1]:
import proveit
from proveit import defaults
from proveit import A, B
from proveit.logic import in_bool, Not, Or
from proveit.logic.booleans.disjunction import not_left_if_neither
theory = proveit.Theory() # the theorem's theory
In [2]:
import proveit.logic
In [3]:
%proving not_right_if_neither
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
not_right_if_neither:
(see dependencies)
In [4]:
# If we do not disable "not_left_if_neither" then a sub-optimal derivation may be generated through the automration.
# (a locally optimal choice in minimizing proof steps is not always globally optimal)
not_left_if_neither.proof().disable()
In [5]:
defaults.assumptions = not_right_if_neither.all_conditions()
defaults.assumptions:
In [6]:
AorB_given_B = Or(A, B).conclude_via_example(
    B, assumptions = defaults.assumptions + (B,))
AorB_given_B: ,  ⊢  
In [7]:
B_impl_AorB = AorB_given_B.as_implication(B)
B_impl_AorB:  ⊢  
In [8]:
B_impl_AorB.deny_antecedent()
not_right_if_neither may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [9]:
%qed
proveit.logic.booleans.disjunction.not_right_if_neither has been proven.
Out[9]: