2 <!-- Copyright (C) 2000, HELM Team -->
4 <!-- This file is part of HELM, an Hypertextual, Electronic -->
5 <!-- Library of Mathematics, developed at the Computer Science -->
6 <!-- Department, University of Bologna, Italy. -->
8 <!-- HELM is free software; you can redistribute it and/or -->
9 <!-- modify it under the terms of the GNU General Public License -->
10 <!-- as published by the Free Software Foundation; either version 2 -->
11 <!-- of the License, or (at your option) any later version. -->
13 <!-- HELM is distributed in the hope that it will be useful, -->
14 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
15 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
16 <!-- GNU General Public License for more details. -->
18 <!-- You should have received a copy of the GNU General Public License -->
19 <!-- along with HELM; if not, write to the Free Software -->
20 <!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
21 <!-- MA 02111-1307, USA. -->
23 <!-- For details, see the HELM World-Wide-Web page, -->
24 <!-- http://cs.unibo.it/helm/. -->
26 <!--******************************************************************-->
27 <!-- Lambda Calculus -->
28 <!-- First draft: March 20 2001, Andrea Asperti -->
29 <!--******************************************************************-->
31 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
32 xmlns:m="http://www.w3.org/1998/Math/MathML"
33 xmlns:helm="http://www.cs.unibo.it/helm">
35 <!-- ************************** LAMBDA ****************************** -->
38 <xsl:template match="APPLY[CONST[(attribute::uri='cic:/Rocq/LAMBDA/Terms/subst_rec.con' or attribute::uri='cic:/Rocq/LAMBDA/Substitution/subst_rec_r.con')] and count(child::*) = 4]" mode="pure">
40 <m:csymbol definitionURL="{CONST/@uri}">subst</m:csymbol>
41 <xsl:apply-templates select="*[3]" mode="pure"/>
42 <xsl:apply-templates select="*[2]" mode="pure"/>
43 <xsl:apply-templates select="*[4]" mode="pure"/>
47 <xsl:template match="APPLY[CONST[(attribute::uri='cic:/Rocq/LAMBDA/Terms/subst.con' or attribute::uri='cic:/Rocq/LAMBDA/Substitution/subst_r.con')] and count(child::*) = 3]" mode="pure">
49 <m:csymbol definitionURL="{CONST/@uri}">subst</m:csymbol>
50 <xsl:apply-templates select="*[2]" mode="pure"/>
51 <xsl:apply-templates select="*[3]" mode="pure"/>
57 <xsl:template match="APPLY[CONST[(attribute::uri='cic:/Rocq/LAMBDA/Terms/lift_rec.con' or attribute::uri='cic:/Rocq/LAMBDA/Substitution/lift_rec_r.con')] and count(child::*) = 4]" mode="pure">
59 <m:csymbol definitionURL="{CONST/@uri}">lift_with_base</m:csymbol>
60 <xsl:apply-templates select="*[2]" mode="pure"/>
61 <xsl:apply-templates select="*[3]" mode="pure"/>
62 <xsl:apply-templates select="*[4]" mode="pure"/>
66 <xsl:template match="APPLY[CONST[(attribute::uri='cic:/Rocq/LAMBDA/Terms/lift.con' or attribute::uri='cic:/Rocq/LAMBDA/Substitution/lift_r.con')] and count(child::*) = 3]" mode="pure">
68 <m:csymbol definitionURL="{CONST/@uri}">lift</m:csymbol>
69 <xsl:apply-templates select="*[2]" mode="pure"/>
70 <xsl:apply-templates select="*[3]" mode="pure"/>
75 <xsl:template match="APPLY[MUTIND[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Reduction/red1.ind')] and count(child::*) = 3]" mode="pure">
77 <m:csymbol definitionURL="{MUTIND/@uri}">beta_red1</m:csymbol>
78 <xsl:apply-templates select="*[2]" mode="pure"/>
79 <xsl:apply-templates select="*[3]" mode="pure"/>
83 <xsl:template match="APPLY[MUTIND[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Reduction/red.ind')] and count(child::*) = 3]" mode="pure">
85 <m:csymbol definitionURL="{MUTIND/@uri}">beta_red</m:csymbol>
86 <xsl:apply-templates select="*[2]" mode="pure"/>
87 <xsl:apply-templates select="*[3]" mode="pure"/>
91 <xsl:template match="APPLY[MUTIND[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Reduction/par_red1.ind')] and count(child::*) = 3]" mode="pure">
93 <m:csymbol definitionURL="{MUTIND/@uri}">par_beta_red1</m:csymbol>
94 <xsl:apply-templates select="*[2]" mode="pure"/>
95 <xsl:apply-templates select="*[3]" mode="pure"/>
99 <xsl:template match="APPLY[MUTIND[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Reduction/par_red.ind')] and count(child::*) = 3]" mode="pure">
101 <m:csymbol definitionURL="{MUTIND/@uri}">par_beta_red</m:csymbol>
102 <xsl:apply-templates select="*[2]" mode="pure"/>
103 <xsl:apply-templates select="*[3]" mode="pure"/>
109 <xsl:template match="APPLY[CONST[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Marks/unmark.con')] and count(child::*) = 2]" mode="pure">
111 <m:csymbol definitionURL="{CONST/@uri}">forgetful</m:csymbol>
112 <xsl:apply-templates select="*[2]" mode="pure"/>
116 <!-- boolean algebra of redexes -->
118 <xsl:template match="APPLY[MUTIND[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Redexes/sub.ind')] and count(child::*) = 3]" mode="pure">
120 <m:subset definitionURL="{MUTIND/@uri}"/>
121 <xsl:apply-templates select="*[2]" mode="pure"/>
122 <xsl:apply-templates select="*[3]" mode="pure"/>
126 <xsl:template match="APPLY[MUTIND[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Redexes/union.ind')] and count(child::*) = 4]" mode="pure">
128 <m:eq definitionURL="{MUTIND/@uri}"/>
130 <m:union definitionURL="{MUTIND/@uri}"/>
131 <xsl:apply-templates select="*[2]" mode="pure"/>
132 <xsl:apply-templates select="*[3]" mode="pure"/>
134 <xsl:apply-templates select="*[4]" mode="pure"/>
138 <xsl:template match="APPLY[MUTIND[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Redexes/comp.ind')] and count(child::*) = 3]" mode="pure">
140 <m:csymbol definitionURL="{MUTIND/@uri}">isomorphic</m:csymbol>
141 <xsl:apply-templates select="*[2]" mode="pure"/>
142 <xsl:apply-templates select="*[3]" mode="pure"/>
146 <xsl:template match="APPLY[MUTIND[(position()='1' and attribute::uri='cic:/Rocq/LAMBDA/Residuals/residuals.ind')] and count(child::*) = 4]" mode="pure">
148 <m:eq definitionURL="{MUTIND/@uri}"/>
150 <m:setdiff definitionURL="{MUTIND/@uri}"/>
151 <xsl:apply-templates select="*[2]" mode="pure"/>
152 <xsl:apply-templates select="*[3]" mode="pure"/>
154 <xsl:apply-templates select="*[4]" mode="pure"/>