]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/set.xsl
Algebra notation.
[helm.git] / helm / style / set.xsl
index 5ff4fce0b94642e447563375f7cf38dbb0d9dabf..f1f7b7e50b5bf56e470fa0592dec67b76b002d14 100644 (file)
@@ -488,4 +488,51 @@ and (count(child::*) = 2) and APPLY[CONST[attribute::uri='cic:/Coq/Sets/Ensemble
     </xsl:choose>
 </xsl:template>
 
+<!-- *******************  SIGMA TYPES  **************************** -->
+
+<xsl:template match="APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Specif/Subsets/sig.ind']]" mode="pure">
+ <xsl:choose>
+  <xsl:when test="count(child::*) = 3">
+   <xsl:choose>
+    <xsl:when test="name(*[3]) = 'LAMBDA'">
+     <m:set>
+       <m:bvar>
+        <m:ci>
+         <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[3]/target/@binder"/></xsl:with-param></xsl:call-template>
+        </m:ci>
+        <m:type>
+         <xsl:apply-templates select="*[3]/source/*[1]" mode="noannot"/>
+        </m:type>
+       </m:bvar>
+       <m:condition>
+        <xsl:apply-templates select="*[3]/target/*[1]" mode="noannot"/>
+       </m:condition>
+     </m:set>
+    </xsl:when>
+    <xsl:otherwise>
+     <m:set>
+       <m:bvar>
+        <m:ci>$x</m:ci>
+        <m:type>
+         <xsl:apply-templates select="*[2]" mode="noannot"/>
+        </m:type>
+       </m:bvar>
+       <m:condition>
+        <m:apply>
+         <m:csymbol>app</m:csymbol>
+         <xsl:apply-templates select="*[3]" mode="noannot"/>
+         <m:ci>$x</m:ci>
+        </m:apply>
+       </m:condition>
+     </m:set>
+    </xsl:otherwise>
+   </xsl:choose>
+  </xsl:when>
+  <xsl:otherwise>
+   <xsl:apply-imports/>
+  </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
 </xsl:stylesheet>