Is there a standard notation to define a tuple?

5.2k Views Asked by At

So I have a matrix $A=[a_{ij}]_{\forall\,i,j\in\{1,\dots,n\}}$.

I have no problem to define a set $S$ as $S:=\{j: j=\text{argmax}_{j'}\; a_{ij'},\forall i\in\{1,\dots,n\} \}$ for example. In fact, I have seen sets defined this way many times.

Now my problem is with tuple. Is it correct to use the same for tuple. So, can I say "let $A$ be the tuple $A:=(j: j=\text{argmax}_{j'}\; a_{ij'},\forall i\in\{1,\dots,n\} )$." or this makes no sense?

EDIT

In fact, I have a bad time finding some mathematical object that is like array in programming language. So I can access elements of that object, find its size, add elements, remove elements, etc. Is there any mathematical object like this?

3

There are 3 best solutions below

5
On BEST ANSWER

I would just write the tuple out to avoid any confusion or ambiguity with the order:

$$x = (x_1,\ldots,x_n),\ x_i = \operatorname{argmax}_j a_{ij}$$

Edit: Mathematical objects don't need to be "implemented". Just write what you want your reader to understand. To add an element $y$ to $x = (x_1,\ldots,x_n)$, just write "$x' = (x_1,\ldots,y,\ldots,x_n)$ where $y$ is inserted in the $i$-th position". To define its size, write "Let $n$ be the length of $x$.". To remove an element, write $(x_1,\ldots,x_{i-1},x_{i+1},...,x_n)$.

2
On

Perhaps list comprehension is what you're after? I should add that mathematicians don't use this notation very often (probably to our detriment).

0
On

What do we typically write for the type of a tuple? Usually something like $\mathbb{R}^n$, say, for a $n$-tuple of real numbers. What does this notation mean? We could say that it means "multiply" $\mathbb{R}$ with itself $n$ times, i.e. $\mathbb{R}\times\cdots\times\mathbb{R}$. Alternatively, we could view $n$ as standing for the set $\{1,...,n\}$ and $\mathbb{R}^n$ as the function space $n \to \mathbb{R}$. This is completely consistent. An array is just a function, usually from a finite input space. A sequence is just a function from $\mathbb{N}$. A matrix is just a function $m\times n \to \mathbb{R}$.

From this perspective you can simply say the tuple $x = i \mapsto \text{argmax}_j A(i,j)$ treating your matrix, $A$, as a function too, because hey, why not? You can, of course, use subscripting as a notational variation on function application leading to ryanblack's answer rationalized: $x_i = \text{argmax}_j A_{ij}$

You can define "array" operations on this representation if you like, e.g. prepending an element would look like: $$\text{prepend}(a,x)\equiv i \mapsto \begin{cases}a, & i = 0\\ x_{i-1}, & i \neq 0\end{cases}$$ As ryanblack suggests though, mathematician's are rarely this precise or detailed.