\documentclass[12pt,reqno]{amsart} % Document type

% There is a lengthy top section...
% Copy and paste this into a new .tex file.
% Begin typing at the bottom of this document.

%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
%
% Various add-ons that allow for greater customization of the document. Not all are necessary.

%\usepackage[T1]{fontenc} % Output encoding (suggested when text contains accented letters)
%\usepackage[utf8]{inputenc} % Input encoding (important when writing in foreign languages)
\usepackage[margin =.75in]{geometry} % Set page dimensions
\usepackage{parskip} % Custom paragraph spacing
\usepackage{setspace} % Allow for double-spacing using \doublespace
\usepackage{multicol} % Allows multiple columns on a page
\usepackage{mathtools,amssymb,amsfonts,amsthm} % Variety of useful things for math
\usepackage{euscript,mathrsfs,bbm} % Some additional fonts
\usepackage{color} % Color
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor} % Extra colors
\usepackage{nopageno}
\usepackage[normalem]{ulem} % Strikethough using \sout{}

\usepackage{ifthen} % if-then statements

\usepackage{comment} % Customizable comment environments
\usepackage{newverbs} % Customizable verbatim environments
\usepackage{enumitem} % Customizable enumerate environments
\usepackage{tabularx} % Greater flexibility with tables
\usepackage{multirow} % Table elements span multiple rows

\usepackage{graphicx} % For inserting images
\usepackage{wrapfig} % Wrap text around figures
\usepackage{url} % For inserting urls
\usepackage[linktoc=all,colorlinks=true,linkcolor=blue,urlcolor=Purple,citecolor=cyan]{hyperref} % Internal and external links
\usepackage[all]{hypcap} % Image captions (requires hyperref)
\usepackage{pdfpages} % Insert pdfs
\usepackage{tikz} % For drawing pictures
    \usetikzlibrary{petri}
    \usetikzlibrary{trees}
    \usetikzlibrary{arrows}
    \usetikzlibrary{decorations.markings}
    \usetikzlibrary{patterns}
%\usepackage[all]{xy} % Matrix-like diagrams
\raggedbottom
\allowdisplaybreaks

%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
%
% Custom comment environments and various editing macros
% Comments can be turned off using \excludecomment{ }

\specialcomment{lecturenotes}{}{}\excludecomment{lecturenotes}
\specialcomment{answers}{ \textsc{Answer: }}{}
\specialcomment{remarks}{

\setlength{\leftskip}{5mm}
\begingroup\color{blue}}
{\endgroup

\setlength{\leftskip}{0mm}
}
\specialcomment{solutions}{

\setlength{\leftskip}{5mm}
\begingroup\color{blue}}
{\endgroup

\setlength{\leftskip}{0mm}
}
\specialcomment{inremarks}{\begingroup\color{blue}}{\endgroup}
\specialcomment{insolutions}{\begingroup\color{blue}}{\endgroup}
\newcommand{\ctypo}[1]{\colorbox{Gold}{#1}\hspace{-1mm}}
\newcommand{\ctex}[1]{\colorbox{Pink}{#1}}
\newcommand{\period}{\colorbox{cyan!50}{.}}
\newcommand{\comma}{\colorbox{cyan!50}{,}}

\newverbcommand{\cverb}{\small\color{purple}}{}
\newverbcommand{\everb}{\small\color{blue}}{}

\newboolean{print_solutions}
\setboolean{print_solutions}{true}
\ifthenelse{\boolean{print_solutions}}{}{\excludecomment{solutions}\excludecomment{insolutions}}

%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
%
% Custom column types for tabularx

\newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}
\newcolumntype{R}[1]{>{\hsize=#1\hsize\raggedleft\arraybackslash}X}
\newcolumntype{C}[1]{>{\hsize=#1\hsize\centering\arraybackslash}X}

%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
%
% Custom spacing commands

\begingroup
    \makeatletter
    \@for\theoremstyle:=definition,remark,plain\do{%
        \expandafter\g@addto@macro\csname th@\theoremstyle\endcsname{%
            \addtolength\thm@preskip\parskip
            }%
        }
\endgroup

\newcommand{\sss}{\vspace{2 mm}\noindent}
\newcommand{\lss}{\vspace{5 mm}\noindent}
\newcommand{\lls}{\vspace{7 mm}\noindent}
\newcommand{\ds}{\displaystyle}
\newcommand{\HR}{\vspace{5pt}\hrule height 1pt \vspace{5pt}}
\newcommand{\atext}[1]{\text{\quad #1\quad}}
%\newcommand\Tstrut{\rule{0pt}{2.6ex}}         % = `top' strut
%\newcommand\Bstrut{\rule[-1ex]{0pt}{0pt}}   % = `bottom' strut

%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
%
% Shortcuts for commonly used symbols

\newcommand{\ca}{\mathcal}
\newcommand{\fr}{\mathfrak}
\newcommand{\eucal}{\EuScript}
\newcommand{\scr}{\mathscr}
\newcommand{\bbf}{\mathbb{F}}
\newcommand{\bbn}{\mathbb{N}}
\newcommand{\bbr}{\mathbb{R}}
\newcommand{\bbq}{\mathbb{Q}}
\newcommand{\bbc}{\mathbb{C}}
\newcommand{\bbz}{\mathbb{Z}}
\newcommand{\bbp}{\mathbb{P}}
\newcommand{\bfa}{\mathbf{a}}
\newcommand{\bfb}{\mathbf{b}}
\newcommand{\bfc}{\mathbf{c}}
\newcommand{\bfu}{\mathbf{u}}
\newcommand{\bfv}{\mathbf{v}}
\newcommand{\bfx}{\mathbf{x}}
\newcommand{\ring}{\ca O}

\newcommand{\inv}{^{-1}}
\newcommand{\into}{\hookrightarrow}
\newcommand{\onto}{\twoheadrightarrow}
\newcommand{\isom}{\overset{\sim}{\to}}
\renewcommand{\iff}{\Leftrightarrow}
\renewcommand{\implies}{\Rightarrow}
\renewcommand{\impliedby}{\Leftarrow}
\newcommand{\contradiction}{\Rightarrow\Leftarrow}

%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
%
% Shortcuts for matrices and vectors

\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\vmat}[1]{\begin{vmatrix}#1\end{vmatrix}}
\newcommand{\floor}[1]{\lfloor #1 \rfloor}
\newcommand{\Floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\vect}[1]{\langle #1 \rangle}

%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
%
% Custom function names

\newcommand{\Ad}{\operatorname{Ad}}
\newcommand{\ad}{\operatorname{ad}}
\newcommand{\disc}{\operatorname{disc}}
\newcommand{\domain}{\operatorname{domain}}
\newcommand{\Id}{\operatorname{Id}}
\newcommand{\im}{\operatorname{im}}
\newcommand{\ind}{\operatorname{ind}}
\newcommand{\nul}{\operatorname{Nul}}
\newcommand{\nullity}{\operatorname{nullity}}
\newcommand{\ord}{\operatorname{ord}}
\newcommand{\proj}{\operatorname{proj}}
\newcommand{\rank}{\operatorname{rank}}
\newcommand{\red}{\operatorname{red}}
\newcommand{\bbref}{\operatorname{rref}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\trunc}{\operatorname{Trunc}}
\newcommand{\vspan}{\operatorname{span}}

%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%
%
% Environment styles

\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem*{prop*}{Proposition}
\newtheorem*{cor*}{Corollary}
\newtheorem*{lem*}{Lemma}
\newtheorem*{thm*}{Theorem}

\theoremstyle{definition}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{defn}[thm]{Definition}
\newtheorem*{defn*}{Definition}
\newtheorem{claim}[thm]{Claim}
\newtheorem{example}[thm]{Example}
\newtheorem*{conj*}{Conjecture}
\newtheorem*{rd}{Read from the text}
\newenvironment{answer}{\noindent\textsc{Answer:}}{\hfill $\square$}

\newcounter{homework}
\newtheorem{hw}[homework]{Homework}
\newtheorem*{hw*}{Homework}
\newcounter{exercise}[homework]
\newtheorem{exer}[exercise]{Exercise}
\renewcommand{\theexercise}{\arabic{exercise}}

\theoremstyle{remark}
\newtheorem{remark}[thm]{Remark}
\newtheorem*{remark*}{Remark}
\newtheorem{notation}[thm]{Notation}
\newtheorem*{notation*}{Notation}

\newcounter{sentencecount}
\newcommand{\sen}{\stepcounter{sentencecount}$^{\arabic{sentencecount}}\,$}

\newcommand{\truefalse}{\qquad\textbf{T}\qquad \textbf{F}\quad :\quad}

\title{Math 2001 \\ Quiz 9}
\date{\today}

\begin{document}
\maketitle

\begin{enumerate}
\item 

\begin{multicols}{2}
\begin{enumerate}[label={\bf \Roman*.}]
\item 

\

\begin{tikzpicture}[scale=1.2]
\foreach \x/\y in {1/dots,2/fivepointed stars,3/bricks,4/bricks} {
	\draw (1.3*\x,1.2) node[draw,pattern=\y,inner sep = 6mm] {};
	\draw (1.3*\x,1.2) node[circle,fill=white,inner sep=.5mm,draw] {$s_\x$};
}
\foreach \x/\y in {1/bricks,2/fivepointed stars,3/north west lines,4/dots} {
	\draw (1.3*\x,0) node[draw,pattern=\y,inner sep = 5mm,circle] {};
	\draw (1.3*\x,0) node[circle,fill=white,inner sep=.5mm,draw] {$c_\x$};
}
\end{tikzpicture}

\item
\

\begin{tikzpicture}[scale=1.2]
\foreach \x/\y in {1/north west lines,2/fivepointed stars,3/north west lines,4/dots} {
	\draw (1.3*\x,1.2) node[draw,pattern=\y,inner sep = 6mm] {};
	\draw (1.3*\x,1.2) node[circle,fill=white,inner sep=.5mm,draw] {$s_\x$};
}
\foreach \x/\y in {1/bricks,2/fivepointed stars,3/fivepointed stars,4/dots} {
	\draw (1.3*\x,0) node[draw,pattern=\y,inner sep = 5mm,circle] {};
	\draw (1.3*\x,0) node[circle,fill=white,inner sep=.5mm,draw] {$c_\x$};
}
\end{tikzpicture}
\end{enumerate}
\end{multicols}

Let $P(s_i)$ and $P(c_i)$ denote the pattern on the $i$-th square and circle, respectively. 
\begin{itemize}
\item For each of the following statements, write its contrapositive, negation, and converse where requested. 

\item Additional, identify which diagrams satisfy each statement.
\end{itemize}

\begin{enumerate}[label={\arabic*.}]
\ifthenelse{\boolean{print_solutions}}{}{\setlength{\itemsep}{7mm}}
\item 
\begin{tikzpicture}
\draw (0,0) rectangle (3,1.5);
\node at (1.5,1.2) {Satisfied by};
\begin{solutions}
\node at (1.5,.5) {None};
\end{solutions}
\end{tikzpicture}
For each $i$, $P(c_i)$ is ``bricks," but $P(s_i)$ is not.

\item[] \begin{tikzpicture}
\draw (0,0) rectangle (3,1);
\begin{solutions}
\node at (1.5,.5) {I, II};
\end{solutions}
\end{tikzpicture}
Negation:
\begin{insolutions}
For all $i$, $P(c_i)$ is not ``bricks" or $P(s_i)$ is ``bricks".
\end{insolutions}

\item \begin{tikzpicture}
\draw (0,0) rectangle (3,1);
\begin{solutions}
\node at (1.5,.5) {II};
\end{solutions}
\end{tikzpicture}
If there exists an $i$ such that $P(c_i) = P(s_i)$, then there exists a $j$ such that $j \neq i$ and $P(c_j) = P(s_j)$.

\item[] \begin{tikzpicture}
\draw (0,0) rectangle (3,1);
\begin{solutions}
\node at (1.5,.5) {II};
\end{solutions}
\end{tikzpicture}
Contrapositive:
\begin{insolutions}
If there exists an $i$ such that for all $j$ either $j = i$ or $P(c_j) \neq P(s_j)$, then $P(s_i) \neq P(c_i)$.
\end{insolutions}

\item[] \begin{tikzpicture}
\draw (0,0) rectangle (3,1);
\begin{solutions}
\node at (1.5,.5) {I};
\end{solutions}
\end{tikzpicture}
Negation:
\begin{insolutions}
There exists an $i$ such that $P(c_i) = P(s_i)$, and for all $j$, either $j = i$ or $P(c_j) \neq P(s_j)$.
\end{insolutions}

\item[] \begin{tikzpicture}
\draw (0,0) rectangle (3,1);
\begin{solutions}
\node at (1.5,.5) {II};
\end{solutions}
\end{tikzpicture}
Converse:
\begin{insolutions}
If there exists a $j$ such that $P(c_j) = P(s_j)$, then there exists an $i$ such that $i \neq j$ and $P(s_i) = P(c_i)$.
\end{insolutions}
\end{enumerate}

\vfill
\pagebreak

\item Edit the following proof for its writing only. We will tackle the logic on the next page.
\begin{itemize}
\item Fix all \ifthenelse{\boolean{print_solutions}}{\colorbox{Gold}{spelling}}{spelling} and \ifthenelse{\boolean{print_solutions}}{\colorbox{cyan!50}{punctuation}}{punctuation} errors. 
\item Mark any \ifthenelse{\boolean{print_solutions}}{\colorbox{Gold}{grammatical}}{grammatical} errors. Replace or remove individual words so that the sentences are grammatically correct. Make as few changes as possible and avoid rewriting entire sentences (or the whole proof for that matter.)
\item Correct all notational errors relating to mathematical \ifthenelse{\boolean{print_solutions}}{\colorbox{Pink}{symbols}}{symbols} or \ifthenelse{\boolean{print_solutions}}{\colorbox{Pink}{definitions}}{definitions}.
\end{itemize}

\vspace{2mm}
\hrule

\begin{quote}
Question: Is $\sqrt 4$ irrational? Prove your claim.

\ifthenelse{\boolean{print_solutions}}{\begin{spacing}{1.3}}{\begin{spacing}{2}}
\begin{proof}
We prove (by contradiction) that $\sqrt 4$ is irrational. 

Assume $\sqrt 4$ is rational\comma that is\comma
\begin{align}\label{eq:1}
\sqrt 4 = \frac{a}{b}\comma \atext{\ctex{where $a, b \in \bbz$}\period}
\end{align}
Assume \ctypo{\sout{if}}
\begin{inremarks}
[further that]
\end{inremarks}
\ctex a does not share a common factor with $b$\period \ctypo{\sout{because}}
\ctex{\sout{$a \mid b$}} 
\begin{inremarks}
[In other words, $a/b$]
\end{inremarks}
is a reduced fraction. Then by clearing denominators and squaring\comma equation \eqref{eq:1} \ctypo{\sout{equals}}
\begin{inremarks}
[is equivalent to]
\end{inremarks}
\begin{align}\label{eq:2}
a^2 = 4b^2\period
\end{align}
\ctypo so $a^2$ is even\comma and
\begin{inremarks}
[therefore $a$ is even. Hence]
\end{inremarks}
\ctypo{\sout{it}} $\ctex{$a$}=2c$\comma \ctex{for some $c \in \bbz$}. \ctypo{\sout{Rewording}}
\begin{inremarks}
[Substituting]
\end{inremarks}
\ctypo{\sout{this}}
\begin{inremarks}
[$a = 2c$]
\end{inremarks}
into \ctypo{\sout{the}} equation
\begin{inremarks}
[\eqref{eq:2} yields]
\end{inremarks}
\begin{align}
4c^2 = 4b^2\comma
\end{align}
so $c=\ctex{$\pm$}b$. \ctypo{\sout{To get a contradiction see}}
\begin{inremarks}
[Note]
\end{inremarks}
that \ctex a and \ctex b share a common factor: \ctex c. Specifically\comma $c\mid b$ because $1 \cdot c = b$\comma and $c\mid a$ \ctypo{becuase} $2\cdot c = a$. 
\begin{inremarks}
[The fact that]
\end{inremarks}
$c \mid a$ and $c \mid b$ \sout{which is a contradiction to the statement \ctex{\sout{$a \mid b$}}}
\begin{inremarks}
[contradicts the assumption that $a/b$]
\end{inremarks}
is reduced.

Thus \ctypo{\sout{proofing}} \sout{that} $\sqrt 4$ is irrational.
\end{proof}
\end{spacing}
\end{quote}

\begin{remarks}
The majority of the errors are somewhat minor: word choice, sentence structure, spelling errors. But there are also a number of (what I would consider) significant mistakes.
\begin{itemize}
\item Failing to declare that $a$, $b$, and $c$ are integers.
\item Missing steps and lack of justification, particularly in the middle of the argument.
\item Use of ambiguous terms: ``\emph{it} equals $2c$. Rewording \emph{this} into \emph{the equation}..."
\item Mistaking $a \mid b$ for $\frac{a}{b}$.
\end{itemize}
All told, there are about eight significant errors and another 20 or so minor ones.
\end{remarks}

\pagebreak

\item 

\textit{Proof style:} (circle one) \qquad direct \qquad contrapositive \qquad \framebox{contradiction}

\textit{Assumptions:} On what assumptions is the author basing his/her argument? (What are the starting assumptions?)

\ifthenelse{\boolean{print_solutions}}{}{\vspace{1.5in}}

\begin{solutions}
The author assumes that $\sqrt 4$ is rational, and that $\sqrt 4 = a/b$, where $a/b$ is a fully reduced fraction.
\end{solutions}

\textit{Outline:} For each line, cite the appropriate theorem, definition, etc. which justifies the step. If the step is the result of a simple algebraic manipulation, write ``alg" for the justification. If the statement does not logically follow from the previous line, write ``$*$" for the justification. 

\begin{minipage}{.8\textwidth}
\begin{spacing}{2}
\begin{align*}
\hline
&\sqrt 4 = \frac{a}{b} &&\implies \qquad 4b^2 = a^2 &&\ifthenelse{\boolean{print_solutions}}{\atext{( \color{blue} alg. )}}{\atext{(\hspace{3.5in})}}\\
&&&\implies \qquad a^2 \text{ is even} &&\ifthenelse{\boolean{print_solutions}}{\atext{( \color{blue} def. of even, $a^2 = 2(2b^2)$, assuming $a, b \in \bbz$ )}}{\atext{(\hspace{3.5in})}}\\
&&&\implies \qquad a \text{ is even} &&\atext{( proved in class )}\\
&&&\implies \qquad a = 2c &&\ifthenelse{\boolean{print_solutions}}{\atext{( \color{blue} (where $c \in \bbz$) def. of even )}}{\atext{(\hspace{3.5in})}}\\
&&&\implies \qquad 4b^2 = 4c^2 &&\ifthenelse{\boolean{print_solutions}}{\atext{( \color{blue} alg. )}}{\atext{(\hspace{3.5in})}}\\
&&&\implies \qquad b = c&&\ifthenelse{\boolean{print_solutions}}{\atext{( \color{blue} alg. (actually, $b = \pm c$) )}}{\atext{(\hspace{3.5in})}}\\
\hline
&a = 2c &&\implies \qquad c \mid a &&\ifthenelse{\boolean{print_solutions}}{\atext{( \color{blue} def. of divides )}}{\atext{(\hspace{3.5in})}}\\
\hline
&b = c &&\implies \qquad c \mid b &&\ifthenelse{\boolean{print_solutions}}{\atext{( \color{blue} def. of divides )}}{\atext{(\hspace{3.5in})}}\\
\hline
&c \mid a \text{ and } c \mid b &&\contradiction &&\ifthenelse{\boolean{print_solutions}}{\atext{( \color{blue} $a$ and $b$ share a factor, so $a/b$ is not reduced * )}}{\atext{(\hspace{3.5in})}}\\
\hline
\end{align*}
\end{spacing}
\end{minipage}

\vspace{-20mm}
\textit{Unjustified statements:} For each ``$*$", explain why this is a logical gap or gaffe. You do not have to correct the error, just explain why it is an error.

\begin{solutions}
Although the argument is a bit sloppy and light on details, the argument is logically sound. That is, it is sound until the final line. The ``contradiction" is not actually a contradiction...
\end{solutions}
\end{enumerate}

\end{document}