BCSL456D Program 8

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:

Leave a Reply

Your email address will not be published. Required fields are marked *