is there a nice way to redefine \to in a LaTeX file so that it becomes \rightarrow in inline maths and \longrightarrow in display maths?

· · Web · · ·