class: center, middle, inverse, title-slide .title[ # Sentential Logic (SL) ] .date[ ### MSA 2025 ] --- # Sentential logic (SL) _Sentential Logic_ (SL) is a _formal_ language. SL is very basic and rudimentary; there are several other, more powerful logical languages. However, we will start with SL, as it's the simplest. SL has precise definitions. Due to its simplicity, SL contains no ambiguities. **We will use SL to model a portion of the logical relations that can be expressed in English (a natural language)**. SL will only capture logical relations in our language, leaving aside other elements (emphasis, tone, or other dialectical moves). 1. Either Mr. Green or the butler is the assassin. 2. The assassination was not committed in the library. 3. Mr. Green was in the library. 4. If Mr. Green was in the library, then he is not the assassin. 5. Therefore, the butler is the assassin. --- class: medium-font # Syntax of SL There are three kinds of symbols in SL: | Type | Symbol | | ---------------- | ------------------------- | | Atomic sentences | `\(A\)`, `\(B\)`, `\(C\)`, …, `\(Z\)`, `\(A_1\)`, `\(A_2\)`,... | | Connectives | `\(\sim\)`, `\(\wedge\)`, `\(\vee\)`, `\(\rightarrow\)`, `\(\leftrightarrow\)` | | Brackets | `\((\)` `\()\)` `\([\)` `\(]\)` `\(\{\)` `\(\}\)` | .shadow[ .emphasis[ **Expression**: An _expression_ of SL is any string of symbols of SL. ] ] Examples of expressions in SL: - `\((A\wedge B)\)` - `\(A () \sim X_2 \vee \wedge \rightarrow (\)` --- class: small-font # Atomic sentences in SL .shadow[ .emphasis[ **Atomic Sentence**: An _atomic sentence_ is a sentence that is not composed by any other sentences or other symbols. It is represented by a single uppercase letter. ] ] Let `\(A\)` and `\(B\)` be sentences in SL. If so, the following is true: - `\(A\)` is an atomic sentence. - `\(B\)` is an atomic sentence. - `\((A \wedge B)\)` is _not_ an atomic sentence. - `\(\Not A\)` is _not_ an atomic sentence. We will use SL to represent sentences in English. To do this, we create a **symbolization key**, such as the following: - `\(A\)`: The gardener did it. - `\(B\)`: The butler did it. - `\(C\)`: The maid did it. --- class: small-font # Syntax of SL (cont.) The _syntax_ of a language concerns the proper arrangement of symbols required to create well-formed sentences. .shadow[ .emphasis[ 1. Every sentence letter is a sentence. 2. If `\(A\)` is a sentence, then `\(\Not A\)` is a sentence. 3. If `\(A\)` and `\(B\)` are sentences, then `\((A \mathop{\wedge} B)\)` is a sentence. 4. If `\(A\)` and `\(B\)` are sentences, then `\((A \vee B)\)` is a sentence. 4. If `\(A\)` and `\(B\)` are sentences, then `\((A \rightarrow B)\)` is a sentence. 4. If `\(A\)` and `\(B\)` are sentences, then `\((A \leftrightarrow B)\)` is a sentence. 7. Nothing else is a sentence. ] ] Let `\(P\)`, `\(Q\)`, and `\(R\)` be atomic sentences in SL. Which of the following is a sentence? 1. `\((P \vee Q)\)` 2. `\((R \rightarrow (P \vee Q))\)` 3. `\(((P \vee Q)\)` 4. `\(Q () \Not R \vee \wedge \rightarrow (\)` 5. `\(P \vee Q\)` --- class: medium-font # Connectives in SL | Symbol | Name of symbol | Name in SL | Meaning in English | | ----------------- | ---------------- | ------------- | ------------------------- | | `\(\sim\)` | tilde | negation | It is not the case that…' | | `\(\wedge\)` | wedge | conjunction | "Both… and…" | | `\(\vee\)` | descending wedge | disjunction | "Either… or…" | | `\(\rightarrow\)` | arrow | conditional | "If… then…" | | `\(\leftrightarrow\)` | double arrow | biconditional | "…if and only if…" | We already discussed the _syntax_ of SL. Now we will discuss two things: - How to use SL and its connectives to symbolize some sentences in English. - The _semantics_ of SL. - Semantics is about the _meaning_ of linguistic expressions. --- class: medium-font # Semantics of SL In SL, the _meaning_ of sentences is their truth-value (true or false). .shadow[ .emphasis[ **Meaning of a sentence**: A _sentence_ in SL has only one of two meanings: it can be true `\((T)\)` or false `\((F)\)` . ] ] Because of this, SL can help us to model sentences in English that are either true or false. **It will not help us model sentences that cannot have a truth-value assigned** to them. Examples of sentences that cannot have a truth value: -- - Is today sunny? - ¡Abre la puerta! - `\(2+2\)` --- exclude: true # Negation Let `\(B\)`: Mary is in Barcelona. Then `\(\Not B\)`: It is not the case that Mary is in Barcelona. .shadow[ .emphasis[ A sentence can be symbolized as `\(\Not A\)` if it can be paraphrased in English as ‘It is not the case that ...’, ‘...is not...’ The sentence `\(\Not A\)` is called the _negation_ of `\(A\)`. ] ] Another example: Let `\(M\)`: The mirror is replaceable. 1. The mirror can be replaced. 2. The mirror is irreplaceable. 3. The mirror is not replaceable. --- # Negation: semantics .shadow[ .emphasis[ **Semantics of negation**: `\(\Not A\)` is true when `\(A\)` is false. `\(\Not A\)` is false when `\(A\)` is true. ] ] Truth-table of negation (where true is T, false is F): <table class="truth"><tbody><tr><th>A</th><th class="dv"></th><th></th><th>~</th><th>A</th></tr><tr><td>T</td><td class="dv"></td><td></td><td class="mc">F</td><td></td></tr><tr><td>F</td><td class="dv"></td><td></td><td class="mc">T</td><td></td></tr></tbody></table> Suppose the following sentence is _false_: `\(M\)`: The mirror is replaceable. What is the truth-value of `\(\Not M\)`? -- True. What is the truth-value of `\(\Not \Not M\)`? -- False. --- exclude: true # Conjunction Let `\(A\)`: Adam is athletic, and `\(B\)`: Barbara is athetic. Then the sentence "Adam is athletic, and Barbara is also athletic" can be symbolized by `\((A \wedge B)\)` in SL .shadow[ .emphasis[ A sentence can be symbolized as `\((A \wedge B)\)` if it can be paraphrased in English as "Both ... , and ... ", or as "... , but ...", or as "although... , ...". The sentence `\((A \wedge B)\)` is called a _conjunction._ `\(A\)` and `\(B\)` are called _conjuncts._ ] ] --- # Conjunction: semantics .shadow[ .emphasis[ **Semantics of conjunction**: `\((A \wedge B)\)` is true only when both `\(A\)` and `\(B\)` are true. Otherwise, `\((A \wedge B)\)` is false. ] ] <table class="truth"><tbody><tr><th>A</th><th>B</th><th class="dv"></th><th></th><th></th><th>(A</th><th> ∧ </th><th>B)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr></tbody></table> Let `\(A\)`: Adam is athletic, and `\(B\)`: Barbara is athetic. Suppose `\(A\)` is false, but `\(B\)` is true. What is the truth-value of `\((A \wedge B)\)`? -- False. --- # Conjunction: examples 1. Barbara is athletic and energetic. 2. Barbara and Adam are both athletic. 3. Although Barbara is energetic, she is not athletic. Let's use this translation key: - `\(A\)`: Adam is athletic. - `\(B\)`: Barbara is athetic. - `\(E\)`: Barbara is energetic. -- 1. `\((B \wedge E)\)` 2. `\((B \wedge A)\)` 3. `\((E \wedge \Not B)\)` Suppose `\(A\)` is false, `\(B\)` is true, and `\(E\)` is true. What are the truth-values of these sentences? -- 1. True. 2. False. 3. False. --- exclude: true # Disjunction Let's define the following symbolization key: - `\(H\)`: Hannah will play videogames. - `\(R\)`: Ryan will play videogames. - `\(M\)`: Hannah will watch movies. Then... 1. Either Hannah will play videogames, or she will watch movies: `\((H \vee M)\)` 2. Either Hannah or Ryan will play videogames: `\((H \vee R)\)` .shadow[ .emphasis[ A sentence can be symbolized as `\((A \vee B)\)` if it can be paraphrased in English as "Either... , or...". The sentence `\((A \vee B)\)` is called a _disjunction._ `\(A\)` and `\(B\)` are called _disjuncts._ ] ] --- # Disjunction: semantics .shadow[ .emphasis[ **Semantics of disjunction**: `\((A \vee B)\)` is true when `\(A\)` is true, when `\(B\)` is true, or when both `\(A\)` and `\(B\)` are true. If both `\(A\)` and `\(B\)` are false, then `\((A \vee B)\)` is false. ] ] <table class="truth"><tbody><tr><th>A</th><th>B</th><th class="dv"></th><th></th><th></th><th>(A</th><th>∨</th><th>B)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr></tbody></table> Suppose `\(H\)` is true but `\(R\)` is false. What is the truth-value of `\((H \vee R)\)`? -- True. --- class: medium-font # Disjunction: examples 2. You get either soup or salad. 2. Either you will not have soup, or you will not have salad. 3. You will have neither soup nor salad. 4. You get either soup or salad, but not both. For these sentences let's use this symbolization key: - `\(S_1\)`: You will get soup - `\(S_2\)`: You will get salad -- 1. `\((S_1 \vee S_2)\)` 2. `\((\Not S_1 \vee \Not S_2)\)` 3. `\(\Not (S_1 \vee S_2)\)` 4. `\([(S_1 \vee S_2) \wedge \Not (S_1 \wedge S_2)]\)` Note: Our disjunction connective is also called _inclusive or_, because the resulting sentence is true when either one of the disjuncts is true, or _when both disjuncts are true_. We don't have a symbol for the _exclusive or_, which is true only when one of the disjuncts is true. --- exclude: true # Conditional 1. If Jean is in London, then Jean is in England. 2. Jean is in England only if Jean is in London. `\(L\)` : Jean is in London. `\(E\)` : Jean is in England. .shadow[ .emphasis[ A sentence can be symbolized as `\((A \rightarrow B)\)` if it can be paraphrased in English as ‘If ..., then ...’ or ‘... only if ...’. The sentence `\((A \rightarrow B)\)` is called a _conditional_. `\(A\)` is called the _antecedent_, and `\(B\)` is called the _consequent._ ] ] Sentence (1): `\((L \rightarrow E)\)`. Sentence (2): `\((E \rightarrow L)\)`. --- # Conditional: semantics .shadow[ .emphasis[ **Semantics of conditional**: `\((A \rightarrow B)\)` is false only when `\(A\)` is true and `\(B\)` is false. Otherwise, `\((A \rightarrow B)\)` is true. ] ] <table class="truth"><tbody><tr><th>A</th><th>B</th><th class="dv"></th><th></th><th></th><th>(A</th><th>→</th><th>B)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr></tbody></table> Let `\(L\)` : Jean is in London. `\(E\)` : Jean is in England. Suppose `\(L\)` is false, but `\(E\)` is true. What is the truth-value of `\((E \rightarrow L)\)`? -- False. --- class: small-font # Conditional: semantics In the case of the conditional, the _order_ of the sentences matters! Look at the second and third row of the truth-table of the conditional. <table class="truth"><tbody><tr><th>A</th><th>B</th><th class="dv"></th><th></th><th></th><th>(A</th><th>→</th><th>B)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr></tbody></table> Consider A is true and B is false. Then `\((A \rightarrow B)\)` is false, but `\((B \rightarrow A)\)` is true! Consider this other example: Let `\(L\)` : Jean is in London. `\(E\)` : Jean is in England. Suppose Jean is in England but not in London. So `\(E\)` is true but `\(L\)` is false. If Jean is in London, then Jean is in England. `\((L \rightarrow E)\)`: True! If Jean is in England, then Jean is in London: `\((E \rightarrow L)\)`: False! --- exclude: true # Biconditional 1. If Tim is a bachelor, then he is an unmarried man. 2. If Tim is an unmarried man, then he is a bachelor. 3. Tim is an unmarried man if and only if he is a bachelor. `\(B\)`: Tim is a bachelor. `\(U\)`: Tim is an unmarried man. (1) is `\((B \rightarrow U)\)`. (2) is `\((U \rightarrow B)\)`. (3) is `\((B \leftrightarrow U)\)` We can use the biconditional connective ( `\(\leftrightarrow\)` ) to translate sentence (3). .shadow[ .emphasis[ A sentence can be symbolized as `\((A \leftrightarrow B)\)` if it can be paraphrased in English as ‘... if and only if ...’. The sentence `\((A \leftrightarrow B)\)` is called a _biconditional_. ] ] --- # Biconditional: semantics .shadow[ .emphasis[ **Semantics of biconditional**: `\((A \leftrightarrow B)\)` is true when `\(A\)` and `\(B\)` are true, or when `\(A\)` and `\(B\)` are false. Otherwise, `\((A \rightarrow B)\)` is false. ] ] <table class="truth"><tbody><tr><th>A</th><th>B</th><th class="dv"></th><th></th><th></th><th>(A</th><th>↔</th><th>B)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr></tbody></table> `\(B\)`: Tim is a bachelor. `\(U\)`: Tim is an unmarried man. Suppose `\(B\)` and `\(U\)` are false. What is the truth-value of `\((B \leftrightarrow U)\)`? -- True. --- # Summary: Semantics of connectives <table class="truth"><tbody><tr><th>A</th><th>B</th><th class="dv"></th><th></th><th>~</th><th>A</th><th class="dv"></th><th></th><th></th><th>(A</th><th>∧</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>∨</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>→</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>↔</th><th>B)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td class="mc">F</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td class="mc">F</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr></tbody></table> --- # Main connective of a sentence The main connective of a sentence is the connective with the largest scope. In other words, is the connective that _rules over all_ the components of the sentence. - Negation rules over the sentence that is immediately to the right of the tilde. Thus, if the sentence starts with a negation, that's the main connective. `\(\stackrel{\downarrow}{\Not} P\)` `\(\stackrel{\downarrow}{\Not} (P \wedge Q)\)` `\(\stackrel{\downarrow}{\Not} [R \vee (P \wedge Q)]\)` `\(\stackrel{\downarrow}{\Not} \{[R \vee (P \wedge Q)]\rightarrow S\}\)` - The other connectives rule over the sentences that are immediately to the left and right of the connective. If the connective rules over the whole sentence, that's the main connective. But if there are other sentences not ruled by the connective, then that's not the main connective, and you should examine another one. Activity: Place a downward arrow over the main connective of the following sentences: `\((P \wedge Q)\)` `\([(P \wedge Q) \vee R]\)` `\(\{[R \vee (P \wedge Q)]\rightarrow S\}\)` `\((\Not P \wedge Q)\)` --- # Main connective of a sentence Activity: Place a downward arrow over the main connective of the following sentences: `\((P \stackrel{\downarrow}{\wedge} Q)\)` `\([(P \wedge Q) \stackrel{\downarrow}{\vee} R]\)` `\(\{[R \vee (P \wedge Q)] \stackrel{\downarrow}{\rightarrow} S\}\)` `\((\Not P \stackrel{\downarrow}{\wedge} Q)\)` Another method to determine the main connective: - If the sentence starts with a negation, that's the main connective. - Otherwise, start counting the brackets. For each opening bracket, add 1. For each closing bracket, substract 1. When your count is exactly 1, the first operator you hit (apart from `\(\Not\)`) is the main connective. `\(\underset{1}{(}P \stackrel{\downarrow}{\wedge} Q)\)` `\(\underset{1}{[}\underset{2}{(}P \wedge Q\underset{1}{)} \stackrel{\downarrow}{\vee} R]\)` `\(\underset{1}{\{}\underset{2}{[}R \vee \underset{3}{(}P \wedge Q\underset{2}{)}\underset{1}{]} \stackrel{\downarrow}{\rightarrow} S\}\)` `\(\underset{1}{(}\Not P \stackrel{\downarrow}{\wedge} Q)\)` --- # Syntax trees We can use syntax trees to calculate the truth-value of a compound sentence, given a truth-value assignment of the atomic sentences. Step 1: Create syntax tree by decomposing the sentences into less complex ones, starting from the main connective, until all of the atomic sentences are exposed. Step 2: Calculate the truth-value of all the sentences in the tree, starting from the bottom. Decomposing sentences: <img src="assets/sl-decomposing.png" alt="" height="140"/> --- class: medium-font # Syntax trees: example Activity: Create a syntax tree for the following sentence in SL, and use it to calculate its truth-value given the truth-value assignment given: `\(\{[R \vee (P \wedge Q)]\rightarrow \Not S\}\)` `\(P\)`: False; `\(Q\)`: False; `\(R\)`: True; `\(S\)`: True. Step 1: Syntax tree: <img src="assets/sl-syntaxtree1.png" alt="" height="320"/> --- # Syntax trees: example Step 2: Calculating truth value of sentences (from bottom to top): `\(P\)`: False; `\(Q\)`: False; `\(R\)`: True; `\(S\)`: True. <img src="assets/sl-syntaxtree2.png" alt="" height="320"/> --- exclude: true ### Quiz 4 question 7 > The following paragraph contains an argument. State it in **standard form**:<br> > _The gardener did it. After all, it was either the butler or the gardener. And the butler didn't do it._ All of these answers are incorrect: After all, it was either the butler or the gardener. And the butler didn't do it, so the gardener did it. It was either the butler or the gardener.<br> The butler didn't do it.<br> The gardener did it. 1. It was either the butler or the gardener. 2. The butler didn't do it. 3. The gardener did it. Correct answer: 1. It was either the butler or the gardener. 2. The butler didn't do it. 3. Therefore, the gardener did it. --- exclude: true ### Quiz 4 question 8 Suppose `\(A\)` is true and `\(H\)` is false. What is the truth-value of `\(\Not (A \wedge H)\)`. <table class="truth"><tbody><tr><th>A</th><th>B</th><th class="dv"></th><th></th><th>~</th><th>A</th><th class="dv"></th><th></th><th></th><th>(A</th><th>∧</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>∨</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>→</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>↔</th><th>B)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td class="mc">F</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td class="mc">F</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr></tbody></table> --- ### Another syntax-tree example What is the truth-value of `\((\Not P \rightarrow \Not \Not Q)\)`, if `\(P\)` is true and `\(Q\)` is false? Tools: <table class="truth"><tbody><tr><th>A</th><th>B</th><th class="dv"></th><th></th><th>~</th><th>A</th><th class="dv"></th><th></th><th></th><th>(A</th><th>∧</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>∨</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>→</th><th>B)</th><th></th><th class="dv"></th><th></th><th></th><th>(A</th><th>↔</th><th>B)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td class="mc">F</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td class="mc">F</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">F</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td><td class="dv"></td><td></td><td></td><td></td><td class="mc">T</td><td></td><td></td></tr></tbody></table> <img src="assets/sl-decomposing.png" alt="" height="140"/> --- ### Another syntax-tree example What is the truth-value of `\((\Not P \rightarrow \Not \Not Q)\)`, if `\(P\)` is true and `\(Q\)` is false? .center[ <img src="assets/sl-syntaxtree3.png" alt="" height="320"/>] --- # Complete truth-tables for sentences If we do the syntax tree of `\(\Not (A \wedge H)\)` when `\(A\)` is true and `\(H\)` is false, we would find that the sentence is true. More generally, we are able to calculate the truth-value of this sentence because we are given a truth-value assignment of its atomic sentences. What can we do if we don't know the truth-value of the atomic sentences? We can calculate all the possible truth-values of the sentence, given all combinations of truth-values of its atomic sentences. We do this by creating a _complete truth-table of the sentence_. -- <table class="truth"><tbody><tr><th>A</th><th>H</th><th class="dv"></th><th></th><th>~</th><th>(</th><th>A</th><th>∧</th><th>H</th><th>)</th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td class="mc">F</td><td></td><td>T</td><td>T</td><td>T</td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td>T</td><td>F</td><td>F</td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td>F</td><td>F</td><td>T</td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td>F</td><td>F</td><td>F</td><td></td></tr></tbody></table> --- class: small-font ### Complete truth-tables for sentences: Steps 1) In the first line, we write all the atomic sentences present in the sentence, we draw a vertical line, we write the sentence, and then we draw a horizontal line. <table class="truth"><tbody><tr><th>A</th><th>H</th><th class="dv"></th><th></th><th>~</th><th>(</th><th>A</th><th>∧</th><th>H</th><th>)</th></tr> <tr><td> </td><td></td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td></td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td></td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td></td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> </tbody></table> -- 2) We need to determine the number of rows our table will have. The number of rows is given by `\(2^n\)`, where `\(n\)` is the number of atomic sentences. In this case, we have 2 atomic sentences, so `\(2^2=4\)`, which means that our table will have four rows. <table class="truth"><tbody><tr><th></th><th>A</th><th>H</th><th class="dv"></th><th></th><th>~</th><th>(</th><th>A</th><th>∧</th><th>H</th><th>)</th></tr> <tr><td>1</td><td> </td><td></td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td>2</td><td> </td><td></td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td>3</td><td> </td><td></td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td>4</td><td></td><td></td><td class="dv"></td><td></td><td class="mc"> </td><td></td><td></td><td></td><td></td><td></td></tr> </tbody></table> --- class: small-font 3) Below the atomic sentences, we write all possible truth-value combinations, each in a separate row. We start from the rightmost atomic sentence, and we alternate between True and False. <table class="truth"><tbody><tr><th>A</th><th>H</th><th class="dv"></th><th></th><th>~</th><th>(</th><th>A</th><th>∧</th><th>H</th><th>)</th></tr> <tr><td> </td><td>T</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td>F</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td>T</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td>F</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> </tbody></table> -- In the next column, we write two times True, and two times False, and so on. <table class="truth"><tbody><tr><th>A</th><th>H</th><th class="dv"></th><th></th><th>~</th><th>(</th><th>A</th><th>∧</th><th>H</th><th>)</th></tr> <tr><td>T</td><td>T</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td>T</td><td>F</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td>F</td><td>T</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td>F</td><td>F</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td></td><td></td><td></td><td></td></tr> </tbody></table> --- class: small-font 4) We now work in the right part of the table. We start by copying the truth-value of the atomic sentences immediately below their apprearance in the sentence. <table class="truth"><tbody><tr><th>A</th><th>H</th><th class="dv"></th><th></th><th>~</th><th>(</th><th>A</th><th>∧</th><th>H</th><th>)</th></tr> <tr><td>T</td><td>T</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td>T</td><td></td><td>T</td><td></td></tr> <tr><td>T</td><td>F</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td>T</td><td></td><td>F</td><td></td></tr> <tr><td>F</td><td>T</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td>F</td><td></td><td>T</td><td></td></tr> <tr><td>F</td><td>F</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td>F</td><td></td><td>F</td><td></td></tr> </tbody></table> -- 5) We calculate the truth-value of the compound sentences, starting from the innermost sentences, until we get to the main connective. Calculating `\((A \wedge H)\)`: <table class="truth"><tbody><tr><th>A</th><th>H</th><th class="dv"></th><th></th><th>~</th><th>(</th><th>A</th><th>∧</th><th>H</th><th>)</th></tr> <tr><td>T</td><td>T</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td>T</td><td class="mc1">T</td><td>T</td><td></td></tr> <tr><td>T</td><td>F</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td>T</td><td class="mc1">F</td><td>F</td><td></td></tr> <tr><td>F</td><td>T</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td>F</td><td class="mc1">F</td><td>T</td><td></td></tr> <tr><td>F</td><td>F</td><td class="dv"></td><td></td><td class="mc"></td><td></td><td>F</td><td class="mc1">F</td><td>F</td><td></td></tr> </tbody></table> --- Calculating `\(\Not (A \wedge H)\)`: <table class="truth"><tbody><tr><th>A</th><th>H</th><th class="dv"></th><th></th><th>~</th><th>(</th><th>A</th><th>∧</th><th>H</th><th>)</th></tr> <tr><td>T</td><td>T</td><td class="dv"></td><td></td><td class="mc">F</td><td></td><td>T</td><td class="mc1">T</td><td>T</td><td></td></tr> <tr><td>T</td><td>F</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td>T</td><td class="mc1">F</td><td>F</td><td></td></tr> <tr><td>F</td><td>T</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td>F</td><td class="mc1">F</td><td>T</td><td></td></tr> <tr><td>F</td><td>F</td><td class="dv"></td><td></td><td class="mc">T</td><td></td><td>F</td><td class="mc1">F</td><td>F</td><td></td></tr> </tbody></table> As you can see from the second row, when `\(A\)` is true and `\(H\)` is false, `\(\Not (A \wedge H)\)` is true. But the truth-table of the sentence gives us not only that result, but also all possible truth-values of it, given all possible-truth values of the atomic sentences that are featured in it. --- # Activity Exercise: Calculate the complete truth-table of the following sentence: `\((\Not P \rightarrow \Not \Not Q)\)` -- <table class="truth"><tbody><tr><th>P</th><th>Q</th><th class="dv"></th><th></th><th>(</th><th>~</th><th>P</th><th>→</th><th>~</th><th>~</th><th>Q)</th><th></th></tr><tr><td>T</td><td>T</td><td class="dv"></td><td></td><td></td><td>F</td><td>T</td><td class="mc">T</td><td>T</td><td>F</td><td>T</td><td></td></tr><tr><td>T</td><td>F</td><td class="dv"></td><td></td><td></td><td>F</td><td>T</td><td class="mc">T</td><td>F</td><td>T</td><td>F</td><td></td></tr><tr><td>F</td><td>T</td><td class="dv"></td><td></td><td></td><td>T</td><td>F</td><td class="mc">T</td><td>T</td><td>F</td><td>T</td><td></td></tr><tr><td>F</td><td>F</td><td class="dv"></td><td></td><td></td><td>T</td><td>F</td><td class="mc">F</td><td>F</td><td>T</td><td>F</td><td></td></tr></tbody></table>