Course contentsShow
← Computer Science
Lesson 54 of 2,8722. Discrete Mathematics for CSFree lesson

Uniqueness Quantifier (∃!)

Learn to express unique existence using the uniqueness quantifier and its definition.

Uniqueness Quantifier (∃!)

What you'll learn: How to express that exactly one element satisfies a condition using the uniqueness quantifier.

What Is the Uniqueness Quantifier?

You've already learned two quantifiers: the universal quantifier (∀) for "all" and the existential quantifier (∃) for "there exists." Now we add a third: the uniqueness quantifier (∃!), which means "there exists exactly one."

When you write ∃!x P(x), you're stating two things simultaneously:

  1. At least one x exists that makes P(x) true
  2. No more than one x makes P(x) true

In other words, precisely one element satisfies the condition—no fewer, no more.

How It's Defined

The uniqueness quantifier isn't primitive; it's actually shorthand built from concepts you already know:

∃!x P(x) means: "There exists an x such that P(x) is true, AND for any other y, if P(y) is true, then y must be the same as x."

More formally: (∃x P(x)) ∧ (∀y ∀z ((P(y) ∧ P(z)) → (y = z)))

Real-World Example

Consider the predicate "is the current president of France." Using the uniqueness quantifier:

∃!x President(x)

This says exactly one person holds that office—not zero, not two, but precisely one.

Compare this to just ∃x President(x), which only guarantees at least one president exists (maybe more!).

Why It Matters

In computer science, uniqueness is crucial for database constraints (unique IDs), algorithm correctness (finding the solution), and formal specifications (ensuring exactly one valid state).

Key Takeaway: The uniqueness quantifier ∃! expresses that exactly one element satisfies a condition, combining existence with exclusivity.