2 - how I can remove the brackets of the optional parameter
\begin{theorem}[Schwarz inequality]...
should not be (Schwarz inequality) but Schwarz inequality.
Put this in the preamble:
\newtheorem*{schwarz}{Schwarz Inequality}
Then in the document:
\begin{schwarz}
% ``I see your Schwarz is as big as mine.'' --- Dark Helmet, Spaceballs
\end{schwarz}
EDIT I think I understand what you want now. If you don't want a one-off environment, you can alter the theorem's head specification to typeset only the theorem note (optional argument) without delimiters, like so:
\documentclass{minimal}
\usepackage{amsthm}
\makeatletter
\newtheoremstyle{namedtheorem}%
{3pt} %Space above
{3pt} %Space below
{} %Body font
{} %Indent amount
{\bfseries} %Theorem head font
{.} %Punctuation after theorem head
{0.25em} %Space after theorem head
{\thmname{\@ifempty{#3}{#1}\@ifnotempty{#3}{#3}}}
\makeatother
\theoremstyle{namedtheorem}
% first argument here is the environment to be defined
% second argument is the default name of the theorem.
\newtheorem*{namedtheorem}{Theorem}
\begin{document}
\begin{namedtheorem}
One is the loneliest number.
\end{namedtheorem}
\begin{namedtheorem}[Schwarz Inequality]
For $x$ and $y$ in a Hilbert space $H$,
\[
|(x,y) | \leq \Vert x \Vert \cdot \Vert y \Vert
\]
\end{namedtheorem}
\end{document}
amsthm
is inamsthdoc.pdf
. the source documentation is inamsclass.dtx
.amsthm
is built into the ams document classes, and the.sty
file is spun off from that source. since everything is interwoven, it may be a bit obscure to pull out just theamsthm
parts, but it's all there.