%LaTeX sample file for Foundations Computer Science
%Everything following a % sign on a line is a comment

%The next line specifies the style of document to produce and asks for 11pt type
\documentclass[11pt]{article}

% This package sets all four margins to be 1 inch
\usepackage{fullpage}


% this package changes the paragraph style to skip a line before a new paragraph rather than indenting
\usepackage{parskip}

% these packages are needed to use many mathematical symbols
\usepackage{amsmath,amssymb}

\pagestyle{empty}

\begin{document}
{\bf \noindent Your Name, Your RPI Email \hfill 		Homework 1: Foundations of Computer Science}\\
	
{\bf Problem 1.} 

{\bf Part 1(a).}   Here is an example of a truth table. \\

\begin{tabular}{c|c|c}
$p$ & $q$ & $p \rightarrow q$ \\
\hline
T & T & T \\
\hline
T & F & F \\
\hline
F & T & T \\
\hline
F & F & T
\end{tabular}

You can include text below tables when needed.

% this line adds 0.5 inches of vertical space
\vspace{.5in}

{\bf Part 1(b).} Here is an example of a proposition. \\
\[
(p \land q) \rightarrow (\neg p \lor r)
\]

You can include text below equations when needed.

% this line starts a new page
\newpage

{\bf Problem 2.} Here is one way to format a proof with logical equivalences.

\begin{align*}
\neg(p \rightarrow q)	& \equiv \neg (\neg p \lor q) & \text{by Table 7, 1st equivalence}\\
& \equiv \neg\neg p \land \neg q & \text{by DeMorgan's Law}\\
& \equiv p \land \neg q & \text{by Double Negation Law}
\end{align*}


	
\end{document}
