I have error : Undefined control sequence for this code, however I am not sure which part is wrong.
\documentclass[journal]{IEEEtran}
\begin{document}
\begin{lemma}\label{lemma:R5_R6}
\begin{proof}
Besides place and transition which relate to the robot movement, $P^R_k$ and $T_k$, circuit $R_5(A^{\prime}X)$ and $R_6(A^{\prime\prime}_X)$ are formed by $A^{\prime}_X$ and $A^{\prime\prime}_X$, respectively, for $X \in S$. Since $y= n$ where $n$ is an odd number, then $X \equiv {x_1, x_2,\dots, x_n}$ means the circuit connects all activities places for $i=1,\dots,n$. By following the Definition \ref{def:A_prime}, circuit $R_5(A^{\prime}_X)$ where $A^{\prime}_X \equal {P{x_1}^{\prime}, P_{x_2}^{\prime\prime},P_{x_3}^{\prime},\dots,P_{x_n}^{\prime}}$ connects all cleaning place $c_i$ for all $i=1,\dots,n$ together with the respective $P^R_k$ and $T_k$. Similarly, according to the Definition\ref{def:A_doubleprime}, circuit $R_6(A^{\prime\prime}X)$ where $A^{\prime\prime}{X} \equiv {P_{x_1}^{\prime\prime}, P_{x_2}^{\prime},P_{x_3}^{\prime\prime},\dots,P_{x_n}^{\prime\prime}}$ connects all processing place $p_i$ for all $i=1,\dots,n$ together with the respective $P^R_k$ and $T_k$. Therefore, the Lemma \ref{lemma:R5_R6} holds.
\end{proof}
\end{lemma}
\end{document}
However, when I recompile the overleaf with compiler pdfLaTeX, the result comes well as follows.
This is the snippet of the error message.
So, is there anyone could suggest what is wrong with the code, please?
Thank you.


lemmaerror or another? Could you edit your error message into the question please – JamesT Apr 10 '23 at 12:37proofshould not be used insidelemma, but after it. – egreg Apr 10 '23 at 13:40