]> matita.cs.unibo.it Git - helm.git/commitdiff
more notations added
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Wed, 21 Mar 2001 16:53:40 +0000 (16:53 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Wed, 21 Mar 2001 16:53:40 +0000 (16:53 +0000)
helm/style/arith.xsl
helm/style/reals.xsl

index 617930350481c838a5aafc6f229e3c64674910ca..aabee3575c527ba4f665664bd142a5925ef48960 100644 (file)
@@ -53,7 +53,7 @@
 <xsl:template match="APPLY[CONST/@uri='cic:/Coq/Init/Peano/ge.con']" mode="pure">
    <xsl:call-template name="mk-mml-infix">
       <xsl:with-param name="c-tag" select="CONST"/>
-      <xsl:with-param name="m-tag" select="'geg'"/>
+      <xsl:with-param name="m-tag" select="'geq'"/>
    </xsl:call-template>
 </xsl:template>
 
    </xsl:call-template>
 </xsl:template>
 
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Arith/Min/min.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'min'"/>
+   </xsl:call-template>
+</xsl:template>
+
 </xsl:stylesheet>
index 6c6f1a7555e49a6705058094f4206195244a4480..7f3deaa9251c0c7620c4609dbe4b758750de2435 100644 (file)
@@ -27,7 +27,7 @@
 <!--******************************************************************--> 
 <!-- Reals                                                            -->
 <!-- First draft: April 3 2000                                        -->
-<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena                 -->
+<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena, Guidi          -->
 <!--******************************************************************-->
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -56,8 +56,6 @@
  <m:cn definitionURL="{@uri}" helm:xref="{@id}">1</m:cn>
 </xsl:template>
 
-
-
 <!-- Unary Operations and power -->
 
 <xsl:template match="APPLY[CONST[
 
 <!-- Binary Operations and Relations -->
 
-<xsl:template match="APPLY[CONST[
- attribute::uri='cic:/Coq/Reals/Rdefinitions/Rplus.con' or
- attribute::uri='cic:/Coq/Reals/Rdefinitions/Rminus.con' or
- attribute::uri='cic:/Coq/Reals/Rdefinitions/Rmult.con' or
- attribute::uri='cic:/Coq/Reals/Rdefinitions/Rle.con' or
- attribute::uri='cic:/Coq/Reals/Rdefinitions/Rlt.con' or
- attribute::uri='cic:/Coq/Reals/Rdefinitions/Rge.con' or
- attribute::uri='cic:/Coq/Reals/Rdefinitions/Rgt.con' or
- attribute::uri='cic:/Coq/Reals/Rbasic_fun/Rmin.con' or
- attribute::uri='cic:/Coq/Reals/Rfunctions/pow.con']]" mode="pure">
-    <xsl:choose>
-     <xsl:when test="count(child::*) = 3">
-      <xsl:variable name="elem">
-       <xsl:choose>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rplus.con'">
-         <xsl:value-of select="'plus'"/>
-        </xsl:when>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rminus.con'">
-         <xsl:value-of select="'minus'"/>
-        </xsl:when>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rmult.con'">
-         <xsl:value-of select="'times'"/>
-        </xsl:when>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rle.con'">
-         <xsl:value-of select="'leq'"/>
-        </xsl:when>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rlt.con'">
-         <xsl:value-of select="'lt'"/>
-        </xsl:when>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rge.con'">
-         <xsl:value-of select="'geq'"/>
-        </xsl:when>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rgt.con'">
-         <xsl:value-of select="'gt'"/>
-        </xsl:when>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rbasic_fun/Rmin.con'">
-         <xsl:value-of select="'min'"/>
-        </xsl:when>
-        <xsl:when test="CONST/@uri='cic:/Coq/Reals/Rfunctions/pow.con'">
-         <xsl:value-of select="'power'"/>
-        </xsl:when>
-       </xsl:choose>
-      </xsl:variable>
-      <m:apply helm:xref="{@id}">
-       <xsl:element name="{concat('m:',$elem)}">
-        <xsl:attribute name="definitionURL">
-         <xsl:value-of select="CONST/@uri"/> 
-        </xsl:attribute>
-        <xsl:attribute name="helm:xref">
-         <xsl:value-of select="CONST/@id"/>
-        </xsl:attribute>
-       </xsl:element>
-       <xsl:apply-templates select="*[2]" mode="noannot"/>
-       <xsl:apply-templates select="*[3]" mode="noannot"/>
-      </m:apply>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-imports/>
-     </xsl:otherwise>
-    </xsl:choose>
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rle.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'leq'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rlt.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'lt'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rge.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'geq'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rgt.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'gt'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rplus.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'plus'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rminus.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'minus'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rmult.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'times'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rdefinitions/Rdiv.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'divide'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rbasic_fun/Rmin.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'min'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rbasic_fun/Rmax.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'max'"/>
+   </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="APPLY[CONST/@uri='cic:/Coq/Reals/Rfunctions/pow.con']" mode="pure">
+   <xsl:call-template name="mk-mml-infix">
+      <xsl:with-param name="c-tag" select="CONST"/>
+      <xsl:with-param name="m-tag" select="'power'"/>
+   </xsl:call-template>
 </xsl:template>
 
 <!-- LIMIT -->