Image from "AN ACTUAL TEXTBOOK, AND: PHOTOS!" by Richard Zach is licensed under CC BY 4.0
Another good logic textbook, Sets, Logic, Computation is an open source textbook which you can download at the Open Logic Project
During the first meeting, we talked a little bit about the background of logic and we looked at some arguments, identifying the premises and conclusions and translating them to Chinese.
Let's take a quick look at a couple more examples to warm up.
Examples:
If Jupiter is more massive than Earth, then Jupiter has a stronger gravitational field than Earth. Jupiter is more massive than Earth. In conclusion, Jupiter has a stronger gravitational field than Earth.
If we want to be safe, then we should have a state that can protect us. If we should have a state that can protect us, then we should give up some freedoms. Therefore, if we want to be safe, then we should give up some freedoms.
Suppose . Then , so . Next, Suppose . Then also , and therefor also . Thus, .
This week, we will begin to look at a language of logic, which we can use to represent arguments we find in English or Chinese and formally investigate their logical properties.
A language of logic consists of a number of things:
Because we always start discussing a logical system by discussing the language it uses, it is worth pausing to discuss the notion of using language to study language.
These comprise the first two parts of the logical system: a vocabulary and a syntax or grammar.
The languages of the systems we study are symbolic logical languages. They use symbols such as and , not found in ordinary English or Chinese.
However, we will talk and read about these logical languages in ordinary English or Chinese.
Whenever one language is used to discuss to study another, we can distinguish between the language that is being studied, called the object language, from the language in which we conduct the study, called the metalanguage.
What one is the object language and which one is the metalanguage for this course?
In this course, the object languages will be propositional logic (referred to as truth functional logic in the forallx textbook) and predicate calculus (referred to as first order logic in the textbook). In CS250, set theory was the main object language you studied.
Often we will use the metalanguage (English or Chinese or example) to prove things about the object language. Proving things already requires logical vocabulary! Fortunately English (and Chinese) has words like all, or, and, if, and so on. These are some of the logical vocabulary of English.
While I am here, we will study the Propositional Logic (PL) also called Truth Functional Logic (TFL) in the textbook. It's called the propositonal logic because the word 'proposition' means "sentence," and this is the logic of sentences.
The Propositional Logic, like any language contains a volcabulary. In this case, it is pretty small, so it is easy to study.
Logical Connectives: , , , , and
These are called, in order from left to right, "negation," "conjunction," "disjunction," "conditional," and "biconditional."
Atomic Sentences: Uppercase letters: A, B, C, ... P, Q, R
Sentence Schema (sentence variables): lowercase letters:
Parentheses: ( ), [ ], { }
Propositional logic also has a syntax, rules that govern the structure of sentences in the language.
Any atomic sentence, P, is syntactically well-formed.
For any well-formed sentence, , , is well-formed.
For any well-formed sentence, and , , , , and are well-formed.
Are the following sentences well-formed?
In studying languages, we often distinguish the syntax from the semantics of the language. The semantics of a language refers to the meanings.
In the propositional logic, the meaning of a sentence is its truth conditions. For this class, we will consider just two truth values: true and false. And we will assume the principle of bivalance
Principle of Bivalence: Each sentence of our language must be either true or false, not both, not neither.
So we will assume that each sentence is either true or false.
CCUT is in Changchun.
This can be represented by a single capital letter, . Atomic sentences are the basic building blocks of our language. Sentences are called atomic if they cannot be broken down into more basic parts.
In the propositional logic, sentences are either atomic or they are compound. Compound sentences are built up from sentences and the logical connectives mentioned above.
We have some idea of what the logical connectives mean, since we used English words to describe them. However, their precise meaning is given by a truth table.
A truth table is a table which represents all of the possible truth values a sentence of the propositional logic can take.
Here are the truth tables for our logical connectives:
p | q | p q | p q | p | p q |
---|---|---|---|---|---|
T | T | T | T | F | T |
T | F | F | T | F | F |
F | T | F | T | T | T |
F | F | F | F | T | T |
These truth tables give the semantics for the logical connectives. Notice that these are lower case and , indicating that these are sentence schema (or sentence variables).
So the compound sentence has the form .
This type of pattern matching is important to understand.
Not or negation is a unary connective. This means that it "connects" only to one sentence.
If is a well-formed sentence, then we can attach not to it:
The semantics for not are given by the following truth table:
p | |
---|---|
T | F |
F | T |
As we can see, negation gives us the opposite truth value of the original sentence.
"The Earth is not the center of the universe"
How do we translate this and what is the truth value?
Let R mean "The widget is replaceable."
How should we translate these?
But be careful!
We might translate 1 to , but 2 shouldn't be translated as . It may be that Jane is neither happy nor unhappy. The point here is that "Jane is not happy" does not necessarily mean the same thing as "Jane is unhappy."
I went to the party and I had fun.
p | q | p q |
---|---|---|
T | T | T |
T | F | F |
F | T | F |
F | F | F |
Examples
I go to the party or I study.
p | q | p q |
---|---|---|
T | T | T |
T | F | T |
F | T | T |
F | F | F |
Or is inclusive.
Examples
If I goto the party, then I will not study.
p | q | p q |
---|---|---|
T | T | T |
T | F | F |
F | T | T |
F | F | T |
Examples
If Jean is in Paris, then Jean is in France.
Jean is in France only if Jean is in Paris.
For Jean to be in Paris, it is necessary that Jean be in France.
It is a necessary condition on Jean’s being in Paris that she
be in France.
For Jean to be in France, it is sufficient that Jean be in Paris.
It is a sufficient condition on Jean’s being in France that she be in Paris
Puzzle: Each card has a letter (consonant or vowel) on one side, and a number (odd or even) on the other.
Rule: If there's a vowel on one side of the card, there is always an odd number on the other.
Challenge: How many of the pictured cards must you turn over to see if any break this rule?
Four men and four women were nominated for two positions on the school board. One man and one woman were eleted to the positions. Suppose the men are named , , , and and the women are named , , , and . Further, suppose that the following four statements are true:
Who were the two people elected to the school board?
Let the capital , , , and so on stand for the statements " was elected," " was elected, " was elected" and so on.
We know that one man and one woman were elected. In other words, we know that some long sentence of the form is true. In particular, we know that one of those disjuncts is true and the others are false.
We are given that (symbolizing 1-4 and finding some equivalences):
So we can find the two people elected to the school board by determining which disjunct from our long sentence satisfies (or makes true) 1--4. Only satisfies 1-4.
So and were the two people elected to the school board.
Translations: