πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

Predicate Logic

Predicate Logic deals with predicates, which are propositions, consist of variables.

Predicate Logic - Definition

A predicate is an expression of one or more variables determined on some specific domain. A predicate with variables can be made a proposition by either authorizing a value to the variable or by quantifying the variable.

The following are some examples of predicates.

  • Consider E(x, y) denote "x = y"
  • Consider X(a, b, c) denote "a + b + c = 0"
  • Consider M(x, y) denote "x is married to y."

Quantifier:

The variable of predicates is quantified by quantifiers. There are two types of quantifier in predicate logic - Existential Quantifier and Universal Quantifier.

Existential Quantifier:

If p(x) is a proposition over the universe U. Then it is denoted as βˆƒx p(x) and read as "There exists at least one value in the universe of variable x such that p(x) is true. The quantifier βˆƒ is called the existential quantifier.

There are several ways to write a proposition, with an existential quantifier, i.e.,

(βˆƒx∈A)p(x)    or    βˆƒx∈A    such that p (x)    or    (βˆƒx)p(x)    or    p(x) is true for some x ∈A.

Universal Quantifier:

If p(x) is a proposition over the universe U. Then it is denoted as βˆ€x,p(x) and read as "For every x∈U,p(x) is true." The quantifier βˆ€ is called the Universal Quantifier.

There are several ways to write a proposition, with a universal quantifier.

βˆ€x∈A,p(x)    or    p(x), βˆ€x ∈A      Or    βˆ€x,p(x)    or    p(x) is true for all x ∈A.

Negation of Quantified Propositions:

When we negate a quantified proposition, i.e., when a universally quantified proposition is negated, we obtain an existentially quantified proposition,and when an existentially quantified proposition is negated, we obtain a universally quantified proposition.

The two rules for negation of quantified proposition are as follows. These are also called DeMorgan's Law.

Example: Negate each of the following propositions:

1.βˆ€x p(x)∧ βˆƒ y q(y)

Sol: ~.βˆ€x p(x)∧ βˆƒ y q(y))
      β‰…~βˆ€ x p(x)βˆ¨βˆΌβˆƒyq (y)        (∴∼(p∧q)=∼p∨∼q)
      β‰… βˆƒ x ~p(x)βˆ¨βˆ€y∼q(y)

2. (βˆƒx∈U) (x+6=25)

Sol: ~( βˆƒ x∈U) (x+6=25)
      β‰…βˆ€ x∈U~ (x+6)=25
      β‰…(βˆ€ x∈U) (x+6)β‰ 25

3. ~( βˆƒ x p(x)βˆ¨βˆ€ y q(y)

Sol: ~( βˆƒ x p(x)βˆ¨βˆ€ y q(y))
      β‰…~βˆƒ x p(x)∧~βˆ€ y q(y)        (∴~(p∨q)= ∼p∧∼q)
      β‰… βˆ€ x ∼ p(x)βˆ§βˆƒy~q(y))

Propositions with Multiple Quantifiers:

The proposition having more than one variable can be quantified with multiple quantifiers. The multiple universal quantifiers can be arranged in any order without altering the meaning of the resulting proposition. Also, the multiple existential quantifiers can be arranged in any order without altering the meaning of the proposition.

The proposition which contains both universal and existential quantifiers, the order of those quantifiers can't be exchanged without altering the meaning of the proposition, e.g., the proposition βˆƒx βˆ€ y p(x,y) means "There exists some x such that p (x, y) is true for every y."

Example: Write the negation for each of the following. Determine whether the resulting statement is true or false. Assume U = R.

1.βˆ€ x βˆƒ m(x2<m)

Sol: Negation of βˆ€ x βˆƒ m(x2<m) is βˆƒ x βˆ€ m (x2β‰₯m). The meaning of βˆƒ x βˆ€ m (x2β‰₯m) is that there exists for some x such that x2β‰₯m, for every m. The statement is true as there is some greater x such that x2β‰₯m, for every m.

2. βˆƒ mβˆ€ x(x2<m)

Sol: Negation of βˆƒ m βˆ€ x (x2<m) is βˆ€ mβˆƒx (x2β‰₯m). The meaning of βˆ€ mβˆƒx (x2β‰₯m) is that for every m, there exists for some x such that x2β‰₯m. The statement is true as for every m, there exists for some greater x such that x2β‰₯m.

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>