\documentclass{article}
\usepackage{hyperref}

\begin{document}
\flushleft \underline{Homework 1 -- MATH 2510 Spring 2018}
\begin{enumerate}
\item Let $X=\{1,2,3\}$, $Y=\{2,3,4\}$, and $Z=\{1,2,3,5,7\}$. 

\begin{enumerate}
\item Is $2 \in X$? Is $2 \in Y$? Is $2 \in Z$?

\item Is $X \subseteq Y$? Is $X \subseteq Z$? Is $Y \subseteq Z$? Is $Z \subseteq X$? Is $Z \subseteq Y$?

\item  What is $X \cup Y$? What is $X \cup Z$? What is $Y \cup Z$? What is $X \cup Y \cup Z$?

\item What is $X \cap Y$? What is $X \cap Z$? What is $Y \cap Z$? What is $X \cap Y \cap Z$? 

\item What is $X \times Y$?

\end{enumerate}

\item Let $X=\{1,2,3\}$ and $Y=\{4,5,6\}$. Let $R \subset X \times Y$ be a relation given by $R = \{(1,5), (1,6), (2,6), (3, 6)\}$. Is $R$ a function? Why or why not?

\item Is the following string of symbols a formula of propositional logic? 
$$(A \wedge B) \wedge ((\neg A) \wedge B)$$

\item Is the following string of symbols a formula of propositional logic? 
$$(A \wedge \neg) \wedge (A \wedge (B \wedge \neg A)).$$

\item Prolog exercise. Consider the Prolog code \texttt{family.pl} at \\
\href{https://github.com/tomcuchta/math2510spring2018/blob/master/family.pl}{https://github.com/tomcuchta/math2510spring2018/blob/master/family.pl}. Copy this code to \href{https://swish.swi-prolog.org/}{SWISH}. 
\begin{enumerate}
\item What code do you run to check if Bob is a sibling of Joe? What is the result when it is run? 
\item What code do you run to check if Tim is a sibling of Alice? What is the result when it is run?
\item What code can you use to define the "brother of" relation?
\item What code can you use to define the "uncle of" relation? 
\end{enumerate}
\end{enumerate}
\end{document}