The goal is to have snake_cased elements typewriter-styled breaking properly. I am using \detokenize rather than simply \_ because otherwise the snake_casing looks wrong, namely like this:
rather than like this
But LaTeX will not break them. Here is a basic example:
\documentclass[draft,11pt]{article}
\sloppy
\begin{document}
\newcommand{\isnormalized}[1]{
\texttt{\detokenize{is_normalized}}(\ensuremath{#1})
}
\newcommand{\atomincons}[2]{
\texttt{\detokenize{is_atomically_inconsistent}}(\ensuremath{#1,#2})
}
\newcommand{\containsnodiamond}[1]{
\texttt{\detokenize{contains_no_diamond}}(\ensuremath{#1})
}
\newcommand{\containsonlyliterals}[1]{
\texttt{\detokenize{contains_only_literals}}(\ensuremath{#1})
}
\newcommand{\prop}{\textsc{prop}}
The procedures do as their names say. Specifically, \atomincons{\Delta}{\prop} returns \textbf{1}
if there exist both $p$ and $\neg p$ in $\Delta$ for some propositional letter
$p\in\prop$ and returns \textbf{0} otherwise. \containsonlyliterals{\Delta} returns \textbf{1} if $\Delta$ contains only atomic
literals and \textbf{0} otherwise. \containsnodiamond{\Delta} returns
\textbf{1} if there is no formula of the form $\langle a\rangle \varphi'$ in
$\Delta$ and \textbf{0} otherwise. Note that \isnormalized{\Delta},
\containsonlyliterals{\Delta} and \containsnodiamond{\Delta} runs in time linear
in the size of the set $\Delta$ while \atomincons{\Delta}{\prop} takes time at
most quadratic in the size of $\Delta$.
\end{document}
Removing the draft option and \sloppy makes the problem clearer.



\-obviously doesn't work but it doesn't affect automatic hyphenation) Probably I would leave breaking disabled between letters and just allow it after_(and don't add a hyphen at all – David Carlisle Jan 15 '16 at 13:16_a letter as well (\lccode \_=`_` would do, but see alternative approach I just posted as an answer) – David Carlisle Jan 15 '16 at 13:23