[Tex/LaTex] Beamer error: undefined control sequence \end{frame}

beamererrors

\documentclass[hyperref={pdfencoding=auto}]{beamer} % "Beamer" is a word used in Germany to mean video projector. 

\usetheme{Berkeley} % Search online for beamer themes to find your favorite or use the Berkeley theme as in this file.

\usepackage{color} % It may be necessary to set PCTeX or whatever program you are using to output a .pdf instead of a .dvi file in order to see color on your screen.
\usepackage{amsfonts,amssymb,amsmath}
\usepackage{graphicx} % This package is needed if you wish to include external image files.

\theoremstyle{definition} % See Lesson Three of the LaTeX Manual for more on this kind of "proclamation."
\newtheorem*{dfn}{A Reasonable Definition}               
\definecolor{kugreen}{RGB}{0,153,76}
\definecolor{kugreenlys}{RGB}{132,158,139}
\definecolor{kugreenlyslys}{RGB}{173,190,177}
\definecolor{kugreenlyslyslys}{RGB}{214,223,216}

%beamertemplate
\setbeamertemplate{theorems}[numbered]
\usecolortheme[named=kugreen]{structure}
%\useinnertheme{circles}
\usefonttheme[onlymath]{serif}
%\setbeamercovered{transparent}
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamercovered{invisible}
\useinnertheme{rectangles}

\title{Authentication Codes}
\author{Abigail A. Villa\\ Skezeer John B. Paz} 
\institute{Ph.D. Mathematics \\ De La Salle University\\ \texttt{abigail\_villa@dlsu.edu.ph // skezeer\_john\_paz@dlsu.edu.ph}}
\date{November 27, 2017} 
% Remove the % from the previous line and change the date if you want a particular date to be displayed; otherwise, today's date is displayed by default.

\AtBeginSection[]  % The commands within the following {} will be executed at the start of each section.
{
\begin{frame} % Within each "frame" there will be one or more "slides."  
\frametitle{Outline} % This is the title of the outline.
\tableofcontents[pausesections]  % This will display the table of contents and highlight the current section.
\end{frame}
} % Do not include the preceding set of commands if you prefer not to have a recurring outline displayed during your presentation.

\begin{document}

\begin{frame} 
\titlepage
\end{frame}

\section{Orthogonal Array} % Since this is the start of a new section, our recurring outline will appear here.
\subsection[PRELIMS]{Preliminaries}

\begin{frame}
\frametitle{PRELIMINARIES}
\textbf{Latin Square}\\ \pause
A Latin square of order $n$ with entries from an $n-set~X$ is an $n \times n$ array $L$ in which every cell contains an element of $X$ such that every row of $L$ is a permutation of $X$ and every column of $L$ is a permutation of $X$.
\begin{block}{Example}
    A Latin square of order 4.\\
    \[ 
    \begin{array}{|cccc|}
    \hline
    1&2&3&4\\
    4&1&2&3\\
    3&4&1&2\\
    2&3&4&1\\
    \hline
    \end{array}
    \]
\end{block}
\end{frame}

\begin{frame}
\textbf{Quasigroup}\\
\textbf{Definition:} Let $X$ be a finite set of cardinality $n$, and let $\circ$ be a binary operation defined on $X~(i.e., \circ: X\times X\longrightarrow X)$. We say that the pair $(X, \circ)$ is a quasigroup of order $n$ provided that the following two properties are satisfied:\\
\begin{enumerate}
    \item For every $x,y\in X$, the equation $x\circ z=y$ has a unique solution for $z\in X$.\\
    \item For every $x,y\in X$, the equation $z\circ x=y$ has a unique solution for $z\in X$.
\end{enumerate}
The \textit{operation table} of a binary operation $\circ$ defined on $X$ is the $|X| \times |X|$ array $A=(a_{x,y})$, where $a_{x,y}=x\circ y$

\end{frame}

\begin{frame}
\textbf{Idempotent/Symmetric quasigroup}\\
\textbf{Definition:} Suppose $(X,\circ)$ is a quasigroup. We say that $(X,\circ)$ is an \textit{idempotent quasigroup} if $x\circ x =x$ for all $x\in X$, and we say that $(X,\circ)$ is a \textit{symmetric quasigroup} if $x\circ y= y \circ x$ for al $x,y \in X$.
\end{frame}

\begin{frame}
These concepts can also be defined for Latin squares in the obvious way: A \textit{symmetric Latin square} $L=(\mathscr{l}_{x,y})$ .
 \end{frame}

\end{document}

This was the code that i've been trying to work on. Please help. thanks

Best Answer

You may want to add \usepackage{mathrsfs} in your preamble, i.e. after \documentclass and before \begin{document}. Note, however, that the \mathscr command does not support lower-casse letters, and you may thus replace \mathscr{l} by \mathscr{L} (or by \ell, if you want a lower-case script l).