How to prove that $\ker f \subset (X^2+X+1)$? Let $w = \exp\left(i \frac{2\pi}{3} \right)$. I would like to prove that
$$\mathbb Q[w] \cong \mathbb Q[X] / (X^2 + X + 1)$$
For pedagogical reasons, I am forcing myself to use only the following thing.

There is a homomorphism $f: \mathbb Q[X] \to \mathbb Q[w]$ which is the identity map on $\mathbb Q$ and satisfies $f(X) = w$. 

From this,
$$\mathbb Q[w] \cong \mathbb Q[X]/I$$
where $I = \ker f$. 
If $A(X) \in (X^2 + X + 1)$, say $A(X) = B(X)(X^2 + X + 1)$, then:
$$f(A(X)) = f(B(X)) f(X^2 + X + 1) = f(B(X)) (w^2 + w + 1) = f(B(X)) 0 = 0$$
so $A(X) \in I$ and $(X^2 + X + 1) \subset I$.
How to show the other inclusion, i.e. $I \subset (X^2 + X + 1)$, in an elementary way?
 A: Let $A(X)=\sum_{k=0}^na_kX^k\in I=\ker f$. Then because $w^3=1$ we get
$$0=A(w)=\sum_{k=0}^na_kw^k=\sum_{k=0}^m(a_{3k}+a_{3k+1}w+a_{3k+2}w^2),$$
where $m:=\lfloor\frac{n}{3}\rfloor$ and $a_k:=0$ for $k>n$. This can be rewritten further to
$$\sum_{k=0}^m(a_{3k}+a_{3k+1}w+a_{3k+2}w^2)
=\left(\sum_{k=0}^ma_{3k}\right)
+\left(\sum_{k=0}^ma_{3k+1}\right)w
+\left(\sum_{k=0}^ma_{3k+2}\right)w^2.$$
We know that $w^2+w+1=0$ so this tells us that $w^2=-w-1$, so
$$\left(\sum_{k=0}^m(a_{3k}-a_{3k+2})\right)
+\left(\sum_{k=0}^m(a_{3k+1}-a_{3k+2})\right)w=0.$$
But only the second term has an imaginary part, so that sum must be zero. Then the first sum is also zero. That means
$$\sum_{k=0}^ma_{3k}
=\sum_{k=0}^ma_{3k+1}
=\sum_{k=0}^ma_{3k+2}.$$
It follows that (this is a matter of routine verification):
$$A(X)=(X^2+X+1)\sum_{k=0}^m\left(\sum_{i=0}^{\lfloor\frac{k}{3}\rfloor}(a_{k-3i}-a_{k-3i-1})\right)X^k.$$

Similarly but alternatively; we know that $w^2+w+1=0$, so if $A(X)=\sum_{k=0}^na_kX\in I=\ker f$ with $n\geq2$ then also
$$B(X):=A(X)-a_nX^{n-2}(X^2+X+1)\in\ker f,$$
where $\deg B(X)<n$. Repeating this yields a $C(X)\in\ker f$ with $\deg C(X)<2$, so $C(X)=c_1X+c_0$ for some $c_1,c_0\in\Bbb{Q}[X]$. Then $c_1\omega+c_0=0$, and by the same argument as above it follows that $c_1=c_0=0$. This shows that $A(X)$ is a multiple of $X^2+X+1$.
A: Note that $p(X) = X^2+X+1$ is the minimal polynomial of $w$, and as such, $p(x)$ divides every polynomial $A(X)$ such that $A(w) = 0$. But $A(X) \in \text{ker } f \iff A(w) = 0$. Therefore $p(X) \mid A(X)$ and thus $A(X)\in (X^2+X+1)$.
