]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/proofs.xsl
Update to V7 after V6-2 tag creationg
[helm.git] / helm / style / proofs.xsl
index cd7593052fa06ea5eb1a70a397a8d30513720ac5..1d7945dc26208c0d44c01cf991ad84d92a8b1882 100644 (file)
 
 <!-- Proof objects -->
 
-<!-- <xsl:key name="typeid" use="@id" match="TYPE"/> -->
+<!-- <xsl:key name="typeid" use="@of" match="TYPE"/> -->
 
 <xsl:template match="LAMBDA|PROD|CAST|REL|SORT|APPLY|VAR|META|CONST|MUTIND|MUTCONSTRUCT|MUTCASE|FIX|COFIX" mode="noannot">
   <xsl:choose> 
    <xsl:when test="@id">
     <xsl:variable name="id" select="@id"/>
     <xsl:choose>
-     <!-- <xsl:when test="//ALLTYPES and key('typeid',@id)"> -->
-     <xsl:when test="//ALLTYPES/TYPE[@id=$id]">
+     <!-- <xsl:when test="//InnerTypes and key('typeid',@id)"> -->
+     <xsl:when test="//InnerTypes/TYPE[@of=$id]">
      <xsl:choose>
       <xsl:when test="name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic_Type/eqT_ind.con' or
- attribute::uri='cic:/coq/ZARITH/auxiliary/eqT_ind_r.con'] and count(child::*) = 7">
+ attribute::uri='cic:/Coq/Init/Logic_Type/eqT_ind.con' or
+ attribute::uri='cic:/Coq/Zarith/auxiliary/eqT_ind_r.con'] and count(child::*) = 7">
        <m:apply helm:xref="{@id}">
         <m:csymbol>thread</m:csymbol>
-        <xsl:apply-templates mode="pure" select="//ALLTYPES/TYPE[@id=$id]"/>
+        <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]"/>
         <m:apply>
          <m:csymbol>rw_step</m:csymbol>
          <xsl:apply-templates mode="pure" select="*[3]"/>
@@ -47,7 +47,7 @@
       </xsl:when>
       <!-- aggiungere la verifica dell'esistenza dei lambda per and_ind -->
       <xsl:when test="name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic/Conjunction/and_ind.con'] 
+ attribute::uri='cic:/Coq/Init/Logic/Conjunction/and_ind.con'] 
  and count(child::*) = 6">
        <m:apply helm:xref="{@id}">
         <m:csymbol>and_ind</m:csymbol>
        </m:apply>
       </xsl:when>
       <xsl:when test="name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic/Disjunction/or_ind.con'] 
+ attribute::uri='cic:/Coq/Init/Logic/Disjunction/or_ind.con'] 
  and count(child::*) = 7">
        <m:apply helm:xref="{@id}">
         <m:csymbol>or_ind</m:csymbol>
         <xsl:apply-templates mode="noannot" select="*[7]"/>
-        <xsl:apply-templates mode="pure" select="//ALLTYPES/TYPE[@id=$id]"/>
+        <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]"/>
         <xsl:apply-templates mode="pure" select="*[5]"/>
         <xsl:apply-templates mode="pure" select="*[6]"/>
        </m:apply>
       </xsl:when>
-      <xsl:when test="count(*[@id = //ALLTYPES/TYPE/@id]) = 1">
+      <xsl:when test="count(*[@id = //InnerTypes/TYPE/@of]) = 1">
        <m:apply helm:xref="{@id}">
         <m:csymbol>thread</m:csymbol>
-        <xsl:apply-templates mode="pure" select="//ALLTYPES/TYPE[@id=$id]"/>
+        <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]"/>
         <m:apply>
          <m:csymbol>app</m:csymbol>
          <xsl:apply-templates mode="copy-of-no-prop" select="*[1]"/>
         </m:apply>
-        <xsl:apply-templates mode="thread" select="*[@id = //ALLTYPES/TYPE/@id]"/>
+        <xsl:apply-templates mode="thread" select="*[@id = //InnerTypes/TYPE/@of]"/>
        </m:apply>
       </xsl:when>
       <xsl:otherwise>
@@ -86,7 +86,7 @@
         <m:csymbol>proof</m:csymbol>
         <xsl:apply-templates select="." mode="pure"/>
         <!-- <xsl:apply-templates select="key('typeid',@id)" mode="pure"/> -->
-        <xsl:apply-templates select="//ALLTYPES/TYPE[@id=$id]" mode="pure"/>
+        <xsl:apply-templates select="//InnerTypes/TYPE[@of=$id]" mode="pure"/>
        </m:apply>
       </xsl:otherwise>
      </xsl:choose>
 
 <xsl:template match="*" mode="copy-of-no-prop">
  <xsl:choose>
-  <xsl:when test="@id = //ALLTYPES/TYPE/@id">
+  <xsl:when test="@id = //InnerTypes/TYPE/@of">
    <m:ci>previous</m:ci>
   </xsl:when>
   <xsl:otherwise>
 <xsl:template match="*" mode="thread">
   <xsl:choose>
    <xsl:when test="name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic_Type/eqT_ind.con' or
- attribute::uri='cic:/coq/ZARITH/auxiliary/eqT_ind_r.con'] and count(child::*) = 7">
+ attribute::uri='cic:/Coq/Init/Logic_Type/eqT_ind.con' or
+ attribute::uri='cic:/Coq/Zarith/auxiliary/eqT_ind_r.con'] and count(child::*) = 7">
     <xsl:variable name="id" select="@id"/>
-     <xsl:apply-templates mode="pure" select="//ALLTYPES/TYPE[@id=$id]"/>
+     <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]"/>
      <m:apply>
       <m:csymbol>rw_step</m:csymbol>
       <xsl:apply-templates mode="pure" select="*[3]"/>
    </xsl:when>
 <!--**** Patch temporanea, per il problema dei threads ***-->
 <xsl:when test="(name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic/Conjunction/and_ind.con'] 
+ attribute::uri='cic:/Coq/Init/Logic/Conjunction/and_ind.con'] 
  and count(child::*) = 6) or
 (name()= 'APPLY' and CONST[
- attribute::uri='cic:/coq/INIT/Logic/Disjunction/or_ind.con'] 
+ attribute::uri='cic:/Coq/Init/Logic/Disjunction/or_ind.con'] 
  and count(child::*) = 7)">
  <xsl:apply-templates mode="noannot" select="."/>
 </xsl:when>
 <!--**** Fine Patch temporanea, per il problema dei threads ***-->
-   <xsl:when test="count(*[@id = //ALLTYPES/TYPE/@id]) = 1">
+   <xsl:when test="count(*[@id = //InnerTypes/TYPE/@of]) = 1">
        <xsl:variable name="id" select="@id"/>
        <m:apply helm:xref="{@id}">
         <m:csymbol>thread</m:csymbol>
-        <xsl:apply-templates mode="pure" select="//ALLTYPES/TYPE[@id=$id]"/>
+        <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]"/>
         <m:apply>
          <m:csymbol>app</m:csymbol>
          <xsl:apply-templates mode="copy-of-no-prop" select="*[1]"/>
         </m:apply>
-        <xsl:apply-templates mode="thread" select="*[@id = //ALLTYPES/TYPE/@id]"/>
+        <xsl:apply-templates mode="thread" select="*[@id = //InnerTypes/TYPE/@of]"/>
        </m:apply>
    </xsl:when>
    <xsl:otherwise>
 
 <!-- non del tutto soddisfacente, ma .... -->
 <xsl:template match="APPLY[CONST[
- attribute::uri='cic:/coq/INIT/Logic_Type/eqT_ind.con' or
- attribute::uri='cic:/coq/ZARITH/auxiliary/eqT_ind_r.con']]" mode="appflat">
+ attribute::uri='cic:/Coq/Init/Logic_Type/eqT_ind.con' or
+ attribute::uri='cic:/Coq/Zarith/auxiliary/eqT_ind_r.con']]" mode="appflat">
     <xsl:choose>
      <xsl:when test="count(child::*) > 7">
       <xsl:variable name="id" select="@id"/>
       <xsl:variable name="ideqp" select="*[7]/@id"/>
       <xsl:variable name="idsubp" select="*[5]/@id"/>
-      <xsl:variable name="leteqp" select="boolean(//ALLTYPES/TYPE[@id=$ideqp])"/>
-      <xsl:variable name="letsubp" select="boolean(//ALLTYPES/TYPE[@id=$idsubp])"/>
+      <xsl:variable name="leteqp" select="boolean(//InnerTypes/TYPE[@of=$ideqp])"/>
+      <xsl:variable name="letsubp" select="boolean(//InnerTypes/TYPE[@of=$idsubp])"/>
       <m:apply helm:xref="{@id}">
        <m:csymbol>rewrite_and_apply</m:csymbol>
        <m:apply>
 </xsl:template> 
 
 <xsl:template match="APPLY[CONST[
- attribute::uri='cic:/coq/INIT/Logic/Conjunction/and_ind.con']]" mode="appflat">
+ attribute::uri='cic:/Coq/Init/Logic/Conjunction/and_ind.con']]" mode="appflat">
     <xsl:choose>
      <xsl:when test="count(child::*) > 4">
       <m:apply helm:xref="{@id}">