logo
In [1]:
import proveit
from proveit import defaults
from proveit import m, x, y, A, B, S
from proveit.numbers import one, two
from proveit.logic import InSet, Intersect
from proveit.logic.sets.inclusion  import subset_eq_def
from proveit.logic.sets.intersection  import intersection_def

theory = proveit.Theory() # the theorem's theory
In [2]:
%proving intersection_is_subset_eq
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
intersection_is_subset_eq:
(see dependencies)
In [3]:
defaults.assumptions = [intersection_is_subset_eq.condition]
defaults.assumptions:
In [4]:
intersection_is_subset_eq.condition.instantiate()
In [5]:
subset_eq_def
In [6]:
subset_eq_def_inst = subset_eq_def.instantiate({A:Intersect(A, B), B:A})
subset_eq_def_inst:  ⊢  
In [7]:
defaults.assumptions = [*defaults.assumptions, subset_eq_def_inst.rhs.condition]
defaults.assumptions:
In [8]:
intersection_def_inst = intersection_def.instantiate({m:two, x:x, A:[A, B]})
intersection_def_inst:  ⊢  
In [9]:
intersection_def_inst.derive_right_via_equality()
In [10]:
subset_eq_def_inst.rhs.prove()
intersection_is_subset_eq may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [11]:
subset_eq_def_inst.derive_left_via_equality()
In [12]:
%qed
proveit.logic.sets.intersection_is_subset_eq has been proven.
Out[12]: