I want to add some logical rules in my paper
just to avoid confusion, I do not want to build rules
I want to display them in my paper
So I used equations terms
\begin{equation}
$if word = “and” then remove word.$
\label{Rule1}
\end{equation}
I want to see my paper something like this
if word = “and” then remove word. ................ (1)
How to do it?

\begin{equation}starts math mode, so the two$s inside of theequationenvironment will throw errors. It looks like you just started with LaTeX or are using it in a very unelegant manner, so it might be a good idea to read a good and concise introduction to get to know the basic concepts. You could, for example, visit https://www.learnlatex.org/ for this. After you learned basic LaTeX, you might want to take a look at packages for pseudocode. – Skillmon Nov 10 '20 at 07:42\text{}:\text{if word} = \text{“and” then remove word.}. Also, search this site for "algorithm". To get you started have a look at algorithm, algorithmic, algorithmicx, algorithm2e, algpseudocode = confused. – Peter Grill Nov 10 '20 at 08:31