concatenation of words. The empty word will be denoted by $\lambda$. Furthermore, let $K$ be a field, and let $$K\langle X\rangle=\{c_1w_1+\cdots+c_sw_s\ |\ s\in\mathbb{N},c_i\in K\setminus\{0\},w_i\in\langle X\rangle\}$$ be the non-commutative polynomial ring generated by $X$ over $K$ (or the free associative $K$-algebra generated by $X$). We introduce basic notions of Gröbner basis theory in this setting.

\[sec2def1\] A *word ordering* on $\langle X\rangle$ is a well-ordering ${\sigma}$ which is compatible with multiplication, i.e. $w_1\geq_{\sigma} w_2$ implies $w_3w_1w_4\geq_{\sigma} w_3w_2w_4$ for all words $w_1,w_2,w_3,w_4\in\langle X\rangle$.

In the commutative case, a word ordering is usually called a *term ordering* or *monomial ordering*. For instance, the *length-lexicographic ordering* $\LLex$ is a word ordering. It first compares the length of two words and then breaks ties using the non-commutative lexicographic ordering with respect to $x_1>_{\LLex}\cdots>_{\LLex}x_n$. Note that the non-commutative lexicographic ordering by itself is not a word ordering, since it is neither a well-ordering nor compatible with multiplication.

\[sec2def2\] Let ${\sigma}$ be a word ordering on $\langle X\rangle$.

-   Given a polynomial $f\in K\langle X\rangle\setminus\{0\}$, there exists a unique representation $f=c_1w_1+\cdots+c_sw_s$ with $c_1,\dots,c_s\in K\setminus\{0\}$ and $w_1,\dots,w_s\in\langle X\rangle$ such that $w_1>_{\sigma}\cdots>_{\sigma} w_s$. The word $\lw_{\sigma}(f)=w_1$ is called the *leading word* of $f$ with respect to ${\sigma}$. The element 