% If you are working from this template to just write up your own
% solutions, I'm trying to keep it simple for you and there are only a
% few places you need to edit. On line 43 there's a place where the
% phrase "YOUR NAME HERE" appears; change it to your actual
% name. Several places below there are places where the phrase "YOUR
% ANSWER HERE" appears, and directly below (or replacing) those lines
% are good places to put your answers.
%
% One important thing you need to do, however (due to the complicated
% way I use a single form to produce both the question sheets and
% solution writeups) is to make sure that you keep the word 'solution'
% in your filename, or else your answers won't be printed at all.
\documentclass[12pt]{article}
 
\usepackage[margin=0.7in,dvips]{geometry}
\usepackage{fancyhdr,lastpage}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{tikz}
\usepackage{substr}

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

\pagestyle{fancy}
\lhead{MATH 311-01}
\chead{Problem Set \#4\answer{ solutions}}
\rhead{\answer{YOUR NAME HERE}}
\lfoot{}
\cfoot{Page \thepage\ of \pageref{LastPage}}
\rfoot{{\bf due February 9, 2017}}

\newtheorem{prop}{Proposition}

% The command below redefines \neg (the logical negation character)
% to be a big tilde, in line with the usage in the book. Comment it
% out if you prefer the more traditional negation symbol.
\renewcommand*{\neg}{\mathord{\sim}}

\begin{document}
\question{Turn the following true statements into propositions
    with explicitly described variables, premise, and conclusion,
    and then prove that proposition.}

  \begin{enumerate}
  \item \question{The cube of any even integer is even.}
    
    \answer{
      \begin{prop}
        % State your proposition here.
      \end{prop}
      \begin{proof}
        % Provide your proof here.
      \end{proof}
    }
    
  \item \question{If the square of a rational number is not an
      integer, then the rational number itself is also not an
      integer.}

    \answer{
      \begin{prop}
        % State your proposition here.
      \end{prop}
      \begin{proof}
        % Provide your proof here.
      \end{proof}
    }


  \item \question{Any non-negative real number plus one is positive.}
    
    \answer{
      \begin{prop}
        % State your proposition here.
      \end{prop}
      \begin{proof}
        % Provide your proof here.
      \end{proof}
    }

  \item \question{If the product of two integers is even, then at
      least one of the two factors in the product must be even.}

    \answer{
      \begin{prop}
        % State your proposition here.
      \end{prop}
      \begin{proof}
        % Provide your proof here.
      \end{proof}
    }
\end{enumerate}

\end{document}
