1 The Foundations - Logic and Proofs
1 The Foundations - Logic and Proofs
1 The Foundations - Logic and Proofs
Conjunction And ∧
Disjunction Or ∨
Conditional If-then →
p ∼p
F T
T F
ii) Conjunction (∧): When p and q both are true, then only conjunction of them will be true.
p q p∧q
F F F
F T F
T F F
T T T
iii) Disjunction (∨): When p and q both are false, then only disjunction of them will be false.
p q p∨q
F F F
F T T
T F T
T T T
p q p→q
F F T
F T T
T F F
T T T
Example:
p: you will get good marks q: you will get chocolate.
p → q: If you will get good marks then you will get chocolate.
Note:
● p → q may be read as
If p then q, p implies q, p only if q,q if p, q follows from p.
v) Biconditional (↔): If there is a proposition that has the form "p if and only if q", then that type
of proposition will be known as a bi-implication or bi-conditional proposition. When both p and q
are true, or p and q both are false, then the bi-implication of them will be true.
p q p↔q
T T T
T F F
F T F
F F T
Clearly, the last column of the truth table contains both T and F.
Therefore, the given proposition is- Contingency, Satisfiable.
2018301|Discrete Mathematics Lecture Notes|GP Muz.|2023| 4
Solution 2 (Using Algebra Of Proposition):
We have-
(p ∧ (p → q)) → ∼q
= (p ∧ (∼p ∨ q)) → ∼q { ∵ p → q = ∼p ∨ q }
= ∼(p ∧ (∼p ∨ q)) ∨ ∼q { ∵ p → q = ∼p ∨ q }
= ∼((p ∧ ∼p) ∨ (p ∧ q)) ∨ ∼q { Using Distributive law }
= ∼(F ∨ (p ∧ q)) ∨ ∼q { Using Complement law }
= ∼(p ∧ q) ∨ ∼q { Using Identity law }
= ∼p ∨ ∼q ∨ ∼q { Using De Morgans law }
= ∼p ∨ ∼q
Clearly, the result is neither T nor F.
So, the given proposition is a contingency and satisfiable.
Example: write the converse, inverse, and contrapositive of a given statement "If the weather is
sunny, then I will go to school."
Solution: p: The weather is sunny q: I will go to school
Converse Statement: If I will go to school, then the weather is sunny.
Inverse Statement: If the weather is not sunny, then I will not go to school.
Contrapositive Statement: If I will not go to school, then the weather is not sunny.
1 means first priority or high precedence, 5 means least priority or low precedence.
Law of Contrapositive: p → q ≡ ∼q → ∼p
2.3.2 Quantifiers
In predicate logic, predicates are used alongside quantifiers to express the extent to which a
predicate is true over a range of elements. Using quantifiers to create such propositions is called
quantification.
There are two types of quantifiers-
a. Universal Quantifier (∀) :
Let U be some domain of x; ∀x P(x) means “For all x, p(x) is True”
b. Existential Quantifier (∃) :
Let U be some domain of x; ∃x P(x) means “There exists an x such that p(x) is True”
Ex:
1. U = {1,2,3,4}; P(x) : x+4 ≤ 7
∀x P(x) = F
∃x P(x) = T
2. U = {1,2,3}; P(x) : x+4 ≤ 7
∀x P(x) = T
∃x P(x) = T
First premises
Second premises
Third premises
Fourth premises
.
.
Nth premises
______________
∴ Conclusion
F F T T∧F = F F→F=T
F T T T∧F = F F→T=T
T F F F∧T = F F→F=T
T T T T∧T = T T→T=T
------------------------------------------------------------------------------------------------
1. Here we will write the converse, inverse, and contrapositive of some statements, which are
shown below:
a. If the weather is sunny, then I will go to school.
b. If 3y - 2 = 10, then x = 1.
c. If there is rainy weather, then I will go outside to enjoy it.
d. You will get good marks only if you study hard.
e. I will go to the market if my cousins come.
f. I go to college whenever my friends come.
g. I will give you a party only if I buy a good dress.
h. If I become famous, then I will earn a lot of money.
2. Determine the nature of following propositions among Tautology, Contradiction and
Contingency-
a. p ∧ ∼p
b. (p ∧ (p → q)) → ∼q
c. [ (p → q) ∧ (q → r) ] ∧ ( p ∧ ∼r)
d. ∼(p → q) ∨ (∼p ∨ (p ∧ q))
e. (p ↔ r) → (∼q → (p ∧ r))
3. With and without truth tables show that ¬(p∨ (¬p ∧ q)) ≡ ¬(p∨ q).
4. With and without truth tables show that (¬ p → q) ≡ p∨ q.
5. With and without truth tables show that ¬ (¬ p ∨ (p∨ q)) → q is a tautology.
6. With and without truth tables show that an implication and it’s contrapositive are logically
equivalent.
7. Show that the two statements (p ∧ q) → r and (p → r) ∧ (q → r) are not logically
equivalent.
8. Show that the following argument is not valid
p∨r
p∨q
______
∴q∨r
9. Explain any two proof methods that you like most.
------------------------------------------------------------------------------------------------