\usepackage{amsthm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Zu verwendende Regelsaetze 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Bei Nummerierung vom Typ swapped soll abweichend vom Standard
%%% "5.12. Satz" erscheinen als "5.12 Satz", das heisst ohne
%%% zusaetzlichen Punkt.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\swappedhead#1#2#3{%
  \thmnumber{#2}\thmname{\@ifnotempty{#2}{ }#1}%
  \thmnote{ {\the\thm@notefont(#3)}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Neue Theoremstile
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtheoremstyle{standard}% name
  {0.8ex}%      Space above, empty = `usual value'
  {}%      Space below
  {\normalfont}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {:}%        Punctuation after thm head
  {0.5em}% Space after thm head: \newline = linebreak
  {}%         Thm head 
\newtheoremstyle{break-italic}% name
  {0.8ex}%      Space above, empty = `usual value'
  {}%      Space below
  {\itshape}% Body font
  {0cm}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {}%        Punctuation after thm head
  {\newline }% Space after thm head: \newline = linebreak
  {}%         Thm head 
\newtheoremstyle{break-roman}% name
  {0.8ex}%      Space above, empty = `usual value'
  {}%      Space below
  {\normalfont}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {}%        Punctuation after thm head
  {\newline }% Space after thm head: \newline = linebreak
  {}%         Thm head spec
\newtheoremstyle{varthm-roman}% name
  {0.5ex}%      Space above, empty = `usual value'
  {0ex}%      Space below
  {\normalfont}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {:}%        Punctuation after thm head 
  {.5em}%     Space after thm head: " " = normal interword space;
        %       \newline = linebreak
  {\thmnote{#3}}% Thm head spec
\newtheoremstyle{varthm-roman-no-punctuation}% name
  {}%      Space above, empty = `usual value'
  {}%      Space below
  {\normalfont}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {}%        Punctuation after thm head 
  {.5em}%     Space after thm head: " " = normal interword space;
        %       \newline = linebreak
  {\thmnote{#3}}% Thm head spec
\newtheoremstyle{varthm-roman-break}% name
  {}%      Space above, empty = `usual value'
  {}%      Space below
  {\normalfont}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {}%        Punctuation after thm head
  {\newline}%     Space after thm head: " " = normal interword space;
        %       \newline = linebreak
  {\thmnote{#3}}% Thm head spec
\newtheoremstyle{varthm-italic}% name
  {}%      Space above, empty = `usual value'
  {}%      Space below
  {\itshape}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {:}%        Punctuation after thm head 
  {.5em}%     Space after thm head: " " = normal interword space;
        %       \newline = linebreak
  {\thmnote{#3}}% Thm head spec
\newtheoremstyle{varthm-italic-no-punctuation}% name
  {}%      Space above, empty = `usual value'
  {}%      Space below
  {\itshape}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {}%        Punctuation after thm head 
  {.5em}%     Space after thm head: " " = normal interword space;
        %       \newline = linebreak
  {\thmnote{#3}}% Thm head spec
\newtheoremstyle{varthm-italic-break}% name
  {}%      Space above, empty = `usual value'
  {}%      Space below
  {\itshape}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {}%        Punctuation after thm head
  {\newline}%     Space after thm head: " " = normal interword space;
        %       \newline = linebreak
  {\thmnote{#3}}% Thm head spec

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Neue Regelsätze mit Nummerierung "5.12 Satz" etc.
%%% Durch Setzen der Variablen \theoremnumberstyle wird der Stil
%%% ausgewaehlt. Dies geschieht z.B. durch den Befehl
%%% \def\theoremnumberstyle{changesection}
%%% der vor der Einbindung dieses Stylefiles geschehen muss.
%%% plain         = Satz 12
%%% change        = 12 Satz 
%%% section       = Satz 5.12
%%% changesection = 5.12 Satz
%%% chapter       = Satz V.12
%%% changechapter = V.12 Satz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\thmsection{section}
\def\thmchangesection{changesection}
\def\thmchapter{chapter}
\def\thmchangechapter{changechapter}
\def\thmchange{change}
\def\thmplain{plain}
%\def\yes{yes}
%\def\no{no}
\ifx\theoremnumberstyle\thmplain
  \theoremstyle{break-italic} 
  \newtheorem{satz}{Satz} 
\else
  \ifx\theoremnumberstyle\thmsection
    \theoremstyle{break-italic} 
    \newtheorem{satz}{Satz}[section]
  \else
    \ifx\theoremnumberstyle\thmchange
      \swapnumbers
      \theoremstyle{break-italic} 
      \newtheorem{satz}{Satz}
    \else
      \ifx\theoremnumberstyle\thmchangesection
         \swapnumbers
         \theoremstyle{break-italic} 
         \newtheorem{satz}{Satz}[section]
      \else
        \ifx\theoremnumberstyle\thmchangechapter
           \swapnumbers
           \theoremstyle{break-italic} 
           \newtheorem{satz}{Satz}[chapter]
        \else
          \ifx\theoremnumberstyle\thmsection
             \theoremstyle{break-italic} 
             \newtheorem{satz}{Satz}[section]
          \else
            %% Wenn \theoremnumberstyle nicht gesetzt ist, dann immer plain.
            \theoremstyle{break-italic} 
            \newtheorem{satz}{Satz}[section]
          \fi
        \fi
      \fi
    \fi
  \fi
\fi

\theoremstyle{break-italic} 
\newtheorem{theorem}[satz]{Theorem}
\newtheorem{lemma}[satz]{Lemma}
\newtheorem{folgerung}[satz]{Folgerung}
\newtheorem{korollar}[satz]{Korollar}
\newtheorem{corollary}[satz]{Corollary}
\newtheorem{proposition}[satz]{Proposition}
\newtheorem{axiom}[satz]{Axiom}
\newtheorem*{conjecture*}{Conjecture}

\theoremstyle{break-roman} 
\newtheorem{definition}[satz]{Definition}
\newtheorem{arbeitsdefinition}[satz]{Arbeitsdefinition}
\newtheorem{exercise}[satz]{Exercise}
\newtheorem{aufgabe}[satz]{Aufgabe}
\newtheorem{loesung}[satz]{L\"osung zu Aufgabe}
\newtheorem{beispiel}[satz]{Beispiel}
\newtheorem{example}[satz]{Example}
\newtheorem{bemerkung}[satz]{Bemerkung}
\newtheorem{remark}[satz]{Remark}
\newtheorem{notation}[satz]{Notation}
\newtheorem{algorithmus}[satz]{Algorithmus}
\newtheorem{hinweise}[satz]{Allgemeine Hinweise}
\newtheorem{generalvoraussetzung}[satz]{Generalvoraussetzung}
\newtheorem{definitionsatz}[satz]{Definition und Satz}
\newtheorem{definitiontheorem}[satz]{Definition and Theorem}
\newtheorem{definitionproposition}[satz]{Definition and Proposition}
\newtheorem{definitionbemerkung}[satz]{Definition und Bemerkung}
\newtheorem{definitionremark}[satz]{Definition and Remark}
\newtheorem{remarkdefinition}[satz]{Remark and Definition}
\newtheorem{motivation}[satz]{Motivation}
\newtheorem{algorithm}[satz]{Algorithm}
\newtheorem{erinnerung}[satz]{Erinnerung}
\newtheorem{konstruktion}[satz]{Konstruktion}

\theoremstyle{standard} 
\newtheorem*{behauptung}{Behauptung}
\newtheorem*{claim}{Claim}
\newtheorem*{assumption}{Assumption}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Regelsaetze, deren Bezeichner noch frei gewaehlt werden kann;
%%% z.B. Generalvoraussetzung, Notation, Hinweis, ...
%%% Beispiel mit angepasster Nummerierung:
%%%    \stepcounter{satz}
%%%    \begin{varthm-roman-break}[\arabic{section}.\arabic{satz} Hinweis]
%%%    \end{varthm-roman-break}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theoremstyle{varthm-roman}
\newtheorem*{varthm-roman}{}% all text supplied in the note
\theoremstyle{varthm-italic}
\newtheorem*{varthm-italic}{}% all text supplied in the note
\theoremstyle{varthm-roman-break}
\newtheorem*{varthm-roman-break}{}% all text supplied in the note
\theoremstyle{varthm-italic-break}
\newtheorem*{varthm-italic-break}{}% all text supplied in the note
\theoremstyle{varthm-roman-no-punctuation}
\newtheorem{varthm-roman-no-punctuation-numbered}[satz]{}% all text supplied in the note
\theoremstyle{varthm-italic-no-punctuation}
\newtheorem{varthm-italic-no-punctuation-numbered}[satz]{}% all text supplied in the note

\newenvironment{varthm-roman-numbered}[1]{
  \begin{varthm-roman-no-punctuation-numbered}
    \mbox{\rm\textbf{#1}}
  }{\end{varthm-roman-no-punctuation-numbered}}
\newenvironment{varthm-italic-numbered}[1]{
  \begin{varthm-italic-no-punctuation-numbered}
    \mbox{\rm\textbf{#1}}
  }{\end{varthm-italic-no-punctuation-numbered}}
\newenvironment{varthm-roman-break-numbered}[1]{
  \begin{varthm-roman-no-punctuation-numbered}
    \mbox{\rm\textbf{#1}\newline}
  }{\end{varthm-roman-no-punctuation-numbered}}
\newenvironment{varthm-italic-break-numbered}[1]{
  \begin{varthm-italic-no-punctuation-numbered}
    \mbox{\rm\textbf{#1}}\newline
  }{\end{varthm-italic-no-punctuation-numbered}}
