Idempotents in tensor product with a f.g. local Artin algebra Let $k$ be a field.
Let $A$ and $B$ be $k$-algebras (commutative , with unit).
Assume that $A$ is finitely generated, local and Artinian.
Assume that the set of idempotents in $B$ is finite. (I stress that $B$ need not be finitely generated.)
Is the set of idempotents in ${A \otimes_k B}$ also finite?
(It is enough to assume that the only idempotents in $B$ are $0$ and $1$, but even in this case, maybe some unexpected idempotents appear in ${A \otimes_k B}$...)
 A: Let $n=\dim_k A$. First, I claim that if $B$ is a finitely generated $k$-algebra and $\operatorname{Spec} B$ is connected then $\operatorname{Spec} A\otimes B$ has at most $n$ connected components.  To prove this, note that each connected component of $\operatorname{Spec} A\otimes B$ is of the form $\operatorname{Spec} C$ where $C$ is a finitely generated projective $B$-module (being a direct summand of $A\otimes B$).  In particular, $C$ is locally free as a $B$-module, and its local rank must be constant since $\operatorname{Spec} B$ is connected.  Since $C$ is nonzero, its local rank at each point is at least $1$.  Therefore if $\operatorname{Spec} A\otimes B$ has $m$ connected components, then the local rank of $A\otimes B$ as a $B$-module at each point is at least $m$.  But that local rank is equal to $n$, and thus $m\leq n$.
Now suppose $B$ is a $k$-algebra (not necessarily finitely generated) with no nontrivial idempotents, but $A\otimes B$ has infinitely many idempotents.  Then we can find a finitely generated subalgebra $B_0\subseteq B$ such that $A\otimes B_0$ contains more than $2^n$ idempotents.  This then implies $\operatorname{Spec} A\otimes B_0$ has more than $n$ connected components, contradicting the result above.  Thus $A\otimes B$ cannot have infinitely many idempotents (indeed, it cannot have more than $2^n$ idempotents).
(In fact, the reduction to the case where $B$ is finitely generated is unnecessary.  The only place this assumption is used in the first paragraph above is to conclude that the connected components of $\operatorname{Spec} A\otimes B$ are clopen (since there are only finitely many of them since $A\otimes B$ is Noetherian).  Without the assumption, the argument still shows that $\operatorname{Spec} A\otimes B$ cannot be decomposed as a disjoint union of more than $n$ nonempty clopen subsets, and this is enough to conclude that it has at most $n$ connected components.)
