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 f, A, B, S
from proveit.logic import Forall, SubsetEq, Functions, Image
%begin theorems
function_image_is_within_codomain = Forall(
(A, B, S), Forall(
f, SubsetEq(Image(f, S), B),
domain=Functions(A, B)),
condition=SubsetEq(S, A))
%end theorems