First Order Logic Problem

234 Views Asked by At

I have the following problem I'm trying to understand/solve using first order logic.

Predicates:
Set(S), which states that S is a set, and
x ∈ S, which states that x is an element of S,

Using first order logic, I need to write :

For any x and y, there is a set containing just the elements x and y.
2

There are 2 best solutions below

1
On BEST ANSWER

Let $w$ is a set containing just the elements $x$ and $y$, then $z\in w$ iff $z=x$ or $z=y$. So desired formula is

$$\forall x\forall y \exists z\forall w: \mathrm{Set}(z)\land (w\in z \leftrightarrow (w=x)\lor (w=y))$$

0
On

HINT:

What is a set containing just $x$ and $y$? It's the set $\{x,y\}$.

First write a formula $\varphi(x,y,z)$ which states that $z=\{x,y\}$. Next, quantify over $x,y,z$ according to your instructions.