Subtleties on comprehension sets

63 Views Asked by At

I see that a typical definition of the cartesian product $A \times B$ is $\{ x \in \wp\wp A \cup B: \exists a \exists b (a \in A \wedge b \in B \wedge x=(a,b)) \}$. I have come up with an alternative that does not use the quantifiers and I don't think is entirely equivalent, logically speaking, to the traditional one and I don't know if it would be correct.

$\{ x \in \wp\wp A \cup B: x=(a,b) \leftrightarrow (a \in A \wedge b \in B) \}$

Is there a difference between the two? In the same way, I am thinking that the best way to define the inverse of a function $f:A \rightarrow B$ would be

$\{ z \in B \times A: z=(y,x) \leftrightarrow y=f(x) \}$