Solution (source code)

= Solution

Each $M_i$ is an <ideal> because the <algebra> is commutative. For $m\in M_i$, the product $me_j$ belongs both to $M_i$ and $M_j$, so is zero when $j\ne i$. Multiplying $1=\sum_je_j$ by $m$ therefore gives $m=me_i$. In particular $e_i^2=e_i$, different $e_i$ have zero product, and
$$
\boxed{M_i=Ae_i,\qquad e_i^2=e_i,\qquad e_ie_j=0\ (i\ne j).}
$$
For any <idempotent> $e$, the set $Ae$ is closed under multiplication and $e$ acts as its identity. With $f=1-e$ the map $a\mapsto(ae,af)$ is an <algebra> isomorphism $A\to Ae\times Af$: multiplication is componentwise because $ef=0$, and its inverse sends $(u,v)$ to $u+v$.

The $A$-<submodules> of $Ae$ are exactly its <ideals> as a unital <algebra>, since acting by $a$ on $Ae$ is the same as acting by $ae$. A nonzero commutative unital <algebra> is a <simple module> over itself exactly when every nonzero principal <ideal> is the whole <algebra>, which is equivalent to every nonzero element having an inverse. Thus \b[a nonzero component $Ae$ is simple exactly when it is a <field>]. If $e=0$, both properties fail under the nonzero-<field> convention.

A semisimple regular <module> is a finite <direct sum> of simple <ideals>. Applying the preceding decomposition gives a finite direct product of <fields>. Conversely the coordinate <ideals> of a finite product of <fields> are <simple modules>, so its regular <module> is semisimple. The <fields> are finite extensions of $K$, because $A$ has finite $K$-<dimension>.

For a generator $g$ of the <cyclic group> of order three, evaluation $X\mapsto g$ gives a surjection $\mathbb Q[X]\to\mathbb QG$ with <kernel> $(X^3-1)$, by division and independence of $1,g,g^2$. The factors $X-1$ and $X^2+X+1$ are coprime, and the quadratic is irreducible over $\mathbb Q$. The <Chinese remainder theorem> yields
$$
\boxed{\mathbb QG\cong\frac{\mathbb Q[X]}{(X^3-1)}\cong\mathbb Q\times\mathbb Q(\sqrt{-3}).}
$$
The explicit map sends $g$ to $(1,\zeta_3)$, where $\zeta_3=(-1+\sqrt{-3})/2$.