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 a, b, f, n, x, A, B, C, fa, fb, fx
from proveit import Lambda, Conditional
from proveit.logic import (
And, Forall, Equals, NotEquals, InSet, Surjections)
%begin theorems
elim_domain_condition = Forall(
(A, B), Forall(f, InSet(f, Surjections(A, B)),
condition=InSet(Lambda(x, Conditional(fx, InSet(x, A))),
Surjections(A, B))))
%end theorems