# First Order Logic - "Only One" Construct

I am wondering how one would go about constructing a "only one" statement using first order logic.

I stumbled into an example that said "Only one student took Greek in Spring of 2011."

I can easily construct something like "There is a student who took Greek in Spring of 2011." How can I add "Only one" to it?

• Hint: What can be said about any $x$ and $y$ such that each took Greek? Mar 30, 2017 at 12:18
• Roughly you want to say that there exists an element with that property, and for any element different from that element, the property does not hold.
– mrp
Mar 30, 2017 at 12:19
• @MaliceVidrine I see! We say that they are equal? Mar 30, 2017 at 12:21

The usual way is to say that if two elements both satisfy the property, then they are the same element.

In other words, the sentence

There exists exactly one $x$ such that $P(x)$

is written as

$$\exists x: (P(x)\land \forall y:(P(y)\implies x=y))$$

$$\exists x\forall y: P(y) \Leftrightarrow x=y$$

This means especially that $\exists x: P(x)\Leftrightarrow x=x$, or $\exists x: P(x)$. Also it implies that if $P(x)$ and $P(y)$ we have that $x=y$.

• @lemontree I've completely reformulated the answer... Mar 30, 2017 at 13:23

$(\exists x)(f(x) \land (\forall y)(f(y)\rightarrow y=x))$, where $f$ means "having taken Greek."

The idea is to express the uniqueness condition by means of identity between entities to which the property in question applies.
This amounts to stating that "$x$ has the property $P$, and all entities which also have property $P$ must be identical to that very $x$" or, slightly differently worded, "$x$ has the property $P$, and there is no other entity which also has the property $P$ and is different from $x$".

Formally, this can be expressed as

$\exists x (P(x) \land \forall y (P(y) \to x = y))$

or

$\exists x (P(x) \land \neg \exists y (P(y) \land x \neq y))$

It can easily be shown that the two formulations are equivalent in their truth conditions.