\documentclass[12pt]{article}

\usepackage[margin=0.5in,top=0.7in,dvips]{geometry}
\usepackage{fancyhdr,lastpage}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
%\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 \#4\answer{ solutions}}
\rhead{}% Your name here!
\lfoot{}
\cfoot{\answer{Page \thepage\ of \pageref{LastPage}}}
\rfoot{due Thursday, March 26, 2015}

\begin{document}
\begin{enumerate}
\item \question{Demonstrate an example of a subring $D$ of ring $D'$
    such that: $D'$ is a unique factorization domain but not a field,
    and $D$ is an integral domain but not a unique factorization
    domain.}

  \answer{}

\item \question{Let an integral domain $D$ be called
    \emph{reverse-Noetherian} if every sequence of ideals
    $D\supseteq I_1\supsetneq I_2\supsetneq
    I_3\supsetneq\cdots$ is finite. Prove that $D$ is
    reverse-Noetherian if and only if $D$ is a field.}

  \answer{}

\item \question{Prove that if $D$ is a principal ideal domain, then
    for every pair of nonzero $a,b\in D$, there is a value $d$ such
    that:
    \begin{itemize}
    \item $d$ divides both $a$ and $b$.
    \item If $e\in D$ is such that $e$ divides both $a$ and $b$, then
      $e$ divides $d$.
    \item $d=ar+bs$ for some $r,s\in D$.
    \end{itemize}
    Prove furthermore that $d$ is unique up to multiplication by a
    unit.

    (Note that these three properties are those which, in $\mathbb N$,
    describe the greatest common divisor).
  }

  \answer{}

\item \question{For a linear transformation $T$ from a vector space
    $V$ to a vector space $W$, the \emph{image} of $T$ is the set of
    all $w\in W$ such that $w=T(v)$ for some $T$, and the
    \emph{kernel} of $T$ is the set of all $v\in V$ such that
    $T(v)=0$. Prove that the kernel and image of $T$ are
    \emph{subspaces} of $V$ and $W$ respectively.}

  \answer{}

\item \question{Let $W$ be a vector space of finite dimension. Prove
    that there are not subspaces $U$ and $V$ of $W$ such that $U\cap
    V=\{0\}$ and $\dim U+\dim V>\dim W$.}

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