import proveit
# Prepare this notebook for defining the axioms of a theory:
%axioms_notebook # Keep this at the top following 'import proveit'.
from proveit import f, x, A, B, fx
from proveit.logic import Forall, Equals, InSet
from proveit.logic.sets import Functions
%begin axioms
A function from a domain $A$ to codomain $B$ must map any element in $A$ to an element in $B$.
functions_def = Forall(
(f, A, B), Equals(InSet(f, Functions(A, B)),
Forall(x, InSet(fx, B), domain=A)))
%end axioms