Unit IV
Unit IV
Predicates
Unit IV
VARSHA HIMTHANI
ASSISTANT PROFESSOR
JECRC UNIVERSITY
Logic
• Logic is the study of the criteria used in
evaluating inferences or arguments.
A truth table is a visual tool, in the form of a diagram with rows &
columns, that shows the truth or falsity of a compound premise. It’s a way
of organizing information to list out all possible scenarios from the
provided premises.
True(T) is usually 1; False(F) is usually 0
A B A∨B A B A∨B A B A∨B
True True True T T T 1 1 1
True False True T F T 1 0 1
False True True F T T 0 1 1
False False False F F F 0 0 0
Connective #1: Negation
▪ If A is a statement variable, the negation of A is "not A" and is
denoted ¬ A or A’ or ~A
▪Unary connective, instead of binary connective
▪ It has the opposite truth value from A ¬A
A: if A is true, then ¬ A is false True False
if A is false, then ¬ A is true. False True
For example: It will rain tomorrow.
▪It is false that it will rain tomorrow.
▪It will not rain tomorrow.
Connective #2:Conjunction
▪ If A and B are statement variables, the conjunction of A and B is A Λ B,
which is read "A and B“ (A.B)
▪A Λ B is true when both A and B are true.
▪A Λ B is false when at least one of A or B is false. A and B are called the
conjuncts of A Λ B.
▪For example: 8 is even but 6 is odd.
▪Peter is tall and thin.
A B AΛ B
True True True
True False False
False True False
False False False
Connective #3: Disjunction
▪ If A and B are statement variables, the disjunction of A and B is A V B,
which is read "A or B" (A+B)
▪ A V B is true when at least one of A or B is true. A V B is false when
both A and B are false
▪A and B are called the disjuncts of A V B
▪For example: The river is shallow or polluted.
A B A∨B
True True True
True False True
False True True
False False False
Connective #4: Implication
▪ If A and B are statement variables, the symbolic form of "if A then B" is A B.
▪Here A is called the hypothesis/antecedent statement and B is called the
conclusion/consequent statement.
▪ "If A then B'' is false when A is true and B is false, and it is true otherwise.
For example: If the food is good, then the service is excellent.
A B A B
True True True
True False False
False True True
False False True
Implication Representations
▪A implies B
▪B if A
▪Whenever A, B
▪ A, therefore B
▪B follows from A
▪A is a sufficient condition for B
▪ B is a necessary condition for A
▪A only if B
Practice questions
What’s the truth value of the following:
8 is even or 6 is odd. T
8 is even but 6 is odd. F
If 8 is odd, then 6 is odd. T
If 8 is even, then 6 is even. T
Connective #5: Equivalence/Double
Implication/ Biconditional
▪ If A and B are statement variables, the symbolic form of “A if, and only
if, B" and is denoted A ⇔ B.
▪It is true if both A and B have the same truth values and is false if A and
B have opposite truth values.
▪Other forms: “A is necessary and sufficient for B”, “A is equivalent to B”,
“A if and only if B”.
▪Note: A ⇔ B is a short form for (A B) Λ (B A)
Connective #5: Equivalence/Double
Implication/ Biconditional
▪Hypothesis if and only if conclusion.
▪Conclusion if and only if hypothesis.
For example
I have a triangle if and only if my polygon has only three sides.
My polygon has only three sides if and only if I have a triangle.
A B A⇔B
True True True
True False False
False True False
False False True
(A B) Λ (B A) = A ⇔ B
A B A B B A B A A B B A A⇔B
True True True True True True True True True
True False False True False False False False False
False True True False True True True True False
False False True False False True True True True
Translating English proposition to
Logical Expression
P: The store is open today.
Q: Mary is going to the store today.
R: John is going to the store today.
1. The store is close today.
2. Mary is going to store even though the store is closed today.
3. John and marry are going to store today.
4. Although the store is closed, Mary is going to the store today.
¬P
Q ∧ ¬P
Q∧R
Q ∧ ¬P
Translating English proposition to Logical
Expression
P: The store is open today.
Q: Mary is going to the store today.
R: John is going to the store today.
1) Either John or Mary (or both) are going to the store today.
2) John is going to the store today, but Mary isn't.
3) The store is open today, and either John or Mary is going.
4) if store is open today then Mary will go to store
5) John will go to store if store is open today.
6) Mary will go to store if and only if john will go to store today.
Solution:
P: you can access the internet from campus
Q: you are from computer science department
R: you are a faculty
Answer: (Q ∨R) P
Practice Questions
1. Both Marry and John are going to store today. P ∧ Q
2. Stacy loves milk but Marry loves chocolate. P ∧ Q
3. Either I leave or you leave. P V Q
4. Meera likes rabbits or she doesn’t like rabbits. P V ¬ P
5.neither Marry nor John found the hidden amulet. ¬ P ∧ ¬Q Or ¬(P V Q)
6. The sky will turn red if there is a lot of smoke. Q P
7. We will dance provided that you learn some dance moves. Q P
Practice Questions
8. The pencil will run out of lead when you finish writing your paper. Q P
9. You will become rich if and only if you get lucky and work hard.P (Q ∧ R)
10. Being an even number is a necessary and sufficient condition for being
divisible by 2. P Q
11. I will bring an umbrella when and only when it rains. P Q
12. Fido is neither a dog nor a cat but rather a goose. (¬ P ∧ ¬Q ) ∧ R
13. If a tailor sews a shirt then she will make money and if a tailor sews a dress,
she ll not be a poor. (P Q) ∧ (R ¬S)
14. To pass philosophy it is not necessary to make notes every week. ¬ (Q P)
Limitation of propositional Logic
We cannot use propositional logic to establish the truth of a proposition
that isn't given as a premise, or which can't be inferred by the laws of
inference.
For example:
X is greater than 4.
All persons present in this classroom are students.
X is an animal.
X is greater than 3.
2. Let A(x) denoted the statement “ The word x contains the letter ‘a’ ”.
What are the truth values of A(orange), A(true), A(False).
3. Let C(x,y) denoted the statement “ The x is capital of y. What are the
truth values of C(Jaipur, Delhi), C(Delhi, India), C( Mumbai, India).
Quantifiers
▪Quantifiers are words that refer to quantities such as “some” or “all”. It
defines that for how many elements a given predicate is True.
▪Generally Quantifiers are used to express the quantities without giving an
exact number. For example all, many, some, few etc.
Example:
1)John has many friends here.
2)All persons present in the class are students.
Types of Quantifiers:
1. Universal Quantifiers
2. Existential Quantifiers
Universal Quantifiers
The universal quantification of P(x) is the statement “P(x) for all values of x in
the domain”
Notation: ∀x P(x) [for all or every or each or any x, P(x)]
∀ is called universal quantifier.
P(x) is true for all positive integers x (If domain is set of positive integers).
OR
∀x P(x) (for every value of x, P(x) is true)
Existential Quantifiers
The existential quantification of P(x) is the proposition “There exists an element
x in the domain such that P(x).
Or ∃x P(x)
There is a x such that P(x) or
There is at least one x such that P(x) or
For some x P(x)
For example:
Some people are dishonest.
Existential Quantifiers
Lets take another example to understand existential quantifiers.
Let P(x) be a statement x<3
P(1): 1<3(True)
P(2): 2< 3 (True)
P(3): 3< 3 (False)
….
P(x)
There are some values of x exist, for which P(x) is true. (If domain is set
of positive integers)
OR
∃x P(x) (for some values of x, P(x) is true)
Domain or Domain of Discourse(DOD)
▪A domain specifies the possible values of the variables under
consideration.
▪It is important to specify the DOD, without it quantification of statement
is not possible.
▪For example: Let p(x) is the statement x+1> x
Solution:
Domain: All real numbers.