# What is the best way to write a set of triples where if $(x,y,z)$ is included $(y,x,z)$ is not.

I am given two sets $A$ and $B$. I want to construct a new set $C$ defined as triple $(x,y,z)$ where $x$ and $y$ are distinct elements of $A$ and $z\in B$ on the requirement that if $(x,y,z)\in C$ then $(y,x,z)\not\in C$.

My question is about the notation. Currently, I am writing it like this

$C=\{(x,y,z)\mid x\neq y\in A$, $z\in B$, $(y,x,z)\not\in C\}$. But I feel this is not standard notation in math. I though about defining a lexicographic order < on $A$ and then write it

$C=\{(x,y,z)\mid x\neq y\in A, z\in B$ and $x$ precedes $y$ w.r.t. < $\}$. Is this correct?

It seems your set $C$ is not a set of triples, but a set of pairs, whereby the first entry of such a pair is an arbitrary two-element subset $\{x,y\}$ of $A$, and the second entry is an arbitrary element $z\in B$.

You can write: "Let $C:={A\choose2}\times B$, whereby ${A\choose2}$ denotes the set of two-element subsets of $A$. For simplicity we write the elements of $C$ as triples $(x,y,z)$ with $\{x,y\}\subset A$, $\>z\in B$."

If you definitely want your set C to consist of triples of the form $(x,y,z)$ then you will have to provide some means of determining which out of a pair $(x,y,z)$ and $(y,x,z)$ is included and which is left out. Your second option is fine for this.

Otherwise you might consider whether a set containing doubles of the form $(\alpha,z)$, where $\alpha$ is a 2-element subset of $A$ would work for your requirements.

(As a side issue, some people would have a problem with saying "$x\neq y\in A$" rather than "$x,y\in A$, $x\neq y$, which is a bit clearer.)

Your first example does not make sense. To simplify, let's just consider the set $A$ to be the integers $\mathbb{Z}$, and leave the set $B$ out of things. Then you want to define something like $$C = \{(x, y) \mid x, y \in \mathbb{Z}, x \neq y, (y, x) \notin C\}$$ While there certainly are sets satisfying this condition, you can't define a set this way, since there could be a lot of different sets that satisfy it. For example, the set $$\{\ldots, (-3, 0), (-1, 0), (1, 0), (3, 0), \ldots\}$$ satisfies the listed conditions, but so does the single element set $\{(1, 0)\}$. So the set $C$ is not well-defined.

On the other hand, your second attempt is well-defined. The set $$C = \{(x, y) \mid x, y \in \mathbb{Z}, x < y \}$$ makes sense. Put another way, you can take any pair of numbers $(a, b)$ and "ask" your definition whether they are in the set $C$. You can't do this for the first definition, since it seems to depend on you already knowing whether $(b, a)$ is in the set.