Lecture 07
You’re walking down a school hallway when you reach a split — the hallway divides into two directions.
One way leads to passing the subject.
The other way leads to failing and repeating the class until your hair turns gray.
Standing at the split are two professors.
One always tells the truth.
The other always lies.
But you don’t know who is who.
You can ask only ONE question to ONE professor to figure out which hallway leads to passing.
What do you ask?
The Franciscan monk Celestine N. Bittle was among the first to describe logic as "the science of correct thinking" [1]. Furthermore, Walicki [2] adds that logical thinking has something to do with the correct argumentation or correct reasoning.
Logic is one of the most fundamental branches of Philosophy, and is also the foundation of mathematical reasoning. It may have come from the Greek word "logos" which means "reason". It is now defined as the study of truth and reason.
"The ability to think logically and analytically is natural and exclusive for humans. It is our biological nature and identity to reason. It is what separates us from all other leaving things. Reasoning is what makes us human!"
Formal logic is a branch of logic that deals with the abstract study of propositions[3]. It very closely resembles mathematical language for being the "precise logic". (There is also another branch called informal logic which deals more on "everyday" reasoning.)
In simpler words, formal logic studies statements in a black-and-white manner where there is a clear separation between truth and falsity. Just like what we did with the Knights and Knaves problem above, we will be evaluating the truth value of statements.
A proposition is a statement that has a well-defined truth value of either true or false. We are clear with our condition of being "well-defined". That is, a proposition needs to be precise, unambiguous, and distinct in whether it is true or false. For example, the statement
"Two is an even number,"
qualifies as a proposition. However, the statement
"The girl is beautiful,"
does not because this is vague and the truth value is not necessarily clearly determined.
The following are also not propositions:
"Are you hungry?"
"Get a piece of paper."
Take note that all propositions are declarative statements, but not all declarative statements are propositions. Also, note that it is not necessary for a statement to be true to be considered a proposition. All that is needed is it has to be either true or false. For example, the statement "4 + 1 = 6" is a proposition regardless being false.
There is also another class of statements that are seemingly self-contradictory but have no truth value. These are called paradoxes. In this class we will not be dealing with paradoxes but if you want to read more about them, especially the famous Russell's paradox, watch this video.
For convenience, we will use a technique called symbolic logic. That means we will use symbols and notations to shorten our writing of propositions and their truth values.
We will use capital letters such as P, Q, and R to denote propositions. We will use the symbol T to mean "true" and F to mean "false". Also, the symbol "≡" denotes logical equivalence which we will define later. So, to say the proposition P is true, we write
P ≡ T
and to say Q is false, we write
Q ≡ F
It is possible to combine two or more propositions. For example:
P: It is raining.
Q: I am hungry.
Then we can say:
"It is raining AND I am hungry."
This is called a compound proposition. The word "AND" which connects the two propositions is called a logical operator or a connective. There are five basic connectives that we will study: NOT, AND, OR, IF...THEN, and IF AND ONLY IF.
So the statement "It is raining and I am hungry" can be symbolically written as
P ∧ Q
Exercise 01. Write the compound propositions symbolically.
P : "Kaku is blue."
Q : "Kura is red."
R : "White is Kaki."
White is not Kaki.
Kura is red and Kaku is blue.
If Kaku is blue, then white is Kaki.
White is not Kaki or Kaku is not blue.
If Kura is not red, then either Kaku is blue or white is not Kaki.
Exercise 02. Using the same statements as above, interpret the following:
P → ¬Q
R ↔ ¬(P ∨ Q)
(P ∨ Q) ∧ (R ∨ ¬Q)
Compounding propositions has effects to the truth value. Applying connectives on one or more propositions results to another proposition that has its own truth values. That is why connectives are also called logical operators.
Under the NOT (¬) operator, a true proposition becomes false, while a false proposition becomes true.
For example, the statement "one is odd" is true so that the negation "one is not odd" is false. Also, the statement "zero is a positive number" is false but "zero is not a positive number" is true.
Under the AND (∧) operator, the compound proposition is true if and only if both propositions are true and false if at least one of them is false.
For example, the statement "one is odd and two is positive" is true because both "one is odd" and "two is positive" are true. However, "one is odd and zero is positive" is false because "zero is positive" is false.
Under the OR (∨) operator, the compound proposition is true if at least one of the propositions is true and false if and only if both are false.
The conditional proposition P → Q under the IF...THEN operator is true if and only if either Q is true or both P and Q are false. It is false if and only if P is true but Q is false. Here, P is called the condition, hypothesis, or premise while Q is called the conclusion.
The biconditional proposition P ↔ Q under the IF AND ONLY IF operator is true if and only if both P and Q are true, or when both of them are false.
Using the definitions from above, it is possible to evaluate the truth values of compound logical propositions through a truth table. In a truth table, we obtain the truth value of a compound proposition under all possible combinations of truth values of the underlying component propositions. Let us take the following example:
Example. Construct a truth table for P → ¬Q.
First, we write a table of all combinations of truth values for P and Q.
Next, we add another column for ¬Q. By the definition of negation, if Q is true, then ¬Q is false. Otherwise, if Q is false, then ¬Q is true. Hence, we have:
Finally, we evaluate P → ¬Q:
There is also a rule for the order of evaluating logical operators much like PEMDAS in arithmetic: parenthesis, negation, and then ∨, ∧, →, or ↔. Since logic is a very critical part of mathematical language, we do not wish to be vague in expressing our symbols. We make use of parentheses and other grouping techniques to clearly signify which operations to evaluate first. For example, P ∨ Q ∧ R and P → Q ∨ R are invalid symbolisms of compound logical propositions.
Exercise 01. Write out the truth table for the following propositions:
¬P ∨ ¬Q
¬(P ∧ Q)
¬(P ∨ Q) → (¬P ∧ Q) --- compare the results with ¬P
P ∨ (Q ∧ R)
Exercise 02. Write out the truth value for the following propositions:
Supposed, P ≡ T, Q ≡ F, and S ≡ T. Find the Truth value of (S ∨ P) ∧ (Q ∧ ¬S)
Supposed, P ≡ T, Q ≡ T, R ≡ F, and S ≡ F. Find the truth value of (S ∨ P) ∧ (¬R ∨ ¬S)
Supposed, P ≡ T, Q ≡ T, and S ≡ F. Find the truth value of (¬S ∨ P) ∨ (Q ∧ ¬S).
Some propositions mean the same thing as others. These are called equivalent logical propositions. Two propositions are logically equivalent if and only if they have the same truth values. For example, ¬P ∨ ¬Q and ¬(P ∧ Q) from the last exercise are logically equivalent. Also, ¬(P ∨ Q) → (¬P ∧ Q) is logically equivalent with ¬P. We use the symbol ≡ to denote logical equivalence between two propositions. Hence,
¬P ∨ ¬Q ≡ ¬(P ∧ Q)
¬(P ∨ Q) → (¬P ∧ Q) ≡ ¬P
One possible way to prove logical equivalence is to use truth tables. If the columns under these propositions have exactly identical truth values, then they are verified to be logically equivalent.
Example. Prove that P ∨ (Q ∧ R) ≡ (P ∨ Q) ∧ (P ∨ R).
Proof.
Exercise. Prove the following logical equivalences using truth tables.
¬P ∨ ¬Q ≡ ¬(P ∧ Q)
¬P ∧ ¬Q ≡ ¬(P ∨ Q)
P → Q ≡ ¬P ∨ Q
Logical equivalence has three basic properties:
Logical equivalence is reflexive. That means any proposition is logically equivalent to itself. In other words, P ≡ P for any proposition P.
Logical equivalence is symmetric. That means if P is logically equivalent to Q, then Q is also logically equivalent to P. In other words, if P ≡ Q then Q ≡ P.
Logical equivalence is transitive. That means that if P is logically equivalent to Q, and Q is logically equivalent to R, then P is logically equivalent to R. In other words, if P ≡ Q and Q ≡ R, then P ≡ R.
Exercise. Using truth tables,
Prove that P ∨ ¬P is always true.
Prove that P ∧ ¬P is always false.
A proposition which is always true is called a tautology, and is usually denoted as T. A statement which is always false is called a fallacy and is denoted F. For example, P ∨ ¬P ≡ T and P ∧ ¬P ≡ F.
Some logical equivalences are considered basic that they can be used to prove more complicated ones. These logical equivalences are called logical identities.
Identity laws
P ∨ F ≡ P
P ∧ T ≡ P
Domination laws
P ∧ F ≡ F
P ∨ T ≡ T
Complement laws
P ∨ ¬P ≡ T
P ∧ ¬P ≡ F
Idempotent laws
P ∨ P ≡ P
P ∧ P ≡ P
Implication
P → Q ≡ ¬P ∨ Q
Double negation law
¬(¬P) ≡ P
Associative laws
P ∨ (Q ∨ R) ≡ (P ∨ Q) ∨ R
P ∧ (Q ∧ R) ≡ (P ∧ Q) ∧ R
Commutative laws
P ∨ Q ≡ Q ∨ P
P ∧ Q ≡ Q ∧ P
Distributive laws
P ∨ (Q ∧ R) ≡ (P ∨ Q) ∧ (P ∨ R)
P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R)
De Morgan's laws
¬P ∨ ¬Q ≡ ¬(P ∧ Q)
¬P ∧ ¬Q ≡ ¬(P ∨ Q)
Contraposition
P → Q ≡ ¬Q → ¬P
Double implication
P ↔ Q ≡ (P → Q) ∧ (Q → P)
As an alternative to truth tables, these logical identities can be used to prove logical equivalences.
Example. Use logical identities to prove that
P ∧ ¬Q ≡ P ∧ (Q → ¬P).
Proof:
In proving logical equivalences using logical identities, the standard process is:
Choose either side of the equivalence as a starting proposition to be your given. (Tip: it is usually easier to start with the more complicated side.)
Use any applicable logical identity.
The last statement should be the other side of the logical equivalence.
What we have given here are just some of the vast number of proven logical identities. For more identities (which you are allowed to use in class), you can read here[4].
Exercise. Prove the following using logical identities.
¬(P ∨ (¬P ∧ Q)) ≡ P ∧ (Q → ¬P)
(P ∧ Q) → (P ∨ Q) ≡ T
Download Lecture Note for Mathematical Logic Here