Artificial intelligent assistant

Notation To Define A Mapping From A Set to a Relation Between Two Elements Of That Set Say I had a set $S=\\{s_1,\dots, s_n\\}$, and each $s_i$ denotes an outcome. If I wanted to define a function, $f$ which takes two elements of $S$, $\\{s_i, s_j\\}$, and maps it to a relation, either $s_i\succ s_j$ or $s_j\succ s_j$, how exactly could I define this function - notation wise? I was thinking that maybe it could be something like $f: S^2 \rightarrow X$ and $f(s_i,s_j)= \\{s_i\succ s_j $ or $ s_j\succ s_j\\}$ but am unsure of my notation. Essentially, I would like a nice way to write something similar to $g: \mathbb{R}^3 \rightarrow \mathbb{R}^2$, where $g(x, y, z)=(xy, yz)$.

Let's say $\succ$ is a total ordering on $S$. Therefore, either $a \succ b$ or $b \succ a$ for all $a, b \in S$.

In this case, to do what you want to do, you need to create a function from $S^2$ to $S^2$. It will take as input $(a, b)$ for $a, b$ in $S$ and then output the ordered tuple. Here is the formal definition:

$$f(a, b)=\begin{cases}(a, b) \ \ \ \text{if} \ a \succ b \\\ (b, a) \ \ \ \text{if} \ b \succ a\end{cases}$$

Thus, $f$ takes in a two-tuple of $S$ as input and then orders the tuple from greatest to least. I think this is the easiest definition of what you want.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c102a2caa06d731e1b457e25abeaef76