+ </xsl:when>
+ <!-- EQUALITY with extra-parameters -->
+ <xsl:when test="CONST[
+ attribute::uri='cic:/Coq/Init/Logic/Equality/eq_ind.con' or
+ attribute::uri='cic:/Coq/Init/Logic/Logic_lemmas/eq_ind_r.con' or
+ attribute::uri='cic:/Coq/Init/Logic_Type/eqT_ind.con' or
+ attribute::uri='cic:/Coq/Init/Logic_Type/eqT_ind_r.con' or
+ attribute::uri='cic:/Coq/Zarith/auxiliary/eqT_ind_r.con'] and count(child::*) > 7">
+ <xsl:variable name="no_extraproofs" select="count(*[position()>7 and @sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')])"/>
+ <xsl:choose>
+ <xsl:when test="$no_extraproofs=0">
+ <m:apply>
+ <m:csymbol>rewrite_and_apply</m:csymbol>
+ <m:apply>
+ <m:csymbol>rw_step</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ <xsl:apply-templates mode="pure" select="*[3]"/>
+ <xsl:apply-templates mode="pure" select="*[6]"/>
+ <xsl:apply-templates mode="pure" select="*[7]"/>
+ </m:apply>
+ <xsl:apply-templates mode="noannot" select="*[position()>7]"/>
+ </m:apply>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="*[5]/@sort='Prop'">
+ <m:apply helm:xref="{@id}">
+ <m:csymbol>letin</m:csymbol>
+ <m:apply>
+ <m:csymbol>let</m:csymbol>
+ <m:ci>
+ <xsl:call-template name="insert_subscript">
+ <xsl:with-param name="node_value" select="'h1'"/>
+ </xsl:call-template>
+ </m:ci>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ </m:apply>
+ <xsl:call-template name="gen_let">
+ <xsl:with-param name="init_pos" select="1"/>
+ <xsl:with-param name="from" select="7"/>
+ </xsl:call-template>
+ <m:apply>
+ <m:csymbol>rewrite_and_apply</m:csymbol>
+ <m:apply>
+ <m:csymbol>rw_step</m:csymbol>
+ <m:ci>
+ <xsl:call-template name="insert_subscript">
+ <xsl:with-param name="node_value" select="'h1'"/>
+ </xsl:call-template>
+ </m:ci>
+ <xsl:apply-templates mode="pure" select="*[3]"/>
+ <xsl:apply-templates mode="pure" select="*[6]"/>
+ <xsl:apply-templates mode="pure" select="*[7]"/>
+ </m:apply>
+ <xsl:apply-templates mode="flat" select="*[8]">
+ <xsl:with-param name="n">
+ <xsl:value-of select="2"/>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </m:apply>
+ </m:apply>
+ </xsl:when>
+ <xsl:otherwise>
+ <m:apply helm:xref="{@id}">
+ <m:csymbol>letin</m:csymbol>
+ <xsl:call-template name="gen_let">
+ <xsl:with-param name="init_pos" select="0"/>
+ <xsl:with-param name="form" select="7"/>
+ </xsl:call-template>
+ <m:apply>
+ <m:csymbol>rewrite_and_apply</m:csymbol>
+ <m:apply>
+ <m:csymbol>rw_step</m:csymbol>
+ <xsl:apply-templates mode="pure" select="*[5]"/>
+ <xsl:apply-templates mode="pure" select="*[3]"/>
+ <xsl:apply-templates mode="pure" select="*[6]"/>
+ <xsl:apply-templates mode="pure" select="*[7]"/>
+ </m:apply>
+ <xsl:apply-templates mode="flat" select="*[8]">
+ <xsl:with-param name="n">
+ <xsl:value-of select="1"/>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </m:apply>
+ </m:apply>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <!-- False_ind -->
+ <xsl:when test="CONST[
+ attribute::uri='cic:/Coq/Init/Logic/False_ind.con'] and
+ count(child::*) = 3">
+ <m:apply helm:xref="{@id}">
+ <m:csymbol>false_ind</m:csymbol>
+ <m:ci>cic:/Coq/Init/Logic/False_ind.con</m:ci>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>