# Making equations follow the theorem counter

I'm aware that several questions similar to this one have been posted, but I haven't found one that does quite exactly what I will ask below.

Here's what I have so far:

\documentclass{amsart}

\theoremstyle{plain}
\newtheorem{teo}{Theorem}[section]

\begin{document}

\section{A section}
\begin{teo} A theorem. \end{teo}
$$0=1$$

\end{document}


The output is:

I would like the (1) next to the equation to be 1.2. On the next section, a similar pattern would occur, only starting with 2.

You can make teo follow the equation counter:

\documentclass{amsart}

\theoremstyle{plain}
\newtheorem{teo}[equation]{Theorem}
\numberwithin{equation}{section}

\begin{document}

\section{A section}
\begin{teo} A theorem. \end{teo}
$$0=1$$
\begin{teo} A theorem. \end{teo}
$$0=1$$

\end{document}