You'll need the following syntax to produce the above equations:
%%pdflatex
$$ \frac{\prod_{ij}P(A_{ij} = a_{ij}|b)}{\prod_{ij}A_{ij}!} $$
We define the function $f$ with domain $(-\infty,\infty)$ as follows:
\begin{align*}
f:(-\infty, \infty) &\rightarrow [0,1], \\
f(x) &= 0, & x < 0, \\
f(x) &= \frac{1}{2}, & x = 0 \\
f(x) &= 1, & x > 1.
\end{align*}