I am trying to understand what a monoid ring is. My lecture script gives me the following definition (my translation from German):
Let $G$ be a monoid. We define the set $$RG := \{f: G \to R \mid f(\sigma) \ne 0 \text{ for finitely many } \sigma \in G\}$$ together with addition $$f+g: G \to R, \sigma \mapsto f(\sigma) + g(\sigma)$$ and multiplication $$f \cdot g: G \to R, \sigma \mapsto \sum_{\tau, \rho \in G \atop t \cdot \rho = \sigma}f(\tau)g(\rho).$$ This must be a ring, which is commutative iff $G$ is abelian. Further the script says that we can use the inclusions $$R \to RG, a \mapsto f_a \text{ with } f_a:G \to R, \sigma \mapsto a \cdot \delta_{\sigma, \iota} = \begin{cases}a & \text{ if } \sigma = \iota, \\ 0 & \text{ otherwise.}\end{cases}$$ and $$G \to RG, \tau \mapsto f_\tau \text{ with } f_\tau:G \to R, \sigma \mapsto \delta_{\sigma, \tau} = \begin{cases}1 & \text{ if } \sigma = \tau, \\ 0 & \text{ otherwise.}\end{cases}$$ to interpret $R$ and $G$ as subsets of $RG$. This way we can get the representation $$f = \sum_{\sigma \in G}a_\sigma \cdot \sigma$$ with $a_\sigma = f(\sigma) \in R$.
So what I tried to do is to set $R := \mathbb{Z}, G := S_3 = \{id, (1 2), (1 3), (2 3), (1 2 3), (3 2 1)\}$. I took $f$ as a simple function $$\begin{array}{rcl}id & \mapsto & 0\\ (1 2) & \mapsto & 1 \\ (1 3) & \mapsto & 2 \\ (2 3) & \mapsto & 3 \\ (1 2 3) & \mapsto & 4 \\ (3 2 1) &\mapsto& 5.\end{array}$$
Then, trying to decrypt the 1. inclusion I got $$\mathbb{Z} \to \mathbb{Z}S_3, a \mapsto f_a \text{ with } f_a:S_3 \to \mathbb{Z}, \sigma \mapsto a \cdot \delta_{\sigma, \iota} = \begin{cases}a & \text{ if } \sigma = \iota \\ 0 & \text{ otherwise.}\end{cases}$$ This way I got the functions $$\begin{array}{cccccccccc} f_1: & id & \mapsto & 1 &,&f_2: & id & \mapsto & 2 & f_3: \ldots\\ & (1 2) & \mapsto & 0 &&& (1 2) & \mapsto & 0 \\ & (1 3) & \mapsto & 0 &&& (1 3) & \mapsto & 0 \\ & (2 3) & \mapsto & 0 &&& (2 3) & \mapsto & 0 \\ & (1 2 3) & \mapsto & 0 &&& (1 2 3) & \mapsto & 0 \\ & (3 2 1) & \mapsto & 0 &&& (3 2 1) & \mapsto & 0 \\ \end{array}$$ This inclusion maps $a \in \mathbb{Z}$ to a function $f_a \in \mathbb{Z}S_3$ which maps $id$ to $a$ and sends the rest to $0$.
That I decrypted the 2. inclusion and got $$S_3 \to \mathbb{Z}S_3, \tau \mapsto f_\tau \text{ with } f_\tau:S_3 \to \mathbb{Z}, \sigma \mapsto \delta_{\sigma, \tau} = \begin{cases}1 & \text{ if } \sigma = \tau \\ 0 & \text{ otherwise.}\end{cases}$$ together with the functions $$\begin{array}{cccccccccc} f_{id}: & id & \mapsto & 1 &,&f_{(1 2)}: & id & \mapsto & 0 & f_{(1 3)}: \ldots\\ & (1 2) & \mapsto & 0 &&& (1 2) & \mapsto & 1 \\ & (1 3) & \mapsto & 0 &&& (1 3) & \mapsto & 0 \\ & (2 3) & \mapsto & 0 &&& (2 3) & \mapsto & 0 \\ & (1 2 3) & \mapsto & 0 &&& (1 2 3) & \mapsto & 0 \\ & (3 2 1) & \mapsto & 0 &&& (3 2 1) & \mapsto & 0 \\ \end{array}$$ This inclusion maps every $\tau \in S_3$ to a function $f_\tau$ which maps $\tau$ to $1$ and the rest to $0$.
After that I took my simple function $f:$ $$\begin{array}{rcl}id & \mapsto & 0\\ (1 2) & \mapsto & 1 \\ (1 3) & \mapsto & 2 \\ (2 3) & \mapsto & 3 \\ (1 2 3) & \mapsto & 4 \\ (3 2 1) &\mapsto& 5.\end{array}$$ and tried to decompose it in $$f = \sum_{\sigma \in S_3} a_\sigma \cdot \sigma$$ with $a_\sigma = f(\sigma) \in \mathbb{Z}$, as mentioned before.
This way I got $$\begin{array}{rcl}f &=& a_{id}\cdot id + a_{(1 2)}\cdot (1 2) + a_{(1 3)} \cdot (1 3) + a_{(2 3)}\cdot (2 3) + a_{(1 2 3)}\cdot (1 2 3) + a_{(3 2 1)} \cdot (3 2 1)\end{array} \\ = f(id) \cdot id + f((1 2)) \cdot (1 2) + f((1 3)) \cdot (1 3) + f((2 3)) \cdot (2 3) + f((1 2 3)) \cdot (1 2 3) + f((3 2 1)) \cdot (3 2 1) \\ = (1 2) + 2\cdot (13) + 3 \cdot (2 3) + 4 \cdot (1 2 3) + 5 \cdot (3 2 1).$$
At this point I started to ask myself what the hell is going on here, and after sitting a following hour with that I can not understand what is happening here anymore. Both parser and lexer in my brain do not come clear with that so that looking at $4 \cdot (1 2 3)$ I am asking myself what to do with that. It is also hard for me to imagine how can I evaluate $f$ because e.g. $(4 \cdot (1 2 3))(1 3)$ looks a bit dangerous.
Have I made a mistake somewhere? Should I use the inclusions further to get something that makes sense? Could you please help me to get this certain example done?
I started with an intention to understand what a monoid ring is, but by now I see nothing beyond notations. Perhaps, you could propose a more simple example for me to get an intuition on how a monoid ring is intended to work?
The numbers you're using as coefficients in the group ring are completely unrelated to the numbers you're using to write down permutations; they have nothing to do with each other and don't interact in any computations. An expression like $4 \cdot (123)$ is just an abstract scalar $4 \in R$ multiplied abstractly by an element of the group $(123) \in G$ and it doesn't simplify further.
You are absolutely correct that this is very confusing; you can notate permutations using an abstract set of symbols instead to avoid this, e.g. $(abc)$ instead of $(123)$.
If you want a less confusing example to start with take $G = \mathbb{N}$ (including $0$). Then $R[\mathbb{N}]$ turns out to be isomorphic to the ring of polynomials over $R$ in one variable, with the abstract $i \in \mathbb{N}$ corresponding to the polynomial $x^i$.