Let P(x,y) = "x loves y" Let the Domain of Discourse be all people
"Someone loves exactly two people"
I found that this can be expressed as:
∃x∃y∃z( y≠z ∧ P(x,y) ∧ P(x,z) ∧ ∀w(P(x,w) → (w=y ∨ w=z)))
(Person y is not person z, and person x loves y and person x loves z, and for all people, if person x loves person w, then person w must be person y, or person w must be person z)
However I also see this expression in many places and in similar circumstances:
∃x∃y∃z( y≠z ∧ ∀w(P(x,w) ↔ (w=y ∨ w=z)))
(Person y is not person z, and for all people, person x loves person w if and only if person w is person y and person w is person z)
Are these logically equivalent?
Yes, they are equivalent, because $$\forall w ((w=y \lor w=z) \rightarrow P(x,w)) \;\leftrightarrow\; P(x,y) \land P(x,z)$$
Now try to prove this, and try to complete the equivalence proof using this.