Introduction To Logic
Introduction To Logic
Logic
◼ Logic is the basis of all mathematical
reasoning and of all automated reasoning.
◼ The rules of logic specify the meaning of
statements.
◼ The rules of logic give precise meaning to
many statements. These rules are used to
distinguish between valid and invalid
arguments.
Practical Applications of Logic
Example:
𝑝: Today is Friday.
~𝑝: Today is not Friday
Conjunction
Let 𝑝 and 𝑞 be propositions.
Example:
𝑝: Today is Friday.
𝑞: It is raining today.
𝑝 ∧ 𝑞: Today is Friday and it is raining today.
Disjunction
Let 𝑝 and 𝑞 be propositions.
The disjunction 𝑝 ∨ 𝑞 is false when both 𝑝 and 𝑞 are false and is true
otherwise.
Example:
𝑝: Today is Friday.
𝑞: It is raining today.
𝑝 ∨ 𝑞: Today is Friday or it is raining today.
Conditional
Let 𝑝 and 𝑞 be propositions.
The conditional statement 𝒑 → 𝒒 is the proposition
“If 𝑝, then 𝑞.”
The conditional statement 𝑝 → 𝑞 is false when 𝑝 is true and
𝑞 is false, and true otherwise.
In the conditional statement 𝑝 → 𝑞, 𝑝 is called the
hypothesis and 𝑞 is called the conclusion.
Example:
𝑝: Maria learns discrete mathematics.
𝑞: Maria will find a good job.
𝑝 → 𝑞: If Maria learns discrete mathematics, then she will
find a good job.
The following statements are
equivalent (implication)
◼ pq ◼ p is sufficient for q
◼ p implies q ◼ q whenever p
◼ If p, then q ◼ q is necessary for p
◼ If p, q ◼ q follows from p
◼ q if p ◼ A necessary condition
◼ q when p for p is q
◼ p only if q ◼ A sufficient condition for
q is p
Biconditional
Let 𝑝 and 𝑞 be propositions.
The biconditional statement 𝒑 ↔ 𝒒 is the proposition
“𝑝 if and only if 𝑞.”
The biconditional statement 𝑝 ↔ 𝑞 is true when 𝑝 and 𝑞
have the same truth values, and is false otherwise.
Example:
𝑝: You can take the flight.
𝑞: You buy a ticket.
𝑝 ↔ 𝑞: You can take the flight if and only if you buy a
ticket.
The following statements are
equivalent (biconditional)
◼ pq
◼ p if and only if q
◼ p iff q
◼ pq and qp
◼ p is necessary and sufficient for q
◼ If p then q, and conversely
Truth Table
𝑝 ∧ 𝑞 → ~𝑟
Example 3
𝑝 ↔ 𝑞∨𝑟
Example 4
Let 𝑝, 𝑞, and 𝑟 be the propositions:
𝑝: You are sick.
𝑞: You miss the final examination.
𝑟: You pass this subject.
2. 𝑞 ∧ ¬𝑞 ∨ 𝑝
3. 𝑝 ∨ 𝑞 ↔ ¬𝑝
4. 𝑞 → ¬ 𝑝 ∧ 𝑝
Truth Value
Determine the truth value of the propositions.
1. 2 + 3 = 1 or 5 is an odd number
2. 2 < 10 or 10 is divisible by 3
3. If 5 is positive, then 8 is negative
4. 4 + 7 = 11 or 11 – 3 = 7
5. If 3 is positive, then 10 is negative
6. 7 is even or 8 is a multiple of 2
7. Yellow is a primary color and 5 is an odd number