I'm pretty sure there is a simple formatting solution to this, I just can't find it anywhere.
I'll describe what I want to achieve with the code and the picture.
In my last post I was told to add code to my posts, to make it easier for others to help, so there it the relevant part:
\underline{Definition}: A \textbf{state} (or equivalently, an \textbf{instance}) of a database,
is a\\function $f:\Phi\rightarrow \prod_{D\in \mathbb{D}}D$.
Intuitively, $f$ takes a relation name $\phi\in \Phi$ and gives
it an interpretation as a table.
Which produces this:

Notice how the symbol D\in\mathbb{D} does not sit right under the \prod symbol as I intend.
It does sit there when I wrap it with double $$, but it also places the mathematical expression and basically ruins everything...:

and that's not something I want...
Is there a way to do it?


$\prod_x$writesxunder the\prodthen it messes up the line spacing making the doc look ugly and unprofessional. So leave LaTeX to do its thing. BTW: you might want to use a better defind for your definition. Noone use underlining anymore. – daleif Nov 12 '14 at 12:20\displaystyleprior to the\prod. It would make the\prodlook the way you ask, but screw up the line spacing in the process. – Steven B. Segletes Nov 12 '14 at 12:28@symbol somewhere in you comment, as in this way: @so.very.tired – Steven B. Segletes Nov 12 '14 at 12:34\displaystyle, but\prod\limits_{D\in\mathbb{D}}; the result will be slightly less horrible. – egreg Nov 12 '14 at 12:48\newcommand*\map[3]{#1\colon#2\to#3}in the preamble and then use\map{a}{\Phi}{\prod_{D\in\mathbb{D}}}. – Svend Tveskæg Nov 14 '14 at 22:24