CSCI 301 L04 Notes

Lecture 4 - Notes

Logic 1

Announcements

Statements

Definition: A statement is an English sentence or mathematical expression that is either definitely true or definitely false. That is, a statement has a definite truth value (true or false).

Examples:

Sentence/Expression Statement?
Add \(5\) to both sides No
\(\mathbb{Z}\) No
Adding \(5\) to both sides of \(x-5=37\) gives \(x=42\) Yes
\(42 \in \mathbb{Z}\) Yes
\(42\) No
What is the solution of \(2x=84\)? No
The solution of \(2x=84\) is \(41\) Yes
\(42\) is not a number Yes
\(x\) is a multiple of \(8\) No

This last one,

\(x\) is a multiple of \(8\)

has a truth value that depends on the value of \(x\). Thus - by itself - it’s not definitely true or false, and is not a statement. But if you give me a value for \(x\), it becomes a statement because that value is either a multiple of 8 or it is not. This is an example of…

Definition: an open sentence is a sentence or expression that is not a statement because its truth value depends on one or more variables.

Aside: There can be statements we don’t know the truth value of…

…but they still have one.

A sentence can be a statement even if we mortal humans don’t know which!

Nonexample:

it is not cloudy

This isn’t a statement because its truth value depends (for example) on where in the world you are - there is no secret unknown “true” value of whether it is cloudy - it is not definitively true or false. To make it a statement, you’d need to say something more specific.

Example: The Collatz Conjecture

Start with a positive integer \(x\). Repeat the following:

Given any initial positive integer \(x\), after iterating this a finite number of times, \(x\) becomes 1.

This is a statement (it’s either true or not). But nobody has figured out which!

Do Exercises Part A

Logical Operators (and, or, not)

Three important logical operators that operate on statements:

The following show truth tables, where the last column is the value of the expression for the given value(s) of the input(s) in the left column(s).

Do Exercises Part B

Conditional Statements

Here’s the truth table for the conditional operator:

The usual interpretation of \(P \Rightarrow Q\) is to mean “if \(P\) then \(Q\)”, or “\(P\) implies \(Q\)

Notice: this does not commute.

False Implies Anything Weirdness

Notice: If false, then anything! This gets weird sometimes.

\(P\) : If I am healthy, then I will come to class.

Suppose you are sick; then the statement “If I am healthy, then I will come to class” is true whether or not you come to class.

Mental model suggestions:

Do Exercises Part C

Natural Language Weirdness

Equivalent ways of writing “if \(P\) then \(Q\)”:

Definition/aside: “If \(Q\) then \(P\)” is the converse of “If \(P\) then \(Q\)”.

Do Exercises Part D

Biconditional Statements

Biconditional - “\(P\) if and only if \(Q\)”: \(P \Leftrightarrow Q\)

This means \(P \Rightarrow Q\) and \(Q \Rightarrow P\) are both true.

Do Exercises Part E