# Writing a conditional statement (Existence of values) in mathematical form

I wrote a logical expression using math symbol, I wonder if it is correct.

If statement r is true and there is at least one pair of $z$ and $j$ such that $p_z = p _j$ and $z \neq j$ then q is true.

I wrote it as:

$r \land (\exists (z,j)$ s.t.: $( z \neq j ) \land (p_z = p _j)) \rightarrow q$

Could anyone help to see if this is correct? Thanks in advance.

• Take off s.t. The two points means that. – hamam_Abdallah Aug 9 '17 at 13:31
• Thanks for your comment, If I remove that It conveys the meaning I am looking for? – Crimson Aug 9 '17 at 13:32
• Yes. you answer is then correct. – hamam_Abdallah Aug 9 '17 at 13:39
• Thank you very much for time and comment. – Crimson Aug 9 '17 at 13:40

$$(r \land \exists z,j (z \not = j \land p_z = p_j)) \rightarrow q$$
You need to ensure the $r$ is grouped in the antecedant.   Operator precedance of $\to$ over $\wedge$ means that $R\wedge P\to Q$ is actually $R~\wedge~(P\to Q)$, when you want $(R\wedge P)~\to~Q$. $$\Big(r\wedge \big(\exists z~\exists j : (z\neq j)\wedge (p_z=p_j)\big)\Big)~\to~q$$
This is okay, however, not everyone accepts that the "such that" notation, "$(\mathcal Q x:\ldots)$", elevates everything between the colon and the enbrace into the scope of the embraced quantifiers, so for added clarity the scope of the quantifiers could be parenthesised thusly:
$$\Big(r~\wedge ~\exists z~\exists j~\big( (z\neq j)\wedge (p_z=p_j)\big)\Big)~\to~q$$