以前考察したマグマの左単位元・右単位元について考えていきます。書き換え規則の集合は以下のようになります。\begin{cases}
\rho_{1} & = & ( & x & \mapsto & e_L x & \to & x & ) \\
\rho_{2} & = & ( & x & \mapsto & x & \to & e_L x & ) \\
\rho_{3} & = & ( & x & \mapsto & x e_R & \to & x & ) \\
\rho_{4} & = & ( & x & \mapsto & x & \to & x e_R & ) \\
\end{cases} から始めた2段階の合成をすべて書くと以下のようになります。\begin{matrix}
1 & \stackrel{\rho_{1},0}{\Longrightarrow} & e_L x_{1,1} \to x_{1,1} & \stackrel{\rho_{1},0}{\Longrightarrow} & e_L ( e_L x_{1,2} ) \to x_{1,2} \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{1},0}{\Longrightarrow} & x_{1,2} \to x_{1,2} \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{1},2}{\Longrightarrow} & e_L x_{1,2} \to e_L x_{1,2} \\
1 & \stackrel{\rho_{3},0}{\Longrightarrow} & x_{3,1} e_R \to x_{3,1} & \stackrel{\rho_{1},0}{\Longrightarrow} & ( e_L x_{1,2} ) e_R \to x_{1,2} \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{1},0}{\Longrightarrow} & e_L \to e_R \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{1},1}{\Longrightarrow} & e_L x_{1,2} \to x_{1,2} e_R \\
1 & \stackrel{\rho_{1},0}{\Longrightarrow} & e_L x_{1,1} \to x_{1,1} & \stackrel{\rho_{2},0}{\Longrightarrow} & e_L x_{2,2} \to e_L x_{2,2} \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L ( e_L x_{2,1} ) \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{2},1}{\Longrightarrow} & x_{2,1} \to ( e_L e_L ) x_{2,1} \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{2},2}{\Longrightarrow} & x_{2,2} \to e_L ( e_L x_{2,2} ) \\
1 & \stackrel{\rho_{3},0}{\Longrightarrow} & x_{3,1} e_R \to x_{3,1} & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,2} e_R \to e_L x_{2,2} \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{4,1} \to e_L ( x_{4,1} e_R ) \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{2},1}{\Longrightarrow} & x_{2,2} \to ( e_L x_{2,2} ) e_R \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{2},2}{\Longrightarrow} & x_{4,1} \to x_{4,1} ( e_L e_R ) \\
1 & \stackrel{\rho_{1},0}{\Longrightarrow} & e_L x_{1,1} \to x_{1,1} & \stackrel{\rho_{3},0}{\Longrightarrow} & e_L ( x_{3,2} e_R ) \to x_{3,2} \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{3},0}{\Longrightarrow} & e_R \to e_L \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{3},2}{\Longrightarrow} & x_{3,2} e_R \to e_L x_{3,2} \\
1 & \stackrel{\rho_{3},0}{\Longrightarrow} & x_{3,1} e_R \to x_{3,1} & \stackrel{\rho_{3},0}{\Longrightarrow} & ( x_{3,2} e_R ) e_R \to x_{3,2} \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{3},0}{\Longrightarrow} & x_{3,2} \to x_{3,2} \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{3},1}{\Longrightarrow} & x_{3,2} e_R \to x_{3,2} e_R \\
1 & \stackrel{\rho_{1},0}{\Longrightarrow} & e_L x_{1,1} \to x_{1,1} & \stackrel{\rho_{4},0}{\Longrightarrow} & e_L x_{4,2} \to x_{4,2} e_R \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{2,1} \to ( e_L x_{2,1} ) e_R \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{4},1}{\Longrightarrow} & x_{2,1} \to ( e_L e_R ) x_{2,1} \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{4},2}{\Longrightarrow} & x_{4,2} \to e_L ( x_{4,2} e_R ) \\
1 & \stackrel{\rho_{3},0}{\Longrightarrow} & x_{3,1} e_R \to x_{3,1} & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,2} e_R \to x_{4,2} e_R \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to ( x_{4,1} e_R ) e_R \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{4},1}{\Longrightarrow} & x_{4,2} \to ( x_{4,2} e_R ) e_R \\
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{4},2}{\Longrightarrow} & x_{4,1} \to x_{4,1} ( e_R e_R ) \\
\end{matrix} これによって書き換え規則を合成した書き換え規則として \begin{matrix}
1 & \stackrel{\rho_{4},0}{\Longrightarrow} & x_{4,1} \to x_{4,1} e_R & \stackrel{\rho_{1},0}{\Longrightarrow} & e_L \to e_R \\
1 & \stackrel{\rho_{2},0}{\Longrightarrow} & x_{2,1} \to e_L x_{2,1} & \stackrel{\rho_{3},0}{\Longrightarrow} & e_R \to e_L \\
\end{matrix} が得られることがわかります。