3.1 Introduction to Logic
- The ancient Greeks were interested in how humans think and arrive at conclusions.
- Aristotle founded one branch of logic called Aristotelian logic.
- Gottfried Wilhem Leibniz (1646-1716), my 12th great academic grandfather, set the foundations for symbolic logic, system of logic we will study.
- George Bool (1815-1864) formalized this system.
- In this chapter, we will study methods that can be used to prove arguments (in English) are correct.
- Logic is widely applied in
- Mathematics
- Computer science.
- Philosophy
- Law
- A connective are words that connect thoughts.
- We will consider the following connectives
- not
- and
- or
- if then
- if and only if
- A statement is a sentence that can be judged either true or false.
- Simple statements do not have connectives.
- Today is Monday.
- Snow is falling.
- Compound statements have connectives.
- If I study then I will pass the test.
- Today is not Monday.
- We will generally use a symbol to represent a simple statement.
- This will allow us to manipulate compound statements.
- Traditionally we use the letters p, q, r, ...
- p: Today is Monday
- Since statements are either true or false, the variables in logic only have two values.
- If today is Monday, then p is true.
- If today is not Monday, then p is false.
- Negation.
- This is an operation
- It switches the truth of a statement.
- Today is Monday.
- Today is not Monday.
- Symbolically we write ~
- p: Today is Monday.
- ~p becomes Today is not Monday.
- Negations are not simple statements.
- When representing a statement with a negation
- Let the variable be the the statement without a negation.
- Symbolically the original statement is the negation of that statement.
- Represent the following statements
- Fishing is fun.
- A Tractor is not a car.
- The sun is not purple.
- We can build a truth table to represent the operation
- Remember addition tables.
-
- This represents a+b, 1 < a ≤ 10, 1 < b ≤ 10
- But for each variable in this system there are only two values.
- If p is true, ~p is false
- If p is false, ~p is true.
- We can use truth tables to evaluate compound statements
- p: Sue is from New York.
- What is the statement ~p?
- When is the statement ~p true?
- Conjunctions are formed using the word and
- Conjunctions are used to connect two or more simple phrases.
- The food is hot and the wine is cold.
- The symbol for and is ∧
- p: The food is hot.
- q: The wine is cold.
- The food is hot and the wine is cold: p ∧ q
- Combining and and Not.
- The sun is not purple and the sky is not green.
- In each case, represent the positive statement.
- p: The sun is purple
- q: The sky is green.
- The statement becomes: ~p ∧ ~q
- For each of the following, give the symbolic statement
- Cold weather is pleasant and snow is not a problem.
- College is not hard and work is easy.
- For each symbolic statement, give the English statement.
- p: Pennsylvania is a state.
- q: Edinboro is a city.
- p ∧ q
- q ∧ ~p
- ~p ∧ ~q
- The truth table for and
-
p | q | p ∧ q |
---|
T | T | T |
T | F | F |
F | T | F |
F | F | F |
- Note for conjunctions the compound statement is only true when both simple statements are true.
- When are these statements true?
- p: The gift is expensive.
- q: The guest is pleased.
- p ∧ q
- We can build an extended truth table to test more complex statements.
- p: The gift is expensive.
- q: The guest is pleased.
- ~p ∧ ~q
-
p | q | ~p | ~q | ~p ∧ ~q |
---|
T | T | F | F | F |
T | F | F | T | F |
F | T | T | F | F |
F | F | T | T | T |
- Create a truth table for ~q ∧ p
- Sometimes but, however, nevertheless are used in place of and
- Todd is nice but he is not rich.
- Todd is rich however he is not nice.
- A disjunction is a statement that involves or
- The food is hot or the wine is cold.
- The symbol is ∨
- p: The food is hot
- q: The wine is cold.
- p ∨ q
- We use the inclusive or in this class.
-
p | q | p ∨ q |
---|
T | T | T |
T | F | T |
F | T | T |
F | F | F |
- Note that for or if either statement is true, the compound statement is true.
- When are the following statements true?
- p: The gift is expensive.
- q: The guest is pleased.
- ~p ∨ q
- ~p ∨ q
- In this book, simple statements on the same side of a comma are grouped together with parentheses.
- p: The gift is expensive.
- q: The guest is pleased.
- r: The host is happy.
- The gift is expensive or the guest is pleased, and the host is happy.
- (p ∨ q) ∧ r
- Truth tables with three variables.
- Start with TTT
- Flip the third column every other line TFTFTFTF
- Flip the second column every second line TTFFTTFF
- Flip the first column every fourth line TTTTFFFF
-
p | q | r |
T | T | T |
T | T | F |
T | F | T |
T | F | F |
F | T | T |
F | T | F |
F | F | T |
F | F | F |
- I use the alternative method for building a truth table.
- Build the input (above)
- Evaluate continuing more complex sub statements
- ~(p ∨ ~q) ∧ r
- ~q
- p ∨ ~q
- ~(p ∨ ~q)
- ~(p ∨ ~q) ∧ r
-
p | q | r | ~q | p ∨ ~q | ~(p ∨ ~q) | ~(p ∨ ~q) ∧ r |
T | T | T | F | T | F | F |
T | T | F | F | T | F | F |
T | F | T | T | T | F | F |
T | F | F | T | T | F | F |
F | T | T | F | F | T | T |
F | T | F | F | F | T | F |
F | F | T | T | T | F | F |
F | F | F | T | T | F | F |
- Finally, for us, ~(statement)
- This becomes: It is not true that statement
- or: It is false that statement
- It is false that Bob is the president and Sue is the treasurer.
- p: Bob is the president
- q: Sue is the treasurer
- ~(p ∧ q)
- Page 111 19-26
- 5 - 18
- 27-36
- 45-58
- 57-60