0% found this document useful (0 votes)
18 views34 pages

Unit IV

The document covers the fundamentals of logic, including propositions, predicates, and logical connectives. It explains how to evaluate statements and their truth values using truth tables, and introduces quantifiers and their significance in predicate logic. Additionally, it provides practice questions and examples to illustrate the concepts discussed.

Uploaded by

windsurff454
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views34 pages

Unit IV

The document covers the fundamentals of logic, including propositions, predicates, and logical connectives. It explains how to evaluate statements and their truth values using truth tables, and introduces quantifiers and their significance in predicate logic. Additionally, it provides practice questions and examples to illustrate the concepts discussed.

Uploaded by

windsurff454
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Propositions and

Predicates

Unit IV
VARSHA HIMTHANI
ASSISTANT PROFESSOR
JECRC UNIVERSITY
Logic
• Logic is the study of the criteria used in
evaluating inferences or arguments.

• An inference is a process of reasoning in which a new belief is


formed on the basis of evidence or proofs provided by other beliefs.

• An argument is a collection of statements or propositions, some of


which are intended to provide support or evidence in favor of one of the
others.

• A statement or proposition is something that can either be true or false.


We usually think of a statement as a declarative sentence, or part of a
sentence.
Proposition
A proposition is a sentence that is either true or false but not both.
For example:
Which ones from the following are statements?
1. 5 is greater than 10.
2. All Indians are Asians.
3. X is greater than 10.
4. It is not raining.
1 and 4 are the propositions. 2 and 3 are not propositions.
Proposition
▪when there is a non-specific item in the statement, then it is not considered
a statement –
For example,
“X+2 is greater than 0” is not a statement.

▪Usually, we use capital letters A, B, and C to represent statements.


Propositions and Logic
Logic focuses on the relationship between statements as opposed to the
content of any particular statement.
An example to illustrate how logic helps us:
A. All mathematicians love apples.
B. Anyone who loves apple is smart.
C. Therefore, all mathematicians are smart.
• Logic cannot help us to determine the individual truth of the above
statements, however, if statements A and B are true, we can we say C
would be true.
• Logical methods are used in mathematics to prove theorems and in
computer science to prove that programs do what they are supposed to do.
Logical Connectives
Compound statement
It is made of statement variables (such as A, B, and C) and logical
connectives (such as Λ, V, , <-->).
Its truth value depends on the truth values of its components and their
relationships (logical connectives).
Logical connectives
Negation A’, not A
conjunction A Λ B, A and B
disjunction A V B, A or B
implication A B, if A, then B
Equivalence A<-->B, A if and only if B
Truth Tables

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.

Answers: 1) R∨Q 2)R∧¬Q 3) P∧(R∨Q) 4)P Q


5) P R 6) Q⇔R
Examples
Translate this proposition into logical expression
“You can access the internet from campus only if you are from
computer science department or you are a faculty”

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.

These types of statements are represented by predicates and quantifiers.


Predicate
▪Also Known as First order Logic
▪Predicates are the statements involving variables which are neither True
nor False unless the values of the variables are specified.
▪For example

X is an animal.
X is greater than 3.

Above statements are not propositions.


Predicate
▪In predicate logic a statement is divided into two parts:
1. Subject
2. Predicate
▪For example:
“X is greater than 4”
Lets take G(x)= “X is greater than 4”
Here, X is subject or variable and G() represents predicate that is “ is greater
than 4”
G(5)= 5 is greater than 4. T
G(3)= 3 is greater than 4 F
Now if we assign some value to x then the statement G(x) becomes
proposition.
Practice questions : Predicates
1. Let P(x) denotes the statement “x>3”. What are the truth values of P(4)
and P(2).

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) be a statement x+1 >x


P(1): 1+1> 1 = 2>1 (True)
P(2): 2+1> 2 = 3>2 (True)
….

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

P(1): 1+1> 1 = 2>1 (True)


P(2): 2+1> 2 = 3>2 (True)
….
∀x P(x) if DOD is a set of all positive integers.
Expressing Quantification in English
1) Let N(x) be the statement “x has visited Jaipur” where the domain
consists JECRC students.
Express ∀x N(x) in English.
Solution:
All students of JECRC has visited Jaipur.
OR
For every x in the domain of JECRC students, X has visited Jaipur.
Expressing Quantification in
English
2) Let N(x) be the statement “x has visited Amer fort in Jaipur ” where the
domain consists JECRC students.
Express ∃x N(x) in English.
Solution:
Some students of JECRC has visited Amer fort in Jaipur.
OR
For some x in the domain of JECRC students, There exist x who visited
Amer fort in Jaipur.
Nested Quantifiers
If we use a quantifier that appears within the scope of another quantifier, it is
called nested quantifier.
For example : ∀x ∃y P(x,y)
Here ∃ is within the scope of ∀.

Different combinations of nested quantifiers


∀x ∃y P(x,y)
∃x ∀y P(x,y)
∀x ∀y P(x,y)
∃x ∃y P(x,y)
Nested Quantifiers: Example
Let x and y be the real numbers and P(x,y) denotes “x+y = 0”
Find the truth values of
a) ∀x ∀y P(x,y)
b) ∀x ∃y P(x,y)
c) ∃x ∀y P(x,y)
d) ∃x ∃y P(x,y)

Solution:
Domain: All real numbers.

You might also like