\begin{Mhelppage}{Tropical}{E.~Laugerotte}

\begin{MInfo}
\eng{tropical semi-ring}
\de{}
\end{MInfo}

%\begin{todo}
%\end{todo}

\begin{MIntro}
\eng{\Mthis\ creates a domain for the tropical semi-ring.}
\end{MIntro}

\begin{MDetails}
\eng{The domain element \Mthis\Mex{(n)} represents the tropical constant $n$ 
if $n$ is a positive integer, or $\infty$ if $n$ is infinity.}
  \de{}
\end{MDetails}

\begin{MDomElConst}
\MCall[\Mthis]{n}
\end{MDomElConst}

\begin{MParameters}
\param{n}
\eng{integer or infinity.}
\de{}
\end{MParameters}

\begin{MCategories}
\Mup{Cat::SemiRing}
\end{MCategories}

\MRelatedDomains{Dom::Boolean}

\begin{MDomEntries}
\MDomEntry{zero}
\eng{the tropical constant infinity.}
\de{}
\MDomEntry{one}
\eng{the tropical constant $0$.}
\de{}
\end{MDomEntries}

\MMathMethods

\begin{MMethodDetails}{_plus}
  \infoEng{sum of tropicals}
    \infoDe{}  
\call{\Mseq{\Mtype{dom} a1}}
\eng{The sum \Mex{a1+a2+\ldots+ak} of tropicals is defined to be the smallest 
of positive integers or infinity \Mex{a1,a2,\ldots,ak}.}
\de{}
\eng{This method overloads the function \Mup{_plus}.}
\end{MMethodDetails}

\begin{MMethodDetails}{_mult}
  \infoEng{product of tropicals}
    \infoDe{}  
\call{\Mseq{\Mtype{dom} a1}}
\eng{The sum \Mex{a1*a2*\ldots{}*ak} of tropicals is defined to be 
\Mex{a1+a2+\ldots{}+ak}.}
\de{}
\eng{This method overloads the function \Mup{_mult}.}
\end{MMethodDetails}

\begin{MMethodDetails}{_power}
\infoEng{power of a tropical}
\infoDe{}
\call{\Mtype{dom} a,\Mtype{Dom::Integer} n}
\eng{ The nth power \Mex{a^n} of the tropical \Mex{a}.}
\de{}
\eng{This method overloads the function \Mup{_power}.}
\end{MMethodDetails}

\begin{MMethodDetails}{expr}
\infoEng{convert a tropical into an integer or infinity.}
\infoDe{}
\call{\Mtype{dom} a}
\eng{ This method returns a integer or infinity such that generating a 
tropical from that integer or infinity would result in \Mex{a}.}
\de{}
\end{MMethodDetails}


\begin{MExample}{ex1}
\eng{This example shows the idempotency of the tropical semi-ring:}
  \begin{Mexin}
T:=Dom::Tropical:
  \end{Mexin}
  \begin{Mexin}
T(infinity) + T(infinity);
T(3) + T(3)
  \end{Mexin}
\begin{Mexout}
                           infinity

                               3
  \end{Mexout}
\begin{Mexin}
T(6) + T(infinity);
T(6) + T(3);
T(6)*T(infinity);
T(6)*T(3)
  \end{Mexin}
\begin{Mexout}
                               6

                               3

                           infinity

                               9
  \end{Mexout}
\end{MExample}

\MSuperDomain{Dom::BaseDomain}

\begin{MAxioms}
  \Mup{Ax::canonicalRep, Ax::normalRep}
\end{MAxioms}

\begin{MChanges}
  \version{3.0}
  \new
\end{MChanges}

\end{Mhelppage}
