0% found this document useful (0 votes)
5 views9 pages

Predicate logic and propositional logic

The document discusses propositional and predicate logic, highlighting their definitions, differences, and applications. Propositional logic focuses on truth-functional relationships between whole propositions, while predicate logic extends this by incorporating variables and quantifiers for more nuanced reasoning about objects and their relationships. Both branches are essential in various fields, including mathematics, computer science, and philosophy, for formalizing arguments, logical inference, and decision-making.

Uploaded by

alokawasthi
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)
5 views9 pages

Predicate logic and propositional logic

The document discusses propositional and predicate logic, highlighting their definitions, differences, and applications. Propositional logic focuses on truth-functional relationships between whole propositions, while predicate logic extends this by incorporating variables and quantifiers for more nuanced reasoning about objects and their relationships. Both branches are essential in various fields, including mathematics, computer science, and philosophy, for formalizing arguments, logical inference, and decision-making.

Uploaded by

alokawasthi
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/ 9

Predicate logic and propositional logic are two fundamental branches of symbolic logic, each

serving different purposes and handling different types of statements.

1. Propositional Logic:
o Propositional logic deals with propositions or statements that are either true or
false, with no further consideration of their internal structure.
o It employs variables to represent propositions and logical operators (such as
AND, OR, NOT, etc.) to connect these propositions.
o Propositional logic is concerned with the relationships between entire
propositions rather than the internal structure of those propositions.
o Example: Let PP represent the statement "It is raining," and QQ represent the
statement "The ground is wet." Then, we can represent the logical relationship
between these statements as P∧QP∧Q (It is raining and the ground is wet).
2. Predicate Logic:
o Predicate logic extends propositional logic by allowing propositions to contain
variables and quantifiers, which specify the extent of the variables.
o It deals with predicates, which are statements containing variables, and
quantifiers (such as ∀ for universal quantification and ∃ for existential
quantification) to specify the scope of those variables.
o Predicate logic enables reasoning about objects, properties, relations, and
functions.
o Example: Let P(x)P(x) represent the statement "x is a prime number." In
predicate logic, we can write ∀x P(x)∀xP(x) to represent "For all x, x is a prime
number."

In summary, propositional logic deals with simple truth-functional relationships between


propositions,

why do we need propositional logic?

Propositional logic serves as the foundation of logical reasoning and has several important
applications in various fields. Here's why propositional logic is essential:

1. Simplicity: Propositional logic provides a simple and intuitive framework for reasoning
about truth values of propositions. It deals with propositions as atomic units, without
considering their internal structure, which makes it easier to understand and apply.
2. Formalization of Arguments: Propositional logic allows us to formalize arguments
and reason systematically about them. By representing statements as propositions and
using logical operators to connect them, we can analyze the validity and soundness of
arguments.
3. Logical Inference: Propositional logic enables logical inference, where conclusions
can be derived from given premises using valid logical rules. This ability is crucial in
fields such as mathematics, philosophy, and computer science for drawing logical
conclusions and making deductions.
4. Decision Making: Propositional logic can be used to model decision-making processes
in various domains. It is employed in fields like artificial intelligence and computer
science for designing algorithms, constructing decision trees, and representing
knowledge in expert systems.
5. Circuit Design and Computer Hardware: Propositional logic plays a fundamental
role in digital circuit design and computer hardware. Logical gates, such as AND, OR,
and NOT gates, are the building blocks of digital circuits, and their behavior can be
precisely described using propositional logic.
6. Database Queries: In database systems, propositional logic is used to formulate
queries and retrieve information from databases. Logical operators like AND, OR, and
NOT are employed to specify conditions for selecting records from databases.
7. Puzzle Solving and Game Theory: Propositional logic is utilized in solving puzzles
and analyzing strategic interactions in game theory. It provides a formal framework for
representing game rules, player actions, and possible outcomes, enabling the analysis
of optimal strategies.
8. Automated Reasoning: Propositional logic forms the basis for automated reasoning
systems and theorem provers. These systems use logical inference rules to
automatically derive conclusions from given premises, which is valuable in fields like
mathematics, logic programming, and formal verification.

Overall, propositional logic serves as a fundamental tool for formalizing reasoning, modeling
decision-making processes, and solving problems in various domains, making it an
indispensable part of logical and computational thinking.

why do we need predicate logic?

Predicate logic is necessary because it allows for more nuanced and expressive statements
about objects, properties, relations, and functions than propositional logic. Here are some
reasons why predicate logic is essential:

1. Expressiveness: Predicate logic allows us to express relationships between objects and


properties more precisely. Unlike propositional logic, which deals with whole
propositions, predicate logic deals with predicates (statements containing variables) and
quantifiers, enabling us to make statements about specific objects or sets of objects.
2. Quantification: Predicate logic introduces quantifiers such as ∀ (for universal
quantification) and ∃ (for existential quantification), which enable us to make general
statements about all objects or some objects in a domain. This capability is crucial for
reasoning about groups of objects and making generalizations.
3. Formalization of Natural Language: Predicate logic is closer to natural language and
can be used to formalize statements from natural language more accurately. This makes
it a valuable tool in areas such as linguistics, philosophy, and computer science for
representing knowledge and reasoning.
4. Predicate Calculus: Predicate logic forms the basis of predicate calculus, which is
widely used in mathematics, computer science, and philosophy for formal reasoning.
Predicate calculus allows for the derivation of logical conclusions from given premises,
making it a powerful tool in deductive reasoning.
5. Modeling Relations and Functions: Predicate logic enables the representation and
reasoning about relations between objects and functions that map objects to other
objects. This is essential in various fields such as mathematics, computer science, and
artificial intelligence for modeling complex systems and making inferences.
6. Foundations of Mathematics: Predicate logic provides a foundation for formalizing
mathematical theories and proofs. It allows mathematicians to precisely state axioms
and define mathematical structures, facilitating rigorous reasoning and proofs in
mathematics.
Overall, predicate logic extends the expressive power of propositional logic by introducing
quantification and enabling the representation of complex relationships and properties. Its use
is widespread across various disciplines due to its ability to capture the subtleties of logical
reasoning and formalize knowledge.

Propositional logic can be used to analyze and determine the truth values of
compound propositions based on given premises

Ex of Propositional logic

1. Problem: Suppose we have the following propositions:

P: It is raining.

Q: The streets are wet.

If it is raining, then the streets are wet. Determine the truth value of the compound
proposition: "If it is not raining, then the streets are not wet."

Solution: We can represent the given statements as P→Q in propositional logic. Now,
we need to find the truth value of the compound proposition "If it is not raining, then
the streets are not wet," which is equivalent to ¬P→¬Q.

The truth table for this compound proposition is as follows:

P Q ¬P ¬Q ¬P→¬Q
T T F F T
T F F T T
F T T F F
F F T T T

Therefore, the compound proposition "If it is not raining, then the streets are not wet"
is true only when it is not raining and the streets are not wet.

2. Problem: Given the propositions:

P: It is snowing.

Q: The roads are icy.

R: School is cancelled.

If it is snowing and the roads are icy, then school is canceled. Determine the truth
value of the compound proposition: "If school is canceled, then it is snowing and the
roads are icy."
Solution: We can represent the given statements as (P∧Q)→R in propositional logic.
Now, we need to find the truth value of the compound proposition "If school is
canceled, then it is snowing and the roads are icy," which is equivalent to R→(P∧Q).

The truth table for this compound proposition is as follows:

P Q R P∧Q R→(P∧Q)
T T T T T
T F T F F
F T T F F
F F T F F

Therefore, the compound proposition "If school is canceled, then it is snowing and the
roads are icy" is true only when school is canceled, and it is snowing, and the roads
are icy.

Predicate logic can be used to express statements involving quantifiers,


predicates, and relations between objects. It provides a more nuanced and
expressive way to reason about properties and relationships compared to
propositional logic.

Solved examples on predicate logics

1. Problem: Consider the following predicates:

P(x): "x is a prime number."

Q(x): "x is greater than 5."

Express the statement "All prime numbers greater than 5" using predicate logic.

Solution: We want to express the statement "All prime numbers greater than 5" using
predicate logic. This can be represented as: ∀x (P(x)∧Q(x)).

Here, ∀x means "for all x",

P(x) represents "x is a prime number," and

Q(x) represents "x is greater than 5."

So, (P(x)∧Q(x)) means "x is a prime number and x is greater than 5" for all values of
x.

2. Problem: Suppose we have the predicates:


P(x): "x is a positive integer."

Q(x): "x is divisible by 2."

Express the statement "There exists a positive integer that is divisible by 2" using
predicate logic.

Solution: We want to express the statement "There exists a positive integer that is
divisible by 2" using predicate logic. This can be represented as:

∃x(P(x)∧Q(x))

Here, ∃x means "there exists an x",

P(x) represents "x is a positive integer," and

Q(x) represents "x is divisible by 2."

So, (P(x)∧Q(x)) means "x is a positive integer and x is divisible by 2" for at least one
value of x.

3. Problem: Let's define the predicates:

P(x): "x is a mammal."

Q(x,y): "x is the parent of y."

Express the statement "All mammals have parents" using predicate logic.

Solution: We want to express the statement "All mammals have parents" using
predicate logic. This can be represented as:

∀x(P(x)→∃yQ(y,x))

Here, ∀x means "for all x",

P(x) represents "x is a mammal," and

Q(y,x) represents "y is the parent of x."

So, (P(x)→∃yQ(y,x)) means "if x is a mammal, then there exists a y such that y is the
parent of x" for all values of x.

4. Example: Let P(x) represent "x is a cat" and


Q(x) represent "x is black".
Express the statement "All black cats have whiskers" using predicate logic.

Solution: The statement can be expressed as:

∀x ((P(x)∧Q(x))→W(x)) where W(x) represents "x has whiskers".


5. Example: Let P(x) represent "x is a positive integer" and

Q(x) represent "x is divisible by 3".

Express the statement "There exists a positive integer divisible by 3" using predicate
logic.

Solution: The statement can be expressed as:

∃x (P(x)∧Q(x)).

6. Example: Let P(x) represent "x is a triangle" and

Q(x,y) represent "x is adjacent to y".

Express the statement "All triangles have three adjacent sides" using predicate logic.

Solution: The statement can be expressed as:


∀x (P(x)→(∃y ∃z (Q(x,y)∧Q(x,z)∧y≠z)))

7. Example: Let P(x) represent "x is a student" and

Q(x,y) represent "x is friends with y".

Express the statement "Some students have friends" using predicate logic.

Solution: The statement can be expressed as:

∃x ∃y (P(x)∧P(y)∧Q(x,y))

8. Example: Let P(x) represent "x is a mammal" and

Q(x) represent "x is carnivorous".

Express the statement "All mammals are not carnivorous" using predicate logic.

Solution: The statement can be expressed as:

∀x (P(x)→¬Q(x))

9. Example: Let P(x) represent "x is a prime number" and

Q(x,y) represent "x divides y".

Express the statement "All prime numbers have exactly two divisors" using predicate
logic.

Solution: The statement can be expressed as:


∀x (P(x)→(∃y ∃z (Q(y,x)∧Q(z,x)∧y≠z∧¬(∃w (Q(w,x)∧w≠y∧w≠z)))))
10. Example: Let P(x) represent "x is a fruit" and

Q(x) represent "x is red".

Express the statement "All red fruits are apples" using predicate logic.

Solution: The statement can be expressed as:

∀x ((P(x)∧Q(x))→(x=Apple))

11. Example: Let P(x) represent "x is a natural number" and

Q(x) represent "x is odd".

Express the statement "There exists a natural number that is not odd" using predicate
logic.

Solution: The statement can be expressed as:

∃x (P(x)∧¬Q(x))

12. Example: Let P(x) represent "x is a square" and

Q(x) represent "x has four sides".

Express the statement "All squares have equal sides" using predicate logic.

Solution: The statement can be expressed as:

∀x (P(x)→(∃y (Q(y)∧y=4)))

13. Example: Let P(x) represent "x is a multiple of 5" and

Q(x) represent "x is even".

Express the statement "There exists a multiple of 5 that is not even" using predicate
logic.

Solution: The statement can be expressed as:

∃x (P(x)∧¬Q(x))

Predicate logic can be used to express various statements involving


quantifiers, predicates, and relations between objects or properties.
Example: Consider the following sentences:
a) John likes all kinds of food
b) Apples are food
c) Anything anyone eats and isn’t killed by is food
d) Bill eats peanuts and is still alive
e) Sue eats everything Bill eats
Answer the following questions:
i) Assess all the sentences into formulas in predicate logic.
ii) Convert formulas from the previous step into clause form.
iii) Prove that John likes Peanuts using resolution.
Solution:
i) Formulas in Predicate Logic:
a) John likes all kinds of food:
∀x(Food(x)→Likes(John,x))
b) Apples are food:
Food(Apples)
c) Anything anyone eats and isn't killed by is food:
∀x∀y(Eats(x,y)∧¬KilledBy(x)→Food(y))
d) Bill eats peanuts and is still alive:
Eats(Bill,Peanuts)∧¬KilledBy(Bill)
e) Sue eats everything Bill eats:
∀x(Eats(Sue,x)→Eats(Bill,x))
ii) Formulas in Clause Form:
a) John likes all kinds of food:
¬Food(x)∨Likes(John,x)
b) Apples are food:
Food(Apples)
c) Anything anyone eats and isn't killed by is food:
¬Eats(x,y)∨¬KilledBy(x)∨Food(y)
d) Bill eats peanuts and is still alive:
Eats(Bill,Peanuts)∧¬KilledBy(Bill)
e) Sue eats everything Bill eats:
¬Eats(Sue,x)∨Eats(Bill,x)
iii) Proving John Likes Peanuts using Resolution:
To prove that John likes Peanuts, we can attempt to resolve the negation of the statement
"John likes Peanuts" with the set of clauses derived from the given sentences.
Statement to Prove: ¬Likes(John, Peanuts)
Clauses:
1) ¬Food(x)∨Likes(John,x)
2) Food(Apples)
3) ¬Eats(x,y)∨¬KilledBy(x)∨Food(y)
4) Eats(Bill,Peanuts)∧¬KilledBy(Bill)
5) ¬Eats(Sue,x)∨Eats(Bill,x)
Resolution Steps:
Resolve (1) and (2): Likes(John,Apples)
Resolve (3) and (4): Eats(Bill,Peanuts)
Resolve (5) with Eats(Bill,Peanuts): Eats(Sue,Peanuts)

You might also like