I had a doubt about a first order logic question given in this lecture which is a series on Discrete Mathematical structures from IIT.
If $x*y=x$ for all $y$, then $x=0$. You have to represent this in predicate logic. The universe of discourse is set of non-negative integers.
Let $P(x,y,z)$ represent: $x*y=z$
Answer given by the instructor is; $$∀x[∀y P(x,y,x) => x=0]$$ Which I understood and is true. But the answer I managed was: $$∃x[∀y P(x,y,x) ∧ x=0]$$ This also seems right.
Also if you expand the first assertion, $$∀x[∀y P(x,y,x) => x=0]$$ $$∀x[¬∀y P(x,y,x) ∨ x=0]$$ $$∀x ¬[∀y P(x,y,x) ∧ x≠0]$$ $$¬∃x[∀y P(x,y,x) ∧ x≠0]$$ Which is not the same as I managed but I am not able to figure out where I am wrong. Or are they both right?
My first question so sorry for any mistakes. Thanks!
It is not directly mentioned here, but usually this means that the above should be true for all $x$, and not just for some $x$. Hence the answer from your instructor is the right one.