[Math] Find a L-sentence which is true in a structure $M$ iff the universe $A$ of $M$ consists of exactly two elements

first-order-logiclogicpredicate-logic

Find a L-sentence which is true in a structure $M$ iff the universe $A$ of $M$ consists of exactly two elements, where the language L consist a unary function $S$ and $2$-ary predicate $<$.

This is an exercise $2.d$ in my text: A Friendly introduction to mathematical Logic by Leary.

My attempt to solve this is this formula:

$\phi = \mathop{\sim}[\ \forall a\ \exists b\ \exists c\ ([a\ne b] \wedge [ a\ne c] \wedge [b\ne c] \ )\ ] \wedge [\ \forall x \exists y (x\ne y)\ ] $

I chose this formula as it's of course a sentence (no free variables) and it says that the structure doesn't have more than two element and that it doesn't have one element so the only universe satisfies this property must have exactly two elements!

I wonder if this is a right choice and if yes, is there any better sentence we can provide?

Best Answer

Yes, that works, although I found it a bit confusing. You could also say $$ \exists x\,\exists y\,(x \ne y) \wedge \neg \exists x\,\exists y\,\exists z\,(x \ne y \wedge x \ne z \wedge y \ne z),$$ which says "there are two distinct elements and it is not the case that there are three distinct elements," or

$$ \exists x\,\exists y\,(x \ne y \wedge \forall z\,(z = x \vee z = y)),$$ which says "there are two distinct elements such that every element is equal to one of the two."

Related Question