%!TEX root = forallxyyc.tex
\graphicspath{{figures--tt/}}
\part{Truth tables}
\label{ch.TruthTables}
\addtocontents{toc}{\protect\mbox{}\protect\hrulefill\par}

\chapter{Characteristic truth tables}\label{s:CharacteristicTruthTables}

Any non-atomic sentence of TFL is composed of atomic sentences and one or more logical operators. The truth value of the entire sentence---that is, whether it is true or false---depends on the truth value of the atomic sentences that comprise it. To know the truth value of `$(D \eand E)$', for instance, you need to know the truth value of `$D$', the truth value of `$E$'---that is, you need to know if `$D$' is true or false and if `$E$' is true or false. You also need to know the rule for when a conjunction is true and when it is false.

We introduced five logical operators in chapter \ref{s:TFLConnectives}, and now we need to explain when sentences using each one are true and when they are false. For convenience, we will abbreviate the two truth values, `true' and `false', with `T' and `F'.

\begin{factboxy}{Truth values}
\textit{Truth values} are the logical values that a sentence can have: \textit{true} and \textit{false}.
\end{factboxy}

\paragraph{Conjunction}\label{conjunction-tt}  For any sentences \meta{A} and \meta{B}, the conjunction $(\meta{A} \eand \meta{B})$ is true if and only if both \meta{A} and \meta{B} are true. If one or both of \meta{A} and \meta{B} are false, then the sentence $(\meta{A} \eand \meta{B})$ is false. We can summarize this in the \textit{characteristic truth table for conjunction}:
\begin{center}
\begin{tabular}{d d | f}
\meta{A} & \meta{B} & $\meta{A}\eand\meta{B}$\\
\hline
T & T & T\Tstrut\\
T & F & F\\
F & T & F\\
F & F & F
\end{tabular}
\end{center}

Let's go over what is in a truth table. Above the horizontal line on the right is the sentence we are analyzing . On the left, in alphabetical order, are all of the atomic sentences that appear in the sentence on the right.

Below the horizontal line on the left are different combinations of \textit{true} and \textit{false} for the atomic sentences. On the first line, there is a `T' below \meta{A} and a `T' below \meta{B}. So, this line represents the situation where \meta{A} is true and \meta{B} is true. When \meta{A} is true and \meta{B} is true, $(\meta{A} \eand \meta{B})$ is true, which is given under the `$\eand$' on the right (on line 1).
On line 2, meanwhile, there is a `T' below \meta{A} and an `F' below \meta{B}. Checking the right side, we see that when \meta{A} is true and \meta{B} is false, $(\meta{A}\eand\meta{B})$ is false.

Lines 3 and 4 represent the final two combinations of `true' and `false' for \meta{A} and \meta{B}. On line 3, \meta{A} is false and \meta{B} is true. When that is the case, $(\meta{A} \eand \meta{B})$ is false. And then on line 4, \meta{A} and \meta{B} are both false. In that scenario, $(\meta{A} \eand \meta{B})$ is, again, false.

Note that conjunction is \emph{symmetrical}. The truth value for $\meta{A} \eand \meta{B}$ is always the same as the truth value for $\meta{B} \eand \meta{A}$.

\paragraph{Negation} For any sentence \meta{A}, if \meta{A} is true, then \enot\meta{A} is false. And likewise, if \meta{A} is false, then \enot\meta{A} is true. This is represented in the \textit{characteristic truth table for negation}:
\begin{center}
\begin{tabular}{d | f}
\meta{A} & \enot\meta{A}\\
\hline
T & F\Tstrut\\
F & T
\end{tabular}
\end{center}

\paragraph{Disjunction} Recall that `$\eor$' always represents the inclusive-or. So, for any sentences \meta{A} and \meta{B}, the disjunction $(\meta{A}\eor \meta{B})$ is true when \meta{A} is true or \meta{B} is true or both are true. The only instance when $(\meta{A}\eor \meta{B})$ is false is when both \meta{A} and \meta{B} are false. This is represented in the \textit{characteristic truth table for disjunction}:
\begin{center}
\begin{tabular}{d d | f}
\meta{A} & \meta{B} & $\meta{A}\eor\meta{B}$ \\
\hline
T & T & T\Tstrut\\
T & F & T\\
F & T & T\\
F & F & F
\end{tabular}
\end{center}

This is a good time to explain another point. We are, in this chapter, simply stipulating when each of these types of sentences are true and false. This amounts to a definition for each logical operator in TFL. (Thus, the meaning of `$\eor$' is what is given in the above truth table.)
We have reasons for defining them these ways, and there is a consensus that these are the best definitions. But, in the end, these are the correct truth tables for each logical operator because these are the ways that we have chosen to set them.

Conceivably, we could say that $(\meta{A}\eor \meta{B})$ is false when \meta{A} and \meta{B} are both false \textit{and} when \meta{A} and \meta{B} both are true. That would agree with the way that we, at least some of the time, use \textit{or} in English. But that's not what we've chosen to do, and so the way that $(\meta{A}\eor \meta{B})$ is defined in the truth table above is going to apply from this point forward (and similarly for all of the other connectives).

\paragraph{Conditional} The conditional is interesting and, for some, philosophically contentious. One way to think about the conditional is as rule: if the antecedent happens, then the consequent has to happen. So, for instance, take this conditional:

\begin{ebullet}
		\item[] If it is Wednesday, then I am on campus by 10:00 am.
	\end{ebullet}

\noindent This sentence is obviously true when (1) it is Wednesday and I am on campus by 10:00 am. Conversely, this sentence is false when (2) it is Wednesday, but I am not on campus by 10:00 am. (If that happens, the rule has been broken.) Those two scenarios are represented by lines 1 and 2 in the characteristic truth table for the conditional, which is as follows.

\begin{center}\label{characteristic-tt-conditional}
\begin{tabular}{d d | f}
\meta{A} & \meta{B} & $\meta{A}\eif\meta{B}$\\
\hline
T & T & T\Tstrut\\
T & F & F\\
F & T & T\\
F & F & T
\end{tabular}
\end{center}

For the other two scenarios, we have to concentrate a bit.

\begin{ebullet}
\item[(3)] Our conditional is also true when it is not Wednesday (let's say it's Tuesday), but I'm on campus by 10:00 am. In this case, the rule \textit{if it is Wednesday, then I am on campus by 10:00 am} hasn't been broken; it just doesn't apply. So, when the antecedent is false and the consequent is true, the conditional is true. That's represented by line 3 of the characteristic truth table for the conditional.
\item[(4)] Similarly, when it is not Wednesday and I am not on campus by 10:00 am, the rule hasn't been broken. It is still in force. It just hasn't been invoked at all. So even though the antecedent didn't happen and the consequent didn't happen, the conditional is still true. (In other words, let's say, it's Saturday and, at 10:00 am, I am at home in bed. It's false that `it is Wednesday' and it's false that `I am on campus by 10:00 am', but it's still true that \textit{if it is Wednesday, then I am on campus by 10:00 am}.) This scenario is represented on line 4 of the characteristic truth table.
\end{ebullet}

Those four scenarios are pretty straightforward. The conditional is philosophically contentious, however, because every conditional is not as simple as `if it is Wednesday, then I am on campus by 10:00 am'. Take a conditional where the antecedent is always false: `if the queen of England is on the moon, then Mississippi State University is in Starkville.' This isn't much of a rule, but it is a conditional. And since the antecedent is false and the consequent is true, the sentence is true. Even stranger, consider this conditional: `if the queen of England is on the moon, then pigs can fly.' Now, the antecedent is always false and the consequent is always false (at least in our world), but, as is shown on line 4 of the characteristic truth table, the sentence is true.

Sometimes the truth values for the antecedent, the consequent, and the whole conditional make sense (as in our first example) and sometimes they seem odd. That has generated philosophical debate, but it actually does not present a problem for us. The conditional is precisely defined by its characteristic truth table. We, then, simply use that definition, and we don't have to make any decisions about whether a particular conditional is odd or should really be true or false.

Finally, notice that, unlike the conjunction and the disjunction, the conditional is \emph{asymmetrical}. You cannot switch the antecedent and consequent without changing the meaning of the sentence. This is because $\meta{A}\eif\meta{B}$ (`if it is Wednesday, then I am on campus by 10:00 am') has a different truth table than $\meta{B}\eif\meta{A}$ (`if I am on campus by 10:00 am, then it is Wednesday').

\paragraph{Biconditional}\label{biconditional-2} As we said in section \ref{s:biconditional-1}, the biconditional is equivalent to the conjunction of a conditional running in each direction---that is, to $(\meta{A} \eif \meta{B}) \eand (\meta{A}\eif\meta{B})$. Consequently, on every line where both $\meta{A}\eif\meta{B}$ is true and $\meta{B}\eif\meta{A}$ is true, $\meta{A}\eiff\meta{B}$ is true. On every line where either $\meta{A}\eif\meta{B}$ is false or $\meta{B}\eif\meta{A}$ is false, $\meta{A}\eiff\meta{B}$ is false. That yields the following characteristic truth table for the biconditional.

\begin{center}
\begin{tabular}{d d | f}
\meta{A} & \meta{B} & $\meta{A}\eiff\meta{B}$\\
\hline
T & T & T\Tstrut\\
T & F & F\\
F & T & F\\
F & F & T
\end{tabular}
\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Complete truth tables}
\label{s:CompleteTruthTables}

In chapter \ref{s:CharacteristicTruthTables}, we examined the characteristic truth table for each connective. Those truth tables show us when a sentence with the logical operator as the main connective is true and when it is false. That, in effect, is a definition for each logical operator. Now that we have those definitions, we can investigate when other, more complex sentences are true and false---for instance, ones like `$(H\eand I)\eif H$' and `$(M \eand (N \eor P))$', which we will go through in this chapter. Once we understand how to create truth tables, we can investigate other properties of sentences of TFL, which we will do in chapters \ref{s:SemanticConcepts} and \ref{c:tt-validity}.

Before we begin, we will define \define{valuation}.

\begin{factboxy}{Valuation}
A \textit{valuation} is any assignment of truth values to particular atomic sentences of TFL. Each row of a truth table represents a possible valuation. The entire truth table represents all possible valuations.
\end{factboxy}

\noindent Thus, the truth table provides us with a way of finding the truth values of complex sentences on each possible valuation---that is, for every combination of `true' and `false' for every atomic sentence.

\section{An example}\label{s:tt-example}
Consider the sentence `$(H\eand I)\eif H$', which contains three atomic sentences, although only two different ones. We set up the truth table for this sentence by putting $H$ and $I$ on the left side of the vertical line and `$(H\eand I)\eif H$' on the right. (Although $H$ appears twice in `$(H\eand I)\eif H$', we only need one $H$ on the left.) Below the $H$ and $I$ on the left side, we put every combination of `T' and `F'.

Since we have two atomic sentences on the left, there are four combinations of true and false. For consistency, the Ts and Fs should always be listed this way: (a) in the column next to the vertical line, they alternate T, F, T, F; (b) in the next column (to the left), they alternate in pairs: T, T, F, F; and (c) if there are more than two atomic sentences, then more columns and more rows are needed, but the pattern remains the same.
\begin{center}
\begin{tabular}{d d | f e e e e}
$H$&$I$&$(H$&\eand&$I)$&\eif&$H$\\
\hline
 T & T\Tstrut\\
 T & F\\
 F & T\\
 F & F
\end{tabular}
\end{center}

Once the left side of the truth table is completed, we begin filling in the right side. First, we copy the truth values for the atomic sentences. For the $H$, that gives us this:
\begin{center}
\begin{tabular}{d d | f e e e e}
$H$&$I$&$(H$&\eand&$I)$&\eif&$H$\\
\hline
 T & T & {T} & &  & & {T}\Tstrut\\
 T & F & {T} & &  & & {T}\\
 F & T & {F} & &  & & {F}\\
 F & F & {F} & &  & & {F}
\end{tabular}
\end{center}
Adding the truth values for $I$, we have this:
\begin{center}
\begin{tabular}{d d | f e e e e}
$H$&$I$&$(H$&\eand&$I)$&\eif&$H$\\
\hline
 T & T & {T} & & {T} & & {T}\Tstrut\\
 T & F & {T} & & {F} & & {T}\\
 F & T & {F} & & {T} & & {F}\\
 F & F & {F} & & {F} & & {F}
\end{tabular}
\end{center}

Now , there are two  columns that remain. The one under the `$\eand$' and the one under the `$\eif$'. `$(H\eand I)\eif H$', is a conditional. Therefore, the `\eif' is the main logical operator, and the column under the `\eif' will be filled in last. So, right now, we focus on `$(H\eand I)$'. This is a conjunction, and to determine the truth values  for just this sub-sentence, we turn to the characteristic truth table for conjunction. As is shown on p.~\pageref{conjunction-tt}, when `$H$' and `$I$' are both true, we put a `T' below the `$\eand$'.

\begin{center}
\begin{tabular}{d d | f e e e e}
$\textcolor{light-gray}{H}$&$\textcolor{light-gray}{I}$&$(H$&\eand&$I)$&\textcolor{light-gray}{\eif}&\textcolor{light-gray}{$H$}\\
\hline
 \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & T & \textbf{\textcolor{red2}{T}} & T & & \textcolor{light-gray}{T}\Tstrut\\
 \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & \textcolor{light-gray}{T} &  & \textcolor{light-gray}{F} & & \textcolor{light-gray}{T}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & \textcolor{light-gray}{F} &  & \textcolor{light-gray}{T} & & \textcolor{light-gray}{F}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} &  & \textcolor{light-gray}{F} & & \textcolor{light-gray}{F}
\end{tabular}
\end{center}

\noindent On the second line, `$H$' is true and `$I$' is false. That means that `$(H\eand I)$' is false, and so we put `F' on the second line below the `$\eand$'.

\begin{center}
\begin{tabular}{d d | f e e e e}
$\textcolor{light-gray}{H}$&$\textcolor{light-gray}{I}$&$(H$&\eand&$I)$&\textcolor{light-gray}{\eif}&\textcolor{light-gray}{$H$}\\
\hline
 \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & T & \textbf{T} & T & & \textcolor{light-gray}{T}\Tstrut\\
 \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & T & \textbf{\textcolor{red2}{F}} & F & & \textcolor{light-gray}{T}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & \textcolor{light-gray}{F} &  & \textcolor{light-gray}{T} & & \textcolor{light-gray}{F}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} &  & \textcolor{light-gray}{F} & & \textcolor{light-gray}{F}
\end{tabular}
\end{center}

\noindent Following the characteristic truth table for conjunction, we fill in the truth values for the third and fourth lines, and that completes the column under the `$\eand$'.

\begin{center}
\begin{tabular}{d d | f e e e e}
$\textcolor{light-gray}{H}$&$\textcolor{light-gray}{I}$&$(H$&\eand&$I)$&\textcolor{light-gray}{\eif}&\textcolor{light-gray}{$H$}\\
\hline
 \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & T & \textbf{T} & T & & \textcolor{light-gray}{T}\Tstrut\\
 \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & T & \textbf{F} & F & & \textcolor{light-gray}{T}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & F & \textbf{\textcolor{red2}{F}} & T & & \textcolor{light-gray}{F}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & F & \textbf{\textcolor{red2}{F}} & F & & \textcolor{light-gray}{F}
\end{tabular}
\end{center}

Now, we complete the truth table by filling in the column under the `$\eif$'. In this conditional, `$(H \eand I)$' is the antecedent and the `$H$' after the `$\eif$' is the consequent. Therefore, we need to look at the truth values below the `\eand' and the `$H$', and we need to refer to the characteristic truth table for the conditional (p.~\pageref{characteristic-tt-conditional}). On the first line, `$(H\eand I)$' is true and `$H$' is true, and so we put a `T' beneath the `\eif'.

\begin{center}
\begin{tabular}{d d | f e e e e}
$\textcolor{light-gray}{H}$&$\textcolor{light-gray}{I}$&$(H$&\eand&$I)$&\eif&$H$\\
\hline
 \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & T & \textcolor{light-gray}{T} & \textbf{\textcolor{red2}{T}} & T\Tstrut\\
 \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & & \textcolor{light-gray}{T}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & & \textcolor{light-gray}{F}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & & \textcolor{light-gray}{F}
\end{tabular}
\end{center}

On the second row, `$(H\eand I)$' is false and `$H$' is true. (That's the scenario on the third line of the characteristic truth table for the conditional (p.~\pageref{characteristic-tt-conditional}), not the second.) A conditional is true when the antecedent is false and  the consequent is true, and so we put a `T' in the second row beneath the `$\eif$'.

\begin{center}
\begin{tabular}{d d | f e e e e}
$\textcolor{light-gray}{H}$&$\textcolor{light-gray}{I}$&$(H$&\eand&$I)$&\eif&$H$\\
\hline
 \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & T & \textcolor{light-gray}{T} & \textbf{T} & T \Tstrut\\
 \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & F & \textcolor{light-gray}{F} & \textbf{\textcolor{red2}{T}} & T\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & & \textcolor{light-gray}{F}\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & & \textcolor{light-gray}{F}
\end{tabular}
\end{center}

\noindent On the third and fourth rows, `$(H\eand I)$' is false and `$H$' is false, and so again, we put `T' below the `\eif' on each line. (On both of these lines, the antecedent is false and the consequent is false, and so these correspond to line four in the characteristic truth table for the conditional.)

\begin{center}
\begin{tabular}{d d | f e e e e}
$\textcolor{light-gray}{H}$&$\textcolor{light-gray}{I}$&$(H$&\eand&$I)$&\eif&$H$\\
\hline
 \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & \textcolor{light-gray}{T} & T & \textcolor{light-gray}{T} & \textbf{T} & T \Tstrut\\
 \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & F & \textcolor{light-gray}{F} & \textbf{T} & T\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{T} & \textcolor{light-gray}{F} & F & \textcolor{light-gray}{T} & \textbf{\textcolor{red2}{T}} & F\\
 \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & \textcolor{light-gray}{F} & F & \textcolor{light-gray}{F} & \textbf{\textcolor{red2}{T}} & F
\end{tabular}
\end{center}

Since the `\eif' is the main logical operator, we've now determine the truth values for this sentence. The column of `T's beneath the `\eif' tells us that the sentence `$(H \eand I)\eif H$' is true regardless of the truth values of `$H$' and `$I$'. Those atomic sentences can be true or false in any combination, and the full sentence, `$(H \eand I)\eif H$', remains true. Since we have considered all four possible assignments of truth and falsity to `$H$' and `$I$', we can say that `$(H \eand I)\eif H$' is true on every \textit{valuation}.

In the truth table for any sentence, the most important column is the one beneath the \emph{main logical operator} for the sentence, since this tells us the truth value of the entire sentence. We have emphasized it in the last truth table above by putting this column in bold. When you work through truth tables yourself, you should similarly emphasize it underlining or circling it.

\section{Building complete truth tables}\label{s:tt-example2}
A \define{complete truth table} has a line for every possible combination of \textit{true} and \textit{false} for the atomic sentences that compose the full sentence. Each line represents a \emph{valuation}, and a complete truth table has a line for all the different valuations.

The size of the complete truth table depends on the number of different atomic sentences in the table. A sentence that contains only one atomic sentence requires only two rows, even if the same letter is repeated many times, as in the sentence
`$[(C\eiff C) \eif C] \eand \enot(C \eif C)$'.
The complete truth table requires only two lines because there are only two possibilities: `$C$' can be true or it can be false. The truth table for this sentence looks like this:
\begin{center}
\begin{tabular}{d | f e e e e e e e e e e e e e e }
$C$&$[($&$C$&\eiff&$C$&$)$&\eif&$C$&$]$&\eand&\enot&$($&$C$&\eif&$C$&$)$\\
\hline
 T &    & T &  T  & T &   & T  & T & &\TTbf{\textcolor{red2}{F}}&  F& &   T &  T  & T & \Tstrut\\
 F &    & F &  T  & F &   & F  & F & &\TTbf{\textcolor{red2}{F}}&  F& &   F &  T  & F &   \\
\end{tabular}
\end{center}
Looking at the column underneath the main logical operator, we see that the sentence is false on both rows of the table; i.e., the sentence is false regardless of whether `$C$' is true or false. In other words, it is false on every valuation.

A sentence that contains two atomic sentences requires four lines for a complete truth table.
A sentence that contains three atomic sentences requires eight lines, as  shown in the table right below. Notice that the `T's and `F's in the columns below `$N$' and `$P$' (on the left side) follow the same pattern as the example in the previous section. The column under the `$M$', meanwhile, has four `T's and then four `F's.
\begin{center}
\begin{tabular}{d d d | f e e e e}
$M$&$N$&$P$&$M$&\eand&$(N$&\eor&$P)$\\
\hline
T & T & T & T & \TTbf{\textcolor{red2}{T}} & T & T & T\Tstrut\\
T & T & F & T & \TTbf{\textcolor{red2}{T}} & T & T & F\\
T & F & T & T & \TTbf{\textcolor{red2}{T}} & F & T & T\\
T & F & F & T & \TTbf{\textcolor{red2}{F}} & F & F & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & \TTbf{\textcolor{red2}{F}} & T & T & T\Tstrut\\
F & T & F & F & \TTbf{\textcolor{red2}{F}} & T & T & F\\
F & F & T & F & \TTbf{\textcolor{red2}{F}} & F & T & T\\
F & F & F & F & \TTbf{\textcolor{red2}{F}} & F & F & F
\end{tabular}
\end{center}
By inspecting this truth table, we can see that `$M\eand (N \eor P)$' can be true or false, depending on the truth values of `$M$', `$N$', and `$P$'.

A complete truth table for a sentence that contains four different atomic sentences requires 16 lines. If the sentence has five different letters, the truth table will have 32 lines. If it has six letters, it will have 64 lines, and so on. The rule here is this: for $n$ different atomic sentences, the truth table for the sentence must have $2^n$ lines.

\begin{table*}\centering\sffamily\footnotesize
\ra{1.4}
\begin{tabular}{@{}l l@{}}
\textth{the left side of the truth table}			& \\\toprule
\textth{column} & 	\textth{pattern} \\\midrule
first (next to the vertical line)	& T, F, T, F, \ldots\\
second 	& T, T, F, F, \ldots  	\\
third		& T, T, T, T, F, F, F, F, \ldots  \\
fourth 		& 8 Ts, 8 Fs, \dots 	\\
fifth		& 16 Ts, 16 Fs, \dots \\
\bottomrule
\end{tabular}
\caption{Every truth table for the same sentence should be the same. To ensure that they are, the columns on the left side of the truth table should be filled in using the patterns given in this table. The first column is the one closest to the vertical line.}\label{xxx}
\end{table*}

% But whether a truth table has four lines or 64 lines, every truth table for the same sentence should be the same. Hence, the columns on the left side have to be set as follows. Below the last letter (the one next to the vertical line), alternate between `T' and `F'. In the next column to the left, write two `T's, then two `F's, and repeat. For the third atomic sentence, write four `T's followed by four `F's. This yields an eight line truth table like the one above. For a 16 line truth table, the next column of atomic sentences should have eight `T's followed by eight `F's. For a 32 line table, the next column would have 16 `T's followed by 16 `F's, and so on.

\section{Some more examples}

\begin{earg}
\item[\ex{9.3.1}] To create a truth table for `$(P \eiff Q) \eif (P \eor Q)$', first, we fill in the columns below each $P$ and $Q$. Next, we fill in the columns under the `$\eiff$' and the `$\eor$' (in either order).
\begin{center}
\begin{tabular}{d d | f e e e e e e}
$P$ &$Q$&  ($P$& $\eiff$& $Q$)& $\eif$& ($P$& $\eor$& $Q$)\\
\hline
T& T&      \textcolor{light-gray}{T}& T&  \textcolor{light-gray}{T}&   &   \textcolor{light-gray}{T}& T& \textcolor{light-gray}{T}\Tstrut\\
T& F&      \textcolor{light-gray}{T}& F&  \textcolor{light-gray}{F}&   &   \textcolor{light-gray}{T}& T& \textcolor{light-gray}{F}\\
F& T&      \textcolor{light-gray}{F}& F&  \textcolor{light-gray}{T}&   &   \textcolor{light-gray}{F}& T& \textcolor{light-gray}{T}\\
F& F&      \textcolor{light-gray}{F}& T&  \textcolor{light-gray}{F}&   &   \textcolor{light-gray}{F}& F&  \textcolor{light-gray}{F}\\
\end{tabular}
\end{center}
Once we have those columns complete, we finish the truth table by filling in the column under the `$\eif$', which we do by looking at the column under the `$\eiff$' and the column under the `$\eor$'.
\begin{center}
\begin{tabular}{d d | f e e e e e e}
$P$ &$Q$&  ($P$& $\eiff$& $Q$)& $\eif$& ($P$& $\eor$& $Q$)\\
\hline
T& T&      \textcolor{light-gray}{T}& T&  \textcolor{light-gray}{T}&   \TTbf{\textcolor{red2}{T}}&   \textcolor{light-gray}{T}& T& \textcolor{light-gray}{T}\Tstrut\\
T& F&      \textcolor{light-gray}{T}& F&  \textcolor{light-gray}{F}&   \TTbf{\textcolor{red2}{T}}&   \textcolor{light-gray}{T}& T& \textcolor{light-gray}{F}\\
F& T&      \textcolor{light-gray}{F}& F&  \textcolor{light-gray}{T}&   \TTbf{\textcolor{red2}{T}}&   \textcolor{light-gray}{F}& T& \textcolor{light-gray}{T}\\
F& F&      \textcolor{light-gray}{F}& T&  \textcolor{light-gray}{F}&   \TTbf{\textcolor{red2}{F}}&   \textcolor{light-gray}{F}& F&  \textcolor{light-gray}{F}\\
\end{tabular}
\end{center}

\item[\ex{9.3.2}]To make a truth table for `$P \eand \enot Q$', after we have filled in the columns below the $P$ and $Q$, we fill in the column under the $\enot$. To do that, we look at the column under the $Q$.
\begin{center}
\begin{tabular}{d d | f e e e}
$P$& $Q$&  ($P$& $\eand$& $\enot$& $Q$)\\
\hline
T& T&    \textcolor{light-gray}{T}& & \TTbf{F}& T\Tstrut\\
T& F&    \textcolor{light-gray}{T}& & \TTbf{T}& F\\
F& T&    \textcolor{light-gray}{F}& & \TTbf{F}& T\\
F& F&    \textcolor{light-gray}{F}& & \TTbf{T}& F\\
\end{tabular}
\end{center}
Then, to complete the truth table, we fill in the column under the `$\eand$'---which we do by looking at the column under the $P$ and the column under the `$\enot$'.
\begin{center}
\begin{tabular}{d d | f e e e}
$P$& $Q$&  ($P$& $\eand$& $\enot$& $Q$)\\
\hline
T& T&    T& \TTbf{\textcolor{red2}{F}}& F& \textcolor{light-gray}{T}\Tstrut\\
T& F&    T& \TTbf{\textcolor{red2}{T}}& T& \textcolor{light-gray}{F}\\
F& T&    F& \TTbf{\textcolor{red2}{F}}& F& \textcolor{light-gray}{T}\\
F& F&    F& \TTbf{\textcolor{red2}{F}}& T& \textcolor{light-gray}{F}\\
\end{tabular}
\end{center}

\item[\ex{9.3.3}]For `$\enot(P \eif Q)$', after we have filled in the columns under the `$P$' and the `$Q$', we fill in the column under the `$\eif$'.
\begin{center}
\begin{tabular}{d d | f e e e}
$P$& $Q$& $\enot$& ($P$& $\eif$& $Q$)\\
\hline
T& T&  &   \textcolor{light-gray}{T}& T& \textcolor{light-gray}{T}\Tstrut\\
T& F&  &   \textcolor{light-gray}{T}& F& \textcolor{light-gray}{F}\\
F& T&  &   \textcolor{light-gray}{F}& T& \textcolor{light-gray}{T}\\
F& F&  &   \textcolor{light-gray}{F}& T& \textcolor{light-gray}{F}\\
\end{tabular}
\end{center}
Then, to complete the table, we fill in the column under the `$\enot$'. To fill in that column, we look at the column under the `$\eif$'.
\begin{center}
\begin{tabular}{d d | f e e e}
$P$& $Q$& $\enot$& ($P$& $\eif$& $Q$)\\
\hline
T& T&  \TTbf{\textcolor{red2}{F}}&   \textcolor{light-gray}{T}& T& \textcolor{light-gray}{T}\Tstrut\\
T& F&  \TTbf{\textcolor{red2}{T}}&   \textcolor{light-gray}{T}& F& \textcolor{light-gray}{F}\\
F& T&  \TTbf{\textcolor{red2}{F}}&   \textcolor{light-gray}{F}& T& \textcolor{light-gray}{T}\\
F& F&  \TTbf{\textcolor{red2}{F}}&   \textcolor{light-gray}{F}& T& \textcolor{light-gray}{F}\\
\end{tabular}
\end{center}

\item[\ex{9.3.4}]In `$(P \eand \enot Q) \eor Q$', the `$\eor$' is the main logical operator, and so we will fill in the column under it last. First (after we have filled in the columns under the `$P$' and the `$Q$'), we fill in the column under the `$\enot$'.
\begin{center}
\begin{tabular}{d d | f e e e e e}
$P$& $Q$&   ($P$& $\eand$& $\enot$& $Q$)& $\eor$& $Q$\\
\hline
T& T&      \textcolor{light-gray}{T}& & F& \textcolor{light-gray}{T}&   & \textcolor{light-gray}{T}\Tstrut\\
T& F&      \textcolor{light-gray}{T}& & T& \textcolor{light-gray}{F}&   & \textcolor{light-gray}{F}\\
F& T&      \textcolor{light-gray}{F}& & F& \textcolor{light-gray}{T}&   & \textcolor{light-gray}{T}\\
F& F&      \textcolor{light-gray}{F}& & T& \textcolor{light-gray}{F}&   & \textcolor{light-gray}{F}\\
\end{tabular}
\end{center}
Next, while looking at the column under the `$P$' and under the `$\enot$', we fill in the column under the `$\eand$'.
\begin{center}
\begin{tabular}{d d | f e e e e e}
$P$& $Q$&   ($P$& $\eand$& $\enot$& $Q$)& $\eor$& $Q$\\
\hline
T& T&      T& \TTbf{F}& F& \textcolor{light-gray}{T}&   & \textcolor{light-gray}{T}\Tstrut\\
T& F&      T& \TTbf{T}& T& \textcolor{light-gray}{F}&   & \textcolor{light-gray}{F}\\
F& T&      F& \TTbf{F}& F& \textcolor{light-gray}{T}&   & \textcolor{light-gray}{T}\\
F& F&      F& \TTbf{F}& T& \textcolor{light-gray}{F}&   & \textcolor{light-gray}{F}\\
\end{tabular}
\end{center}
Then last, we fill in the column under the `$\eor$' while looking at the column under the `$\eand$' and under the `$Q$'.
\begin{center}
\begin{tabular}{d d | f e e e e e}
$P$& $Q$&   ($P$& $\eand$& $\enot$& $Q$)& $\eor$& $Q$\\
\hline
T& T&      \textcolor{light-gray}{T}& F& \textcolor{light-gray}{F}& \textcolor{light-gray}{T}&   \TTbf{\textcolor{red2}{T}}& T\Tstrut\\
T& F&      \textcolor{light-gray}{T}& T& \textcolor{light-gray}{T}& \textcolor{light-gray}{F}&   \TTbf{\textcolor{red2}{T}}& F\\
F& T&      \textcolor{light-gray}{F}& F& \textcolor{light-gray}{F}& \textcolor{light-gray}{T}&   \TTbf{\textcolor{red2}{T}}& T\\
F& F&      \textcolor{light-gray}{F}& F& \textcolor{light-gray}{T}& \textcolor{light-gray}{F}&   \TTbf{\textcolor{red2}{F}}& F\\
\end{tabular}
\end{center}

\end{earg}

\section{Truth tables in Carnap}\label{s:ttCarnap-intro}

You should practice making truth tables on paper, but you also need to make them using the software package Carnap (https://carnap.io/). Using Carnap is pretty straightforward, and it's made easier because the left side of the truth table is completed for you. (See figure \ref{fig:tt-1}.) On the right side, below each atomic sentence and connective, you have the option of selecting a `T' or an `F'. (See figure \ref{fig:tt-2}.)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[h]
%\makebox[\textwidth][l]{		% lets the table go outside the margins
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=5cm]{tt-1.png}
\subcaption{}
\label{fig:tt-1}
\end{subfigure}
\hspace{.25cm}
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics[width=5cm]{tt-2.png}
\subcaption{}
\label{fig:tt-2}
\end{subfigure}
\caption{}
%}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Most often (although not always), the problems in Carnap will be set up so that you will only be able to submit your answers when they are correct. At those times, once the truth table is complete, you will select `Check'. Carnap will tell you ``Success!'' or ``Something's not quite right.'' It is easy to make a mistake when filling in a truth table, and so if something is not quite right, then you have to inspect every truth value until you find the mistake. Then select `Check' again. Once Carnap confirms that the truth table is correct, select `Submit'. \textbf{Don't forget to submit after you complete every truth table correctly.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{SCfigure}
\centering
\includegraphics[width=5cm]{tt-6a.png}
\caption{A completed and verified truth table in Carnap.}
\label{fig:tt-6}
\end{SCfigure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%  exercises for `Complete truth tables'

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\practiceproblems
\section{Practice exercises}\label{pr.TT.TTorC}
\setcounter{ProbPart}{0}

\problempart
Make a complete truth table for each sentence.
\begin{earg}
\item $A \eif A$ %taut
\item $C \eif\enot C$ %contingent
\item $(A \eiff B) \eiff \enot(A\eiff \enot B)$ %tautology
\item $(A \eif B) \eor (B \eif A)$ % taut
\item $(A \eand B) \eif (B \eor A)$  %taut
\item $\enot(A \eor B) \eiff (\enot A \eand \enot B)$ %taut
\item $\bigl[(A\eand B) \eand\enot(A\eand B)\bigr] \eand C$ %contradiction
\item $[(A \eand B) \eand C] \eif B$ %taut
\item $\enot\bigl[(C\eor A) \eor B\bigr]$ %contingent
\end{earg}

\problempart
Check all the claims made in \S\ref{s:MoreBracketingConventions}. That is, show that each of these statements is true.
\begin{earg}
	\item `$((A \eand B) \eand C)$' and `$(A \eand (B \eand C))$' have the same truth table
	\item `$((A \eor B) \eor C)$' and `$(A \eor (B \eor C))$' have the same truth table
	\item `$((A \eor B) \eand C)$' and `$(A \eor (B \eand C))$' do not have the same truth table
	\item `$((A \eif B) \eif C)$' and `$(A \eif (B \eif C))$' do not have the same truth table
\end{earg}
Also, check whether:
\begin{earg}
	\item[5.] `$((A \eiff B) \eiff C)$' and `$(A \eiff (B \eiff C))$' have the same truth table
\end{earg}

\problempart
Make truth tables for the following sentences, and mark the column that represents the possible truth values for the whole sentence.

\begin{earg}

\item $\enot (N \eiff (P \eif N))$

\item $\enot [(X \eand Y) \eor (X \eor Y)]$

\item $(A \eif B) \eiff (\enot B\eiff \enot A)$

\item $[C \eiff (D \eor E)] \eand \enot C$

\item $\enot(C \eand (B \eand H)) \eiff (C \eor (B \eor H))$

\item	$(D \eand \enot D) \eif G $

\item	$(\enot P \eor \enot R) \eiff R $

\item	$\enot \enot (\enot A \eand \enot B)  $

\item 	$[(D \eand H) \eif J] \eif \enot(D \eor H) $

\item	$\enot [(D \eiff F) \eiff G] \eif (\enot D \eand F) $

\end{earg}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%  answers for `Complete truth tables'

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Answers}
\setcounter{ProbPart}{0}

\problempart\label{pr.TT.TTorC-a}

\begin{earg}

\item $A \eif A$ %taut
\myanswer{\begin{center}
\begin{tabular}{d | f e e}
$A$ & $A$&$\eif$&$A$\\
\hline
 T & T&\TTbf{T}&T\Tstrut\\
F & F&\TTbf{T}&F
\end{tabular}
\end{center}
}

\item $C \eif\enot C$ %contingent
\myanswer{\begin{center}
\begin{tabular}{d | f e e e}
$C$ & $C$&$\eif$&$\enot$&$C$\\
\hline
 T & T & \TTbf{F}& F& T\Tstrut\\
F & F & \TTbf{T}& T& F\\
\end{tabular}
\end{center}}

\item $(A \eiff B) \eiff \enot(A\eiff \enot B)$ %tautology
\myanswer{\begin{center}
\begin{tabular}{d d | f e e e e e e e e}
$A$ & $B$&$(A$&$\eiff$&$B)$&$\eiff$&$\enot$&$(A$&$\eiff$&$\enot$&$B)$ \\
\hline
T & T & T & T & T & \TTbf{T} & T & T & F & F & T\Tstrut\\
T & F & T & F & F & \TTbf{T} & F & T & T & T & F\\
F & T & F & F & T & \TTbf{T} & F & F & T & F & T\\
F & F & F & T & F & \TTbf{T} & T & F & F & T & F
 \end{tabular}
\end{center}}

\item $(A \eif B) \eor (B \eif A)$ % taut
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e e e e e}
$A$ & $B$&$(A$&$\eif$&$B)$&$\eor$&$(B$&$\eif$&$A)$ \\
\hline
T & T & T & T & T & \TTbf{T} & T & T & T\Tstrut\\
T & F & T & F & F & \TTbf{T} & F & T & T\\
F & T & F & T & T & \TTbf{T} & T & F & F \\
F & F & F & T & F & \TTbf{T} & F & T & F
 \end{tabular}
\end{center}}

\item $(A \eand B) \eif (B \eor A)$  %taut
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e e e e e}
$A$ & $B$&$(A$&$\eand$&$B)$&$\eif$&$(B$&$\eor$&$A)$ \\
\hline
T & T & T & T & T & \TTbf{T} & T & T & T\Tstrut\\
T & F & T & F & F & \TTbf{T} & F & T & T\\
F & T & F & F & T & \TTbf{T} & T & T & F \\
F & F & F & F & F & \TTbf{T} & F & F & F
 \end{tabular}
\end{center}}
\item $\enot(A \eor B) \eiff (\enot A \eand \enot B)$ %taut

\myanswer{\begin{center}
\begin{tabular}{d d | f e e e e e e e e e}
$A$ & $B$&$\enot$&$(A$&$\eor$&$B)$&$\eiff$&$(\enot$&$A$&$\eand$&$\enot$&$B)$\\
\hline
T & T & F & T & T & T & \TTbf{T} & F & T & F & F & T\Tstrut\\
T & F & F & T& T & F & \TTbf{T} & F & T & F & T & F\\
F & T & F & F & T & T & \TTbf{T} & T & F & F & F & T\\
F & F & T & F & F & F & \TTbf{T} & T & F & T & T & F
 \end{tabular}
\end{center}}

\item $\bigl[(A\eand B) \eand\enot(A\eand B)\bigr] \eand C$ %contradiction
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e e e e e e e}
$A$ & $B$&$C$&$\bigl[(A$&$\eand$&$B)$&$ \eand$&$\enot$&$(A$&$\eand$&$B)\bigr]$&$\eand$&$C$\\
\hline
T & T & T & T & T & T & F & F & T & T & T & \TTbf{F} & T\Tstrut\\
T & T & F & T& T & T & F & F & T & T & T & \TTbf{F}& F\\
T & F & T & T & F & F & F & T & T & F & F & \TTbf{F} & T\\
T & F & F & T & F & F & F & T & T & F & F & \TTbf{F} & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & F & T & F & T & F & F & T & \TTbf{F} & T\Tstrut\\
F & T & F & F & F & T & F & T & F & F & T & \TTbf{F} & F\\
F & F & T & F & F & F & F & T & F & F & F & \TTbf{F} & T\\
F & F & F & F & F & F & F & T & F & F & F & \TTbf{F} & F
\end{tabular}
\end{center}}

\item $[(A \eand B) \eand C] \eif B$ %taut
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e e e e}
$A$ & $B$&$C$&$[(A$&$\eand$&$B)$&$\eand$&$C]$&$\eif$&$B$\\
\hline
T & T & T & T & T & T & T & T & \TTbf{T} & T\Tstrut\\
T & T & F & T & T & T & F & F & \TTbf{T} & T\\
T & F & T & T & F & F & F & T & \TTbf{T} & F\\
T & F & F & T & F & F & F & F & \TTbf{T} & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & F & T & F & T & \TTbf{T} & T\Tstrut\\
F & T & F & F & F & T & F & F & \TTbf{T} & T\\
F & F & T & F & F & F & F & T & \TTbf{T} & F\\
F & F & F & F & F & F & F & F & \TTbf{T} & F\\
\end{tabular}
\end{center}}

\item $\enot\bigl[(C\eor A) \eor B\bigr]$ %contingent
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e e e}
$A$ & $B$&$C$&$\enot\bigl[($&$C$&$\eor$&$A)$&$\eor$&$B\bigr]$\\
\hline
T & T & T & \TTbf{F} & T & T & T & T & T\Tstrut\\
T & T & F & \TTbf{F} & F & T & T & T & T\\
T & F & T & \TTbf{F} & T & T & T & T & F\\
T & F & F & \TTbf{F} & F & T & T & T & F\\\arrayrulecolor{light-gray}\hline
F & T & T & \TTbf{F} & T & T & F & T & T\Tstrut\\
F & T & F & \TTbf{F} & F & F & F & T & T\\
F & F & T & \TTbf{F} & T & T & F & T & F\\
F & F & F & \TTbf{T} & F & F & F & F & F
\end{tabular}
\end{center}}
\end{earg}

\problempart

\begin{earg}
\item `$((A \eand B) \eand C)$' and `$(A \eand (B \eand C))$' have the same truth table
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e h | f e e e e }
$A$ & $B$ & $C$ & $(A$&$\eand$& $B)$ &$ \eand$ & $C$ & $A$ & $\eand$ & $(B$&$\eand$&$C)$\\
\hline
T & T & T & T & T & T &  \TTbf{T} & T &T & \TTbf{T} & T & T& T \Tstrut\\
T & T & F & T& T & T &  \TTbf{F} & F & T& \TTbf{F} & T & F& F\\
T & F & T & T & F & F &  \TTbf{F} & T & T & \TTbf{F} & F & F & T \\
T & F & F &  T & F & F &  \TTbf{F} & F & T& \TTbf{F} & F & F & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & F & T & \TTbf{F} & T & F& \TTbf{F} & T & T & T\Tstrut\\
F & T & F & F & F & T & \TTbf{F} & F & F& \TTbf{F} &  T & F & F\\
F & F & T & F & F & F & \TTbf{F} & T & F& \TTbf{F} & F& F & T\\
F & F & F & F & F & F & \TTbf{F} & F & F& \TTbf{F} &  F& F & F\\
\end{tabular}
\end{center}}

\item `$((A \eor B) \eor C)$' and `$(A \eor (B \eor C))$' have the same truth table
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e h | f e e e e }
$A$ & $B$ & $C$ & $(A$&$\eor$& $B)$ &$ \eor$ & $C$ & $A$ & $\eor$ & $(B$&$\eor$&$C)$\\
\hline
T & T & T & T & T & T &  \TTbf{T} & T &T & \TTbf{T} & T & T& T \Tstrut\\
T & T & F & T& T & T &  \TTbf{T} & F & T& \TTbf{T} & T & T& F\\
T & F & T & T & T & F &  \TTbf{T} & T & T & \TTbf{T} & F & T & T \\
T & F & F &  T & T& F &  \TTbf{T} & F & T& \TTbf{T} & F & F & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & T & T & \TTbf{T} & T & F& \TTbf{T} & T & T & T\Tstrut\\
F & T & F & F & T & T & \TTbf{T} & F & F& \TTbf{T} &  T & T & F\\
F & F & T & F & F & F & \TTbf{T} & T & F& \TTbf{T} & F& T & T\\
F & F & F & F & F & F & \TTbf{F} & F & F& \TTbf{F} &  F& F & F\\
\end{tabular}
\end{center}}

\item `$((A \eor B) \eand C)$' and `$(A \eor (B \eand C))$' do not have the same truth table
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e h | f e e e e }
$A$ & $B$ & $C$ & $(A$&$\eor$& $B)$ &$ \eand$ & $C$ & $A$ & $\eor$ & $(B$&$\eand$&$C)$\\
\hline
T & T & T & T & T & T &  \TTbf{T} & T &T & \TTbf{T} & T & T& T \Tstrut\\
T & T & F & T& T & T &  \TTbf{F} & F & T& \TTbf{T} & T & F& F\\
T & F & T & T & T & F &  \TTbf{T} & T & T & \TTbf{T} & F & F & T \\
T & F & F &  T & T& F &  \TTbf{F} & F & T& \TTbf{T} & F & F & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & T & T & \TTbf{T} & T & F& \TTbf{T} & T & T & T\Tstrut\\
F & T & F & F & T & T & \TTbf{F} & F & F& \TTbf{F} &  T & F & F\\
F & F & T & F & F & F & \TTbf{F} & T & F& \TTbf{F} & F& F & T\\
F & F & F & F & F & F & \TTbf{F} & F & F& \TTbf{F} &  F& F & F\\
\end{tabular}
\end{center}}

\item `$((A \eif B) \eif C)$' and `$(A \eif (B \eif C))$' do not have the same truth table
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e h | f e e e e }
$A$ & $B$ & $C$ & $(A$&$\eif$& $B)$ &$ \eif$ & $C$ & $A$ & $\eif$ & $(B$&$\eif$&$C)$\\
\hline
T & T & T & T & T & T &  \TTbf{T} & T &T & \TTbf{T} & T & T& T \Tstrut\\
T & T & F & T& T & T &  \TTbf{F} & F & T& \TTbf{F} & T & F& F\\
T & F & T & T & F & F &  \TTbf{T} & T & T & \TTbf{T} & F & T & T \\
T & F & F &  T & F& F &  \TTbf{T} & F & T& \TTbf{T} & F & T & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & T & T & \TTbf{T} & T & F& \TTbf{T} & T & T & T\Tstrut\\
F & T & F & F & T & T & \TTbf{F} & F & F& \TTbf{T} &  T & F & F\\
F & F & T & F & T & F & \TTbf{T} & T & F& \TTbf{T} & F& T & T\\
F & F & F & F & T & F & \TTbf{F} & F & F& \TTbf{T} &  F& T & F\\
\end{tabular}
\end{center}}

\item `$((A \eiff B) \eiff C)$' and `$(A \eiff (B \eiff C))$' have the same truth table.\\
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e h | f e e e e }
$A$ & $B$ & $C$ & $(A$&$\eiff$& $B)$ &$ \eiff$ & $C$ & $A$ & $\eiff$ & $(B$&$\eiff$&$C)$\\
\hline
T & T & T & T & T & T &  \TTbf{T} & T &T & \TTbf{T} & T & T& T \Tstrut\\
T & T & F & T& T & T &  \TTbf{F} & F & T& \TTbf{F} & T & F& F\\
T & F & T & T & F & F &  \TTbf{F} & T & T & \TTbf{F} & F & F & T \\
T & F & F &  T & F& F &  \TTbf{T} & F & T& \TTbf{T} & F & T & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & F & T & \TTbf{F} & T & F& \TTbf{F} & T & T & T\Tstrut\\
F & T & F & F & F & T & \TTbf{T} & F & F& \TTbf{T} &  T & F & F\\
F & F & T & F & T & F & \TTbf{T} & T & F& \TTbf{T} & F& F & T\\
F & F & F & F & T & F & \TTbf{F} & F & F& \TTbf{F} &  F& T & F\\
\end{tabular}
\end{center}}
\end{earg}

\problempart
Complete truth tables for each sentence with the column that represents the possible truth values for the whole sentence in bold.

\begin{earg}

\item $\enot (N \eiff (P \eif N))$
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e e e e}
$N$ & $P$ &	\TTbf{$\enot$} 	&	$(N$ 	&	$\eiff$	&	$(P$ 	&	$\eif$	&	$N))	$\\
\hline
T & T	& 	\TTbf{F} 		&	T	&	T	&	T	&	T	&	T\Tstrut\\
T & F	& 	\TTbf{F} 		&	T	&	T	&	F	&	T	&	T	\\
F & T	& 	\TTbf{F} 		&	F	&	T	&	T	&	F	&	F	\\
F & F	& 	\TTbf{T} 		&	F	&	F	&	F	&	T	&	F	\\
\end{tabular}
\end{center}
}

\item $\enot [(X \eand Y) \eor (X \eor Y)]$
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e e e e e e}
$X$ & $Y$	&	\enot	&	 [(X 	&	\eand& 	Y) 	&	\eor 	&	(X 	&	\eor 	&	Y)] \\
\hline
T & T	&	\TTbf{F}	&	T	&	T	&	T	&	T	&	T	&	T	&	T\Tstrut	\\
T & F &	\TTbf{F}	&	T	&	F	&	F	&	T	&	T	&	T	&	F	\\
F & T	&	\TTbf{F}	&	F	&	F	&	T	&	T	&	F	&	T	&	T	\\
F & F	&	\TTbf{T}	&	F	&	F	&	F	&	F	&	F	&	F	&	F	\\
\end{tabular}
\end{center}
}

\item $(A \eif B) \eiff (\enot B\eiff \enot A)$
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e e e e e e e}
$A$ & $B$	&	(A 	&	\eif	&	B)	&	 \eiff 	&	(\enot&	B 	&	\eiff 	&	 \enot 	& 	 A) \\
\hline
T & T	&	T	&	T	&	T	&	\TTbf{T}		&	F	 &	T	&	T	&	F		&	T\Tstrut	\\
T & F	&	T	&	F	&	F	&	\TTbf{T}		&	T	 &	F	&	F	&	F		&	T	\\
F & T	&	F	&	T	&	T	&	\TTbf{F}		&	F	 &	T	&	F	&	T		&	F	\\
F & F	&	F	&	T	&	F	&	\TTbf{T}		&	T	 &	F	&	T	&	T		&	F	\\
\end{tabular}
\end{center}
}

\item $[C \eiff (D \eor E)] \eand \enot C$
\myanswer{
\begin{center}
\begin{tabular}{d d d | f e e e e e e e}
$C$ & $D$ & $E$	&	[C 	&	\eiff 	&	(D 	&	\eor 	&	E)] 	&	\eand 	&	 \enot 	&	 C \\
\hline
T& T& T	&	T	&	T	&	T	&	T	&	T	&	\TTbf{F}		&	F		&	T\Tstrut\\
T& T& F	&	T	&	T	&	T	&	T	&	F	&	\TTbf{F}		&	F		&	T	\\
T& F& T	&	T	&	T	&	F	&	T	&	T	&	\TTbf{F}		&	F		&	T	\\
T& F& F	&	T	&	F	&	F	&	F	&	F	&	\TTbf{F}		&	F		&	T	\\\arrayrulecolor{light-gray}\hline
F& T& T	&	F	&	F	&	T	&	T	&	T	&	\TTbf{F}		&	T		&	F	\Tstrut\\
F& T& F	&	F	&	F	&	T	&	T	&	F	&	\TTbf{F}		&	T		&	F	\\
F& F& T	&	F	&	F	&	F	&	T	&	T	&	\TTbf{F}		&	T		&	F	\\
F& F&	 F   &	F	&	T	&	F	&	F	&	F	&	\TTbf{T}		&	T		&	F	\\
\end{tabular}
\end{center}
}

\item $\enot(C \eand (B \eand H)) \eiff (C \eor (B \eor H))$
\myanswer{
\begin{center}
\begin{tabular}{d d d | f e e e e e e e e e e e}
$C$& $B$& $H$	&\enot&	(C 	&\eand &	(B 	&	 \eand 	&	 H))	&	\eiff 	&	(C 	& \eor 	& (B 	& \eor	& H))	\\
\hline
T& T& T	&F	   &	T	&	  T &	T	&	T		&	T	&	\TTbf{F}	&	T	&	T	&	T	&	T	&	T\Tstrut\\
T& T& F	&T	   &	T	&	  F &	T	&	F		&	F	&	\TTbf{T}	&	T	&	T	&	T	&	T	&	F	\\
T& F& T	&T	   &	T	&	 F  &	F	&	F		&	T	&	\TTbf{T}	&	T	&	T	&	F	&	T	&	T	\\
T& F& F	&T	   &	T	&	 F  &	F	&	F		&	F	&	\TTbf{T}	&	T	&	T	&	F	&	F	&	F	\\\arrayrulecolor{light-gray}\hline
F& T& T	&T	   &	F	&	F   &	T	&	T		&	T	&	\TTbf{T}	&	F	&	T	&	T	&	T	&	T	\Tstrut\\
F& T& F	&T	   &	F	&	F   &	T	&	F		&	F	&	\TTbf{T}	&	F	&	T	&	T	&	T	&	F	\\
F& F& T	&T	   &	F	&	F   &	F	&	F		&	T	&	\TTbf{T}	&	F	&	T	&	F	&	T	&	T	\\
F& F& F	&T	   &	F	&	F   &	F	&	F		&	F	&	\TTbf{F}	&	F	&	F	&	F	&	F	&	F	\\
\end{tabular}
\end{center}
}

\vspace{1em}

\item	$(D \eand \enot D) \eif G $
%\vspace{1em}
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e e e e }
$D$& $G$	&	(D 	&	 \eand 	& 	 \enot	&	 D) 	&	 \eif 	&	 G \\
 \hline
T&  T	&	T	&	F		&	F		&	T	&	\TTbf{T}	&	T\Tstrut	\\
T&  F	&	T	&	F		&	F		&	T	&	\TTbf{T}	&	F	\\
F&  T	&	F	&	F		&	T		&	F	&	\TTbf{T}	&	T	\\
F&  F	&	F	&	F		&	T		&	F	&	\TTbf{T}	&	F	\\
\end{tabular}
\end{center}
}
\vspace{1em}

\item	$(\enot P \eor \enot R) \eiff R $
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e e e e e}
$P$& $R$	&	(\enot 	&	P 	&	\eor 	&	\enot 	& 	 R) 	& 	\eiff 	&	 R \\
\hline
T& T	&	F		&	T	&	F	&	F		&	T	&	\TTbf{F}	&	T\Tstrut	\\
T& F	&	F		&	T	&	T	&	T		&	F	&	\TTbf{F}	&	F	\\
F& T	&	T		&	F	&	T	&	F		&	T	&	\TTbf{T}	&	T	\\
F& F	&	T		&	F	&	T	&	T		&	F	&	\TTbf{F}	&	F	\\
\end{tabular}
\end{center}
}
\vspace{1em}

\item	$\enot \enot (\enot A \eand \enot B)  $
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e e e e e}
$A$& $B$	&	\enot		&	 \enot 	&	(\enot 	& 	 A 	& \eand 	& 	\enot 	&	 B)  \\
 \hline
T& T	&	\TTbf{F}		&	T		&	F		&	T	&	F	&	F		&	T\Tstrut	\\
T& F	&	\TTbf{F}		&	T		&	F		&	T	&	F	&	T		&	F	\\
F& T	&	\TTbf{F}		&	T		&	T		&	F	&	F	&	F		&	T	\\
F& F	&	\TTbf{T}		&	F		&	T		&	F	&	T	&	T		&	F	\\
\end{tabular}
\end{center}
}
\vspace{1em}

\item 	$[(D \eand H) \eif J] \eif \enot(D \eor H) $
\myanswer{
\begin{center}
\begin{tabular}{d d d | f eeeeeeeee}
$D$& $H$ & $J$ 	&	[(D 	& 	 \eand 	& 	 H)	& 	\eif 	&	J] 	&	\eif 	&	 \enot 	&	(D 	&	 \eor 	& H) \\
\hline
T&  T&  T	&	T	&	T		&	T	&	T	&	T	&	\TTbf{F}	&	F		&	T	&	T		&T\Tstrut\\
T&  T&  F	&	T	&	T		&	T	&	F	&	F	&	\TTbf{T}	&	F		&	T	&	T		&T	\\
T&  F&  T	&	T	&	F		&	F	&	T	&	T	&	\TTbf{F}	&	F		&	T	&	T		&F	\\
T&  F&  F	&	T	&	F		&	F	&	T	&	F	&	\TTbf{F}	&	F		&	T	&	T		&F	\\\arrayrulecolor{light-gray}\hline
F&  T&  T	&	F	&	F		&	T	&	T	&	T	&	\TTbf{F}	&	F		&	F	&	T		&T	\Tstrut\\
F&  T&  F	&	F	&	F		&	T	&	T	&	F	&	\TTbf{F}	&	F		&	F	&	T		&T	\\
F&  F&  T	&	F	&	F		&	F	&	T	&	T	&	\TTbf{T}	&	T		&	F	&	F		&F	\\
F&  F&  F	&	F	&	F		&	F	&	T	&	F	&	\TTbf{T}	&	T		&	F	&	F		&F	\\
\end{tabular}
\end{center}
}

\vspace{1em}

\item	$\enot [(D \eiff F) \eiff G] \eif (\enot D \eand F) $
\myanswer{
\begin{center}
\begin{tabular}{d d d | feeeeeeeeee}
$D$& $F$ & $G$ 	&	\enot 	&	[(D 	&	\eiff 	&	F) 	&	\eiff 	&	 G]	& 	\eif 	 &	(\enot 	& 	D 	 & 	 \eand &F) \\
\hline
T&  T&  T	&	F		&	T	&	T	&	T	&	T	&	T	&	\TTbf{T}	&	F		&	T	&	F	&T	\Tstrut\\
T&  T&  F	&	T		&	T	&	T	&	T	&	F	&	F	&	\TTbf{F}	&	F		&	T	&	F	&T	\\
T&  F&  T	&	T		&	T	&	F	&	F	&	F	&	T	&	\TTbf{F}	&	F		&	T	&	F	&F	\\
T&  F&  F	&	F		&	T	&	F	&	F	&	T	&	F	&	\TTbf{T}	&	F		&	T	&	F	&F	\\\arrayrulecolor{light-gray}\hline
F&  T&  T	&	T		&	F	&	F	&	T	&	F	&	T	&	\TTbf{T}	&	T		&	F	&	T	&T	\Tstrut\\
F&  T&  F	&	F		&	F	&	F	&	T	&	T	&	F	&	\TTbf{T}	&	T		&	F	&	T	&T	\\
F&  F&  T	&	F		&	F	&	T	&	F	&	T	&	T	&	\TTbf{T}	&	T		&	F	&	F	&F	\\
F&  F&  F	&	T		&	F	&	T	&	F	&	F	&	F	&	\TTbf{F}	&	T		&	F	&	F	&F	\\
\end{tabular}
\end{center}
}
%\vspace{1em}
\end{earg}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Six concepts}
\label{s:SemanticConcepts}

As we did in the previous chapter, we begin with the definition of \define{valuation}.

\begin{factboxy}{Valuation}
A \textit{valuation} is any assignment of truth values to particular atomic sentences of TFL. Each row of a truth table represents a possible valuation. The entire truth table represents all possible valuations.
\end{factboxy}

Let's say that we are going to create a truth table for `$P \eor \enot Q$'. (See figure \ref{fig:valuation}.) On the first line of the truth table, you may recall, we make $P =$ `true' and $Q =$ `true'. That is one valuation. On the second line, we make $P =$ `true' and $Q =$ `false'. That is another valuation. The assignments of `true' and `false' to `$P$` and `$Q$' on lines 3 and 4, then, are the remaining possible valuations, when we have a sentence containing only two atomic sentences.

%\begin{center}
%\begin{tabular}{d d | f e e e }
%$P$&$Q$& $P$& \eor& \enot& $Q$\\
%\hline
 %T & T & T & \TTbf{T} & F & T\Tstrut\\
 %T & F & T & \TTbf{T} & T & F \\
 %F & T & F & \TTbf{F} & F & T \\
 %F & F & F & \TTbf{T} & T & F
%\end{tabular}
%\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}
\centering
\includegraphics[width=6.5cm]{this_is_a_valuation.pdf}
\caption{For the TFL sentence `$P \eor \enot Q$', $P =$ `true' and $Q =$ `true' is one valuation. On this valuation, `$P \eor \enot Q$' is true.}
\label{fig:valuation}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

In the previous chapter, we used truth tables to determine---for each possible valuation---the truth value of any TFL sentence. In this chapter, we will extend this type of analysis. We will examine six properties that apply (or may apply) to either single TFL sentences (\textit{tautology}, \textit{contradiction}, and \textit{contingent}) or sets of TFL sentences (\textit{equivalent}, \textit{jointly consistent}, and \textit{jointly inconsistent}). For each, we use a truth table to determine which property applies.

\section{Tautologies and contradictions}
In \S\ref{s:nec-truth}, we said that a \emph{necessary truth} is a sentence that must be true, a \emph{necessary falsehood} is a sentence that must be false, and a sentence that is neither a necessary truth or a necessary falsehood is \textit{contingent}. The first two, \textit{necessary truth} and \textit{necessary falsehood}, have surrogates in TFL. We will start with the surrogate for necessary truth.

\begin{factboxy}{Tautology}
A sentence of TFL is a \define{tautology} if and only if it is true on every valuation.
\end{factboxy}

We can determine whether a sentence is a tautology using a truth table. If the sentence is true on every line of a complete truth table (that is, if there is a `T' on every line under the main connective), then it is true on every valuation. And if it is true on every valuation, it is a tautology. The example from \S\ref{s:tt-example}, `$(H \eand I) \eif H$', for instance, is a tautology.

\begin{center}
\begin{tabular}{d d | f e e e e}
${H}$&${I}$&$(H$&\eand&$I)$&\eif&$H$\\
\hline
{T} & {T} & {T} & T & {T} & \textbf{T} & T \Tstrut\\
{T} & {F} & {T} & F & {F} & \textbf{T} & T\\
{F} & {T} & {F} & F & {T} & \textbf{T} & F\\
{F} & {F} & {F} & F & {F} & \textbf{T} & F
\end{tabular}
\end{center}

\textit{Tautology} is only a surrogate, however, for \textit{necessary truth}. There are some necessary truths that we cannot adequately symbolize in TFL. An example is `$2 + 2 = 4$'. This \emph{must} be true, but if we try to symbolize it in TFL, the best we can offer is an atomic sentence, perhaps,
	\begin{ekey}
		\item[F] $2 + 2 = 4$
	\end{ekey}
But an atomic sentence by itself cannot be a tautology. (To see this, try making a truth table for just `$F$'.) Still, if we can adequately symbolize some English sentence as a TFL sentence, and that TFL sentence is a tautology, then the English sentence expresses a necessary truth.

We have a similar surrogate for \textit{necessary falsehood}.
\begin{factboxy}{Contradiction}
A sentence of TFL is a \define{contradiction} if and only if it is false on every valuation.
\end{factboxy}

\noindent Again, we can determine whether a sentence is a contradiction with a truth table. If the sentence is false on every line of a complete truth table, then it is false on every valuation, and so it is a contradiction. The standard example of a contradiction is `$P \eand \enot P$'. Since we have only one letter in this sentence, it is only a two line truth table, but on each line, the sentence is false.

\begin{center}
\begin{tabular}{d | f e e e}
$P$& $P$ & $\eand$ &\enot&$P$\\
\hline
 T & T & \TTbf{F} & F & T\Tstrut\\
 F & F & \TTbf{F} & T & F
\end{tabular}
\end{center}
Similarly, although its truth table has four lines, `$(P \eor Q) \eiff (\enot P \eand \enot Q)$' is a contradiction.
\begin{center}
\begin{tabular}{d d | f e e e e e e e e}
$P$& $Q$& $(P$ &\eor &$Q)$ &\eiff &(\enot &$P$ &\eand &\enot &$Q)$\\
\hline
T &T      &T &T &T   &\TTbf{F}    &F &T &F &F &T\Tstrut\\
T &F      &T &T &F   &\TTbf{F}    &F &T &F &T &F\\
F &T      &F &T &T   &\TTbf{F}    &T &F &F &F &T\\
F &F      &F &F &F   &\TTbf{F}    &T &F &T &T &F
\end{tabular}
\end{center}

In \S\ref{s:nec-truth}, we defined \define{contingent} as ``a sentence that is capable of being true and capable of being false (in different circumstances, of course).'' A truth table, then, provides us with those different circumstances.

\begin{factboxy}{Contingent}
A sentence that is true on at least one valuation and false on at least one valuation is contingent.
\medskip

Or, we can also say: any sentence that is neither a tautology nor a contradiction is contingent.
\end{factboxy}

\noindent`$\enot(P \eor Q)$', for instance, is contingent.
\begin{center}
\begin{tabular}{d d | f e e e}
$P$&$Q$&\enot&$(P$&\eor&$Q)$\\
\hline
 T & T & \TTbf{F} & T & T & T\Tstrut\\
 T & F & \TTbf{F} & T & T & F \\
 F & T & \TTbf{F} & F & T & T \\
 F & F & \TTbf{T} & F & F & F
\end{tabular}
\end{center}

\section{Equivalence}\label{equivalence--tt}
There are several possible logical relationships that can exist between two or more sentences of TFL. We we examine three relationships, and we will focus on pairs of sentences. The first logical relationship is \define{equivalence}.

\begin{factboxy}{Equivalent}
$\meta{A}$ and $\meta{B}$ are \define{equivalent} if and only if, for every valuation, their truth values agree (that is, if and only if there is no valuation for which they have opposite truth values).
\medskip

Equivalently, if $(\meta{A} \eiff \meta{B})$ is a tautology, then $\meta{A}$ and $\meta{B}$ are \define{equivalent}.
\tcblower
\footnotesize{Recall from \ref{s:Metavariables}, that $\meta{A}$ stands for any possible sentence of TFL (as do $\meta{B}$, $\meta{C}$, $\meta{D}$, etc.). Hence, `$\meta{A}$' can stand for `$P \eor Q$' or `$(P \eiff \enot R) \eand T$' or anything else.}
\end{factboxy}

Consider the sentences `$\enot(P \eor Q)$' and `$\enot P \eand \enot Q$'. Are they equivalent? To find out, we construct a truth table containing both sentences.
\begin{center}
\begin{tabular}{d d | f e e h | f e e e e}
$P$&$Q$&\enot&$(P$&\eor&$Q)$&\enot&$P$&\eand&\enot&$Q$\\
\hline
 T & T & \TTbf{F} & T & T & T & F & T & \TTbf{F} & F & T\Tstrut\\
 T & F & \TTbf{F} & T & T & F & F & T & \TTbf{F} & T & F\\
 F & T & \TTbf{F} & F & T & T & T & F & \TTbf{F} & F & T\\
 F & F & \TTbf{T} & F & F & F & T & F & \TTbf{T} & T & F
\end{tabular}
\end{center}
Looking at the columns for the main logical operators (`\enot' for the first sentence, `\eand' for the second), we see that on the first three rows, both sentences are false. On the final row, both are true. Since they match on every row---that is, on every valuation for `$P$' and `$Q$'---the two sentences are equivalent.

\section{Consistency}\label{consistency--tt}
In \S\ref{s:joint-poss}, we said that sentences are \textit{jointly possible} if and only if it is possible for all of them to be true at once. The surrogate for this concept in TFL is \define{jointly consistent}.

\begin{factboxy}{Jointly consistent}
$\meta{A}$ and $\meta{B}$ are \define{jointly consistent} if and only if there is some valuation that makes them both true \textit{and} they are not equivalent.
\medskip

Equivalently, if
\begin{earg}
\vspace{-2mm}
	\item[(1)] there is at least one valuation that makes ($\meta{A}\eand\meta{B}$) true, and
	\item[(2)] $(\meta{A} \eiff \meta{B})$ is \textit{not} a tautology,
\vspace{-2mm}
\end{earg}
then $\meta{A}$ and $\meta{B}$ are \define{jointly consistent}.
\end{factboxy}

\noindent The requirement that the two sentences not be equivalent is not always included, but we will distinguish between sentences that are jointly consistent from those that are equivalent.

This was one of the examples in \S\ref{s:joint-poss}:
\begin{ebullet}
		\item[G1.] There are at least four giraffes at the wild animal park.
		\item[G2.] There are exactly seven gorillas at the wild animal park.
	\end{ebullet}
These are jointly possible because it is possible for them both to be true at the same time. It takes nothing away from their joint possibility that they can also be false at the same time or one can be false while the other is true. Applying that same observation to \textit{jointly consistent}, all we need is one line where both sentences are true. (More than one line is fine also, although the truth values for the two sentences shouldn't match on every line. If they do, then the sentences are equivalent.) `$(P \eor Q)$' and `$(P \eand \enot Q)$' have one line where they are both true, and so they are jointly consistent.

\begin{center}
\begin{tabular}{d d | f e h | f e e e}
$P$ &$Q$& $P$& ~\eor~ & $Q$& $P$& \eand& \enot& $Q$\\
\hline
 T & T &  T & \TTbf{T} & T & T & \TTbf{F} & F & T\Tstrut\\
 T & F &  T & \circled{\TTbf{T}} & F & T & \circled{\TTbf{T}} & T & F\\
 F & T &  F & \TTbf{T} & T & F & \TTbf{F} & F & T\\
 F & F &  F & \TTbf{F} & F & F & \TTbf{F} & T & F
\end{tabular}
\end{center}

And finally, in \S\ref{s:joint-poss}, we also said that sentences are \textit{jointly impossible} if and only if it is \textit{not} possible for all of them to be true at once. The surrogate for this concept in TFL is \define{jointly inconsistent}.

\begin{factboxy}{Jointly inconsistent}
$\meta{A}$ and $\meta{B}$ are \define{jointly inconsistent} if and only if there is no valuation that makes them both true.
%\textit{and} they are not equivalent.
\end{factboxy}

\noindent There are three ways that two sentences can be jointly inconsistent.

\begin{ebullet}
\item[(1)] One each line, the truth value for one sentence is `T' and the truth value for the other sentence is `F'. For instance, the truth values for `$P \eor Q$' and `$\enot P \eand \enot Q$' never match. On each line, one is true and the other is false. Hence, two sentences are jointly inconsistent in this way when $\enot(\meta{A} \eiff \meta{B})$ is a tautology.

%Hence, for this relationship between two sentences, all of these criteria are satisfied: $\enot(\meta{A} \eand \meta{B})$ is a tautology; $\enot(\meta{A} \eiff \meta{B})$ is a tautology; and $(\meta{A} \eor \meta{B})$ is a tautology.
\begin{center}
\begin{tabular}{d d | f e h | f e e e e}
$P$& $Q$& $P$& ~\eor~ & $Q$& \enot& $P$& \eand& \enot& $Q$\\
\hline
 T & T &		 T & \TTbf{T} & T 		&	 F & T & \TTbf{F} & F & T\Tstrut\\
 T & F &		 T & \TTbf{T} & F 		&	 F & T & \TTbf{F} & T & F\\
 F & T &		 F & \TTbf{T} & T 		&	 T & F & \TTbf{F} & F & T\\
 F & F &		 F & \TTbf{F} & F 		&	 T & F & \TTbf{T} & T & F
\end{tabular}
\end{center}
\medskip
\item[(2)] When the truth value for one sentence is `T', then the truth value for the other sentence is `F', but both sentences can be false at the same time. For example, `$\enot(\enot P \eor Q)$' and `$(\enot P \eand \enot Q)$' are never both true on the same line, but they are false on the same line. For two sentences that are jointly inconsistent in this way, this criterion is satisfied: $\enot(\meta{A} \eand \meta{B})$ is a tautology.
\begin{center}
\begin{tabular}{d d | f e e e h | f e e e e}
$P$& $Q$&	\enot& (\enot	&$P$	&~\eor~	&$Q)$	&\enot 	&$P$ & \eand 	& \enot	& $Q$\\
\hline
T  &	 T & 		\TTbf{F} &	 ~F 		& T 	& T 	& T 		& F 		& T 	& \TTbf{F} 		& F 		& T\Tstrut\\
T  &	 F & 		\TTbf{T} &	 ~F 		& T 	& F 	& F 		& F 		& T 	& \TTbf{F} 		& T 		& F\\
F  &	 T & 		\TTbf{F} &	 ~T 		& F	& T 	& T 		& T 		& F 	& \TTbf{F} 		& F 		& T\\
F  &	 F & 		\TTbf{F} &	 ~T 		& F	& T 	& F 		& T 		& F 	& \TTbf{T} 		& T 		& F
\end{tabular}
\end{center}
\medskip
\item[(3)] Both sentences are false on every line. For example, the truth values for `$\enot P \eand P$' and `$\enot Q \eand Q$' are always the same. On each line, both sentences are false. So, for sentences that are jointly inconsistent in this way, both of these criteria must be satisfied: $\enot(\meta{A} \eand \meta{B})$ is a tautology and $(\meta{A} \eiff \meta{B})$ is a tautology. (And the latter, recall, means that these sentences are equivalent, and so here \textit{jointly inconsistent} and \textit{equivalent} overlap.)
\begin{center}
\begin{tabular}{d d | f e e h | f e e e e}
$P$&$Q$&\enot&$P$&\eand&$P$&\enot&$Q$&\eand&&$Q$\\
\hline
 T & T &  F & T & \TTbf{F} & T & F & T & \TTbf{F} &  & T\Tstrut\\
 T & F &  F & T & \TTbf{F} & T & T & F & \TTbf{F} &  & F\\
 F & T &  T & F & \TTbf{F} & F & F & T & \TTbf{F} &  & T\\
 F & F &  T & F & \TTbf{F} & F & T & F & \TTbf{F} &  & F
\end{tabular}
\end{center}
\end{ebullet}

%\bigskip

%\begin{minipage}{.5\linewidth}

%\medskip
%\end{minipage}%
%\begin{minipage}{.5\linewidth}

%\end{minipage}
%\medskip

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%  exercises for `Semantic concepts'

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\practiceproblems
\section{Practice exercises}
\setcounter{ProbPart}{0}

\problempart
Revisit your answers to the exercises in part A of chapter \ref{s:CompleteTruthTables}, and determine which sentences were tautologies, which were contradictions, and which were neither tautologies nor contradictions.\\

\problempart Create a truth table for each sentence, and then determine whether the sentence is a \textbf{tautology}, a \textbf{contradiction}, or is \textbf{contingent}.

\begin{earg}
\item $\enot B \eand B$ \vspace{.5ex}%contra
\item $\enot D \eor D$ \vspace{.5ex}%taut
\item $(A\eand B) \eor (B\eand A)$\vspace{.5ex} %contingent
\item $\enot[A \eif (B \eif A)]$\vspace{.5ex} %contra
\item $A \eiff [A \eif (B \eand \enot B)]$ \vspace{.5ex}%contra
\item $[(A \eand B) \eiff B] \eif (A \eif B)$ \vspace{.5ex}% contingent.
\end{earg}

\problempart
\label{pr.TT.consistent}
For each set of sentences, create a truth table and then determine whether the sentences are \textbf{jointly consistent} or \textbf{jointly inconsistent}.
\begin{earg}
\item $A\eif A$, $\enot A \eif \enot A$, $A\eand A$, $A\eor A$ %consistent
\item $A\eor B$, $A\eif C$, $B\eif C$ %consistent
\item $B\eand(C\eor A)$, $A\eif B$, $\enot(B\eor C)$  %inconsistent
\item $A\eiff(B\eor C)$, $C\eif \enot A$, $A\eif \enot B$ %consistent

\item $A \eand \enot B$, $\enot(A \eif B)$, $B \eif A$\vspace{.5ex} %Consistent
\item $A \eor B$, $A \eif \enot A$, $B \eif \enot B$ \vspace{.5ex}%inconsistent.
\item $\enot(\enot A \eor B) $, $A \eif \enot C$, $A \eif (B \eif C)$\vspace{.5ex} %Inconsistent
\item $A \eif B$, $A \eand \enot B$\vspace{.5ex} %Inconsistent
\item $A \eif (B \eif C)$, $(A \eif B) \eif C$, $A \eif C$\vspace{.5ex} % consistent.

\item $\enot B$, $A \eif B$, $A$ \vspace{.5ex}%inconsistent.
\item $\enot(A \eor B)$, $A \eiff B$, $B \eif A$\vspace{.5ex} %Consistent
\item $A \eor B$, $\enot B$, $\enot B \eif \enot A$\vspace{.5ex} %Inconsistent
\item $A \eiff B$, $\enot B \eor \enot A$, $A \eif B$\vspace{.5ex} %consistent.
\item $(A \eor B) \eor C$, $\enot A \eor \enot B$, $\enot C \eor \enot B$\vspace{.5ex} %consistent
\end{earg}

\problempart
\label{pr.TT.equiv}
For each pair of sentences, create a truth table and then determine whether the pair of sentences are \textbf{equivalent} or are not.
\begin{earg}
\item $A$ and $\enot A$
\item $A \eand \enot A$ and $\enot B \eiff B$
\item $[(A \eor B) \eor C]$ and $[A \eor (B \eor C)]$
\item $A \eor (B \eand C)$ and $(A \eor B) \eand (A \eor C)$
\item $[A \eand (A \eor B)] \eif B$ and $A \eif B$

\item $A\eif A$ and $A \eiff A$
\item $\enot(A \eif B)$ and $\enot A \eif \enot B$
\item $A \eor B$ and $\enot A \eif B$
\item$(A \eif B) \eif C$ and $A \eif (B \eif C)$
\item $A \eiff (B \eiff C)$ and $A \eand (B \eand C)$
\end{earg}

\problempart
\label{pr.TT.concepts}
\begin{earg}
\item Suppose that \meta{A} and \meta{B} are logically equivalent. What can you say about $\meta{A}\eiff\meta{B}$?

\item Suppose that $\meta{A}$, $\meta{B}$ and $\meta{C}$  are jointly inconsistent. What can you say about $(\meta{A}\eand\meta{B}\eand\meta{C})$?

\item Suppose that \meta{A} and \meta{B} are logically equivalent. What can you say about $(\meta{A}\eor\meta{B})$?

\item Suppose that \meta{A} and \meta{B} are \emph{not} logically equivalent. What can you say about $(\meta{A}\eor\meta{B})$?

\item Consider this principle:
	\begin{ebullet}
		\item[] Suppose $\meta{A}$ and $\meta{B}$ are equivalent. Suppose an argument contains $\meta{A}$ (either as a premise, or as the conclusion). The validity of the argument would be unaffected, if we replaced $\meta{A}$ with $\meta{B}$.
	\end{ebullet}
Is this principle correct? Explain your answer.
\end{earg}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%  answers for `Semantic concepts'

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Answers}
\setcounter{ProbPart}{0}

\problempart
From chapter \ref{s:CompleteTruthTables}
\begin{earg}
\item $A \eif A$ \hfill \myanswer{tautology}
\item $C \eif\enot C$ \hfill \myanswer{neither}
\item $(A \eiff B) \eiff \enot(A\eiff \enot B)$  \hfill \myanswer{tautology}
\item $(A \eif B) \eor (B \eif A)$  \hfill \myanswer{tautology}
\item $(A \eand B) \eif (B \eor A)$  \hfill \myanswer{tautology}
\item $\enot(A \eor B) \eiff (\enot A \eand \enot B)$ \hfill \myanswer{tautology}
\item $\bigl[(A\eand B) \eand\enot(A\eand B)\bigr] \eand C$  \hfill \myanswer{contradiction}
\item $[(A \eand B) \eand C] \eif B$  \hfill \myanswer{tautology}
\item $\enot\bigl[(C\eor A) \eor B\bigr]$  \hfill \myanswer{neither}
\end{earg}

\problempart Use a truth table to determine whether each sentence is a tautology, a contradiction, or a contingent sentence.
\begin{earg}
\item $\enot B \eand B$ \vspace{.5ex} \hfill \myanswer{Contradiction}
\item $\enot D \eor D$ \vspace{.5ex} \hfill \myanswer{Tautology}
\item $(A\eand B) \eor (B\eand A)$\vspace{.5ex} \hfill \myanswer{Contingent}
\item $\enot[A \eif (B \eif A)]$\vspace{.5ex} \hfill \myanswer{Contradiction}
\item $A \eiff [A \eif (B \eand \enot B)]$ \vspace{.5ex} \hfill \myanswer{Contradiction}
\item $[(A \eand B) \eiff B] \eif (A \eif B)$ \vspace{.5ex} \hfill \myanswer{Contingent}
\end{earg}

\problempart
\label{pr.TT.consistent}
Use a truth table to determine whether each set of sentences are jointly consistent or jointly inconsistent.
\begin{earg}
\item $A\eif A$, $\enot A \eif \enot A$, $A\eand A$, $A\eor A$ \\
These sentences are jointly consistent. (See line 1.)
\myanswer{\begin{center}
\begin{tabular}{d | f e h | f e e e h | f e h | f e e}
$A$ &  $A$&$\eif$&$A$&$\enot$&$A$&$\eif$&$\enot$&$A$&$A$&$\eand$&$A$&$A$&$\eor$&$A$\\
\hline
T & T & \TTbf{T} & T& F & T & \TTbf{T} & F & T & T & \TTbf{T} & T & T & \TTbf{T} & T\Tstrut\\
F & F & \TTbf{T} & F& T & F & \TTbf{T} & T & F & F & \TTbf{F} & F & F & \TTbf{F} & F
\end{tabular}
\end{center}}

\item $A\eor B$, $A\eif C$, $B\eif C$ \\
These sentences are jointly consistent. (See line 1.)
\myanswer{\begin{center}
\begin{tabular}{d d d | f e h | f e h | f e e}
$A$ & $B$ & $C$ & $A$&$\eor$&$B$&$A$&$\eif$&$C$&$B$&$\eif$&$C$\\
\hline
T & T & T & T & \TTbf{T} & T & T & \TTbf{T} & T & T & \TTbf{T} & T\Tstrut\\
T & T & F & T & \TTbf{T} & T & T & \TTbf{F} & F & T & \TTbf{F} & F\\
T & F & T & T & \TTbf{T} & T & T & \TTbf{T} & T & F & \TTbf{T} & T\\
T & F & F & T & \TTbf{T} & F & T & \TTbf{F} & F & F & \TTbf{T} & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & \TTbf{T} & F & F & \TTbf{T} & T & T & \TTbf{T} & T\Tstrut\\
F & T & F & F & \TTbf{T} & T & F & \TTbf{T} & F & T & \TTbf{F} & F\\
F & F & T & F & \TTbf{F} & F & F & \TTbf{T} & T & F & \TTbf{T} & T\\
F & F & F & F & \TTbf{F} & F & F & \TTbf{T} & F & F & \TTbf{T} & F\\
\end{tabular}
\end{center}}

\item $B\eand(C\eor A)$, $A\eif B$, $\enot(B\eor C)$ \\
These sentences are jointly inconsistent.
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e h | f e h | f e e e}
$A$ & $B$ & $C$ & $B$&$\eand$&$(C$&$\eor$&$A)$&$A$&$\eif$&$B$&$\enot$&$(B$&$\eor$&$C)$\\
\hline
T & T & T & T & \TTbf{T} & T & T & T & T & \TTbf{T} & T & \TTbf{F} & T & T & T\Tstrut\\
T & T & F & T & \TTbf{T} & F & T & T & T & \TTbf{T} & T & \TTbf{F} & T &  T & F\\
T & F & T & F & \TTbf{F} & T & T & T & T & \TTbf{F} & F & \TTbf{F} & F &  T & T\\
T & F & F & F & \TTbf{F} & F & T & T & T & \TTbf{F} & F & \TTbf{T} & F & F & F\\\arrayrulecolor{light-gray}\hline
F & T & T & T & \TTbf{T} & T & T & F & F & \TTbf{T} & T & \TTbf{F} & T & T & T\Tstrut\\
F & T & F & T & \TTbf{F} & F & F & F & F & \TTbf{T} & T & \TTbf{F} & T & T & F\\
F & F & T & F & \TTbf{F} & T & T & F & F & \TTbf{T} & F & \TTbf{F} & F & T & T\\
F & F & F & F & \TTbf{F} & F & F & F & F & \TTbf{T} & F & \TTbf{T} & F & F & F\\
\end{tabular}
\end{center}}

\item $A\eiff(B\eor C)$, $C\eif \enot A$, $A\eif \enot B$
These sentences are jointly consistent. (See line 8.)
\myanswer{\begin{center}
\begin{tabular}{d d d | f e e e h | f e e h | f e e e}
$A$ & $B$ & $C$ & $A$&$\eiff$&$(B$&$\eor$&$C)$&$C$&$\eif$&$\enot$&$A$&$A$&$\eif$&$\enot$&$B$\\
\hline
T & T & T & T & \TTbf{T} & T & T & T & T & \TTbf{F} & F & T & T & \TTbf{F} & F & T\Tstrut\\
T & T & F & T & \TTbf{T} & T & T & F & F & \TTbf{T} & F & T & T & \TTbf{F} & F & T\\
T & F & T & T & \TTbf{T} & F & T & T & T & \TTbf{F} & F & T & T & \TTbf{T} & T & F\\
T & F & F & T & \TTbf{F} & F & F & F & F & \TTbf{T} & F & T & T & \TTbf{T} & T & F\\\arrayrulecolor{light-gray}\hline
F & T & T & F & \TTbf{F} & T & T & T & T & \TTbf{T} & T & F & F & \TTbf{T} &  F & T\Tstrut\\
F & T & F & F & \TTbf{F} & T & T & F & F & \TTbf{T} & T & F & F & \TTbf{T} & F & T\\
F & F & T & F & \TTbf{F} & F & T & T & T & \TTbf{T} & T & F & F & \TTbf{T} &T & F\\
F & F & F & F & \TTbf{T} & F & F & F & F & \TTbf{T} & T & F & F & \TTbf{T} & T & F
\end{tabular}
\end{center}}

\item $A \eand \enot B$, $\enot(A \eif B)$, $B \eif A$\\
These sentences are jointly consistent. (See line 2.)
\myanswer{
\begin{center}
\begin{tabular}{d d | f e e h | f e e h | f e e }
$A$ & $B$ 	&	A 	& \eand	&  \enot & B &  \enot &  (A &  \eif & B)	 & 	 B	 & 	\eif  & A   \\
\hline
T  & T	& 	T   & F     &   F	 & T  &  F	& 	T &   T	  & T 	  & 	 T	 & 	 T	  & T\Tstrut\\
T  & F	&  T & 	\textbf{T}	 & T	 & F &  \textbf{T}	 & 	 T	 & 	 F	 	 & 	 F	 	 	 & 	 F	 	 & 	 \textbf{T}	 	 & 	 T	 	  	  \\
F  & T	& 	 F	 				 & 	 F	 & 	 F	 & T & 		 F	 & 	 F	 & 	 T	 	 & 	 T	 	  	  & 	 T	 	 & 	 F	 	 & 	 F	 \\
F  & F	& 	 F	  				& 	 F	 & 	 T	 & 	F&    	 	 F	 & 	 F	 & 	 T	 	 & 	 F	 	  	  & 	 F	 	 & 	 T	 	 & 	 F	 \\
\end{tabular}
\end{center}
}

\item $A \eor B$, $A \eif \enot A$, $B \eif \enot B$\\
These sentences are jointly inconsistent.
\myanswer{
\begin{center}
\begin{tabular}{d d | f e h | f e e h | f e e e}
$A$ & $B$  & A	 & \eor 	 & B 	  	 	 & A 	 & \eif 	 & 	\enot & A 	  	 	 & B 	 & \eif 	 & \enot	 & 	B \\
\hline
T & T   &	 T	 & 	 T	 &T  	  	 	 & T	 & 	 F	 & 	F 	 & T 	 & 	 	  	T 	 & 	F 	 & 	 F	 & 	T\Tstrut\\
T &  F &	 T	& 	 T	 & F 	  	 	 & 	T 	 & 	 F	 & 	 F	 & 	 T	 & 	 	  	F 	 & 	 T	 & 	 T	 & 	 F	 \\
F &  T  &	 F	& 	 T	 & 	 T	  	 	 & 	F 	 & 	 T	 & 	 T	 & 	F 	 & 	 	    T	 & 	 F	 & 	 F	 & 	 T	 \\
F &  F  &	 F	& 	 F	 & 	 F	  	 	 & 	 F	 & 	 T	 & 	 T	 & 	 F	 & 	 	  	 F	 & 	 T	 & 	 T	 & 	 F	 \\
\end{tabular}
\end{center}
}

\item $\enot(\enot A \eor B) $, $A \eif \enot C$, $A \eif (B \eif C)$\\
These sentences are jointly consistent.
\begin{center}
\begin{tabular}{d d d | f e e e h | f e e h | f e e e e}
$A$ & $B$  & $C$ &   \enot & (\enot & A & \eor & B)  & A  & \eif 	 & \enot 	 & C & 	 A & \eif 	& (B & \eif & C)  \\
 \hline
T&	T&	T&	F 	& 	F	 & 	T & T	 & T  	  & T & F	 & 	 F & T 	  	 & T & T	 & T	 & T 	 & T\Tstrut\\
T&	T&	F&	   	 F	& 	F	 & 	T & T	 & T  	  & T & T	 & 	 T & F	  	 & T & F	 & T	 & F	 & F 	  \\
T&	F&	T&	   	 T & 	F 	& 	T & F	 & F  	  & T & F	 & 	 F & T	  	 & T & T	 & F	 & T	 & T 	  \\
T&	F&	F&	      \TTbf{T}		&  F	 & 	T & F	 & 	F   & 	T & \TTbf{T}	 & 	 T & F 		 & T & \TTbf{T}	 & F	 & T	 & F\\\arrayrulecolor{light-gray}\hline
F&	T&	T&	   	 F	& 	T	 & 	F & T	 & 	T   & 	F & T	 & 	 F & T	  	 & F	 & F	 & T	 & T	 & T\Tstrut\\
F&	T&	F&	   	 F	& 	 T	& 	F & T	 & 	T   & 	F & T	 & 	T & F 	 	 & F	 & T	 & T	 & F 	 & F 	\\
F&	F&	T&	   	 F	& 	 T	& 	F & T	 & 	F   & 	F & T	 & 	F & T	  	 & F	 & T	 & F	 & T	 & T 	\\
F&	F&	F&	   	 F	& 	 T	& 	F & T	 & 	F   & 	F & T	 & 	T & F	  	 & F	 & T	 & F	 & T	 & F 	\\
\end{tabular}
\end{center}

\item $A \eif B$, $A \eand \enot B$ \hfill \myanswer{Inconsistent}

\item $A \eif (B \eif C)$, $(A \eif B) \eif C$, $A \eif C$ \hfill \myanswer{ Consistent}

\item $\enot B$, $A \eif B$, $A$ \vspace{.5ex} \hfill \myanswer{Inconsistent}
\item $\enot(A \eor B)$, $A \eiff B$, $B \eif A$\vspace{.5ex} \hfill \myanswer{Consistent}
\item $A \eor B$, $\enot B$, $\enot B \eif \enot A$\vspace{.5ex} \hfill \myanswer{Inconsistent}
\item $A \eiff B$, $\enot B \eor \enot A$, $A \eif B$\vspace{.5ex} \hfill \myanswer{Consistent}
\item $(A \eor B) \eor C$, $\enot A \eor \enot B$, $\enot C \eor \enot B$\vspace{.5ex} \hfill \myanswer{Consistent}
\end{earg}

\problempart
\label{pr.TT.equiv}
Use a truth table to determine whether each set of sentences are equivalent or not.
\begin{earg}
\item $A$ and $\enot A$
\item $A \eand \enot A$ and $\enot B \eiff B$
\item $[(A \eor B) \eor C]$ and $[A \eor (B \eor C)]$
\item $A \eor (B \eand C)$ and $(A \eor B) \eand (A \eor C)$
\item $[A \eand (A \eor B)] \eif B$ and $A \eif B$

\item $A\eif A$ and $A \eiff A$
\item $\enot(A \eif B)$ and $\enot A \eif \enot B$
\item $A \eor B$ and $\enot A \eif B$
\item$(A \eif B) \eif C$ and $A \eif (B \eif C)$
\item $A \eiff (B \eiff C)$ and $A \eand (B \eand C)$
\end{earg}

\problempart
\label{pr.TT.concepts}
\begin{earg}
\item Suppose that \meta{A} and \meta{B} are logically equivalent. What can you say about $\meta{A}\eiff\meta{B}$?
\begin{ebullet}
\item[] \myanswer{\meta{A} and \meta{B} have the same truth value on every line of a complete truth table, so $\meta{A}\eiff\meta{B}$ is true on every line. It is a tautology.}
\end{ebullet}

\item Suppose that $\meta{A}$, $\meta{B}$ and $\meta{C}$  are jointly inconsistent. What can you say about $(\meta{A}\eand\meta{B}\eand\meta{C})$?
\begin{ebullet}
\item[] \myanswer{Since the sentences are jointly inconsistent, there is no valuation on which they are all true. So their conjunction is false on every valuation. It is a contradiction}
\end{ebullet}

\item Suppose that \meta{A} and \meta{B} are logically equivalent. What can you say about $(\meta{A}\eor\meta{B})$?
\begin{ebullet}
\item[] \myanswer{Not much. Since $\meta{A}$ and $\meta{B}$ are true on exactly the same lines of the truth table, their disjunction is true on exactly the same lines. So, their disjunction is logically equivalent to them.}
\end{ebullet}

\item Suppose that \meta{A} and \meta{B} are \emph{not} logically equivalent. What can you say about $(\meta{A}\eor\meta{B})$?
\begin{ebullet}
\item[] \myanswer{\meta{A} and \meta{B} have different truth values on at least one line of a complete truth table, and $(\meta{A}\eor\meta{B})$ will be true on that line. On other lines, it might be true or false. So $(\meta{A}\eor\meta{B})$ is either a tautology or it is contingent; it is \emph{not} a contradiction.}
\end{ebullet}

\item Consider this principle:
\begin{ebullet}
\item[] Suppose $\meta{A}$ and $\meta{B}$ are logically equivalent. Suppose an argument contains $\meta{A}$ (either as a premise, or as the conclusion). The validity of the argument would be unaffected, if we replaced $\meta{A}$ with $\meta{B}$.
\end{ebullet}
Is this principle correct? Explain your answer.

\begin{ebullet}
\item[] The principle is correct. Since $\meta{A}$ and $\meta{B}$ are logically equivalent, they have the same truth table. So every valuation that makes $\meta{A}$ true also makes $\meta{B}$ true, and every valuation that makes $\meta{A}$ false also makes $\meta{B}$ false. So if no valuation makes all the premises true and the conclusion false, when $\meta{A}$ was among the premises or the conclusion, then no valuation makes all the premises true and the conclusion false, when we replace $\meta{A}$ with $\meta{B}$.
\end{ebullet}

\end{earg}


\chapter{HiCEnterprise domains}
\label{domains}

In the domain part of the package the significance of interaction between domains A and B is calculated as the
probability of observing a stronger contact under the fitted distribution. There are three distributions available:
Poisson (default), Negative Binomial and Hypergeometric.

\section{Available distributions}

\subsection{Poisson}
Another approach is to assume that the contacts are distributed according to the Poisson distribution with the $\lambda$ parameter depending on the distance from the diagonal. In this case, for every domain pair, we estimate the average contact frequency $\lambda_d$ in the diagonals corresponding to the distance between them and score the given domain contact against the Poisson distribution with the mean and variance $\lambda_d$. Poisson distribution is used as default by the program.

\subsection{Hypergeometric}

\begin{equation}
Pvalue = 1 - \sum_{i=0}^{k-1} \frac{{a\choose i}{N-a\choose b-i }}{{N\choose b}}
\end{equation}

Here $N$ (population size) is the sum of all frequencies in the Hi-C map, $a$ is the sum from the column of domain A and
$b$ is the sum from the row of domain B (number of success states in the population and number of draws). $k$ is the number of contacts between domains A and B. This idea
and original code was developed by Irina Tuszyńska and presented in (Niskanen et al. n.d.).

\subsection{Negative Binomial}
The negative binomial distribution is slightly more general than the Poisson distribution discussed in the previous section. In particular it allows for overdispersion of the data. In this case, for each pair of domains at the distance $d$ we estimate the mean contact frequency $\mu_d$ and variance $\sigma^2_d \geq \mu$ from all values in the respective diagonals and then score the contact significance of this domain pair against the negative binomial distribution with the estimated mean and variance.

\section{Input files}
\label{sec:input2}

To run the domain-domain interactions analysis you need:
\begin{itemize}
    \item one Hi-C map in numpy format for one chromosome
    \item file with domains definition in the format: domain\_id chromosome\_name start\_coordinate end\_coordinate (space
    delimited). Optionally fifth column may contain \lstinline{sherpa}\_level.
\end{itemize}

All coordinates should be provided in bp.

\subsubsection{Example files}
Example files are provided in \lstinline{HiCEnterprise/HiCEnterprise/tests/test_files} directory in \lstinline{maps} and \lstinline{doms}.

Overall, the usage looks like this:

\begin{lstlisting}
HiCEnterprise domains domains_options
\end{lstlisting}

To see the available arguments:
\begin{lstlisting}
HiCEnterprise domains -h
\end{lstlisting}

\subsubsection{Example runs}
There are a few required arguments for the analysis.
\begin{itemize}
    \item Path to the Hi-C map in a numpy format: \lstinline{--hic_map ./map40kb.npy}
    \item File with domain definition: \lstinline{--domain_file domains.txt}
    \item Name of the chromosome to run the analysis for: \lstinline{--chr 22}
    \item Resolution (bin size) of Hi-C maps in bp (all maps provided should be of the same resolution): \lstinline{--bin_res 40000}
\end{itemize}

For information on formats of files see~\ref{sec:input2}.

Run with only required arguments:
\begin{lstlisting}
HiCEnterprise domains --hic_map ./map40kb.npy --domain_file
./domains.txt --chr 22 --bin_res 40000
\end{lstlisting}

\subsubsection{Visualisation}

If you want to plot the results with matplotlib, add --plotting argument to the command. Resulting figures can be found
in director provided by --figures\_folder option.

In example:
\begin{lstlisting}
HiCEnterprise domains --hic_map ./map40kb.npy --domain_file
./domains.txt --chr 22 --bin_res 40000 --plotting
--figures_folder ./my_folder_for_figures
\end{lstlisting}

If you don not provide the --figures\_folder argument, ./figures directory will be created and the plots will be put
there. There are additional options that you can use to change your visualization, i.e. if you want to change colors that
represent the Hi-C map and domain-domain interactions, you can use --hic\_color and --interactions\_color with any
available palette from https://matplotlib.org/api/pyplot\_summary.html.

\section{Output files}

\subsection{stats folder}
This folder contains the results from the analysis. Result filenames consist of domains file name, map name,
'stats' or 'corr\_stats', chromosome name, statistical cutoff threshold, and distribution name. Example:
domains-map40kb-stats22-0\_01-hypergeom.txt.

\subsection{figures folder}
In this folder you will find the plotted figures if the --plotting argument was used. Interaction maps are
extracted to PNG files. Files are named by the map name, "corr" if the FDR corrected data is on the plot, domains file
name, and distribution name. Example: map40kb-corr\_domains-hypergeom.png

More interesting examples with real HiC maps are available on the HiCEnterprise site http://regulomics.mimuw.edu.pl/wp/hicenterprise/

\section{All arguments listed alphabetically}
\label{sec:arguments2}
\begin{itemize}
   \item --all\_domains : Stop remove pericentromeric domains and domains with rare interdomains contacts, where a mean
    number of contacts in one row is less than n*numer\_of\_domains. n = 1 and can be changed by --interact\_indomain parameter
    \item -b, --bin\_res : REQUIRED Resolution (size of the bins on the Hi-C maps) in bp i.e.~10000 for 10kb resolution.
    \item -c, --chr : REQUIRED Name of the chromosome for which to extract domain interactions.
    \item --distribution : The distribution on which you would like to base the identification of domain-domain
    interactions. Available: hypergeom, negbinom, poisson. Default is hypergeom.
    \item -d, --domain\_file : REQUIRED Text file with domain definition in the format: \\
    dom\_id(int) chromosome(int) dom\_start(bp) dom\_end(bp) sherpa-lvl(optional).
    \item -e, --ticks\_separation : Frequency of ticks on the plot.
    \item -f, --figures\_folder : Folder to save the figures (plots) in. Default is './figures/'.
     \item  -g --interact\_indomain : Multiplier of domains\_number, that is a threeshold for neglecting pericentromeric domains.
    Mutualy exclusive with --all\_domains option. Default = 1, higher number - more domains will be removed.
    \item -l, --plot\_title : The title of the plot. If it contains spaces, use quotation marks. Default is
    "Interactions".
    \item -m, --hic\_map : Path to the single-chromosome Hi-C map in numpy format.
    \item -n, --hic\_name : Name to use for Hi-C map. Default is the name of the file.
    \item -o, --hic\_color : The color of HiC map. You can choose the palette from Colormaps available here:
    https://matplotlib.org/api/pyplot\_summary.html. Recommended are Reds, Blues, YlOrBr, PuBu. Default is Greens.
    \item --plotting : If results should be plotted. matplotlib library is required.
    \item -r, --interactions\_color : The color of interactions. You can choose the palette from Colormaps available
    here: https://matplotlib.org/api/pyplot\_summary.html. Recommended are Reds, Blues, YlOrBr, PuBu. Default is YlOrBr.
    \item -s, --stats\_folder : Folder to save the statistics and significant points in. Default is './stats/'.
    \item --sherpa\_lvl : If there are sherpa levels in the file and which one to use.
    \item -t, --threshold :  Statistical cutoff threshold. Default is 0.01.
\end{itemize}