\documentclass{amsart}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{geometry,amssymb,graphicx,cleveref}
\geometry{letterpaper}

%%%%%%%%%% Start TeXmacs macros
\newtheorem{definition}{Definition}
\newtheorem{lemma}{Lemma}
\newcommand{\nonconverted}[1]{\mbox{}}
{\theoremstyle{remark}\newtheorem{question}{Question}}
{\theoremstyle{remark}\newtheorem{remark}{Remark}}
\newtheorem{theorem}{Theorem}
%%%%%%%%%% End TeXmacs macros

\begin{document}

\title{TeXmacs to LaTeX conversion}

\author{Anonymous}

{\maketitle}

\section{First section}

\begin{theorem}
  \label{thm:1}This is a theorem about $\embbb{\vartriangle}_{R / A}$.
\end{theorem}

\begin{lemma}
  \label{lem:2}We have a diagram
  \[ \begin{array}{ccc}
       A & \nonconverted{longtwoheadrightarrow} & A''\\
       {\mbox{\rotatebox[origin=c]{-90}{$\longrightarrow$}}} &  &
       {\mbox{\rotatebox[origin=c]{-90}{$\longrightarrow$}}}\\
       B & \nonconverted{longtwoheadrightarrow} & B''
     \end{array} \]
\end{lemma}

{\ornamentedtitled{AAA

BBB

CCC}{Unimportant remark}}

\begin{remark}
  \label{rem:3}Look at $M^{\dilate{0.75}{0.75}{\blacksquare}}$.
\end{remark}

\begin{definition}
  \label{def:4}We say that an abelian group $M$ is {\textbf{free}} if {...}
\end{definition}

\begin{question}
  This is a question.
\end{question}

\section{Second section}

\begin{theorem}
  A duplicate of \cref{thm:1}.
\end{theorem}

\begin{lemma}
  A duplicate of \cref{lem:2}.
\end{lemma}

\begin{remark}
  A duplicate of \cref{rem:3}.
\end{remark}

\begin{definition}
  A duplicate of \cref{def:4}
\end{definition}

If we have a {\textbf{flat module}}, then {...}

\end{document}
