Tuple
Let $$I$$ be an index set, and $$S$$ a set then we say that a function $$t : I \to S$$ is a tuple,
Tuple at an Index
Suppose that $$t$$ is a tuple and $$i \in \operatorname{ dom } \left( t \right)$$ , then we define that the tuple's value at index $$i$$ as $$t \left( i \right)$$
Tuple Subscript Notation
Suppose that $$t$$ is a tuple, then we define $$t _ i$$ to be $$t$$ at index $$i$$
Ordered Tuple Notation
Suppose that the index set has some natural ordering, then the notation $$\left( t _ { i _ 1 } , t _ { i _ 2 } , \ldots \right)$$
Finite Tuple
A finite tuple is a tuple with a finite index set
Naturally Indexed Tuple
A naturally indexed tuple is a tuple whose index set equals $$\mathbb{ N } _ 1$$ or $$[ 1 \ldots m ]$$ for some $$m \in \mathbb{ N } _ 1$$

Note that a naturally indexed tuple is represented using ordered tuple notation using $$\left( a _ 1, a _ 2, \ldots \right)$$. When it's finite we get $$\left( a _ 1, a _ 2, a _ 3, a _ 4 \right)$$

Finite Tuple Equality
We define two $$n$$ tuples $$(x_1, x_2, ..., x_n)$$ and $$(y_1, y_1, ..., y_n)$$ to be equal when $\forall i \in [1 \ldots n], x_i = y_i$

Note that finite tuples tuples are indexed starting from 1

Length
Suppose that $$a = \left( a _ 1, a _ 2, \ldots , a _ n \right)$$ then $$\operatorname{ len } \left( a \right) = n$$
Zero Indexed Tuple
A zero indexed tuple is a tuple of the form $$a = \left( a _ 0, a _ 1, \ldots a _ m \right)$$
Length of a Zero Indexed Tuple
Suppose that $$a = \left( a _ 0, a _ 1, \ldots a _ m \right)$$ is a zero indexed tuple, then $$\operatorname{ len } \left( a \right) = m + 1$$
Converting from Regular to Zero Indexing
Let $$a$$ be a finite tuple and suppose $$\operatorname{ len } \left( a \right) = n$$ , let $$r$$ be $$a$$ but indexed regularly, and let $$z$$ be $$a$$ but using zero indexing, then for all $$i \in [ 1 ... n ], r _ i = z _ { i - 1 }$$
Reverse of a Finite Tuple
Suppose that $$a = \left( a _ 1, a _ 2, \ldots , a _ n \right)$$, is an $$n$$ tuple, then we define $\operatorname{rev} \left( a \right) := \left( a _ n, \ldots , a _ 1 \right)$
Reverse Cancels
For any $$n$$ tuple $$a$$ $\operatorname{ rev } \left( \operatorname{ rev } \left( a \right) \right) = a$
Concatenation
Suppose that $$a = \left( a _ 1, \ldots , a _ n \right)$$ and $$b = \left( b _ 1, \ldots , b _ m \right)$$ are finite tuples, then $\operatorname{ concat } \left( a, b \right) = \left( a _ 1, \ldots a _ n, b _ 1, \ldots , b _ m \right)$
Sorted in Ascending Order
Suppose that $$a = \left( a _ 1, a _ 2, \ldots , a _ n \right) \in \mathbb{ R } ^ n$$, then we say that $$a$$ is sorted in ascending order when for any $$i \in [ 1 \ldots n - 1 ]$$ $$a _ i \le a _ { i + 1 }$$
Ascending Tuple
Show that $$\left( 1, 2, 3, 4, 100 \right)$$ is an ascending $$n$$ tuple
Sorted in Descending Order
Suppose that $$a = \left( a _ 1, a _ 2, \ldots , a _ n \right) \in \mathbb{ R } ^ n$$, then we say that $$a$$ is sorted in descending order when for any $$i \in [ 1 \ldots n - 1 ]$$ $$a _ i \ge a _ { i + 1 }$$
Descending Tuple
Show that $$\left( 8, 5, 3, 1, 0 \right)$$ is a descending $$n$$ tuple
The reverse of Ascending is Descending
Suppose that $$a$$ is a finite tuple sorted in ascending order, then $$\operatorname{ rev } \left( a \right)$$ is sorted in descending order.
Inversion
Suppose that $$\left( a _ 1, a _ 2, \ldots , a _ n \right) \in \mathbb{ R } ^ n$$, then an inversion is a tuple $$i , j \in [ 1 \ldots n ] \times [ 1 \ldots n ]$$ such that $$i \lt j$$ but $$a _ i \gt a _ j$$

Given the tuple $$a := \left( 8, 9, 10, 11, 3 \right)$$ then we can see that $$\left( 1, 5 \right)$$ is an inversion because $$1 \lt 5$$ but $$8 \gt 3$$