[Tex/LaTex] Using there exists symbol within inference of the semantic package

semanticssymbols

I am using the semantic package to write inference rules. I need to put a there exists symbol which is standard to LaTeX using $\exists$. However, when used within the semantic package's inference command as follows:

\inference[case$_0$]{$\exists$ I}{test}

several errors are encountered :

(./semantics.aux) (/usr/share/texmf-texlive/tex/latex/ucs/ucsencs.def)
! Missing $ inserted.
<inserted text>
$
l.42 \inference[case$_0$]{$\exists$ I}
{test}
! Extra }, or forgotten $.
\@processPremiseLine ...ce \end \hskip \@@pSpace }
\fi \fi \def \sem@tmp {#2}...
l.42 \inference[case$_0$]{$\exists$ I}
{test}
! Missing $ inserted.
<inserted text>
$
l.42 \inference[case$_0$]{$\exists$ I}
{test}
! Missing } inserted.
<inserted text>
}
l.42 \inference[case$_0$]{$\exists$ I}
{test}
[1] (./semantics.aux) )

Can anyone suggest what I can do please?

Best Answer

You can "box" the item using \ensuremath:

enter image description here

\documentclass{article}
\usepackage{semantic}% http://ctan.org/pkg/semantic
\begin{document}
\inference[case$_0$]{\ensuremath{\exists~I}}{test}
\end{document}

Note the forced spacing as a result of the tie ~. This may just be your preference, which I've stuck to.