]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/drop_coercions.xsl
Disequalities chains for algebra. First draft.
[helm.git] / helm / style / drop_coercions.xsl
index f2bc44d0d7f43c2ec8e6a6f16c21a307de71a1f6..b31160eab490d350a6b0d24f10604d17a33cc855 100644 (file)
     </xsl:choose>
 </xsl:template>
 
+<xsl:template match="APPLY[CONST[position()='1' and 
+   @uri='cic:/Algebra/CRings/nat_injection/nring.con']]">
+     <xsl:variable name="no_params">
+      <xsl:call-template name="get_no_params">
+       <xsl:with-param name="first_uri" select="$CICURI"/>
+       <xsl:with-param name="second_uri" select="CONST[1]/@uri"/>
+      </xsl:call-template>
+     </xsl:variable>
+    <xsl:choose>
+     <xsl:when test="(count(child::*) - number($no_params)) = 2">
+      <xsl:apply-templates select="*[2+$no_params]"/>
+     </xsl:when>
+     <xsl:otherwise>
+      <APPLY id="{@id}" sort="{@sort}">
+       <xsl:apply-templates select="*"/>
+      </APPLY>
+     </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
 
 <xsl:template match = "/|*">
   <xsl:copy>