\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{enumerate}
\usepackage{ifthen}
\usepackage{ulem} % for strikethrough \sout{...} command
\usepackage{color}
\usepackage{hyperref}

% for the smiley face
\usepackage{wasysym}

\setlength{\unitlength}{0.1in}

\setlength{\oddsidemargin}{-0.25in}
\setlength{\evensidemargin}{-0.25in}
\setlength{\topmargin}{-0.25in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\topskip}{0.0in}
\setlength{\textheight}{9.75in}
\setlength{\textwidth}{7in}

\newcommand{\bdot}{\, {\scriptstyle{\bullet}} \,}
\newcommand{\B}[1]{{\bf {#1}}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}

\newcommand{\myspace}{\parbox[c][0.25in]{0.25in}{\hfill}}
\newcommand{\varspace}[2]{\mbox{\parbox[c][#1]{#2}{\hfill}}}
\newcommand{\force}{{\noindent $\mbox{\;}$}}

\newcommand{\diagquotient}[2]{\displaystyle{{#1 \atop \;}\hspace*{-0.1in} \mbox{\put(0,0){\line(2,1){2}}} \hspace*{0.1in} {\; \atop #2}}}

\newcommand{\bproof}{\noindent {\bf Proof:} \quad}
\newcommand{\eproof}{$\blacksquare$}

\begin{document}

\pagestyle{empty}

\noindent
\parbox{2.25in}{\bf Math 2110}
\hfill {\Large \bf Homework \#9} \hfill
\parbox{2.25in}{\bf \hfill Due: Fri., Oct. $30^\mathrm{th}$, 2020}

\vspace{0.1in}

%\noindent {\large\bf Name:} \underline{\Large\quad My Name Goes Here \quad} \hfill 

\force \hfill Handwritten solutions are fine. \smiley  % uses wasysym package. :)
\hfill \force

\vspace{0.2in}

\noindent
{\it Notational Notes:} $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ are integers, rational numbers, and real numbers (respectively). Also, $\mathbb{R}_{\geq 0}=[0,\infty)$ (i.e., non-negative reals).

\vspace{0.1in}

\begin{description}
\item[\#1] The following are faulty ``definitions'' of functions. Explain why each fails to be a function.

\begin{enumerate}[(a)]
\item Let $f:\mathbb{Q} \to \mathbb{Z}$ be defined by $f(a/b)=ab$ where $a,b \in \mathbb{Z}$ and $b\not=0$ (i.e., $a/b$ is a rational number).
\item Let $g:\mathbb{Z} \to \mathbb{R}$ be defined by $g(n)=\sqrt{n}$.
\end{enumerate}

\item[\#2] For each of the following functions, determine if the function is one-to-one, onto, both, or neither. Prove your answers.

\begin{enumerate}[(a)]
\item Let $f:\mathbb{R} \to \mathbb{R}_{\geq 0}$ be defined by $f(x)=x^2+1$.

\item Let $g:\mathbb{Z} \to \mathbb{Z}$ be defined by $g(n) = \left\{ \begin{array}{cl} \dfrac{n}{2} & n \text{ is even} \vspace{0.05in} \\  3-n & n \text{ is odd} \end{array} \right.$

\item Let $h:\mathbb{Z} \to \mathbb{Z}$ be defined by $h(n) = \left\{ \begin{array}{cl} n+1 & n \text{ is even} \\ 2n & n \text{ is odd} \end{array} \right.$

\end{enumerate}

\item[\#3] Let $f:A \to B$ and $g:B \to C$ be surjective (i.e., onto) functions. Show that $g \circ f:A \to C$ is surjective. 

\item[\#4] Let $f:A \to B$ be a function and let $S_1,S_2 \subseteq A$ and $T_1,T_2 \subseteq B$. Prove the following:

\begin{enumerate}[(a)]
\item $f(S_1)-f(S_2) \subseteq f(S_1-S_2)$
\item $f^{-1}(T_1 \cup T_2) = f^{-1}(T_1) \cup f^{-1}(T_2)$
\item If $T_1 \subseteq T_2$, then $f^{-1}(T_1) \subseteq f^{-1}(T_2)$.
\end{enumerate}

\end{description}

\vspace{0.3in}

Keep in mind that for a function $f:A \to B$ where $S\subseteq A$ and $T \subseteq B$, we have the following equivalences (straight from the definitions):
\begin{itemize}
\item $x \in f(S)$ if and only if there exists some $y \in S$ such that $f(y)=x$. 
\item $x \in f^{-1}(T)$ if and only if $f(x) \in T$.
\end{itemize}

\vspace{0.15in}

\noindent Here is a sample proof involving images and preimages (aka inverse images) of sets.

\vspace{0.1in}

\noindent
\fbox{\large\bf Prop:} Let $f:A \to B$ be a function.
\begin{itemize}
\item If $C \subseteq B$, then $f(f^{-1}(C)) \subseteq C$.
\item $f$ is onto if and only if for every $C \subseteq B$ we have $f(f^{-1}(C))=C$.
\end{itemize}

\bproof
For the first item, suppose $C \subseteq B$ and suppose $x \in f(f^{-1}(C))$. Then by definition, there exists some $y \in f^{-1}(C)$ such that $f(y)=x$. Again, by definition, $y \in f^{-1}(C)$ means $f(y) \in C$. Therefore, $x=f(y) \in C$. Thus $f(f^{-1}(C)) \subseteq C$.

For the second item, first suppose $f$ is onto and let $C \subseteq B$. We already know that $f(f^{-1}(C)) \subseteq C$. So suppose $x \in C$. Then since $f$ is onto, there exists some $y \in A$ such that $f(y)=x$. But then by definition $y \in f^{-1}(C)$ since $f(y)=x \in C$. Therefore, $f(y) \in f(f^{-1}(C))$ since $y \in f^{-1}(C)$ and so $x=f(y) \in f(f^{-1}(C))$. Thus we have shown $C \subseteq f(f^{-1}(C))$ and so $f(f^{-1}(C))=C$.

Conversely, suppose that $f(f^{-1}(C)=C$ for all $C \subseteq B$. Let $y\in B$. Then since $\{ y\} \subseteq B$, we have $f(f^{-1}(\{y\}))=\{y\}$. Thus, since $y \in \{y\}=f(f^{-1}(\{y\}))$, by definition there exists some $x \in f^{-1}(\{y\})$ such that $f(x)=y$. Again, by definition $f(x) \in \{y\}$ since $x \in f^{-1}(\{y\})$. So $f(x)=y$. Therefore, $f$ is onto.
\eproof





\end{document}