Hopefully you've discovered that the problem is easy in LaTeX (indeed, it is substantially what it was designed for), but here is an explicit construction for you to look at.
Try compiling this document, both with and without the Lemma in it. (Depending on how you are writing your document, you may have to run LaTeX twice in a row to make the cross-reference resolve each time you remove the Lemma. Many modern editors do this automatically.)
\documentclass{article}
\usepackage{amsthm,amssymb}
\newtheorem{theorem}{Theorem}[section]
% Theorem numbering is Sec#.Thm#
\newtheorem{lemma}[theorem]{Lemma}
% Lemmata are numbered as theorems
\begin{document}
\section{A section with some politically motivated math in it}
The following Lemma is folklore among Business Administration circles of
the \emph{Paradigmatic Shift} school:
\begin{lemma}[Synergy Lemma]
\label{lemma:synergy}
Under the right circumstances, $1 + 1 = 3$.
\end{lemma}
\begin{proof} By adoption of a positive workplace culture. \end{proof}
\noindent
The Synergy Lemma proves quite useful to show the following celbrated result:
\begin{theorem}
\label{thm:2+2=5}
When it suits us, $2 + 2 = 5$.
\end{theorem}
\begin{proof} Exercise for the reader; use good stomping boots. \end{proof}
\noindent
Theorem~\ref{thm:2+2=5} is commonly known as \emph{Orwell's Theorem},
though it is often (and more accurately) called \emph{Vissarionovich's Theorem}
in many eastern European countries.
\end{document}
\newtheorem
etc. to set up these environments, e.g.\newtheorem{theorem}{Theorem}[section]
etc. You should then place\label
and reference them with\ref
to refer to these environments. See LaTeX documentation, and possibly consider eitheramsthm
orntheorem
packages for more sophisticated formatting.