\documentclass[12pt]{amsart}
\usepackage{amsmath,amsthm,amsfonts,latexsym,amssymb,amscd,xcolor}
\pagestyle{headings}
\setlength{\textwidth}{468true pt}
\setlength{\headheight}{0true pt} % needed for 12pt documents
\setlength{\oddsidemargin}{0 truept}
\setlength{\evensidemargin}{0 truept}
\setlength{\textheight}{580true pt}
\newtheorem{thm}{Theorem} %[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lm}[thm]{Lemma}
\newtheorem{prp}[thm]{Proposition}
\newtheorem{clm}[thm]{Claim}
%

\begin{document}


\noindent
{\bf Solutions to HW 3.}

\bigskip
  
\begin{enumerate}
\item[1.]
  Explain why it is true that the function
  $F:A\to {\mathcal P}(A): a\mapsto\{a\}$ is injective.  
\end{enumerate}
  
  \bigskip
  
\color{blue}
If $F(a)=F(b)$, then $\{a\}=\{b\}$, according to the definition of $F$.
Now, by the Axiom of Extensionality, $a=b$. This establishes
that $F$ is injective. (We showed that $F(a)=F(b)$
implies $a=b$.)
\color{black}

\vfill
  
\begin{enumerate}
\item[2.]
  In this problem,
  $f: A\to B$ and $g: B\to C$ will be composable functions.
\end{enumerate}
  

\bigskip

\begin{enumerate}
\item[(a)]
  Show that if
  $g\circ f$ is injective, then
  $f$ is injective, while if $g\circ f$ is surjective,
  then $g$ is surjective.
  \bigskip
  
\color{blue}
For the first part of the problem,
we argue by contradiction. Assume that $g\circ f$
is injective, but that $f$ is not injective.
Since $f$ is not injective, there exist distinct $a_1, a_2\in A$
such that $f(a_1)=f(a_2)$. But now, since $g$ is a function,
$g(f(a_1))=g(f(a_2))$. This may also be written as
$g\circ f(a_1)=g\circ f(a_2)$. By the injectivity of
$g\circ f$, we get that $a_1=a_2$, which contradicts
the distinctness of $a_1$ and $a_2$.

We give a direct argument for the second part of the statement.
We assume that $g\circ f: A\to C$ is surjective,
and it is our goal to prove that $g: B\to C$ is surjective.
To this end, choose $c\in C$ arbitrarily; our aim is to show that
there exists $b\in B$ such that $g(b)=c$.
Since $g\circ f: A\to C$ is surjective, there is some
$a\in A$ such that $c = g\circ f(a) = g(f(a))$.
If we take $b=f(a)$, then we obtain that $g(b)=g(f(a))=c$,
as desired.
\color{black}

\vfill

\item[(b)]
  Give an example where
  $g\circ f$ is injective, but
  $g$ is not injective, and an example where
  $g\circ f$ is surjective but $f$ is not surjective. 
  \bigskip
  
  \color{blue}
  Two examples are requested. I give one example
  that satisfies both requests.
  
Let $A = \{0\} = C$ and let $B = \{0,1\}$.
Let $f: A\to B$ be defined so that $f(0)=0$,
and let $g: B\to C$ be defined so that
$g(0)=g(1)=0$. Then $g\circ f: A\to C$ is the identity
function, so it is both injective and surjective.
But $f$ is not surjective and $g$ is not injective.
\color{black}

\end{enumerate}
\vfill  


\begin{enumerate}
\item[3.]
  The function $P_A: A\times B\to A: (a,b)\mapsto a$
  is called the first projection map, or the projection onto A.
\end{enumerate}


\bigskip

\begin{enumerate}
\item[(a)]
  What is the image of this function?
(Make sure to consider the possibility where $B=\emptyset$.) 
  \bigskip
  
\color{blue}
If $B\neq \emptyset$, then $\textrm{im}(P_A) = A$.
This is because, if $b\in B$, then for any $a\in A$
we have $(a,b)\in A\times B$, and $P_A((a,b))=a$.

If $B=\emptyset$, then $A\times B=\emptyset$,
so $P_A$ is the empty function, and therefore
$\textrm{im}(P_A) = \emptyset$.
\color{black}

\vfill

\item[(b)]
  What is the coimage of this function?
(Make sure to consider the possibility where $B=\emptyset$.) 

  \bigskip
  
  \color{blue}
  Recall that 
$\textrm{coim}(P_A)$
is the set of fibers of $P_A$. If $B\neq \emptyset$, then
$\textrm{im}(P_A)=A$,
as we showed in Part (a). The fiber over
any $a\in \textrm{im}(P_A)=A$ is
$f^{-1}(a)=\{a\}\times B$. Thus
$$\textrm{coim}(P_A) = \{\{a\}\times B\;|\;a\in A\}.$$

If $B=\emptyset$, then $A\times B=\emptyset$,
so no fibers are possible for
$P_A$. Hence 
$\textrm{coim}(P_A) = \emptyset$.
\color{black}

\end{enumerate}
\vfill  

\end{document}
