I have a question in Logic:If I am asked to construct a formula, using the '=' predicate, that shows that there are exactly n objects, I need to show that there are no n+1 objects, right?For example, to show that there are exactly 3 objects, I will show that there are no 4 objects.Also, I need to show that there exist n objects.My question is, do I need to show that there is no case where only n-1 objects exist?For example, to show that there are exactly 3 objects, do I need to show that there is no case in which there are only 2 objects?If so, is that the correct form to do so? :1) Showing that there is no case of 4 elements:${\lnot}{\exists}x{\exists}y{\exists}z{\exists}w(x{\neq}y{\land}x{\neq}z{\land}x{\neq}w{\land}y{\neq}z{\land}y{\neq}w{\land}z{\neq}w)$2) Showing that there are 3 elements:${\exists}x{\exists}y{\exists}z(x{\neq}y{\land}x{\neq}z{\land}y{\neq}z)$3) Showing that there is no case of only 2 elements:${\lnot}{\exists}x{\exists}y{\lnot}{\exists}z(x{\neq}y{\land}x{\neq}z{\land}y{\neq}z)$And finally, combining the three:$(1){\land}(2){\land}(3)$I am really not sure.Thanks in advanceEDIT:Actually, assuming that I do need to show that there is no case of less than 3 elements (n elements), I would probably need to show that there is no case where there is just one element as well (from 1 until n-1), am I correct?
Logic formula for exactly n unique objects (no more, no less)
logic;sets;first order logic;finite sets
You need to say that (a) there are at least $n$ elements, and (b) there are at most $n$ elements. To express (a),$$L_n := \exists x_1\dotsc \exists x_n\, \left( \bigwedge_{1\le i < j \le n} x_i\ne x_j \right).$$To express (b),$$M_n := \forall x_1\dotsc \forall x_{n+1}\, \left( \bigvee_{1\le i < j \le n+1}x_i = x_j\right).$$So the sentence $L_n \land M_n$ holds iff there are exactly $n$ elements.