I am new to theorems and definitions of the amsthm
package and what I am trying to achieve might be really simple.
I have the following theorems:
\theoremstyle{definition}
\newtheorem{matriceDef}{Matrice}[section]
\newtheorem{matriceSomma}[matriceDef]{Somma}
\newtheorem{matriceSommaProp}{Proprietà per la somma tra matrici}[matriceSomma]
defined in a file. When I actually put them all together I have a LaTeX Error: No counter 'matriceSomma' defined.
That happens at the last line.
What I am trying to do is have the last definition be a sub-definition of the preceding one. Right now, as you can see,
the output is correct, what I want. The problem is that it gives that error there.
The MWE for this is this one
\documentclass[a4paper]{article}
\usepackage{amsmath,amsfonts,amssymb,mathtools,calrsfs,mathrsfs,amsthm}
\theoremstyle{definition}
\newtheorem{matriceDef}{Matrice}[section]
\newtheorem{matriceSomma}[matriceDef]{Somma}
\newtheorem{matriceSommaProp}{Proprietà per la somma tra matrici}[matriceSomma]
\begin{document}
\section{Matrici}
\subsection{Definizioni e teoremi}
\begin{matriceDef}
Foo, bar
\end{matriceDef}
\begin{matriceSomma}
Outside
\end{matriceSomma}
\begin{matriceSommaProp}
Inside
\end{matriceSommaProp}
\end{document}
I removed the useless typesetting. What I would like to do is create a definition (or a theorem) that depends on another for numbering. Thanks for any help.