% 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}
\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 \#2\answer{ solutions}}
\rhead{\answer{YOUR NAME HERE}}
\lfoot{}
\cfoot{Page \thepage\ of \pageref{LastPage}}
\rfoot{{\bf due January 26, 2017}}

% 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}
\begin{enumerate}
\item \question{Produce truth tables for each of the following statements; if the truth table describes a tautology or contradiction, say so.}
  \begin{enumerate}
  \item \question{$(P\vee Q)\rightarrow\neg Q$.}

    \answer{
      \begin{tabular}{|c|c||c|c|c|}\hline
        $P$&$Q$&$P\vee Q$&$\neg Q$&$(P\vee Q)\rightarrow \neg Q$\\\hline\hline 
        T&T&T&F&F\\\hline
        T&F&T&T&T\\\hline
        F&T&T&F&F\\\hline
        F&F&F&T&T\\\hline
      \end{tabular}

      Note that this is neither a tautology nor a contradiction.
    }

  \item \question{$[(P\rightarrow Q)\wedge (Q\rightarrow R)]\rightarrow (P\rightarrow R)$.}

    \answer{
      \begin{tabular}{|c|c|c||c|c|c|c|c|}\hline
        $P$&$Q$&$R$&$P\rightarrow Q$&$Q\rightarrow R$&$(P\rightarrow Q)\wedge (Q\rightarrow R)$&$P\rightarrow R$&---$\rightarrow$---\\\hline\hline
        T&T&T&T&T&T&T&T\\\hline
        T&T&F&T&F&F&F&T\\\hline
        T&F&T&F&T&F&T&T\\\hline
        T&F&F&F&T&F&F&T\\\hline
        F&T&T&T&T&T&T&T\\\hline
        F&T&F&T&F&F&T&T\\\hline
        F&F&T&T&T&T&T&T\\\hline
        F&F&F&T&T&T&T&T\\\hline
      \end{tabular}

      Since the final statement is always true, this is a tautology
      (it is also known as the \emph{law of syllogism}).}
  \end{enumerate}

\item \question{Demonstrate, using a truth table or any other
    technique, that the statements $(P\vee Q)\wedge R$ and $(P\wedge
    R)\vee (Q\wedge R)$ are logically equivalent.}

  \answer{You can build either a single truth table for $[(P\vee
    Q)\wedge R]\leftrightarrow[(P\wedge R)\vee (Q\wedge R)]$ and show
    it is tautological, or build truth tables for the two statements
    $(P\vee Q)\wedge R$ and $(P\wedge R)\vee (Q\wedge R)$, and
    demonstrate that they have the same profile of eight possible
    truth values; we shall do the second, although these two different
    approaches are roughly equal amounts of work.

    \begin{tabular}{|c|c|c||c|c|}\hline
      $P$&$Q$&$R$&$P\vee Q$&$(P\vee Q)\wedge R$\\\hline\hline
      T&T&T&T&T\\\hline
      T&T&F&T&F\\\hline
      T&F&T&T&T\\\hline
      T&F&F&T&F\\\hline
      F&T&T&T&T\\\hline
      F&T&F&T&F\\\hline
      F&F&T&F&F\\\hline
      F&F&F&F&F\\\hline
    \end{tabular}\qquad
    \begin{tabular}{|c|c|c||c|c|c|}\hline
      $P$&$Q$&$R$&$P\wedge R$&$Q\wedge R$&$(P\wedge R)\vee(Q\wedge R)$\\\hline\hline
      T&T&T&T&T&T\\\hline
      T&T&F&F&F&F\\\hline
      T&F&T&T&F&T\\\hline
      T&F&F&F&F&F\\\hline
      F&T&T&F&T&T\\\hline
      F&T&F&F&F&F\\\hline
      F&F&T&F&F&F\\\hline
      F&F&F&F&F&F\\\hline
    \end{tabular}
    
    And, as predicted above, these two tables have identical last columns
  }
  
\item \question{The following four propositions are taken from a work
    of Lewis Carroll's. Translate each into a symbolic quantified
    statement (i.e. a statement using either the universal
    quantifier $\forall$ or the existential quantifier $\exists$) using the
    following names for sets and open statements:
    \begin{itemize}
    \item $U$: the set of all books
    \item $B(x)$: the statement ``book $x$ is bound.''
    \item $R(x)$: the statement ``book $x$ is recommended for reading.''
    \item $G(x)$: the statement ``book $x$ is a romance.''
    \item $H(x)$: the statement ``book $x$ is healthy in tone.''
    \item $W(x)$: the statement ``book $x$ is well-written.''
    \end{itemize}}

    \begin{enumerate}
    \item \question{The only books that I do not recommend for
        reading are unhealthy in tone.}
      
      \answer{We could rephrase this as ``It is generally true that if
        book $x$ is unrecommended, then it is unhealthy'', which
        symbolically is $\forall x\in S, \neg R(x)\rightarrow\neg H(x)$.}
      

    \item \question{The bound books are all well-written.}

      \answer{Rephrasing, we see that ``if a book is bound, then it is
        well written'', or in other words $\forall x\in S,
        B(x)\rightarrow W(x)$.}

    \item \question{All the romances are healthy in tone.}

      \answer{We rephrase as ``if a book is a romance, then it is
        healthy in tone'', or in other words $\forall x\in S,
        G(x)\rightarrow H(x)$.}

    \item \question{I do not recommend you to read any of the unbound books.}

      \answer{A possible rephrasing is ``if a book is unbound, then I
        do not recommend it'', or in other words $\forall x\in S, \neg
        B(x)\rightarrow \neg R(x)$.}
    \end{enumerate}

  \item \question{Based on the quantified statements in the previous
      question, what conclusions could you reach if you knew that the
      book ``The Old Man's Comforts'' is healthy in tone?}

    \answer{We are given that $H(OMC)$ is true here. We know that
      $\forall x\in S, \neg R(x)\rightarrow\neg H(x)$, and
      specifically that $\neg R(OMC)\rightarrow\neg H(OMC)$. We also
      know its contrapositive (which is logically equivalent)
      $H(OMC)\rightarrow R(OMC)$. Since $H(OMC)$ is true, it follows
      that $R(OMC)$ is also true. A similar process applied to
      $\forall x\in S, \neg B(x)\rightarrow \neg R(x)$ tells us that
      $R(OMC)\rightarrow B(OMC)$; since $R(OMC)$ is in fact true, then
      $B(OMC)$ is also true. Finally, because $\forall x\in S,
      B(x)\rightarrow W(x)$, we know specifically that
      $B(OMC)\rightarrow W(OMC)$, and since $B(OMC)$ is true, $W(OMC)$
      is true too. Thus we have demonstrated that the propositions
      $R(OMC)$, $B(OMC)$, and $W(OMC)$ are true, which is to say, that
      ``The Old Man's Comforts'' is recommended, bound, and
      well-written.

      Note that you cannot conclude anything about whether ``The Old
      Man's Comforts'' is a romance.}

\end{enumerate}

\end{document}
