Q:

Undefined Control Sequence occurs at: \begin{document}

I wasn't having any problem with my .tex file, but after compiling a separate document - which used a different document class - my current file no longer loads. 
Specifically, I was using the imsart document class, compiled a separate file in the biom class, and now my imsart file won't load. The error I'm getting is: 
(c:/Program Files/PCTeX/PCTeXv6/texmf-dist/tex/latex/lm/ot1lmss.fd)
! Undefined control sequence.
<argument> \bibsep 

 l.66 \begin{document}

I've tried moving the \begin{document} around but that doesn't do anything. I'm almost 100% sure it has something to do with the natbib package, but I can't figure out what. What's bothersome is that no edits were made to the file, and it was just after compiling the other class file that my file won't work. 
I've checked to make sure I'm compiling a LaTeX pdf file, as I was before. 
The basic code is here, which gives the same error, is virtually copied from the imsart class website: 
\documentclass[aoas,preprint]{imsart}
\RequirePackage[OT1]{fontenc}
\RequirePackage{amsthm,amsmath}
\RequirePackage[numbers]{natbib}
\RequirePackage[colorlinks,citecolor=blue,urlcolor=blue]{hyperref}
\startlocaldefs
\numberwithin{equation}{section}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\endlocaldefs
\begin{document}
\section{Ordinary text}
  It is interesting that simulations with the \cite{r4} model worked well
 \begin{thebibliography}{9}
 \bibitem{r4}
\textsc{Prokhorov, Yu.} (1956).
Convergence of random processes and limit theorems in probability
theory. \textit{Theory  Probab.  Appl.}
\textbf{1} 157--214.
\MR{84896}
\end{thebibliography}
\end{document}

A:

I just had this same problem, and found the solution.
For me, it turned out to be a clash between two packages:
Apparently I was loading both the subfigure & subfig packages, which are not compatible (according to this hint).
If I comment out either
\usepackage{subfigure}

OR
\usepackage{subfig}

The code executes properly.
(subfigure is apparently obsolete and should be replaced by subfig)
Apparently You should only use one or the other, as they theoretically provide similar functionality, while I was previously loading both one after the other.
Perhaps your class imsart.cls is importing both packages?

A:

this may or may not be helpful.  i don't have imsart to check.
the undefined command is \bibsep.  it is a length defined in natbib.sty, and depends
on the length \@listi (the width of the space allotted for a first-level item label) being defined already.
for the basic article class, \@listi is defined in the files size1*.clo,
and depends on the command \normalsize being invoked; other class files may set
it differently, including delaying the setting until \AtBeginDocument.  if the
setting of \@listi is deferred, that would explain why the error occurs at
\begin{document}.  this appears affect only the [numbers] option.
you can check in imsart.cls whether \normalsize is invoked immediately, or
the setting of \@listi is delayed.  if you determine that this
is the case, i think your next action should be to inform the creator/distributor of
imsart.cls that the [numbers] option of natbib is incompatible.

A:

I don't have the imsart class loaded, but If I change the class to article as,
\documentclass{article}

Then comment out these two lines, which I'm not sure you need?
% \startlocaldefs
% \endlocaldefs

And then comment out this one line, with an unfamiliar command,
% \MR{84896}

Your document compiles fine. You might check and make sure that the imsart class file is in your tex tree or in the same folder, but other than that, do you need these lines?

