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 Lambda, Conditional
from proveit import f, x, A, B, fx
from proveit.logic import Forall, Equals, InSet
from proveit.logic.sets import Functions
%begin theorems
membership_unfolding = Forall(
(A, B), Forall(f, Forall(x, InSet(fx, B), domain=A),
domain=Functions(A, B)))
membership_folding = Forall(
(A, B), Forall(f, InSet(f, Functions(A, B)),
condition=Forall(x, InSet(fx, B), domain=A)))
elim_domain_condition = Forall(
(A, B), Forall(f, InSet(f, Functions(A, B)),
condition=InSet(Lambda(x, Conditional(fx, InSet(x, A))),
Functions(A, B))))
%end theorems