-<xsl:template match="APPLY[*[position()=1 and name()='MUTCONSTRUCT' and @uri='cic:/Coq/ZArith/fast_integer/fast_integers/Z.ind' and @noConstr='2'] and count(*)=2]" mode="pure">
+<xsl:template match="APPLY[*[position()=1 and name()='MUTCONSTRUCT' and @uri='cic:/Coq/ZArith/fast_integer/Z.ind' and @noConstr='2'] and count(*)=2]" mode="pure">
<xsl:apply-templates select="*[2]" mode="Zpositive">
<xsl:with-param name="base" select="0"/>
<xsl:with-param name="exp" select="1"/>
</xsl:apply-templates>
</xsl:template>
-<xsl:template match="APPLY[*[position()=1 and name()='MUTCONSTRUCT' and @uri='cic:/Coq/ZArith/fast_integer/fast_integers/Z.ind' and @noConstr='3'] and count(*)=2]" mode="pure">
+<xsl:template match="APPLY[*[position()=1 and name()='MUTCONSTRUCT' and @uri='cic:/Coq/ZArith/fast_integer/Z.ind' and @noConstr='3'] and count(*)=2]" mode="pure">
<m:apply helm:xref="{@id}">
<m:minus definitionURL="{*[1]/@uri}" helm:xref="{*[1]/@id}"/>
<xsl:apply-templates select="*[2]" mode="Zpositive">
</m:apply>
</xsl:template>
-<xsl:template match="MUTCONSTRUCT[@uri='cic:/Coq/ZArith/fast_integer/fast_integers/Z.ind' and @noConstr='1']" mode="pure">
+<xsl:template match="MUTCONSTRUCT[@uri='cic:/Coq/ZArith/fast_integer/Z.ind' and @noConstr='1']" mode="pure">
<m:ci definitionURL="{@uri}" helm:xref="{@id}">0</m:ci>
</xsl:template>
<!-- prova di notazione per positive -->
-<xsl:template match="APPLY[*[position()=1 and name()='MUTCONSTRUCT' and @uri='cic:/Coq/ZArith/fast_integer/fast_integers/positive.ind']]" mode="pure">
+<xsl:template match="APPLY[*[position()=1 and name()='MUTCONSTRUCT' and @uri='cic:/Coq/ZArith/fast_integer/positive.ind']]" mode="pure">
<xsl:apply-templates select="." mode="Zpositive">
<xsl:with-param name="base" select="0"/>
<xsl:with-param name="exp" select="1"/>
</xsl:apply-templates>
</xsl:template>
-<xsl:template match="MUTCONSTRUCT[@uri='cic:/Coq/ZArith/fast_integer/fast_integers/positive.ind' and @noConstr='3']" mode="pure">
+<xsl:template match="MUTCONSTRUCT[@uri='cic:/Coq/ZArith/fast_integer/positive.ind' and @noConstr='3']" mode="pure">
<m:ci definitionURL="{@uri}" helm:xref="{@id}">1</m:ci>
</xsl:template>
<xsl:param name="iden" select="''"/>
<xsl:choose>
<xsl:when test="name()='APPLY' and *[position()=1 and name()='MUTCONSTRUCT'
-and @uri='cic:/Coq/ZArith/fast_integer/fast_integers/positive.ind' and @noConstr='1']">
+and @uri='cic:/Coq/ZArith/fast_integer/positive.ind' and @noConstr='1']">
<xsl:apply-templates select="*[2]" mode="Zpositive">
<xsl:with-param name="base" select="$base + $exp"/>
<xsl:with-param name="exp" select="2 * $exp"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="name()='APPLY' and *[position()=1 and name()='MUTCONSTRUCT'
-and @uri='cic:/Coq/ZArith/fast_integer/fast_integers/positive.ind' and @noConstr='2']">
+and @uri='cic:/Coq/ZArith/fast_integer/positive.ind' and @noConstr='2']">
<xsl:apply-templates select="*[2]" mode="Zpositive">
<xsl:with-param name="base" select="$base"/>
<xsl:with-param name="exp" select="2 * $exp"/>
<xsl:with-param name="iden" select="$iden"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="name()='MUTCONSTRUCT' and @uri='cic:/Coq/ZArith/fast_integer/fast_integers/positive.ind' and @noConstr='3'">
+ <xsl:when test="name()='MUTCONSTRUCT' and @uri='cic:/Coq/ZArith/fast_integer/positive.ind' and @noConstr='3'">
<m:ci helm:xref="{$iden}"><xsl:value-of select="$base + $exp"/></m:ci>
</xsl:when>
<xsl:otherwise>
</xsl:choose>
</xsl:template>
+<!-- **************************** Reals ******************************** -->
+
+<xsl:template match="APPLY[CONST[position() = 1 and @uri='cic:/Coq/Reals/Rdefinitions/Rplus.con'] and count(*) = 3]" mode="pure">
+ <xsl:variable name="result">
+ <xsl:apply-templates select="." mode="reals"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string($result) = ''">
+ <m:apply helm:xref="{@id}">
+ <m:plus xmlns:m="http://www.w3.org/1998/Math/MathML" definitionURL="{CONST[1]/@uri}" helm:xref="{CONST[1]/@id}"/>
+ <xsl:apply-templates select="*[2]" mode="noannot"/>
+ <xsl:apply-templates select="*[3]" mode="noannot"/>
+ </m:apply>
+ </xsl:when>
+ <xsl:otherwise>
+ <m:cn helm:xref="{CONST[1]/@id}"><xsl:value-of select="$result"/></m:cn>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="APPLY[*[position() = 1 and name()='CONST' and @uri='cic:/Coq/Reals/Rdefinitions/Rplus.con'] and *[position() = 2 and name()='CONST' and @uri='cic:/Coq/Reals/Rdefinitions/R1.con'] and count(*) = 3]" mode="reals">
+ <xsl:param name="real_counter" select="0"/>
+ <xsl:variable name="result">
+ <xsl:apply-templates select="*[3]" mode="reals">
+ <xsl:with-param name="real_counter" select="$real_counter + 1"/>
+ </xsl:apply-templates>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string($result) = ''"/>
+ <xsl:otherwise>
+ <xsl:value-of select="$result"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="CONST[@uri='cic:/Coq/Reals/Rdefinitions/R1.con']" mode="reals">
+ <xsl:param name="real_counter" select="0"/>
+ <xsl:value-of select="$real_counter + 1"/>
+</xsl:template>
+
+<xsl:template match="*" mode="reals"/>
</xsl:stylesheet>