User:Addemf/sandbox/Technical Reasoning/Propositional Logic Exercises

Abstraction and Analysis of Propositions
Abstract and symbolize the following sentences, and then draw the corresponding truth-table.

1. If I go to the store today then I won't go to the store tomorrow.

2. Either 2 is prime or it is not prime.

3. Bari is larger than Aleksandr and Ziva, but not Vladymyr.

4. If it rains then the temperature will drop sharply.

For any expression like $$P\to \neg(Q\land((\neg P)\lor Q))$$, we will call such a thing a "sentence" if it is properly formed. We will define what it means to be "properly formed" later, but for now a few examples will suffice to give the idea.

$$P\land \neg (Q\lor P)$$ is well formed.

$$P\land $$ is not well-formed, nor is $$\neg\neg$$ or $$PP$$.

For any given sentence, one may draw its corresponding "parse tree".

To give an example, consider the sentence $$P\to\neg(Q\land ((\neg P)\lor Q))$$.

Its syntax tree is animated above, and a still frame of the result is in the thumbnail to the right.



This is constructed by finding the "main operator" which in this case is the conditional $$\to$$ in black.

Then we find the subsentences to the left and right of the conditional. Both are in red.

To the left is P and to the right is $$\neg(Q\land((\neg P)\lor Q))$$. Since the right side has its own main operator, which is the negation, we write this symbol in the tree.

There is nothing below P but there are more subsentences under the negation. In particular, what is under it is the conjunction, $$\land$$ shown in green.

The procedure continues likewise, finding subsentences to the left and right of the $$\land$$.

Find the parse trees for the following sentences.


 * $$(P\to Q)\land (Q\to P)$$
 * $$\neg(\neg P)$$

Variable Value Assignments
We have learned the basic ideas of truth-tables at an introductory level, but some concepts are easier to discuss if we become more rigorous in our definitions.

In particular, we need to become more serious about how we define what is happening at each row of a truth-table.

In the example

row 2 represents what can be said about the sentence $$(\neg P)\lor Q$$ when P is assigned T and Q is assigned F.

Once this assignment is made, we compute subsequent values from these and the rules for the logical operators. For example, with P assigned to T, we compute that $$\neg P$$ evaluates to F according to the rule for negation.

Then $$(\neg P)\lor Q$$ evaluates to F. This is because the left side evaluates to F, and also Q is assigned F, and because of the rule for disjunction.

We will call the assignment of T to P and F to Q and example of a "variable value assignment". Any other assignment would be another example.

For a sentence with variables P and Q, and for a variable value assignment to the same variables, we can compute the truth-value of the sentence.

Tautology, Contradiction, Contingency
Let $$\sigma$$ be the variable value assignment to P and Q given by $$\sigma(P)=F,\sigma(Q)=F$$.

1. Show that $$v_\sigma(P) = F$$. (Hint: Only clause 1. of the definition above is needed.)

2. Show that $$v_\sigma(\neg P) = T$$. (Hint: Only clauses 1 and 2 are needed.)

3. Show that $$v_\sigma(P\lor Q) = F$$. (Hint: Only clauses (1.) and (4.) are needed.)

4. Show that $$v_\sigma(\neg((\neg P)\land(\neg Q))) = F$$.

In effect, a truth-table for a sentence is nothing but a tabular display of every possible variable value assignment, and the value that these determine.

1. Show that $$P\lor(\neg P)$$ is a tautology. (Draw its truth-table, and indicate how the truth-table demonstrates that the sentence is a tautology.)

2. Show that $$\neg(P\lor(\neg P))$$ is a contradiction. (Reuse the table from part (1.).)

3. Show that P by itself is a contingency.

4. Find an example tautology which does not merely have the form $$\alpha\lor (\neg \alpha)$$, where $$\alpha$$ is some sentence.

1. Show that sentence $$\alpha$$ is a tautology if and only if $$\neg\alpha$$ is a contradiction.

2. Show that $$\alpha$$ is a contingency if and only if the following condition holds: There is at least one variable value assignment $$\sigma$$ such that $$v_\sigma(\alpha)=T$$ and at least one variable value assignment $$\tau$$ such that $$v_\tau(\alpha)=F$$.

Entailment and Equivalence
Most of what we have discussed so far has concerned single, isolated propositions. It's the right starting place, but because we are interested in proofs, then ultimately we are more interested in the flow of truth from some sentences to others (speaking metaphorically).

In this subsection, we will see a first exposure to this idea, in the concept of entailment.

Show that the following entailments hold. I recommend drawing the truth-table for both sentences, and highlighting the rows at which the left-hand side's sentence is true. If any of these is F for the right-hand side's sentence, then the entailment does not hold.

1. $$P\vDash P$$

2. $$P\vDash P\lor Q$$

3. $$P\land(P\to Q)\vDash Q$$

4. $$P\land(\neg P)\vDash Q$$

(Hint: (4.) is likely to cause some confusion, but I assure that this entailment is correct and without typos. Notice that there is no row of its truth-table at which the left-hand side's sentence is T.  Therefore, trivially, it entails every sentence!.

It may help to think in terms of the alternate formulation given in the definition above. $$\{\sigma:v_\sigma(P\land(\neg P)=T\} = \emptyset$$. Since we already know that $$\emptyset$$ is a subset of every set, then
 * $$\{\sigma:\sigma\vDash P\land(\neg P)\}\subseteq\{\sigma:\sigma\vDash Q \}$$

Show that the following entailments do not hold.

4. $$P\vDash Q$$

5. $$P\lor (\neg P)\vDash P$$

We have now, so-to-speak, "overloaded" the meaning of the symbol $$\vDash$$.

For a variable value assignment $$\sigma$$ and sentence $$\alpha$$, we have defined $$\sigma\vDash\alpha$$.

Also for sentences $$\alpha,\beta$$ we have defined $$\alpha\vDash\beta$$.

How are these different?

1. Show that, if $$\alpha$$ is a tautology then $$\alpha\vDash\beta$$ if and only if $$\beta$$ is a tautology.

2. Show that if $$\alpha$$ is a contradiction, then $$\alpha\vDash\beta$$ for every sentence $$\beta$$.

3. Show that $$\alpha\vDash\beta$$ if and only if $$\alpha\to\beta$$ is a tautology.

1. Show that $$P\equiv \neg(\neg P)$$.

2. Show that $$\neg(P\lor Q)\equiv (\neg P)\land(\neg Q)$$.

3. The result of part (2.) should look very familiar! It is the logic "version" of the "U-C De Morgan's Law" for sets!

Also show that the "logic version" of the "I-C De Morgan's Law" is also true.

The above shows that there is some significant overlap between what learned about sets, and what we are establishing now for logic.

In fact the connection is nearly on the surface. Recall the definition that
 * $$A\cap B = \{z:z\in A \land z\in B\}$$

Previously we wrote the above, using the word "and" but here we replace it with the symbol for conjunction. But the point is to emphasize the realization that intersection is defined in terms of conjunction.

1. Show how union is defined in terms of disjunction.

2. Show how the complement is defined in terms of negation.

3. Note that the subset relation between two sets, $$A\subseteq B$$, is not an operation which forms new sets. While intersection, union, and complement are operations which form a new set from existing sets, this is not true for the subset relation between sets.

However, there is still a way to understand how the subset relation can be stated in terms of the logic that we have been studying.

Show that $$A\subseteq B$$ if and only if, for every element z in the universe,
 * $$z\in A \to z\in B$$.

1. Show that $$P\land(Q\lor R)$$ is not equivalent to $$(P\land Q)\lor R$$.

2. Show that $$P\to Q$$ is not equivalent to $$Q\to P$$.

3. Show that $$P$$ and $$P\land Q$$ are not equivalent, but that one of these entails the other.

Show that $$\alpha\equiv\beta$$ if and only if $$\alpha\leftrightarrow \beta $$ is a tautology.

Semantic Consequence
With all of the above now established, we are in a position to describe semantic consequence, which is an important part of the analysis of arguments.

Consider the argument
 * "Either the butler or the grandson killed the CEO. But the grandson was in the Seychelles, so the grandson did not kill the CEO.  Therefore the butler killed the CEO."

We might abstract this as
 * "Either P or Q. But if R then not Q, and R.  Therefore P."

What does each of P, Q, and R abstract in the above abstraction?

Symbolically we might represent this by a set of premises, together with a conclusion.


 * Premises = $$\{P\lor Q, R\to (\neg Q), R\}$$.
 * Conclusion = R.

This argument is valid, because the premises "imply" the conclusion. That means, so long as the premises are true, then the conclusion must be true.

When assessing validity we do not question the truth of the premises. That is a question of soundness which we will consider later.

Therefore when assessing the validity of an argument, we only consider the set of variable value assignments for which all of the premises are true,
 * $$\{\sigma:\sigma\vDash\alpha, \text{ for every } \alpha\in\text{ Premises }\}$$

Find $$\{\sigma:v_\sigma(\alpha)=T, \text{ for every } \alpha\in\text{ Premises }\}$$ for the example
 * Premises = $$\{P\lor Q, R\to (\neg Q), R\}$$

Hint: Draw a truth-table for each sentence $$\alpha\in\text{ Premises}$$ and find the rows at which all three are T.

We say that the conclusion is a "semantic consequence" of the premises, so long as the following condition is met: For each $$\sigma$$ which satisfies all of the premises, it also satisfies the conclusion.

1. Show that the argument given by


 * Premises = $$\{P\lor Q, R\to (\neg Q), R\}$$.
 * Conclusion = R.

is valid.

2. Show that the argument
 * Premises = $$\{P\lor Q\}$$
 * Conclusion = P

is invalid.

Suppose that (Premises, Conclusion) is an argument and Premises is a finite set of sentences.

Define $$\bigwedge_{\alpha\in \text{Premises}}\alpha$$ to be the sentence which results from joining together all of the sentences in Premises with a conjunction.

(For example, if Premises were $$\{P,Q\lor R\}$$ then we would have
 * $$\bigwedge_{\alpha\in\text{Premises}}\alpha = P\land (Q\lor R)$$

.)

Show that the argument is valid if and only if
 * $$\bigwedge_{\alpha\in\text{Premises}}\alpha \vDash \text{Conclusion}$$

Let $$\alpha$$ be a tautology and $$\beta$$ a contradiction.

Show that $$\emptyset \vDash\alpha$$, and $$\beta\vDash P\land(\neg P)$$.