PREDICT LOGIC

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

MODUS PONENS

Modus Ponens (Latin: mode that affirms; often abbreviated as MP) is a form of valid inference.
An instance of MP inferences involves two premises: One is a conditional statement, i.e. a
statement of the form If A, then B; the other is the affirmation of the antecedent of the
conditional statement, i.e. A in the conditional statement If A, then B. From these such pairs of
premises, MP allows us to infer the consequent of the conditional statement, i.e. B in If A then
B. The validity of such inferences is intuitively clear, since B must be true if the statements, If A,
then B and A are both true.
Here is an example of an MP inference:
 If Jack is innocent, he has an alibi.

Jack is innocent.

Therefore, Jack has an alibi.
The first two statements are the premises and the third statement is the conclusion. If the first
and second are true, we are forced to accept the third.

MODUS TOLLENS

Modus Tollens (Latin for "mode that denies" abbreviated as MT) is another form of
valid inference. As in the case of MP, an instance of MT inferences involves two
premises. One is again a conditional statement If A then B, while the other, unlike MP, is
the negation of the consequent, i.e. a statement of the form not B. From such pairs of
premises, MT allows us to infer the negation of the antecedent of the conditional
statement, i.e. not A. To see the validity of such inferences, assume toward contradiction
that A is true given the two premises, If A then B and not B are true. Then, by
applying MP to A and If A then B, we can derive B. This is contradictory and thus A is
false, i.e. not A.

Here is an example of an MT inference

If Jack is innocent, he has an alibi.

Jack does not have an alibi.


Therefore, Jack is not innocent.

MT is often referred to also as Denying the Consequent. (Note that there are kinds of
inferences that are similarly-named but invalid, such as Affirming the
Consequent or Denying the Antecedent.)

Predicate Logic
Predicate Logic or First-Order Logic (FOL) is used to represent complex expressions in easier
forms using predicates, variables, and quantifiers. The real-world facts can be simply represented
as local propositions written as well-formed formulas in propositional logic.
Components of Predicate Logic
The three components of Predicate logic are:
1. Predicates: The symbols which are used to represent the properties or relationships between
real-world objects are called Predicates. They play an important role in First-Order Logic
for knowledge representation.

For example, predicates like isLocatedIn(Delhi, India) are used to represent the information.

2. Variables: The symbols used to represent the objects or entities are called Variables. They
are used to quantify the objects by providing them with a symbol and passing it to
predicates.

For example, in the above example isLocatedIn(Delhi, India), the variables


are Delhi and India.

3. Quantifiers: The symbols in logical statements that are used to represent the scope of
variables are called Quantifiers. They are used to represent the relationships between
objects and properties.
The two main quantifiers are Universal Quantifier (∀) and Existential Quantifier (∃).
Characteristics of Predicate Logic
The following are the characteristics of Predicate Logic in AI:
 The Predicate Logic makes the representation of complex relationships simpler by
representing them using the symbols like Predicates and Variables.

 Predicate Logic is used to represent many complex relationships. It can represent negation,
conjunction, disjunction, and many more types of statements.

 Predicate Logic consists of well-defined rules and proper syntax to represent the
relationships via valid logical expressions.

 Predicate Logic is used widely in the field of Artificial Intelligence because of its capability
to represent facts and relationships in a structured manner.
Quantifiers in Predicate Logic
Quantifiers, as we read above, are the symbols in logical statements that are used to represent the
scope of variables. They are used to represent the relationships between objects and properties.
The two main quantifiers are:
1. Universal Quantifier ( ∀ ): The symbol ∀ is used to represent the Universal Quantifier,
which basically means “For All”. It signifies the expression is true for every object or
entity.

For example, “All Boys Like Football” can be written as ∀ x : Boys(x) → Like(x,
Football).

2. Existential Quantifier ( ∃ ): The symbol ∃ is used to represent the Existential Quantifier,


which basically means “There exists”. It signifies the expression is true for at least one
object or entity.
For example, “Some Boys Like Football” can be written as ∃ x : Boys(x) ∧ Like(x,
Football).
Example of Predicate Logic
Let's see a simple example to understand Predicate Logic in a much better way. Suppose we are
given the following statement.
Statement
All white birds are beautiful.

Let’s define the predicates and write the expression for this statement.
Predicates
 IsWhite(x): Represents the property that x is white.
 IsBeautiful(x): Represents the property that x is beautiful.

The following will be the expression for the same.


Expression
∀ x ( IsWhite(x) → IsBeautiful(x) )

EXAMPLES

1. All birds fly.


In this question the predicate is "fly(bird)."
And since there are all birds who fly so it will be represented as follows.
∀x bird(x) →fly(x).

2. Every man respects his parent.


In this question, the predicate is "respect(x, y)," where x=man, and y= parent.
Since there is every man so will use ∀, and it will be represented as follows:
∀x man(x) → respects (x, parent).
3. Some boys play cricket.
In this question, the predicate is "play(x, y)," where x= boys, and y= game. Since there are some
boys so we will use ∃, and it will be represented as:
∃x boys(x) → play(x, cricket).
4. Not all students like both Mathematics and Science.
In this question, the predicate is "like(x, y)," where x= student, and y= subject.
Since there are not all students, so we will use ∀ with negation, so following representation for
this:
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x, Science)].
5. Only one student failed in Mathematics.
In this question, the predicate is "failed(x, y)," where x= student, and y= subject.
Since there is only one student who failed in Mathematics, so we will use following
representation for this:
∃(x) [ student(x) → failed (x, Mathematics) ∧∀ (y) [¬(x==y) ∧ student(y) → ¬failed (x,
Mathematics)].

You might also like