\documentclass[12pt]{article}

\usepackage[margin=0.5in,top=0.7in,dvips]{geometry}
\usepackage{fancyhdr,lastpage}
\usepackage{amsmath,amsthm,amsfonts}
%\usepackage{tikz}
%\usepackage{multirow}
\usepackage{substr}
\usepackage{cancel}

\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\Ann}{Ann}
\DeclareMathOperator{\lcm}{lcm}

\newtheorem{prop}{Proposition}
\newtheorem{thm}{Theorem}
\newtheorem{lem}{Lemma}
\newtheorem{conj}{Conjecture}
\newtheorem{cor}{Corollary}
\theoremstyle{definition}
\newtheorem{defn}{Definition}

\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother

% Include "solution" in your filename to make sure the right mode is
% used below.

\IfSubStringInString{\detokenize{solution}}{\jobname}{%
  % Solutions
  \newcommand\qfill{}
  \newcommand\qpage{}
  \newcommand\qonly[1]{}
  \newcommand\answer[1]{#1}
  \newcommand\question[1]{{\em #1}}
}
{%
  % Problems
  \newcommand\qfill{\vfill}
  \newcommand\qpage{\newpage}
  \newcommand\qonly[1]{#1}
  \newcommand\answer[1]{}
  \newcommand\question[1]{#1}
}

\pagestyle{fancy}
\lhead{MATH 522--01}
\chead{Problem Set \#2\answer{ solutions}}
\rhead{}% Your name here!
\lfoot{}
\cfoot{\answer{Page \thepage\ of \pageref{LastPage}}}
\rfoot{due Thursday, February 5, 2015}

\begin{document}
\begin{enumerate}
\item \question{Prove that, for an integral domain $R$, the ring of
    polynomials $R[x]$ is an integral domain, and that the units in
    $R[x]$ are exactly the units in $R$.}

\answer{}

\item \question{Prove that the ring $\mathbb Z_2[x]/\langle
    x^3+x+1\rangle$ is a field, but that $\mathbb Z_3[x]/\langle
    x^3+x+1\rangle$ is not a field.}

\answer{}

\item \question{Given a ring homomorphism $\varphi:R\rightarrow R'$ on
    commutative rings, let $\varphi^{-1}(S)=\{r\in R:\varphi(r)\in
    S\}$. Note that $\varphi^{-1}$ will map ideals to
    ideals.}

  \begin{enumerate}
  \item \question{Prove that if $I'$ is a prime ideal of $R'$, then
      $\varphi^{-1}(I')$ is a prime ideal of $R$.}

    \answer{}

  \item \question{Demonstrate that if $I'$ is a maximal ideal of $R'$,
      then $\varphi^{-1}(I')$ need not be a maximal ideal of $R$.}

    \answer{}

  \end{enumerate}

\item \question{Prove that for ideals $I$ and $J$ of a commutative
    ring, and $IJ$ representing the set consisting of every product of
    terms from $I$ and $J$, it is the case that $IJ\subseteq I\cap
    J$. Under what circumstances will $IJ=I\cap J$?}

  \answer{}

\item \question{For any subset $A$ of a commutative ring $R$, the
    annihilator $\Ann(A)$ of $A$ is the set of all $r\in R$ such that
    $ra=0$ for all $a\in A$. Prove that $\Ann(A)$ always an ideal in $R$.}

  \answer{}
\end{enumerate}
\end{document}