logo
In [1]:
import proveit
from proveit import defaults
from proveit import x, A, S
from proveit.logic import InSet
from proveit.logic.booleans.negation import closure
from proveit.logic.sets.membership  import not_in_set_def
theory = proveit.Theory() # the theorem's theory
In [2]:
%proving not_in_set_is_bool
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
not_in_set_is_bool:
(see dependencies)
In [3]:
defaults.assumptions = not_in_set_is_bool.all_conditions()
defaults.assumptions:
In [4]:
closure
In [5]:
closure_spec = closure.instantiate({A:InSet(x, S)})
closure_spec:  ⊢  
In [6]:
not_in_set_def
In [7]:
not_in_set_def_spec = not_in_set_def.instantiate({x:x, S:S})
not_in_set_def_spec:  ⊢  
In [8]:
not_in_set_def_spec.sub_left_side_into(closure_spec)
not_in_set_is_bool may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [9]:
%qed
proveit.logic.sets.membership.not_in_set_is_bool has been proven.
Out[9]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 3, 4  ⊢  
  : , : , :
2theorem  ⊢  
 proveit.logic.equality.sub_left_side_into
3instantiation5, 6  ⊢  
  :
4instantiation7  ⊢  
  : , :
5conjecture  ⊢  
 proveit.logic.booleans.negation.closure
6assumption  ⊢  
7axiom  ⊢  
 proveit.logic.sets.membership.not_in_set_def