import proveit
# Prepare this notebook for defining the theorems of a theory:
%theorems_notebook # Keep this at the top following 'import proveit'.
from proveit import x, A, B, S
from proveit.logic import Boolean, EmptySet, Forall, Intersect, InSet, NotInSet
from proveit.logic import SetEquiv, SubsetEq, Union
%begin theorems
Nothing is in the empty set (everything is not in the empty set):
nothing_is_in_empty = Forall(x, NotInSet(x, EmptySet))
union_with_superset_is_superset = Forall(
(A, S),
SetEquiv(Union(A, S), S),
conditions=[SubsetEq(A, S)])
intersection_with_superset_is_set = Forall(
(A, S),
SetEquiv(Intersect(A, S), A),
conditions=[SubsetEq(A, S)])
set_subset_eq_of_union_with_set = Forall(
(A, B),
SubsetEq(A, Union(A, B)),
condition=Forall(x, InSet(InSet(x, B), Boolean)))
intersection_is_subset_eq = Forall(
(A, B),
SubsetEq(Intersect(A, B), A),
condition=Forall(x, InSet(InSet(x, B), Boolean)))
intersection_subset_eq_union = Forall(
(A, B),
SubsetEq(Intersect(A, B), Union(A, B)))
%end theorems