Rightyho, cracked it. At least on my machine.
The problem is that there's a conflict between the IEEEtran document class and amsthm package - they both define \proof.
This is made difficult to fix by the fact (correct me if I'm wrong on this) that LyX doesn't let the user mess with the stuff it does at the very beginning of the latex it produces - the so called preamble goes after this.
When you select, for example, the theorem environment in LyX it goes ahead and sticks \usepackage{amsthm} in the preamble where it conflicts with the IEEE \proof, throwing an error.
The workaround is to do everything manually, so LyX doesn't get it's grubby hands on the pre-preamble. So, in the preamble use:
Code: Select all
\let\IEEEproof\proof
\let\IEEEendproof\endproof
\let\proof\@undefined
\let\endproof\@undefined
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}
\theoremstyle{plain}
\newtheorem{cor}[thm]{Corollary}
\theoremstyle{plain}
\newtheorem{lem}[thm]{Lemma}
\theoremstyle{plain}
\newtheorem{prop}[thm]{Proposition}
\theoremstyle{plain}
\newtheorem{conjecture}[thm]{Conjecture}
\theoremstyle{plain}
\newtheorem{fact}[thm]{Fact}
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\theoremstyle{definition}
\newtheorem{example}[thm]{Example}
\theoremstyle{definition}
\newtheorem{problem}[thm]{Problem}
\theoremstyle{definition}
\newtheorem{xca}[thm]{Exercise}
\theoremstyle{remark}
\newtheorem{rema}[thm]{Remark}
\theoremstyle{remark}
\newtheorem{claim}[thm]{Claim}
When you need to put a theorem in use
Code: Select all
ERT[\begin{thm}]
Your theorem here...
ERT[\end{thm}]
For other environments replace {thm} with the code in curly braces in the preamble, {rema} for a remark, {defn} for a definition.
Hope that helps. I think in actual fact both of our problems might be being caused by an outdated IEEEtran.cls... Something for me to look into when I have more time perhaps.