# Tuple

A tuple is an ordered multiset that is a finite sequence with $n \ge 1$ tuple members.

## References

### 2015

• (Wikipedia, 2015) ⇒ http://en.wikipedia.org/wiki/tuple Retrieved:2015-2-23.
• A tuple is an ordered list of elements. In mathematics, an n-tuple is a sequence (or ordered list) of $n$ elements, where $n$ is a non-negative integer. There is only one 0-tuple, an empty sequence. An $n$ -tuple is defined inductively using the construction of an ordered pair. Tuples are usually written by listing the elements within parentheses " $(\text{ })$ " and separated by commas; for example, $(2, 7, 4, 1, 7)$ denotes a 5-tuple. Sometimes other delimiters are used, such as square brackets " $[\text{ }]$ " or angle brackets " $\langle\text{ }\rangle$ ". Braces " $\{\}$ " are almost never used for tuples, as they are the standard notation for sets. Tuples are often used to describe other mathematical objects, such as vectors. In computer science, tuples are directly implemented as product types in most functional programming languages. More commonly, they are implemented as record types, where the components are labeled instead of being identified by position alone. This approach is also used in relational algebra. Tuples are also used in relation to programming the semantic web with Resource Description Framework or RDF. Tuples are also used in linguistics [1] and philosophy. [2]
• (Wikipedia, 2015) ⇒ http://en.wikipedia.org/wiki/tuple#Properties Retrieved:2015-2-23.
• The general rule for the identity of two $n$ -tuples is : $(a_1, a_2, \ldots, a_n) = (b_1, b_2, \ldots, b_n)$ if and only if $a_1=b_1,\text{ }a_2=b_2,\text{ }\ldots,\text{ }a_n=b_n.$ Thus a tuple has properties that distinguish it from a set.
1. A tuple may contain multiple instances of the same element, so tuple $(1,2,2,3) \neq (1,2,3)$ ; but set $\{1,2,2,3\} = \{1,2,3\}$ .
2. Tuple elements are ordered: tuple $(1,2,3) \neq (3,2,1)$ , but set $\{1,2,3\} = \{3,2,1\}$ .
3. A tuple has a finite number of elements, while a set or a multiset may have an infinite number of elements.

• (Wikipedia, 2015) ⇒ http://en.wikipedia.org/wiki/tuple#Tuples_as_functions Retrieved:2015-2-23.
• If we are dealing with sets, an $n$ -tuple can be regarded as a function, F, whose domain is the tuple's implicit set of element indices, X, and whose codomain, Y, is the tuple's set of elements. Formally: : $(a_1, a_2, \dots, a_n) \equiv (X,Y,F)$ where: : \begin{align} X & = \{1, 2, \dots, n\} \\ Y & = \{a_1, a_2, \ldots, a_n\} \\ F & = \{(1, a_1), (2, a_2), \ldots, (n, a_n)\}. \\ \end{align} In slightly less formal notation this says: : $(a_1, a_2, \dots, a_n) := (F(1), F(2), \dots, F(n)).$