+ </xsl:when>
+ <!-- Algebra disequalities -->
+ <!-- It requires a special mode "diseq"-->
+ <!-- togliere il parametro -->
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/leEq_transitive.con'] and count(child::*) = 7">
+ <m:apply>
+ <m:csymbol>diseq_chain</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>
+ <xsl:apply-templates mode="diseq" select="*[6]">
+ <xsl:with-param name="rel" select="'leq'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[4]"/>
+ <xsl:apply-templates mode="diseq" select="*[7]">
+ <xsl:with-param name="rel" select="'leq'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ </m:apply>
+ </xsl:when>
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/leEq_wdl.con'] and count(child::*) = 7">
+ <m:apply>
+ <m:csymbol>diseq_chain</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ <m:eq/>
+ <!-- <m:ci><xsl:value-of select="'eq'"/></m:ci> -->
+ <xsl:call-template name="generate_side_proof">
+ <xsl:with-param name="proof" select="*[7]"/>
+ <xsl:with-param name="show_statement" select="0"/>
+ </xsl:call-template>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>
+ <xsl:apply-templates mode="diseq" select="*[6]">
+ <xsl:with-param name="rel" select="'leq'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[4]"/>
+ </m:apply>
+ </xsl:when>
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/leEq_less_trans.con'] and count(child::*) = 7">
+ <m:apply>
+ <m:csymbol>diseq_chain</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>
+ <xsl:apply-templates mode="diseq" select="*[6]">
+ <xsl:with-param name="rel" select="'leq'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[4]"/>
+ <xsl:apply-templates mode="diseq" select="*[7]">
+ <xsl:with-param name="rel" select="'lt'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ </m:apply>
+ </xsl:when>
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/less_leEq_trans.con'] and count(child::*) = 7">
+ <m:apply>
+ <m:csymbol>diseq_chain</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>
+ <xsl:apply-templates mode="diseq" select="*[6]">
+ <xsl:with-param name="rel" select="'lt'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[4]"/>
+ <xsl:apply-templates mode="diseq" select="*[7]">
+ <xsl:with-param name="rel" select="'leq'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ </m:apply>
+ </xsl:when>
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/leEq_wdr.con'] and count(child::*) = 7">
+ <m:apply>
+ <m:csymbol>diseq_chain</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>
+ <xsl:apply-templates mode="diseq" select="*[6]">
+ <xsl:with-param name="rel" select="'leq'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[4]"/>
+ <xsl:apply-templates mode="diseq" select="*[7]">
+ <xsl:with-param name="rel" select="'eq'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ </m:apply>
+ </xsl:when>
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/COrdField_axioms/less_transitive_unfolded.con'] and count(child::*) = 7">
+ <m:apply>
+ <m:csymbol>diseq_chain</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>
+ <xsl:apply-templates mode="diseq" select="*[6]">
+ <xsl:with-param name="rel" select="'lt'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[4]"/>
+ <xsl:apply-templates mode="diseq" select="*[7]">
+ <xsl:with-param name="rel" select="'lt'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ </m:apply>
+ </xsl:when>
+ <!-- togliere il parametro -->
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/COrdField_axioms/less_wdr.con'] and count(child::*) = 7">
+ <m:apply>
+ <m:csymbol>diseq_chain</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>
+ <xsl:apply-templates mode="diseq" select="*[6]">
+ <xsl:with-param name="rel" select="'lt'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[4]"/>
+ <xsl:apply-templates mode="diseq" select="*[7]">
+ <xsl:with-param name="rel" select="'eq'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ </m:apply>
+ </xsl:when>
+ <!-- togliere il parametro -->
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/COrdField_axioms/less_wdl.con'] and count(child::*) = 7">
+ <m:apply>
+ <m:csymbol>diseq_chain</m:csymbol>
+ <xsl:apply-templates mode="noannot" select="*[5]"/>
+ <m:eq/>
+ <!-- <m:ci><xsl:value-of select="'eq'"/></m:ci> -->
+ <xsl:call-template name="generate_side_proof">
+ <xsl:with-param name="proof" select="*[7]"/>
+ <xsl:with-param name="show_statement" select="0"/>
+ </xsl:call-template>
+ <xsl:apply-templates mode="noannot" select="*[3]"/>
+ <xsl:apply-templates mode="diseq" select="*[6]">
+ <xsl:with-param name="rel" select="'lt'"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="noannot" select="*[4]"/>
+ </m:apply>
+ </xsl:when>
+ <!-- EQUALITY -->
+ <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">
+ <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:call-template name="generate_side_proof">
+ <xsl:with-param name="proof" select="*[7]"/>
+ </xsl:call-template>
+ <!-- <xsl:apply-templates mode="proof_transform" select="*[7]"/> -->
+ </m:apply>
+ </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">