[Tex/LaTex] How to prevent paragraph breaks after theorem environments

amsartenvironmentsindentationparagraphstheorems

By default, the list environments (such as itemize) have the nice property that if you add a blank line after it, it starts a new paragraph, and if you don't, the paragraph continues. So

The following objects
\begin{itemize}
\item car
\item tree
\item pupil
\end{itemize}
are countable.

will produce one paragraph, while

Here's a list of uncountable objects:
\begin{itemize}
\item hair
\item rice
\end{itemize}

And now for something completely different

gives two paragraphs.

For the theorem type environments (I use the theorems from amsart class), no matter what I do after \end{<theorem type>}, the paragraph breaks. Is there a way to make them behave like itemize (so that page breaking depends on whether I insert a blank line after the environment)?

Edit Since both of the answers so far enquires to why I want this behaviour, rather than the default, let me clarify a bit. I agree that it looks weird to state a theorem in the middle of a paragraph. But I actually want to use the behaviour for (short) definitions or setting of notations. For example, I may write

For the purposes of this monograph, all functions are infinitely differentiable. 
That is, we usually work in the space
\begin{definition}
$C^\infty(\Real^k) \eqdef$ the space of complex-valued smooth functions.
\end{definition}
Often, however, we wish to ignore complications ``from infinity'', i.e.~from 
the non-compactness of $\Real^k$. In these situations we want to use
\begin{definition}
$\mathcal{D} = C^\infty_c(\Real^k) \eqdef$ the space of complex-valued 
smooth functions with compact support.
\end{definition}
Since one of our main tools will be the Fourier transform, the above definition 
is not always satisfactory: the Fourier transform of a function in 
$C^\infty_c(\Real^k)$ will necessarily not be in the same space by the 
uncertainty principle. So a better space is
\begin{definition}
$\mathcal{S}\eqdef$ the space of complex-valued smooth functions with rapid 
decay. That is, all functions $f$ such that $x^\alpha D^\beta f$ remain 
bounded for all multi-indices $\alpha,\beta$. 
\end{definition}
For convenience, we will also introduce the notations
\begin{definition}
$\mathcal{D}' \eqdef$ the space of distributions, or continuous linear maps 
from $\mathcal{D}$ to $\Complex$; and similarly $\mathcal{S}' \eqdef$ the 
space of \emph{tempered} distributions. 
\end{definition}

I find the jagged edge caused by the indentation unpleasant. So no, this is not just an idle question.

Best Answer

Paragraph breaking after theorem environments depending on whether a blank line is inserted does work for the standard article class, but doesn't for amsart. The reason is that amsarts definition of \@endtheorem includes \@endpefalse which disables the conditional breaking mechanism. Remove \@endpefalse and all is well.

\documentclass{amsart}

\makeatletter
% \def\@endtheorem{\endtrivlist\@endpefalse }% OLD
\def\@endtheorem{\endtrivlist}% NEW
\makeatother

\newtheorem{theorem}{Theorem}

\newcommand*{\sometext}{Lorem ipsum dolor sit amet, consectetuer
    adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
    adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu
    libero, nonummy eget, consectetuer id, vulputate a, magna.}

\begin{document}

\sometext

\begin{theorem}
\sometext
\end{theorem}

\sometext

\begin{theorem}
\sometext
\end{theorem}
%
\sometext

\end{document}

enter image description here

Related Question