\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 =.5in]{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{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}
%\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{yellow}{#1}\hspace{-1mm}}
\newcommand{\ctex}[1]{\colorbox{Gold}{#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}}

%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%
%
% 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}

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

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

\begin{document}
\maketitle

\begin{enumerate}[label={\arabic*.)}]
\item (1 pt) Write your name in the top \emph{right} corner of the page.
\item (8 pts) Give the precise definition of each of the following terms. Your answers must be a complete sentence (or sentences).

\begin{enumerate}
\ifthenelse{\boolean{print_solutions}}{\setlength{\itemsep}{0mm}}{\setlength{\itemsep}{20mm}}
\item Finite set

\begin{solutions}
A \emph{finite set} is a set that contains finitely many (distinct) elements.
\end{solutions}

\item Union

\begin{solutions}
Given two sets $A$ and $B$, the \emph{union} of $A$ and $B$ is the set of all elements that are in $A$ or in $B$ (or in both sets). In set builder notation, 
\begin{align*}
A \cup B = \{x : x \in A \text{ or } x \in B\}.
\end{align*}
\end{solutions}

\item Finite union

\begin{solutions}
A \emph{finite union} is the union of finitely many sets. 

Given a finite list of sets, $A_1, A_2, \dotsc, A_n$, the union of these sets is
\begin{align*}
\bigcup_{i=1}^n A_i = \{x : x \in A_i \text{ for some } i \in \bbz, \text{ where } 1 \le i \le n\}.
\end{align*}
\end{solutions}

\item Set difference

\begin{solutions}
Given two sets $A$ and $B$, the \emph{difference} of $A$ and $B$ is the set of all elements that are in $A$ but not in $B$. In set builder notation, 
\begin{align*}
A - B = \{x : x \in A \text{ and } x \notin B\}.
\end{align*}
\end{solutions}

\ifthenelse{\boolean{print_solutions}}{\vspace{0mm}}{\vspace{20mm}}
\end{enumerate}

\item (2 pts) Give an expression that describes the shaded region.

\begin{tikzpicture}
\fill[gray!50] (-1.2,-1.2) rectangle (2.2,2.1);
\fill[white] (-60:1) arc (-60:-240:1)
	arc (180:-0:1)
	arc (60:-120:1)
	arc (-60:60:1)
	arc (120:240:1);
\draw (-1.2,-1.2) rectangle (2.2,2.1)
	(-.9,1.8) node {$U$}
	(0,0) circle (1cm)
	+(210:.5) node {$B$}
	+(60:1) circle (1cm)
	++(60:1)+(90:.5) node {$A$}
	(1,0) circle (1cm)
	+(-30:.5) node {$C$};
\end{tikzpicture}

\begin{solutions}
$\overline{A \cup B \cup C} \cup (B \cap C)$
\end{solutions}

\vfill

\pagebreak

\item(6 pts) Let $A_n = \{-n, n\}$, $B_n = [0,n]$, and $C_n = A_n \cup B_n$. Sketch each of the following sets in the $xy$-plane.

\begin{enumerate}
\ifthenelse{\boolean{print_solutions}}{\setlength{\itemsep}{0mm}}{\setlength{\itemsep}{40mm}}
\item $\ds\bigcup_{n=1}^2 (A_n \times B_n)$
\begin{insolutions}
$= (\{-1,1\} \times [0,1]) \cup (\{-2,2\} \times [0,2])$.

\begin{tikzpicture}
\foreach \x in {-2,-1,1,2} {
	\draw[black] (\x,-.1) node[below] {\tiny $\x$} -- (\x,.1);
	}
\foreach \x in {1,2} {
	\draw[black] (-.1,\x) node[left] {\tiny $\x$} -- (.1,\x);
}
\draw[black] (0,-.5) -- (0,2.5)
	(-2.5,0) -- (2.5,0);
\draw[line width = .5mm] (-2,0) -- (-2,2)
	(-1,0) -- (-1,1)
	(1,0) -- (1,1)
	(2,0) -- (2,2);
\end{tikzpicture}
\end{insolutions}

\item $\ds \left(\bigcup_{n=1}^2 A_n\right) \times B_2$
\begin{insolutions}
$= (\{-1,1\} \cup \{-2,2\}) \times [0,2] = \{-2,-1,1,2\} \times [0,2]$.

\begin{tikzpicture}
\foreach \x in {-2,-1,1,2} {
	\draw[black] (\x,-.1) node[below] {\tiny $\x$} -- (\x,.1);
	}
\foreach \x in {1,2} {
	\draw[black] (-.1,\x) node[left] {\tiny $\x$} -- (.1,\x);
}
\draw[black] (0,-.5) -- (0,2.5)
	(-2.5,0) -- (2.5,0);
\foreach \x in {-2,-1,1,2} {
	\draw[line width = .5mm] (\x,0) -- (\x,2);
}
\end{tikzpicture}
\end{insolutions}

\item[(c.i)] $\ds \bigcup_{n \in A_2} (C_n \times B_n)$
\begin{insolutions}
$= ((\{-2,2\} \cup [0,-2])\times [0,-2]) \cup ((\{-2,2\} \cup [0,2])\times [0,2])$

\hspace{10mm}$= (\{-2\} \cup [0,2]) \times [0,2]$.

\begin{tikzpicture}
\foreach \x in {-2,-1,1,2} {
	\draw[black] (\x,-.1) node[below] {\tiny $\x$} -- (\x,.1);
	}
\foreach \x in {1,2} {
	\draw[black] (-.1,\x) node[left] {\tiny $\x$} -- (.1,\x);
}
\draw[black] (0,-.5) -- (0,2.5)
	(-2.5,0) -- (2.5,0);
\filldraw (0,0) rectangle (2,2);
\draw[line width = .5mm] (-2,0) -- (-2,2);
\end{tikzpicture}
\end{insolutions}

\item[(c.ii)] $\ds \bigcup_{n \in A_2} (C_n \times A_n)$
\begin{insolutions}
$= ((\{-2,2\} \cup [0,-2])\times \{-2,2\}) \cup ((\{-2,2\} \cup [0,2])\times \{-2,2\})$

\hspace{10mm} $= (\{-2\} \cup [0,2]) \times \{-2,2\}$.

\begin{tikzpicture}
\foreach \x in {-2,-1,1,2} {
	\draw[black] (\x,-.1) node[below] {\tiny $\x$} -- (\x,.1);
	\draw[black] (-.1,\x) node[left] {\tiny $\x$} -- (.1,\x);
	}
\draw[black] (0,-2.5) -- (0,2.5)
	(-2.5,0) -- (2.5,0);
\foreach \y in {-2,2} {
	\filldraw (-2,\y) circle (2pt);
	\draw[line width = .5mm] (0,\y) -- (2,\y);
}
\end{tikzpicture}
\end{insolutions}

\end{enumerate}


\end{enumerate}

\end{document}