I wondered whether it is possible to define a sequence without relying on sets or natural numbers and tried with this definition.
- A symbol which is not a comma is a sequence.
- If $S$ is sequence and $s$ a symbol which is not a comma:
- $S, s$ is a sequence, where every symbol occurring in $S$ precedes $\phi$ and $\phi$ is the last symbol of the sequence.
- $s, S$ is a sequence, where every symbol occurring in $S$ follows $\phi$ and $\phi$ is the first symbol of the sequence.
So given the string "$a,b,c$", "$a$" is a sequence and "$a,b$" is a sequence too. Therefore "$a,b,c$" is the sequence "$S, c$", where "$S$" is "$a,b$", "$c$" is its last element and "$a,b$" precede it. Similarly "$a$" can be identified as the first element.
Is that correct?
Why not make it even simpler?
This is similar to the definition of the free monoid.
In terms of addressing elements in a sequence: given the sequence $AsB$, the symbol $s$ is the first element if $A$ is trivial, and the last if $B$ is trivial.