- <xsl:choose>
- <!-- <xsl:when test="//InnerTypes and boolean(key('typeid',*/@id))"> -->
- <!-- start looking for subproofs -->
- <!-- <xsl:when test="((*/@id) = (//InnerTypes/TYPE/@of))"> -->
- <xsl:when test="//InnerTypes and count(*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]) > 0">
- <m:apply helm:xref="{@id}">
- <m:csymbol>letin</m:csymbol>
- <!-- <xsl:for-each select="*[boolean(key('typeid',@id))]"> -->
- <!-- first process all subproofs (let-in) -->
- <xsl:for-each select="*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]">
- <m:apply>
- <m:csymbol>let</m:csymbol>
- <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="concat('h',position())"/></xsl:with-param></xsl:call-template></m:ci>
- <xsl:apply-templates mode="noannot" select="."/>
- </m:apply>
- </xsl:for-each>
- <!-- now re-process the application in mode appflat -->
- <xsl:apply-templates mode="appflat" select="."/>
- </m:apply>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="appflat" select="."/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="APPLY" mode="appflat">