Let $n$ be a positive integer and $F $ a field. Suppose $A$ is an $n \times n$ matrix over $F$ and $P$ is an invertible $n \times n$ matrix over $F$. If $f$ is any polynomial over $F$, prove that $f(P^{-1}AP)=P^{-1}f(A)P$.
My attempt: By definition of $F[x]\times M_n(F)\to M_n(F)$, we have $f(P^{-1}AP)$ $=\sum_{i=0}^n f_i\cdot (P^{-1}AP)^i$. We claim $\forall k\geq 0$, $(P^{-1}AP)^k=P^{-1}A^kP$. Base case: $k=0$. Then $(P^{-1}AP)^0$ $=I_n$ and $P^{-1}A^0P$ $=P^{-1}I_n P$ $=P^{-1}P$ $=I_n$. Thus $(P^{-1}AP)^0=P^{-1}A^0P$. Inductive step: suppose $(P^{-1}AP)^k=P^{-1}A^kP$, for some $k\in \Bbb{N}$. Then $(P^{-1}AP)^{k+1}$ $=(P^{-1}AP)^k\cdot (P^{-1}AP)$ $=P^{-1}A^kP \cdot (P^{-1}AP)$ $=P^{-1}A^k (P\cdot P^{-1})AP$ $=P^{-1}A^k I_n AP$ $=P^{-1} A^{k+1}P$. Thus $(P^{-1}AP)^{k+1}$ $=P^{-1} A^{k+1}P$. By principle of mathematical induction $(P^{-1}AP)^k=P^{-1}A^kP$, $\forall k\ge 0$. So $\sum_{i=0}^n f_i\cdot (P^{-1}AP)^i$ $= \sum_{i=0}^n f_i\cdot (P^{-1}A^iP)$. Since $M_n(F)$ is linear algebra over $F$, we have $\sum_{i=0}^n f_i\cdot (P^{-1}A^iP)$ $= \sum_{i=0}^n P^{-1}(f_i\cdot A^i)P$ $= (\sum_{i=0}^n P^{-1}(f_i\cdot A^i))P$ $=P^{-1}(\sum_{i=0}^nf_i\cdot A^i)P$ $=P^{-1}f(A)P$. Here is definition of linear algebra over $F$. Is my proof correct?