# First order logic: How to set a quantum of subjects

How can i create a sentence in FOL which contains a quantum of subjects? E.g. "Five students took Greek in spring 2001."

I can phrase something like "One student took Greek in spring 2001" with:

∀xy : (took(x, Greek, Spring2001) ∧ took(y, Greek, Spring2001)) ⇒ (x = y)


Sure I can chain this phrase until all subjects (x, y, z, ...) are defined, but are there any patterns to do this?

-

## migrated from stackoverflow.comNov 27 '12 at 15:36

This question came from our site for professional and enthusiast programmers.

Assert the existence of five objects, say $\exists x_1, \cdots \exists x_5$, then state that they are all unequal, so $(x_1 \neq x_2),(x_2 \neq x_3),(x_1 \neq x_3), \cdots$ (there will be $5 \choose 2$ such expressions), then state that they each took Greek, and then state that if $z$ took Greek, then $z=x_1$ or $z=x_2$ ... or $z=x_5$ (presuming that exactly five students took Greek).
$32 = 2^5 \neq {5 \choose 2} = 10$, but I see your point. – Isaac Solomon Dec 3 '12 at 18:38