Labs ICT
โญ Pro Login

Predicate Logic

Understand predicates, quantifiers, and nested quantifiers.

Predicates and Variables

A predicate is a statement containing variables that becomes a proposition when specific values are substituted. For example, P(x): "x > 5" is a predicate. P(7) is true, P(3) is false.

Predicates allow us to express properties and relationships in a general way.

Quantifiers

Quantifiers turn predicates into propositions by specifying how many values satisfy the predicate.

Universal Quantifier (โˆ€): "For all"
  โˆ€x P(x) means P(x) is true for every x in the domain.

Existential Quantifier (โˆƒ): "There exists"
  โˆƒx P(x) means there is at least one x for which P(x) is true.

Negating Quantified Statements

ยฌ(โˆ€x P(x)) โ‰ก โˆƒx ยฌP(x)
ยฌ(โˆƒx P(x)) โ‰ก โˆ€x ยฌP(x)

The negation of "all students are smart" is "there exists a student who is not smart" โ€” not "no students are smart".

Nested Quantifiers

โˆ€x โˆƒy (x + y = 0)   "For every x, there exists y such that x + y = 0"
โˆƒy โˆ€x (x + y = 0)   "There exists y such that for all x, x + y = 0"

The order of quantifiers matters! The first statement is true (y = -x), while the second is false (no single y works for all x).

๐Ÿงช Quick Quiz

In predicate logic, what does โˆ€x P(x) mean?