元组
元组 | |
---|---|
术语名称 | 元组 |
英语名称 | tuple |
别名 | 组 |
元素 | |
---|---|
术语名称 | 元素 |
英语名称 | element |
元组(tuple)表示一组有限、有序的对象构成的数学对象。
定义
由一组按照特定顺序排列的有限个数学对象构成的数学对象叫做元组(tuple),这些数学对象称为元组的元素(element)。
对象的个数叫做元组的长度(length),长度为 [math]\displaystyle{ n }[/math] 的元组被称为[math]\displaystyle{ n }[/math] 元组([math]\displaystyle{ n }[/math]-tuple)。
在命名中,元组通常简称为组,特别是在其中元素来自于同一类数学对象时。如数的元组称为数组。
有序对
有序对 | |
---|---|
术语名称 | 有序对 |
英语名称 | ordered pair |
别名 | 对, 有序偶, 序偶 |
特别地,二元组也被称为有序对(ordered pair)。
在命名中,有序对通常简称为对,特别是在其中元素来自于同一类数学对象时。如数的有序对称为数对,点的有序对称为点对。
注:也存在一些定义体系中,先定义有序对,然后通过有序对的递归来定义元组。
特征
- 有序性:元组中的元素按特定顺序排列,存在先后关系。
- 可重复:元组中的元素可以重复。
- 可索引:元组中的元素位置与数集 [math]\displaystyle{ \{0,1,2,\cdots,n-1\} }[/math] 一一对应。
一般两个元组相等定义为每个对应位置上的元素对应相等。
表示
由 [math]\displaystyle{ a_1,a_2,\dots,a_n }[/math] 构成的元组记为 [math]\displaystyle{ (a_1,a_2,\dots,a_n) }[/math] ,也有人用尖括号。
有序对也有时用圆括号有时用尖括号,通常使用尖括号,如由 [math]\displaystyle{ a }[/math] 和 [math]\displaystyle{ b }[/math] 构成的有序对记为 [math]\displaystyle{ \langle a,b \rangle }[/math] 。
集合定义
基于集合定义元组,并认为元组是与集合不同的类型,如 [math]\displaystyle{ (a_1,a_2,\dots,a_n) }[/math] 可定义为 [math]\displaystyle{ \{\{a_1\}, \{a_1,a_2\}, \dots, \{a_1,a_2,\dots,a_n\} \} }[/math] 。
元组 | ||
---|---|---|
特殊元组 | 0-元组 [math]\displaystyle{ () }[/math] | |
生成 | 笛卡尔积、多元谓词、多元映射、多元函数 | |
运算 | 投影映射 [math]\displaystyle{ \operatorname{proj} }[/math] | |
相等关系 [math]\displaystyle{ = }[/math] |