In my math class today, my teacher defined a function as follows:
A string on alphabet $[m]$ of length $n$ is a function:
$$ s: [n] \rightarrow [m] $$
To seque back to math from programming, what exactly is this function? It reads like it is taking an $n$-length input and outputting an $m$-length output.
I think some other specifications might be necessary: for instance, that the function is 1:1: for a number, $n$, there is one output, $s_n$.
Is this specification implied in the arrow notation? Or is it missing, where the arrow notation could just as easily imply that $s$ in fact, takes the whole of $[n]$ and produces a vector of length $[m]$...and I should fill in the gaps...
Also, in terms of programming, a string can be defined as the physical sequence after the mapping occurs...
Finally (and here is where all of my trouble stems from), the intent of this definition is that $s$ produce a tuple, or indexed item (indexed by $n$)...but the function signature indicates that it produces a $[m]$...
Honestly, I hate it when I wind up answering myself by rewriting the question.
$$ \begin{align} f(n) &= x, x \text{ is a valid index of m}\\ s(n) &= (m_{f(n)})_n\\ s(1) &= (m_{f(1)})_1\\ \end{align} $$
Where the tuple of information, $(n,m)$ is baked into the ordered list, $[m]$.
It's funny, but I have no idea why I was confused anymore...
Anyhow, the rule I've got is that with $s: [n] \rightarrow [m]$, 1:1ness is implied by default...for every 1 $n$, there is a single index number from $m$ placed next to $n$ by virtue of it being output in order with $n$...so the type signature of the output is actually the map, $\lbrace \lbrace 1,f(1) \rbrace, ... \rbrace$...
The elements of $[n]$ are naturally ordered, and this order gives a sequence $[s_{1}, \ldots, s_{n}]$, where each of the $s_{i} \in [m]$. In other words, you have $n$ symbols from $[m]$ laid out in a specified order.
It is sometimes convenient to think of this functionally, so the $i$th character of the string is given by $s(i) = s_{i}$. As a programmer, you can think of this as like an access function, to read a specified character from your string. You have that $[n]$ is the domain of the function (the positions that can be read), and $[m]$ is the codomain (the characters that might be in those positions).
Note that you are thinking of your "alphabet" as the numbers $1, \ldots, m$, because you really don't care what the symbols actually are, from a mathematical point of view, only how many symbols you are using.