8. Develop a LaTeX script to demonstrate the presentation of Numbered theorems, definitions, corollaries, and lemmas in the document.
PROGRAM:
\documentclass{article}
\usepackage{amsthm}
% Define theorem-like environments
\newtheorem{theorem}{Theorem}[section] % Theorems numbered within sections
\newtheorem{definition}[theorem]{Definition} % Definitions share numbering with theorems
\newtheorem{corollary}[theorem]{Corollary} % Corollaries share numbering with theorems
\newtheorem{lemma}[theorem]{Lemma} % Lemmas share numbering with theorems
\begin{document}
\section{Introduction}
\begin{theorem}
This is a theorem.
\end{theorem}
\begin{definition}
This is a definition.
\end{definition}
\begin{corollary}
This is a corollary.
\end{corollary}
\begin{lemma}
This is a lemma.
\end{lemma}
\section{Another Section}
\begin{theorem}
Another theorem.
\end{theorem}
\end{document}
OUTPUT: