My question is quite naive…
I just want to represent a finite sequence of Natural number, is it the best way to write it like this?:
$\langle a_0, \ldots, a_n \rangle $, where $\forall i \in [ 0, n ], a_i \in \mathbb{N}$
I have also seen somewhere $\{ a_i \}$, does it mean a set (or a sequence) of variables? is it finite or infinite? where could i add the constraint like $\forall i \in [ 0, n ], a_i \in \mathbb{N}$?
Also, is there any difference between "tuple" and "sequence"?
Hope my question is clear, I just want to make sure what I write matches the convention…
Thank you very much
Best Answer
There are several usual notations:
And you can always replace $\langle a_i\mid i<n\rangle$ by $\langle a_0,\ldots,a_{n-1}\rangle$.
Note that $[0,n]$ can be read as the real numbers between $0$ and $n$.
The important thing is to be clear in your intention, and consistent in your notation.
And lastly, the difference between a "tuple" and a "sequence" is the context, usually tuple is used for finite length, while sequence is for infinite ones. Also, tuples are usually for a constant length, while sequences are a variable length.
The notation $\{a_i\}$ means that this is a set whose elements are distinct. Naturally it says $i\in I$ for some index set $I$, which in turn might be that this is just a sequence (or a directed set). The meaning is usually clear from context, read more - a lot more - and things will slowly clarify.