I'm using the amsthm packages for theorems. I would like to define an environment paragraph which should resemble the look of a theorem environment (definition theoremstyle), but it shouldn't say 1.1 Paragraph.. Instead of Paragraph it should say nothing, or the content of an optional argument. Let me illustrate what I mean:
\begin{definition}
Lorem.
\end{definition}
\begin{paragraph}
Ipsum.
\end{paragraph}
\begin{paragraph}[Optional Title]
Dolor.
\end{paragraph}
This should produce output as follows:
1.1 Definition. Lorem.
1.2. Ipsum
1.3 Optional Title. Dolor.
Getting this done roughly isn't too difficult, but I would like to get it as close to the original theorem environments as possible. So the spacing after 1.2. should be exactly the same as the spacing after 1.1 Definition., and similarly for the space above and below the environments and whatever else subtle things are handled by amsthm, which I might not even recognize. How can this be done?

\paragraphis defined by most document classes. It's thus not a good idea to define a theorem-like environment calledparagraph. Please do tell us how to you try to define theparagraphenvironment at present, as well as which document class you employ. – Mico Sep 02 '21 at 17:22