I am doing a little reading on monoid/group rings. I see the definition of a monoid ring can be made as the set $T=\{f:G\rightarrow R\mid \text{$f(g)=0$ for all but finitely many $g\in G$}\}$ where $G$ is a monoid and $R$ is a ring. I've seen it said that we can write the elements of $T$ as $$\sum_{g\in G}a_gt^g$$ where we write $T=R[t;G]$ and $t$ is an indeterminate. I am wondering how to do this as I am hoping it may help me to feel better about working with the elements of $T$.
For example, if we take $R=\mathbb{Z}$ as usual and $G=\mathbb{Z}/3\mathbb{Z}$ we see the map $f:G\rightarrow R$ defined by $0\mapsto 6$, $1\mapsto2$ and $2\mapsto 9$ would be in $T$. How would I write $f$ as a sum as above? I may need to do extra reading as this is all very new to me.
The notion of monoid ring is more intuitive if the monoid operation is written as multiplication. In this case, the monoid ring (over $R$) of a monoid $G$ should be regarded as the set of (finite) formal $R$-linear combinations $\sum_{g\in G}a_gg$ of monoid elements $g\in G$, the coefficients $a_g$ being from $R$. (Only finitely many summands should be present, but we can imagine all elements of $G$ being present as long as only finitely many have non-zero coefficients; think of elements $g$ that don't occur in a finite sum as occurring with coefficient zero.) These formal expressions are to be added just by adding coefficients of each $g$. Multiplication is determined by four rules: (1) the distributive law, meaning that to multiply two such sums, you multiply every term in the first by every term in the second; (2) elements of $R$ commute with elements of $G$, so where rule (1) gave you something like $a_ggb_hh$ you can rewrite it as $a_gb_hgh$; (3) multiplication of elements in $R$ (like $a_gb_h$) is done according to the multiplication operation of the ring $R$; (4) multiplication of elements of $G$ is done according to the multiplication operation of the monoid $G$. Thus, the product of $a_gg$ by $b_hh$ becomes $(a_gb_h)(gh)$, where the multiplication in the first (resp. second) parenthesis is defined as in $R$ (resp. $G$). When you multiply two formal sums together according to these rules, you will usually get the same element of $G$ occurring in many (but only finitely many) of the products; collect those terms together to get a formal sum in the standard form.
Perhaps a more intuitive (but less precise) way to say all this is that the elements of the monoid ring are to be added and multiplied in the "obvious" way.
In the case where the monoid operation $G$ is written as addition, the definition above still works, but it looks weird, because it says when you're multiplying two elements of the monoid ring, if you need to multiply two elements $g$ and $h$ of $G$, use the operation of $G$, i.e., add them. This use of addition (in $G$) as multiplication (in the monoid ring) can be confusing. So people use a notation like that in your question, writing $t^g$ in the group ring instead of simply $g$. This notational change really doesn't change anything in the mathematics, but it makes the formulas look better, because now the multiplication rule says that, to multiply $t^g$ by $t^h$ you should apply the monoid operation, called addition, to $g$ and $h$, obtaining $t^{g+h}$. So it looks like a familiar manipulation of exponents. But there really isn't any exponentiation going on; there's no such thing as $t$ in the monoid ring. In particular, I would not, in this context, call $t$ an indeterminate (much less an "indeterminant", which isn't a word).
Finally, for the benefit of anyone who claims not to understand what a formal $R$-linear combination $\sum_{g\in G}a_gg$ is, people sometimes identify it with a function, namely the function that maps each $g\in G$ to the coefficient $a_g\in R$. So it's a function $G\to R$, and all but finitely many elements of $G$ are mapped to $0$ because a formal sum should have only finitely many summands. The advantage of this function viewpoint is that nobody claims not to understand what a function is. The disadvantage is that the definition of how to multiply two such functions looks more complicated and less obvious than what I described above; but it's really the same multiplication rewritten in terms of these coefficient-producing functions.