\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,fancyhdr,epic,eepic,multicol,graphicx}

\renewcommand{\baselinestretch}{1.1}

\theoremstyle{plain}
\theoremstyle{definition}
\newtheorem{problem}{Problem}
\newtheorem*{answer}{Answer}
\newtheorem{definition}{Definition}

\newcommand{\bp}{\begin{problem}}
\newcommand{\ep}{\end{problem}}
\newcommand{\ba}{\begin{answer}}
\newcommand{\ea}{\end{answer}}
\newcommand{\ds}{\displaystyle}
\newcommand{\ben}{\renewcommand{\theenumi}{\alph{enumi}}\renewcommand{\labelenumi}{(\theenumi)}\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}

\fancyhead[L]{\Large \textbf{Math 157 Fall 2013}}
\fancyhead[R]{\large \textbf{Homework 6}}



\begin{document}
\pagestyle{fancy}
\fancyfoot[R,L,C]{}

\bp Read Chapter 1, through section 1.8.  (pages 48-61).
\ben
\item In Section 1.5, do exercises 2,3,4,8,9,10, and 11.
\item In Section 1.7, do exercises 1,2,3, and 6.
\een
\ep


\section*{Functions}

\begin{definition}
  We say that a set of ordered pairs $f \subseteq X\times Y$ is a
  \emph{function from $X$ to $Y$} if and only if for all $x \in X$
  there exists one and only one $y\in Y$ so that $(x,y)\in f.$ We
  usually write $f:X\rightarrow Y$ if $f \subseteq X\times Y$ is
  a function and we write $y=f(x)$ if $(x,y)\in f.$ The set $X$
  is called \emph{the domain of $f$} and the set $Y$ is called
  \emph{the codomain of $f.$}
\end{definition}

It is common to think of a function $f:X\rightarrow Y$
a ``rule'' that associates $x\in X$ to $y\in Y$ whenever
$y=f(x)$ and to refer to the set of ordered pairs $f \subseteq X\times Y$ as
the \emph{graph} of the function.  By this convention the ``rule'' is
referred to as the function $f$ 
and the set $graph(f)=\{(x,y)\in X \times Y
: f(x)=y\}$ is the \emph{graph of $f$}.


\begin{definition}
Suppose that $f:X\rightarrow Y$ is a function.  
\ben
\item For any subset $A \subseteq X$, we define the set
  $f(A)\subseteq Y$
  by $$f(A)=\{y\in Y : \exists x \in A \text{ with }f(x)=y\}.$$
\item We call $f(X)\subseteq Y$ the \emph{range of $f$.}
\item For any subset $B \subseteq Y$, we define the set
  $f^{-1}(B)\subseteq X$
  by $$f^{-1}(B)=\{x\in X : f(x)\in B\}.$$
\een
\end{definition}



\bp Suppose that $f:X\rightarrow Y$ is a function.  
\ben 
\item For any $A\subseteq X$ and $B\subseteq X$, compare $f(A\cup
  B)$ and $f(A)\cup f(B).$
\item For  any $A\subseteq X$ and $B\subseteq X$, compare $f(A\cap B)$ and
  $f(A)\cap f(B).$
\item For  any $C\subseteq Y$ and $D\subseteq Y$, compare $f^{-1}(C\cup
D)$ and $f^{-1}(C)\cup f^{-1}(D).$
\item For  any $C\subseteq Y$ and $D\subseteq Y$, compare $f^{-1}(C\cap
D)$ and $f^{-1}(C)\cap f^{-1}(D).$
\item For  any $A\subseteq X$, compare $f(X\setminus A)$ and
  $Y\setminus f(A).$
\item For  any $C\subseteq Y$, compare $f^{-1}(Y\setminus C)$ and
  $X\setminus f^{-1}(C).$
\item For  any $A\subseteq X$, compare $f^{-1}(f(A))$ and $A$.
\item For  any $C\subseteq Y$, compare $f(f^{-1}(C))$ and $C$.
\een

Here ``compare'' means decide whether $\subseteq$, $\supseteq$, $=$,
or none apply.
\ep


\begin{definition}
Suppose that $f:X\rightarrow Y$ is a function.  
\ben
\item We say that $f$ is \emph{injective} or \emph{one to one} if and
  only if
$$\forall x\in X \forall z\in X \, (f(x)=f(z)\Rightarrow x=z).$$
\item We say that $f$ is \emph{surjective} or \emph{onto} if and
  only if
$$\forall y\in Y \exists x\in X \, (f(x)=y).$$
\item We say that $f$ is \emph{bijective} 
if $f$ is both injective and surjective.
\een
We may call an injective function an \emph{injection}, a surjective function
a \emph{surjection}, and a bijective function a \emph{bijection}.
\end{definition}


\bp Which apply: injective, surjective, or bijective?
\ben
\item Define $f:\N\rightarrow \N$ by $f(n)=2n$ for every $n\in \N.$
\item Define $g:\N\setminus \{0,1\} \rightarrow \N$ by $g(n)=n-1$ for
  every $n\in \N.$
\item Let $X=\{\text{functions }\phi:\N\rightarrow \N\}$.  Define a
  function $G:X\rightarrow \N$ by $G(\phi)=\phi(3)$ for all $\phi\in X.$
\item Let $X=\{\text{functions }\phi:\N\rightarrow \{0,1\}\}$ and let
  $Y=\{\text{subsets of }\N\}.$  Define a
  function $H:X\rightarrow Y$ by $H(f)=f^{-1}(\{1\}).$
\een
\ep


\end{document}