[Math] nested quantifiers (exactly one questions)

discrete mathematicslogicpredicate-logicquantifiers

Express this statement using quantifiers, without using the uniqueness
quantifier."There is exactly one student in this class who has taken exactly one mathematics class at this school"
T (x, y):means that student x has taken class y and the domain is all
students in this class

The correct answer says : ∃x∀z((∃y∀w(T (z, w) ↔ w = y)) ↔ z = x)

My answer is: ∃x∃y,(T(x,y)∧ (∀m,∀n, T(m,n)∧((x=m)∧(y=n))))

What's wrong with my answer?

Best Answer

One difference is that your answer implies that $\forall m, \forall n, T(m,n)$. That should only be true when $m = x$ and $n = y$.

Does that help?