<!-- <xsl:key name="typeid" use="@of" match="TYPE"/> -->
<xsl:key name="typeid" use="@of" match="TYPE"/>
-<!-- ALL this elements does not have inner type -->
-<xsl:template match="PROD|SORT|MUTIND" mode="noannot">
+<!-- These elements do not have inner type -->
+<xsl:template match="PROD|SORT|MUTIND|instantiate" mode="noannot">
<xsl:apply-templates select="." mode="pure"/>
</xsl:template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$naturalLanguage='yes' and @sort='Prop' and $innertype_available='yes'">
+ <!--xsl:when test="@sort='Prop'"-->
<m:apply helm:xref="{@id}">
<m:csymbol>proof</m:csymbol>
<xsl:apply-templates mode="proof_transform" select="."/>
- <!-- <xsl:apply-templates mode="try_inductive" select="."/> -->
<xsl:for-each select="$InnerTypes">
<xsl:apply-templates mode="pure" select="key('typeid',$id)/*"/>
</xsl:for-each>
<!-- LAMBDA has inner type only if it is not nested inside another lambda -->
<xsl:template match="LAMBDA" mode="noannot">
- <xsl:variable name="id" select="@id"/>
+ <xsl:variable name="id" select="decl/@id"/>
<xsl:variable name="innertype_available">
<xsl:for-each select="$InnerTypes">
<xsl:if test="key('typeid',$id)/*">
</xsl:if>
</xsl:for-each>
</xsl:variable>
+ <!--xsl:value-of select="concat('NL: ',$naturalLanguage,' IA: ',$innertype_available)"/-->
<xsl:choose>
<xsl:when test="$naturalLanguage='yes' and @sort='Prop' and $innertype_available='yes'">
- <m:apply helm:xref="{@id}">
+ <m:apply helm:xref="{decl/@id}">
<m:csymbol>proof</m:csymbol>
<xsl:apply-templates mode="proof_transform" select="."/>
<xsl:for-each select="$InnerTypes">
<m:apply helm:xref="{@id}">
<m:csymbol>proof</m:csymbol>
<xsl:apply-templates mode="proof_transform" select="."/>
- <!-- <xsl:apply-templates mode="try_inductive" select="."/> -->
<xsl:for-each select="$InnerTypes">
<xsl:apply-templates mode="pure" select="key('typeid',$id)/*"/>
</xsl:for-each>
<xsl:variable name="id" select="@id"/>
<xsl:choose>
<!-- ricordarsi di trattare il parametro -->
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/CSetoids/CSetoid_basics/eq_transitive_unfolded.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/CSetoids/eq_transitive_unfolded.con'] and count(child::*) = 7">
<!-- <m:ci>eccomi-3</m:ci> -->
<xsl:apply-templates mode="eq_transitive" select="*[6]"/>
<xsl:apply-templates mode="noannot" select="*[4]"/>
<xsl:variable name="id" select="@id"/>
<xsl:choose>
<!-- ricordarsi di trattare il parametro -->
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/leEq_transitive.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/leEq_transitive.con'] and count(child::*) = 7">
<xsl:apply-templates mode="diseq" select="*[6]">
<xsl:with-param name="rel" select="'leq'"/>
</xsl:apply-templates>
<xsl:with-param name="rel" select="'leq'"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/leEq_wdl.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/leEq_wdl.con'] and count(child::*) = 7">
<m:eq/>
<!-- <m:ci><xsl:value-of select="'eq'"/></m:ci> -->
<xsl:call-template name="generate_side_proof">
<xsl:with-param name="rel" select="'leq'"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/leEq_less_trans.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algerba/COrdFields/leEq_less_trans.con'] and count(child::*) = 7">
<xsl:apply-templates mode="diseq" select="*[6]">
<xsl:with-param name="rel" select="'leq'"/>
</xsl:apply-templates>
<xsl:with-param name="rel" select="'lt'"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/less_leEq_trans.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/less_leEq_trans.con'] and count(child::*) = 7">
<xsl:apply-templates mode="diseq" select="*[6]">
<xsl:with-param name="rel" select="'lt'"/>
</xsl:apply-templates>
<xsl:with-param name="rel" select="'leq'"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/Basic_Properties_of_leEq/leEq_wdr.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/leEq_wdr.con'] and count(child::*) = 7">
<xsl:apply-templates mode="diseq" select="*[6]">
<xsl:with-param name="rel" select="'leq'"/>
</xsl:apply-templates>
<xsl:with-param name="rel" select="'eq'"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/COrdField_axioms/less_transitive_unfolded.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/less_transitive_unfolded.con'] and count(child::*) = 7">
<xsl:apply-templates mode="diseq" select="*[6]">
<xsl:with-param name="rel" select="'lt'"/>
</xsl:apply-templates>
<xsl:with-param name="rel" select="'lt'"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/COrdField_axioms/less_wdr.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/less_wdr.con'] and count(child::*) = 7">
<xsl:apply-templates mode="diseq" select="*[6]">
<xsl:with-param name="rel" select="'lt'"/>
</xsl:apply-templates>
<xsl:with-param name="rel" select="'eq'"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/COrdFields/COrdField_axioms/less_wdl.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/less_wdl.con'] and count(child::*) = 7">
<m:eq/>
<!-- <m:ci><xsl:value-of select="'eq'"/></m:ci> -->
<xsl:call-template name="generate_side_proof">
<!-- Algebra equality (eq_transitive_unfolded) -->
<!-- It requires a special mode "eq_transitive"-->
<!-- togliere il parametro -->
- <xsl:when test="CONST[attribute::uri='cic:/Algebra/CSetoids/CSetoid_basics/eq_transitive_unfolded.con'] and count(child::*) = 7">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/CSetoids/eq_transitive_unfolded.con'] and count(child::*) = 7">
<m:apply>
<m:csymbol>eq_chain</m:csymbol>
<xsl:apply-templates mode="noannot" select="*[3]"/>
<!-- 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">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/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="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">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/leEq_wdl.con'] and count(child::*) = 7">
<m:apply>
<m:csymbol>diseq_chain</m:csymbol>
<xsl:apply-templates mode="noannot" select="*[5]"/>
<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">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/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="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">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/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="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">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/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="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">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/less_transitive_unfolded.con'] and count(child::*) = 7">
<m:apply>
<m:csymbol>diseq_chain</m:csymbol>
<xsl:apply-templates mode="noannot" select="*[3]"/>
</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">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/less_wdr.con'] and count(child::*) = 7">
<m:apply>
<m:csymbol>diseq_chain</m:csymbol>
<xsl:apply-templates mode="noannot" select="*[3]"/>
</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">
+ <xsl:when test="CONST[attribute::uri='cic:/Algebra/algebra/COrdFields/less_wdl.con'] and count(child::*) = 7">
<m:apply>
<m:csymbol>diseq_chain</m:csymbol>
<xsl:apply-templates mode="noannot" select="*[5]"/>
</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/eq_ind.con' or
+ attribute::uri='cic:/Coq/Init/Logic/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: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/eq_ind.con' or
+ attribute::uri='cic:/Coq/Init/Logic/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">
<!-- gestire meglio il caso di and_ind quando la prova
non e' della forma \x.\y.M -->
<xsl:when test="CONST[
- attribute::uri='cic:/Coq/Init/Logic/Conjunction/and_ind.con']
+ attribute::uri='cic:/Coq/Init/Logic/and_ind.con']
and count(child::*) = 6
- and name(*[5])='LAMBDA'
- and name(*[5]/target/*[1])='LAMBDA'">
+ and name(*[5])='LAMBDA'">
<m:apply helm:xref="{@id}">
<m:csymbol>and_ind</m:csymbol>
<xsl:apply-templates mode="noannot" select="*[6]"/>
- <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[5]/target/@binder"/></xsl:with-param></xsl:call-template></m:ci>
- <xsl:apply-templates mode="pure" select="*[5]/source/*"/>
- <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[5]/target/LAMBDA/target/@binder"/></xsl:with-param></xsl:call-template></m:ci>
- <xsl:apply-templates mode="pure" select="*[5]/target/LAMBDA/source/*"/>
- <xsl:apply-templates mode="proof_transform" select="*[5]/target/LAMBDA/target/*"/>
+ <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[5]/*[1]/@binder"/></xsl:with-param></xsl:call-template></m:ci>
+ <xsl:apply-templates mode="pure" select="*[5]/*[1]/*"/>
+ <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[5]/*[2]/@binder"/></xsl:with-param></xsl:call-template></m:ci>
+ <xsl:apply-templates mode="pure" select="*[5]/*[2]/*"/>
+ <xsl:apply-templates mode="proof_transform" select="*[5]/target/*"/>
</m:apply>
</xsl:when>
<xsl:when test="CONST[
- attribute::uri='cic:/Coq/Init/Logic/Disjunction/or_ind.con']
+ attribute::uri='cic:/Coq/Init/Logic/or_ind.con']
and count(child::*) = 7">
<xsl:choose>
<xsl:when test="name(*[5])='LAMBDA'
and name(*[6])='LAMBDA'">
<xsl:variable name="definition_url"
- select="'cic:/Coq/Init/Logic/Disjunction/or.ind'"/>
+ select="'cic:/Coq/Init/Logic/or.ind'"/>
<m:apply helm:xref="{@id}">
<m:csymbol>full_or_ind</m:csymbol>
<xsl:apply-templates mode="noannot" select="*[7]"/>
<m:csymbol>left_case</m:csymbol>
<m:bvar>
<m:ci>
- <xsl:value-of select="*[5]/target/@binder"/>
+ <xsl:value-of select="*[5]/*[1]/@binder"/>
</m:ci>
<m:type>
- <xsl:apply-templates mode="pure" select="*[5]/source/*[1]"/>
+ <xsl:apply-templates mode="pure" select="*[5]/*[1]/*[1]"/>
</m:type>
</m:bvar>
<xsl:apply-templates mode="noannot" select="*[5]/target/*[1]"/>
<m:csymbol>right_case</m:csymbol>
<m:bvar>
<m:ci>
- <xsl:apply-templates mode="pure" select="*[6]/target/@binder"/>
+ <xsl:apply-templates mode="pure" select="*[6]/*[1]/@binder"/>
</m:ci>
<m:type>
- <xsl:apply-templates mode="pure" select="*[6]/source/*[1]"/>
+ <xsl:apply-templates mode="pure" select="*[6]/*[1]/*[1]"/>
</m:type>
</m:bvar>
<xsl:apply-templates mode="noannot" select="*[6]/target/*[1]"/>
</xsl:when>
<!-- ex_ind, exT_ind -->
<xsl:when test="(CONST[attribute::uri='cic:/Coq/Init/Logic_Type/exT_ind.con'] or
- CONST[attribute::uri='cic:/Coq/Init/Logic/First_order_quantifiers/ex_ind.con'])
+ CONST[attribute::uri='cic:/Coq/Init/Logic/ex_ind.con'])
and count(child::*) = 6
and name(*[5])='LAMBDA'
- and name(*[5]/target/*[1])='LAMBDA'">
+ and name(*[5]/*[2])='decl'">
<m:apply helm:xref="{@id}">
<m:csymbol>ex_ind</m:csymbol>
<xsl:apply-templates mode="noannot" select="*[6]"/>
- <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[5]/target/@binder"/></xsl:with-param></xsl:call-template></m:ci>
- <xsl:apply-templates mode="pure" select="*[5]/source/*"/>
- <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[5]/target/LAMBDA/target/@binder"/></xsl:with-param></xsl:call-template></m:ci>
- <xsl:apply-templates mode="pure" select="*[5]/target/LAMBDA/source/*"/>
- <xsl:apply-templates mode="proof_transform" select="*[5]/target/LAMBDA/target/*"/>
+ <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[5]/*[1]/@binder"/></xsl:with-param></xsl:call-template></m:ci>
+ <xsl:apply-templates mode="pure" select="*[5]/*[1]/*"/>
+ <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="*[5]/*[2]/@binder"/></xsl:with-param></xsl:call-template></m:ci>
+ <xsl:apply-templates mode="pure" select="*[5]/*[2]/*"/>
+ <xsl:apply-templates mode="proof_transform" select="*[5]/target/*"/>
</m:apply>
</xsl:when>
<xsl:when test="name(*[1])='CONST'">
<m:ci>
<xsl:call-template name="insert_subscript">
<xsl:with-param name="node_value">
- <xsl:value-of select="*[1]/target/@binder"/>
+ <xsl:value-of select="*[1]/*[1]/@binder"/>
</xsl:with-param>
</xsl:call-template>
</m:ci>