Upper triangular matrices $B$ that commute with every upper triangular matrix commuting with $A$

I remember being told that this was true by a professor, but I haven't been able to find a source for it yet.

In the theorem as stated, $\mathbb{F}$ is any field and $T_n(\mathbb{F})$ denotes the algebra of upper triangular $n\times n$ matrices over $\mathbb{F}$.

Theorem: Let $A,B\in T_n(\mathbb{F})$ be such that for all $X\in T_n(\mathbb{F})$, $$AX=XA\implies BX=XB$$ Then $B=p(A)$ for some $p\in \mathbb{F}[t]$.

If we replace $T_n(\mathbb{F})$ by $M_n(\mathbb{F})$, the question is answered in this paper. Unfortunately, the argument doesn't seem to translate directly, as I can't find a way to force the $M_i$ maps to be upper-triangular.

Update: I have re-asked the question here on MO. Thanks to David E Speyer, we now know that this theorem is false. In particular, if $$A=\left[\begin{array}{cccc}0&0&0&1\\ &0&1&0\\ & &0&0\\ & & & 0\end{array}\right]$$ then the matrices commuting with $A$ are those of the form $$\left[\begin{array}{cccc}a&0&*&*\\ &b&*&*\\ & &b&0\\ & & & a\end{array}\right]$$ The matrix $$B=\left[\begin{array}{cccc}0&0&0&1\\ &0&0&0\\ & &0&0\\ & & & 0\end{array}\right]$$ commutes with all matrices of this form, but is clearly not a polynomial in $A$.

• It is not considered good form to cross post, mathoverflow.net/q/304568/31729 – copper.hat Jul 10 '18 at 22:49
• And what's your question then? Sounds like you have answered your own question...... – Mostafa Ayaz Jul 14 '18 at 18:19
• @copper.hat I am sorry. I did not know that cross-posting was poor form. I will delete this question tomorrow when the bounty ends. (Apparently I can't delete questions with bounties on them.) Thank you for correcting me. – Spot Jul 14 '18 at 19:51
• @Spot: Just informing of the site etiquette, not a criticism. I have broken most rules inadvertently (and some knowingly!). – copper.hat Jul 14 '18 at 19:54
• but .. what is the exact meaning of ".. for all X" then ? because the counterexamples you are citing do not involve all the UT matrices , or did I loose something in understanding the statement? – G Cab Jul 15 '18 at 21:38