[Tex/LaTex] Numbering of assumptions

numberingtheorems

Suppose I would like to have a title of assumption being Assumption 1-$\mathcal F$., Assumption 2-$\mathcal F$. and so on to be further called in the text with symbols different from $\mathcal F$. Let me give you an example:

\documentclass[10pt, a4paper]{amsart}
\usepackage{amsmath}               
  {
      \theoremstyle{plain}
      \newtheorem{assumption}{Assumption}
  }
\begin{document}
\section{The first section}
\subsection{The first subsection}
There are three classes of interest: $\mathcal a$, $\mathcal b$ and $\mathcal c$.
Let $\mathcal f$ be a symbolic variable which takes its values 
from the set $\{\mathcal a,\mathcal b,\mathcal c\}$.

\begin{assumption}-$\mathcal f$\label{as:1}
  The class $\mathcal f$ is not empty.
\end{assumption}

\begin{assumption}-$\mathcal f$\label{as:2}
  The derivative $\mathrm d(\mathcal f)$ is positive.
\end{assumption}

Examples of using the assumptions above are as follows:
\begin{itemize}
  \item By saying that Assumption \ref{as:1}-$\mathcal a$ is satisfied,
we mean that the class $\a$ is not empty.
  \item By saying that Assumption \ref{as:2}-$\mathcal c$ is satisfied,
we mean that the derivative $\mathrm d(\mathcal c)$ is positive.
\end{itemize}
\end{document}

enter image description here


In this example everything is fine but the titles of assumptions. Currently they are Assumption 1. -$\mathcal F$ whereas I need $\mathcal F$ to be the part of the title. As below. However, whenever I use \ref in the body text, the reference is of the form Assumption 1.1 rather than Assumption 1. In fact, the numbering does not work well: it seem to depend only on the number of section/subsection where the assumption was defined as here.

  {
      \theoremstyle{plain}
      \newtheorem*{assumption1f}{Assumption 1-$\mathcal f$}
      \newtheorem*{assumption2f}{Assumption 2-$\mathcal f$}
  }
\begin{document}
\section{The first section}
\subsection{The first subsection}
There are three classes of interest: $\mathcal a$, $\mathcal b$ and $\mathcal c$.
Let $\mathcal f$ be a symbolic variable which takes its values 
from the set $\{\mathcal a,\mathcal b,\mathcal c\}$.

\begin{assumption1f}\label{as:1}
  The class $\mathcal f$ is not empty.
\end{assumption1f}

\begin{assumption2f}\label{as:2}
  The derivative $\mathrm d(\mathcal f)$ is positive.
\end{assumption2f}

Examples of using the assumptions above are as follows:
\begin{itemize}
  \item By saying that Assumption \ref{as:1}-$\mathcal a$ is satisfied,
we mean that the class $\mathcal a$ is not empty.
  \item By saying that Assumption \ref{as:2}-$\mathcal c$ is satisfied,
we mean that the derivative $\mathrm d(\mathcal c)$ is positive.
\end{itemize}
\end{document}

enter image description here


Is there any way to fix that? As suggested by egreg, I've implemented the following code. The titles are now fine, as above – but the numbering is still not ok: instead of Assumption 1-$\mathcal A$ that refers to the first assumption, I necessarily get $\mathcal F$ in the reference.

\newtheorem*{assumption*}{\assumptionnumber}
\providecommand{\assumptionnumber}{}
\makeatletter
\newenvironment{assumption}[2]
 {%
  \renewcommand{\assumptionnumber}{Assumption #1-$\mathcal{#2}$}%
  \begin{assumption*}%
  \protected@edef\@currentlabel{#1-$\mathcal{#2}$}%
 }
 {%
  \end{assumption*}
 }
\makeatother

\begin{document}
\section{The first section}
\subsection{The first subsection}

There are three classes of interest: $\mathcal a$, $\mathcal b$ and $\mathcal c$.
Let $\mathcal f$ be a symbolic variable which takes its values 
from the set $\{\mathcal a,\mathcal b,\mathcal c\}$.

\begin{assumption}{1}{F}\label{as:1}
  The class $\mathcal f$ is not empty.
\end{assumption}

\begin{assumption}{2}{F}\label{as:2}
  The derivative $\mathrm d(\mathcal f)$ is positive.
\end{assumption}

Examples of using the assumptions above are as follows:
\begin{itemize}
  \item By saying that Assumption \ref{as:1}-$\mathcal a$ is satisfied,
we mean that the class $\mathcal a$ is not empty.
  \item By saying that Assumption \ref{as:2}-$\mathcal c$ is satisfied,
we mean that the derivative $\mathrm d(\mathcal c)$ is positive.
\end{itemize}
\end{document}

enter image description here


To summarize: in the first version references are the way I want, but titles are not. In the other two (my own attempt, and the code suggested by @egreg) the titles are good, but the references differ from the first case.

Best Answer

From \newtheorem* I guess you're using amsthm. Here's a way to do it:

\documentclass{article}
\usepackage{amsthm}

\newtheorem*{assumption*}{\assumptionnumber}
\providecommand{\assumptionnumber}{}
\makeatletter
\newenvironment{assumption}[2]
 {%
  \renewcommand{\assumptionnumber}{Assumption #1-$\mathcal{#2}$}%
  \begin{assumption*}%
  \protected@edef\@currentlabel{#1-$\mathcal{#2}$}%
 }
 {%
  \end{assumption*}
 }
\makeatother

\begin{document}

\begin{assumption}{1}{F}\label{1F}
Something
\end{assumption}

Here's the reference: \ref{1F}

\end{document}

Only one \newtheorem* is needed. The assumption environment takes as argument the number and the label; it also sets the current reference text.

enter image description here


Here's a modification that seems to be doing what you'd like. Perhaps: the specifications continue to be vague.

\documentclass{article}
\usepackage{amsthm}

\newtheorem*{assumption*}{\assumptionnumber}
\providecommand{\assumptionnumber}{}
\makeatletter
\newenvironment{assumption}[2]
 {%
  \renewcommand{\assumptionnumber}{Assumption #1-$\mathcal{#2}$}%
  \begin{assumption*}%
  \protected@edef\@currentlabel{#1}%
 }
 {%
  \end{assumption*}
 }
\makeatother
\newcommand{\asref}[2]{\ref{#1}-$\mathcal{#2}$}

\begin{document}

\section{The first section}
\subsection{The first subsection}

There are three classes of interest: $\mathcal{A}$, $\mathcal{B}$ and $\mathcal{C}$.
Let $\mathcal{F}$ be a symbolic variable which takes its values 
from the set $\{\mathcal{A},\mathcal{B},\mathcal{C}\}$.

\begin{assumption}{1}{F}\label{as:1}
  The class $\mathcal{F}$ is not empty.
\end{assumption}

\begin{assumption}{2}{F}\label{as:2}
  The derivative $\mathrm{d}(\mathcal{F})$ is positive.
\end{assumption}

Examples of using the assumptions above are as follows:
\begin{itemize}
\item By saying that Assumption \asref{as:1}{A} is satisfied,
we mean that the class $\mathcal{A}$ is not empty.

\item By saying that Assumption \asref{as:2}{C} is satisfied,
we mean that the derivative $\mathrm d(\mathcal{C})$ is positive.
\end{itemize}
\end{document}

enter image description here