I answered another question (LaTeX \models symbol that goes both ways) creating a new symbol, a relation, without using \mathrel.
In his answer to the same question, Werner used it (he also used \joinrel, a command I didn't know, where I used \!).
In this case, however, I see no difference in the results with or without \mathrel. Is it always needed?
\documentclass{article}
\newcommand{\mymod}{\mathrel{\models\!\mid}}
\newcommand{\mymode}{\models\!\mid}
\newcommand{\mymodel}{\mathrel{\models\joinrel\mid}}
\begin{document}
This is without \verb|\mathrel|, with \verb|\!|:
\[ A \mymod B\quad {\scriptstyle A \mymod B }\quad {\scriptscriptstyle A \mymod B }\]
This is with \verb|\mathrel|, with \verb|\!|:
\[ A \mymode B\quad {\scriptstyle A \mymode B }\quad {\scriptscriptstyle A \mymode B } \]
This is with \verb|\mathrel| and \verb|\joinrel|:
\[ A \mymodel B \quad {\scriptstyle A \mymodel B }\quad {\scriptscriptstyle A \mymodel B }\]
They seem the same to me. What is the difference?
\end{document}



\!does\mskip-\thinmuskipwhere\thinmuskip=3mu, whereas\joinreldoes\mathrel{\mkern-3mu}, so if the atoms on both sides of\joinrelare also rel atoms, the two commands are equivalent. – Henri Menke Jan 24 '19 at 21:00\mathrellike\mathbinetc. adjust the "class" of the following group. The different groups are described in the TeX Book. It's basically to tell the system the semantics of your symbol. – TeXnician Jan 24 '19 at 21:02\midand\modelsare but as the spacing seems correct it is probably\mathbinor\mathrel. The only semantic difference is that you now do not have one relation but actually two following each other (models and mid). I don't know whether this might have any side effects on the spacing but I think that, as long as you are not adding any groups inbetween, you are safe. – TeXnician Jan 24 '19 at 21:14unicode-math,stixandstix2as\gleichstark. – Davislor Jan 24 '19 at 23:01