3 <!-- Copyright (C) 2000, HELM Team -->
5 <!-- This file is part of HELM, an Hypertextual, Electronic -->
6 <!-- Library of Mathematics, developed at the Computer Science -->
7 <!-- Department, University of Bologna, Italy. -->
9 <!-- HELM is free software; you can redistribute it and/or -->
10 <!-- modify it under the terms of the GNU General Public License -->
11 <!-- as published by the Free Software Foundation; either version 2 -->
12 <!-- of the License, or (at your option) any later version. -->
14 <!-- HELM is distributed in the hope that it will be useful, -->
15 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
16 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
17 <!-- GNU General Public License for more details. -->
19 <!-- You should have received a copy of the GNU General Public License -->
20 <!-- along with HELM; if not, write to the Free Software -->
21 <!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
22 <!-- MA 02111-1307, USA. -->
24 <!-- For details, see the HELM World-Wide-Web page, -->
25 <!-- http://cs.unibo.it/helm/. -->
27 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
28 xmlns:m="http://www.w3.org/1998/Math/MathML">
30 <!--***********************************************************************-->
31 <!-- From MathML content to HTML -->
32 <!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena, Guidi -->
33 <!--***********************************************************************-->
35 <xsl:param name="CICURI" select="''"/>
36 <xsl:param name="type" select="'standalone'"/>
38 <xsl:include href="html_init.xsl"/>
39 <xsl:include href="html_set.xsl"/>
40 <xsl:include href="html_reals.xsl"/>
42 <xsl:variable name="showcast" select="0"/>
44 <!--***********************************************************************-->
45 <!-- HTML Head and Body -->
46 <!--***********************************************************************-->
48 <!-- <xsl:output method="html" encoding="iso-8859-1"/> -->
50 <!-- document needs method="xml" and searches locally for the dtd if -->
51 <!-- doctype-system is specified (the dtd must exist locally for parsing). -->
52 <!-- For having output html must be media-type="html" and for having the -->
53 <!-- correct <br /> you must specify at least the remote dtd by means of -->
54 <!-- doctype-public -->
58 media-type="text/html"
59 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
61 <xsl:variable name="framewidth" select="45"/>
63 <xsl:template match="/">
64 <xsl:param name="current_indent" select="0"/>
66 <xsl:when test="$type = 'standalone'">
69 <title> <xsl:value-of select="$CICURI"/> </title> <!-- FG -->
70 <style> A { text-decoration: none } </style>
72 <body bgcolor="white">
74 <xsl:with-param name="current_indent" select="0"/>
75 </xsl:apply-templates>
82 <xsl:with-param name="current_indent" select="0"/>
83 </xsl:apply-templates>
89 <!--***********************************************************************-->
91 <!--***********************************************************************-->
93 <xsl:template name="make_indent">
94 <xsl:param name="current_indent" select="0"/>
95 <xsl:if test="$current_indent > 0">
96 <xsl:text> </xsl:text>
97 <xsl:call-template name="make_indent">
98 <xsl:with-param name="current_indent" select="$current_indent - 1"/>
103 <!-- Syntactic Sugar -->
104 <xsl:template match="m:type">
105 <xsl:param name="current_indent" select="0"/>
106 <xsl:apply-templates>
107 <xsl:with-param name="current_indent"
108 select="$current_indent"/>
109 </xsl:apply-templates>
112 <xsl:template match="m:condition">
113 <xsl:param name="current_indent" select="0"/>
114 <xsl:apply-templates>
115 <xsl:with-param name="current_indent"
116 select="$current_indent"/>
117 </xsl:apply-templates>
120 <xsl:template match="m:math">
121 <xsl:param name="current_indent" select="0"/>
122 <xsl:apply-templates>
123 <xsl:with-param name="current_indent"
124 select="$current_indent"/>
125 </xsl:apply-templates>
128 <!--*********************************************************************-->
130 <!--*********************************************************************-->
133 <xsl:template mode="inline" match="m:ci">
135 <xsl:when test="boolean(@definitionURL)">
136 <a href="{@definitionURL}">
137 <xsl:apply-templates/>
141 <xsl:value-of select="."/>
148 <xsl:template match="m:apply[m:csymbol]" mode="inline">
149 <xsl:variable name="name">
150 <xsl:value-of select="m:csymbol"/>
154 <xsl:when test="$name='forall'">
155 <FONT FACE="Symbol" SIZE="+2" color="blue">"</FONT>
156 <xsl:apply-templates select="m:bvar/m:ci"/>
157 <xsl:text>:</xsl:text>
158 <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
159 <xsl:text>.</xsl:text>
160 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
162 <xsl:when test="$name='prod'">
163 <FONT FACE="Symbol" SIZE="+2" color="blue">Õ</FONT>
164 <xsl:apply-templates mode="inline" select="m:bvar/m:ci"/>
165 <xsl:text>:</xsl:text>
166 <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
167 <xsl:text>.</xsl:text>
168 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
171 <xsl:when test="$name='arrow'">
172 <xsl:text>(</xsl:text>
173 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
174 <FONT color="blue" SIZE="+0" FACE="symbol">
175 <xsl:text>®</xsl:text>
177 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
178 <xsl:text>)</xsl:text>
181 <xsl:when test="$name='app'">
182 <xsl:text>(</xsl:text>
183 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
184 <xsl:for-each select="*[position()>2]">
185 <xsl:text> </xsl:text>
186 <xsl:apply-templates mode="inline" select="."/>
188 <xsl:text>)</xsl:text>
191 <xsl:when test="$name='cast'">
192 <xsl:text>(</xsl:text>
193 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
194 <xsl:text>:></xsl:text>
195 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
196 <xsl:text>)</xsl:text>
198 <xsl:when test="$name='Prop'">
199 <FONT color="violet">Prop</FONT>
201 <xsl:when test="$name='Set'">
202 <FONT color="violet">Set</FONT>
204 <xsl:when test="$name='Type'">
205 <FONT color="violet">Type</FONT>
208 <xsl:when test="$name='mutcase'">
209 <xsl:text><</xsl:text>
210 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
211 <xsl:text>> </xsl:text>
212 <FONT color="red">CASE </FONT>
213 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
214 <FONT color="red"> OF </FONT>
215 <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
217 <xsl:when test="not(position() = 1)">
218 <xsl:text> | </xsl:text>
221 <xsl:apply-templates mode="inline" select="."/>
222 <FONT FACE="Symbol" SIZE="+0" mathcolor="green">Þ</FONT>
223 <xsl:apply-templates mode="inline"
224 select="following-sibling::*[position()= 1]"/>
228 <xsl:when test="$name='fix'">
229 <FONT color="red">FIX</FONT>
230 <xsl:value-of select="m:ci"/>
231 <xsl:text>{</xsl:text>
232 <xsl:for-each select="m:bvar">
233 <xsl:value-of select="m:ci"/>
234 <xsl:text>:</xsl:text>
235 <xsl:apply-templates mode="inline" select="m:type"/>
236 <xsl:text>:=</xsl:text>
237 <xsl:apply-templates mode="inline"
238 select="following-sibling::*[position() = 1]"/>
240 <xsl:when test="position()=last()">
241 <xsl:text>}</xsl:text>
244 <xsl:text>;</xsl:text>
250 <xsl:when test="$name='cofix'">
251 <xsl:text>COFIX</xsl:text>
252 <xsl:value-of select="m:ci"/>
253 <xsl:text>{</xsl:text>
254 <xsl:for-each select="m:bvar">
255 <xsl:value-of select="m:ci"/>
256 <xsl:text>:</xsl:text>
257 <xsl:apply-templates mode="inline" select="m:type"/>
258 <xsl:text>:=</xsl:text>
259 <xsl:apply-templates mode="inline"
260 select="following-sibling::*[position() = 1]"/>
262 <xsl:when test="position()=last()">
263 <xsl:text>}</xsl:text>
266 <xsl:text>;</xsl:text>
272 <xsl:when test="$name='proof'">
273 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
274 <FONT color="red"> proves </FONT>
275 <xsl:apply-templates mode="inline" select="*[position()=3]"/>
278 <xsl:when test="$name='false_ind'">
279 <xsl:apply-templates mode="inline" select="*[3]"/>
280 <FONT color="red">Contradiction.</FONT>
283 <xsl:when test="$name='and_ind'">
284 <FONT color="red">From </FONT>
285 <xsl:apply-templates select="*[2]"/>
286 <FONT color="red"> we get</FONT>
288 <xsl:apply-templates select="*[3]"/>
290 <xsl:apply-templates mode="inline" select="*[4]"/>
291 <FONT color="red"> and </FONT>
293 <xsl:apply-templates select="*[5]"/>
295 <xsl:apply-templates mode="inline" select="*[6]"/>
297 <FONT color="red"> hence </FONT>
298 <xsl:apply-templates mode="inline" select="*[7]"/>
301 <xsl:when test="$name='subst'">
302 <xsl:apply-templates select="*[3]" mode="inline"/>
303 <xsl:text>[</xsl:text>
304 <xsl:apply-templates select="*[4]" mode="inline"/>
305 <a href="{*[1]/@definitionURL}">
306 <FONT color="green" FACE="symbol">
307 <xsl:text>¬</xsl:text>
310 <xsl:apply-templates select="*[2]" mode="inline"/>
311 <xsl:text>]</xsl:text>
314 <xsl:when test="$name='lift_with_base'">
316 <xsl:apply-templates select="*[3]" mode="inline"/>
318 <a href="{*[1]/@definitionURL}">
319 <FONT color="green" FACE="symbol">
320 <xsl:text>­</xsl:text>
324 <xsl:apply-templates select="*[4]" mode="inline"/>
326 <xsl:text>(</xsl:text>
327 <xsl:apply-templates select="*[2]" mode="inline"/>
328 <xsl:text>)</xsl:text>
331 <xsl:when test="$name='lift'">
332 <a href="{*[1]/@definitionURL}">
333 <FONT color="green" FACE="symbol">
334 <xsl:text>­</xsl:text>
338 <xsl:apply-templates select="*[2]" mode="inline"/>
340 <xsl:text>(</xsl:text>
341 <xsl:apply-templates select="*[3]" mode="inline"/>
342 <xsl:text>)</xsl:text>
346 <xsl:when test="$name='beta_red1'">
347 <xsl:apply-templates select="*[2]" mode="inline"/>
348 <a href="{*[1]/@definitionURL}">
349 <FONT color="green" FACE="symbol">
350 <xsl:text>®</xsl:text>
353 <FONT color="green" FACE="symbol">
354 <xsl:text>b</xsl:text>
358 <xsl:apply-templates select="*[3]" mode="inline"/>
361 <xsl:when test="$name='beta_red'">
362 <xsl:apply-templates select="*[2]" mode="inline"/>
363 <a href="{*[1]/@definitionURL}">
364 <FONT color="green" FACE="symbol">
365 <xsl:text>®</xsl:text>
368 <FONT color="green" FACE="symbol">
369 <xsl:text>b*</xsl:text>
373 <xsl:apply-templates select="*[3]" mode="inline"/>
376 <xsl:when test="$name='par_beta_red1'">
377 <xsl:apply-templates select="*[2]" mode="inline"/>
378 <a href="{*[1]/@definitionURL}">
379 <FONT color="green" FACE="symbol">
380 <xsl:text>Þ</xsl:text>
383 <FONT color="green" FACE="symbol">
384 <xsl:text>b</xsl:text>
388 <xsl:apply-templates select="*[3]" mode="inline"/>
391 <xsl:when test="$name='par_beta_red'">
392 <xsl:apply-templates select="*[2]" mode="inline"/>
393 <a href="{*[1]/@definitionURL}">
394 <FONT color="green" FACE="symbol">
395 <xsl:text>Þ</xsl:text>
398 <FONT color="green" FACE="symbol">
399 <xsl:text>b*</xsl:text>
403 <xsl:apply-templates select="*[3]" mode="inline"/>
407 <xsl:when test="$name='forgetful'">
408 <a href="{*[1]/@definitionURL}">|</a>
409 <xsl:apply-templates select="*[2]" mode="inline"/>
410 <a href="{*[1]/@definitionURL}">|</a>
413 <!-- boolean algebra of redexes -->
416 <xsl:when test="$name='isomorphic'">
417 <xsl:apply-templates select="*[2]" mode="inline"/>
418 <a href="{*[1]/@definitionURL}">
419 <FONT color="green" FACE="symbol">
420 <xsl:text>@</xsl:text>
423 <xsl:apply-templates select="*[3]" mode="inline"/>
427 <xsl:when test="$name='interp'">
428 <font color="green">[</font>
429 <xsl:apply-templates select="*[2]"/>
430 <font color="green">]</font>
436 <xsl:template mode="inline" match="m:lambda">
437 <FONT SIZE="+2" color="red" FACE="symbol">l</FONT>
438 <xsl:apply-templates select="m:bvar/m:ci"/>
439 <xsl:text>:</xsl:text>
440 <xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
441 <xsl:text>.</xsl:text>
442 <xsl:apply-templates mode="inline" select="*[position()=2]"/>
445 <!--*********************************************************************-->
446 <!-- COUNTING MODE -->
447 <!--*********************************************************************-->
449 <xsl:template match="m:apply[m:csymbol]">
450 <xsl:param name="current_indent" select="0"/>
451 <xsl:param name="width" select="$framewidth"/>
452 <xsl:variable name="name">
453 <xsl:value-of select="m:csymbol"/>
455 <xsl:variable name="charlength">
456 <xsl:apply-templates select="m:csymbol" mode="charcount"/>
458 <!-- <xsl:value-of select="$current_indent"/> -->
459 <!-- <xsl:value-of select="$charlength"/> -->
462 <xsl:when test="$name='forall'">
464 <xsl:when test="$charlength > $framewidth">
466 <FONT FACE="Symbol" SIZE="+2" color="blue">"</FONT>
467 <xsl:apply-templates select="m:bvar/m:ci"/>
468 <xsl:text>:</xsl:text>
469 <xsl:apply-templates select="m:bvar/m:type">
470 <xsl:with-param name="current_indent"
471 select="$current_indent + 5 + 2*string-length(m:bvar/m:ci)"/>
472 </xsl:apply-templates>
474 <xsl:call-template name="make_indent">
475 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
477 <xsl:text>.</xsl:text>
478 <xsl:apply-templates select="*[position()=3]">
479 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
480 </xsl:apply-templates>
483 <xsl:apply-templates mode="inline" select="."/>
488 <xsl:when test="$name='prod'">
490 <xsl:when test="$charlength > $framewidth">
491 <FONT FACE="Symbol" SIZE="+2" color="blue">Õ</FONT>
492 <xsl:apply-templates select="m:bvar/m:ci"/>
493 <xsl:text>:</xsl:text>
494 <xsl:apply-templates select="m:bvar/m:type">
495 <xsl:with-param name="current_indent"
496 select="$current_indent + 5 + 2*string-length(m:bvar/m:ci)"/>
497 </xsl:apply-templates><br/>
498 <xsl:call-template name="make_indent">
499 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
501 <xsl:text>.</xsl:text>
502 <xsl:apply-templates select="*[position()=3]">
503 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
504 </xsl:apply-templates>
507 <xsl:apply-templates mode="inline" select="."/>
512 <xsl:when test="$name='arrow'">
514 <xsl:when test="$charlength > $framewidth">
515 <xsl:text>(</xsl:text>
516 <xsl:apply-templates select="*[position()=2]">
517 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
518 </xsl:apply-templates>
520 <xsl:call-template name="make_indent">
521 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
524 <FONT color="blue" SIZE="+0" FACE="symbol">
525 <xsl:text>®</xsl:text>
527 <xsl:apply-templates select="*[position()=3]">
528 <xsl:with-param name="current_indent" select="$current_indent + 5"/>
529 </xsl:apply-templates>
530 <xsl:text>)</xsl:text>
533 <xsl:apply-templates mode="inline" select="."/>
538 <xsl:when test="$name='app'">
540 <xsl:when test="$charlength > $framewidth">
541 <xsl:text>(</xsl:text>
542 <xsl:apply-templates select="*[position()=2]">
543 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
544 </xsl:apply-templates>
545 <xsl:for-each select="*[position()>2]">
547 <xsl:call-template name="make_indent">
548 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
550 <xsl:apply-templates select=".">
551 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
552 </xsl:apply-templates>
554 <xsl:text>)</xsl:text>
557 <xsl:apply-templates mode="inline" select="."/>
561 <xsl:when test="$name='cast'">
563 <xsl:when test="$showcast = 1">
565 <xsl:when test="$charlength > $framewidth">
566 <xsl:text>(</xsl:text>
567 <xsl:apply-templates select="*[position()=2]">
568 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
569 </xsl:apply-templates><br/>
570 <xsl:call-template name="make_indent">
571 <xsl:with-param name="current_indent" select="$current_indent + 2"/> </xsl:call-template>
572 <xsl:text>:></xsl:text>
573 <xsl:apply-templates select="*[position()=3]">
574 <xsl:with-param name="current_indent" select="$current_indent + 3"/>
575 </xsl:apply-templates>
576 <xsl:text>)</xsl:text>
579 <xsl:apply-templates mode="inline" select="."/>
584 <xsl:apply-templates select="*[position()=2]">
585 <xsl:with-param name="current_indent" select="$current_indent"/>
586 </xsl:apply-templates>
590 <xsl:when test="$name='Prop'">
591 <xsl:text>Prop</xsl:text>
593 <xsl:when test="$name='Set'">
594 <xsl:text>Set</xsl:text>
596 <xsl:when test="$name='Type'">
597 <xsl:text>Type</xsl:text>
599 <xsl:when test="$name='mutcase'">
601 <xsl:when test="$charlength > $framewidth">
602 <xsl:text><</xsl:text>
603 <xsl:apply-templates select="*[position()=2]">
604 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
605 </xsl:apply-templates>
606 <xsl:text>> </xsl:text>
608 <xsl:call-template name="make_indent">
609 <xsl:with-param name="current_indent" select="$current_indent + 2"/> </xsl:call-template>
610 <xsl:text>CASE </xsl:text>
611 <xsl:apply-templates select="*[position()=3]">
612 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
613 </xsl:apply-templates>
614 <xsl:text> OF </xsl:text>
615 <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
617 <xsl:call-template name="make_indent">
618 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
621 <xsl:when test="position() = 1">
622 <xsl:text>  </xsl:text>
625 <xsl:text>| </xsl:text>
628 <xsl:apply-templates select="."/>
629 <FONT FACE="Symbol" SIZE="+0" mathcolor="green">Þ</FONT>
630 <xsl:variable name="body_size">
632 select="following-sibling::*[1]/*[1]" mode="charcount"/>
635 <xsl:when test="$body_size > $framewidth">
637 <xsl:call-template name="make_indent">
638 <xsl:with-param name="current_indent"
639 select="$current_indent + 8"/>
642 select="following-sibling::*[position()= 1]">
643 <xsl:with-param name="current_indent"
644 select="$current_indent + 8"/>
645 </xsl:apply-templates>
648 <xsl:apply-templates select="following-sibling::*[position()= 1]"
655 <xsl:apply-templates mode="inline" select="."/>
660 <xsl:when test="$name='fix'">
662 <xsl:when test="$charlength > $framewidth">
663 <xsl:text>FIX</xsl:text>
664 <xsl:value-of select="m:ci"/>
665 <xsl:text>{</xsl:text>
666 <xsl:for-each select="m:bvar">
668 <xsl:call-template name="make_indent">
669 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
671 <xsl:value-of select="m:ci"/>
672 <xsl:text>:</xsl:text>
673 <xsl:apply-templates select="m:type">
674 <xsl:with-param name="current_indent"
675 select="$current_indent + 5 + string-length(m:ci)"/>
676 </xsl:apply-templates>
678 <xsl:call-template name="make_indent">
679 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
681 <xsl:text>:=</xsl:text>
682 <xsl:apply-templates select="following-sibling::*[position() = 1]">
683 <xsl:with-param name="current_indent" select="$current_indent +2"/>
684 </xsl:apply-templates>
687 <xsl:call-template name="make_indent">
688 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
690 <xsl:text>}</xsl:text>
693 <xsl:apply-templates mode="inline" select="."/>
698 <xsl:when test="$name='cofix'">
700 <xsl:when test="($charlength + 10) > $framewidth">
701 <xsl:text>COFIX</xsl:text>
702 <xsl:value-of select="m:ci"/>
703 <xsl:text>{</xsl:text>
705 <xsl:call-template name="make_indent">
706 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
708 <xsl:for-each select="m:bvar">
709 <xsl:value-of select="m:ci"/>
710 <xsl:text>:</xsl:text>
711 <xsl:apply-templates select="m:type">
712 <xsl:with-param name="current_indent"
713 select="$current_indent + 5 + string-length(m:ci)"/>
714 </xsl:apply-templates>
716 <xsl:call-template name="make_indent">
717 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
719 <xsl:text>:=</xsl:text>
720 <xsl:apply-templates select="following-sibling::*[position() = 1]">
721 <xsl:with-param name="current_indent" select="$current_indent + 3"/>
722 </xsl:apply-templates>
726 <xsl:call-template name="make_indent">
727 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
729 <xsl:text>}</xsl:text>
732 <xsl:apply-templates mode="inline" select="m:type"/>
736 <xsl:when test="$name='let_in'">
737 <xsl:text>let </xsl:text>
738 <xsl:apply-templates select="m:bvar/m:ci"/>
739 <xsl:text> := </xsl:text>
740 <xsl:apply-templates select="*[3]">
741 <xsl:with-param name="current_indent" select="$current_indent+14"/>
742 </xsl:apply-templates>
744 <xsl:call-template name="make_indent">
745 <xsl:with-param name="current_indent" select="$current_indent"/>
747 <xsl:text>in </xsl:text>
748 <xsl:apply-templates select="*[4]">
749 <xsl:with-param name="current_indent" select="$current_indent+5"/>
750 </xsl:apply-templates>
753 <!-- ***************************************** -->
754 <!-- *********** PROOF ELEMENTS ************** -->
755 <!-- ***************************************** -->
757 <xsl:when test="$name='proof'">
758 <xsl:apply-templates select="*[position()=2]">
759 <xsl:with-param name="current_indent" select="$current_indent"/>
760 </xsl:apply-templates>
762 <!-- <xsl:element name="br"/> -->
763 <xsl:call-template name="make_indent">
764 <xsl:with-param name="current_indent" select="$current_indent"/>
766 <FONT color="red">we proved </FONT>
767 <xsl:apply-templates select="*[position()=3]">
768 <xsl:with-param name="current_indent" select="$current_indent + 16"/>
769 </xsl:apply-templates>
772 <xsl:when test="$name='letin1'">
773 <xsl:apply-templates select="*[position()=2]">
774 <xsl:with-param name="current_indent" select="$current_indent"/>
775 </xsl:apply-templates>
777 <xsl:call-template name="make_indent">
778 <xsl:with-param name="current_indent" select="$current_indent"/>
780 <xsl:apply-templates select="*[position()=3]">
781 <xsl:with-param name="current_indent" select="$current_indent"/>
782 </xsl:apply-templates>
785 <xsl:when test="$name='letin'">
786 <xsl:for-each select="*[position()>1 and last()>position()]">
787 <xsl:apply-templates select=".">
788 <xsl:with-param name="current_indent" select="$current_indent"/>
789 </xsl:apply-templates>
791 <xsl:call-template name="make_indent">
792 <xsl:with-param name="current_indent" select="$current_indent"/>
795 <xsl:apply-templates select="*[position()=last()]">
796 <xsl:with-param name="current_indent" select="$current_indent"/>
797 </xsl:apply-templates>
800 <xsl:when test="$name='let'">
802 <xsl:apply-templates select="m:ci"/>
804 <xsl:apply-templates select="*[3]">
805 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
806 </xsl:apply-templates>
809 <xsl:when test="$name='rw_step'">
811 <xsl:when test="name(*[2])='m:apply'">
812 <xsl:apply-templates select="*[2]">
813 <xsl:with-param name="current_indent" select="$current_indent"/>
814 </xsl:apply-templates>
817 <FONT color="red">Consider </FONT>
818 <xsl:apply-templates select="*[2]"/>
821 <xsl:variable name="charlength_first">
822 <xsl:apply-templates select="*[3]/*[1]" mode="charcount"/>
824 <xsl:variable name="charlength_second">
825 <xsl:apply-templates select="*[4]/*[1]" mode="charcount"/>
827 <xsl:variable name="charlength_side_proof">
828 <xsl:apply-templates select="*[5]/*[1]" mode="charcount"/>
830 <xsl:variable name="split1"
831 select="$charlength_first + $charlength_second > $framewidth"/>
832 <xsl:variable name="split2"
833 select="$charlength_second + $charlength_side_proof > $framewidth"/>
834 <!-- <xsl:value-of select="$current_indent"/> -->
835 <!-- <xsl:value-of select="$charlength"/> -->
837 <xsl:call-template name="make_indent">
838 <xsl:with-param name="current_indent" select="$current_indent"/>
840 <FONT color="red">Rewrite </FONT>
841 <xsl:apply-templates mode="inline" select="*[3]"/>
842 <xsl:text> </xsl:text>
843 <xsl:if test="$split1">
845 <xsl:call-template name="make_indent">
846 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
849 <FONT color="red">with </FONT>
850 <xsl:apply-templates mode="inline" select="*[4]"/>
851 <xsl:text> </xsl:text>
852 <xsl:if test="$split2">
854 <xsl:call-template name="make_indent">
855 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
858 <FONT color="red">by </FONT>
859 <xsl:apply-templates select="*[5]">
860 <xsl:with-param name="current_indent" select="$current_indent+7"/>
861 </xsl:apply-templates>
863 <!-- rewrite and apply -->
864 <xsl:when test="$name='rewrite_and_apply'">
865 <xsl:apply-templates select="*[2]">
866 <xsl:with-param name="current_indent" select="$current_indent"/>
867 </xsl:apply-templates>
869 <xsl:call-template name="make_indent">
870 <xsl:with-param name="current_indent" select="$current_indent"/>
872 <FONT color="red">Then apply it to </FONT>
873 <xsl:apply-templates select="*[position()>2]"/>
875 <!-- by_induction -->
876 <xsl:when test="$name='by_induction'">
877 <FONT color="red">We prove </FONT>
878 <xsl:apply-templates select="../*[3]">
879 <xsl:with-param name="current_indent" select="$current_indent+18"/>
880 </xsl:apply-templates>
882 <xsl:call-template name="make_indent">
883 <xsl:with-param name="current_indent" select="$current_indent"/>
885 <FONT color="red">by induction on </FONT>
886 <xsl:apply-templates select="*[position()=last()]/*[position()=last()]">
887 <xsl:with-param name="current_indent" select="$current_indent+30"/>
888 </xsl:apply-templates>
891 <xsl:call-template name="make_indent">
892 <xsl:with-param name="current_indent" select="$current_indent"/>
894 <xsl:text>The induction property is</xsl:text>
896 <xsl:call-template name="make_indent">
897 <xsl:with-param name="current_indent" select="$current_indent"/>
899 <xsl:apply-templates select="*[3]">
900 <xsl:with-param name="current_indent" select="$current_indent"/>
901 </xsl:apply-templates>
904 select="*[position()>3 and not(position()=last())]">
905 <xsl:with-param name="current_indent" select="$current_indent+4"/>
906 </xsl:apply-templates>
908 <xsl:call-template name="make_indent">
909 <xsl:with-param name="current_indent" select="$current_indent"/>
911 <xsl:text>End induction</xsl:text> -->
913 <!-- inductive_case -->
914 <xsl:when test="$name='inductive_case'">
916 <xsl:call-template name="make_indent">
917 <xsl:with-param name="current_indent" select="$current_indent"/>
919 <FONT color="red">Case </FONT>
920 <xsl:apply-templates select="*[2]">
921 <xsl:with-param name="current_indent" select="$current_indent +10"/>
922 </xsl:apply-templates>
923 <xsl:if test="*[3]/*[position()>1]">
925 <xsl:call-template name="make_indent">
926 <xsl:with-param name="current_indent" select="$current_indent+4"/>
928 <FONT color="red">By induction hypothesis, we have:</FONT>
929 <xsl:for-each select="*[3]/*[position()>1]">
931 <xsl:call-template name="make_indent">
932 <xsl:with-param name="current_indent" select="$current_indent + 4"/>
934 <xsl:text>(</xsl:text>
935 <xsl:apply-templates select="m:ci"/>
936 <xsl:text>) </xsl:text>
937 <xsl:apply-templates select="m:type">
938 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
939 </xsl:apply-templates>
943 <xsl:call-template name="make_indent">
944 <xsl:with-param name="current_indent" select="$current_indent + 4"/>
946 <xsl:apply-templates select="*[4]">
947 <xsl:with-param name="current_indent" select="$current_indent +4"/>
948 </xsl:apply-templates>
950 <xsl:call-template name="make_indent">
951 <xsl:with-param name="current_indent" select="$current_indent"/>
953 <xsl:text>End Case</xsl:text> -->
956 <xsl:when test="$name='case_lhs'">
958 <xsl:when test="count(*)=2">
959 <xsl:apply-templates mode="inline" select="*[2]"/>
962 <xsl:text>(</xsl:text>
963 <xsl:apply-templates mode="inline" select="*[2]"/>
964 <xsl:for-each select="m:bvar">
965 <xsl:text> </xsl:text>
966 <xsl:apply-templates mode="inline" select="*[1]"/>
967 <xsl:text>:</xsl:text>
968 <xsl:apply-templates mode="inline" select="m:type/*[1]"/>
970 <xsl:text>)</xsl:text>
975 <xsl:when test="$name='nat_ind_complete'">
976 <FONT color="red">By induction on </FONT>
977 <xsl:apply-templates select="*[2]"/>:
979 <xsl:call-template name="make_indent">
980 <xsl:with-param name="current_indent" select="$current_indent"/>
982 <xsl:text>0 </xsl:text>
983 <FONT FACE="Symbol" mathcolor="green">Þ</FONT>
984 <xsl:apply-templates select="*[3]">
985 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
986 </xsl:apply-templates>
988 <xsl:call-template name="make_indent">
989 <xsl:with-param name="current_indent" select="$current_indent"/>
991 <xsl:text>S(</xsl:text>
992 <xsl:apply-templates select="*[4]"/>
993 <xsl:text>) </xsl:text>
994 <FONT FACE="Symbol" mathcolor="green">Þ</FONT>
995 <FONT color="red">Assume by induction</FONT>
997 <xsl:call-template name="make_indent">
998 <xsl:with-param name="current_indent" select="$current_indent +10"/>
1000 <xsl:text>(</xsl:text>
1001 <xsl:apply-templates select="*[5]"/>
1002 <xsl:text>)</xsl:text>
1003 <xsl:apply-templates select="*[6]">
1004 <xsl:with-param name="current_indent" select="$current_indent + 14"/>
1005 </xsl:apply-templates>
1007 <xsl:call-template name="make_indent">
1008 <xsl:with-param name="current_indent" select="$current_indent +10"/>
1009 </xsl:call-template>
1010 <xsl:apply-templates select="*[7]">
1011 <xsl:with-param name="current_indent" select="$current_indent + 10"/>
1012 </xsl:apply-templates>
1015 <xsl:when test="$name='false_ind'">
1016 <xsl:apply-templates select="*[3]">
1017 <xsl:with-param name="current_indent" select="$current_indent"/>
1018 </xsl:apply-templates>
1020 <xsl:call-template name="make_indent">
1021 <xsl:with-param name="current_indent" select="$current_indent"/>
1022 </xsl:call-template>
1023 <FONT color="red">Contradiction.</FONT>
1026 <xsl:when test="$name='and_ind'">
1028 <xsl:when test="name(*[2])='m:apply'">
1029 <xsl:apply-templates select="*[2]">
1030 <xsl:with-param name="current_indent" select="$current_indent"/>
1031 </xsl:apply-templates>
1034 <FONT color="red">Consider </FONT>
1035 <xsl:apply-templates select="*[2]"/>
1039 <xsl:call-template name="make_indent">
1040 <xsl:with-param name="current_indent" select="$current_indent"/>
1041 </xsl:call-template>
1042 <FONT color="red">In particular, we have</FONT>
1044 <xsl:call-template name="make_indent">
1045 <xsl:with-param name="current_indent" select="$current_indent"/>
1046 </xsl:call-template>
1048 <xsl:apply-templates select="*[3]"/>
1050 <xsl:apply-templates select="*[4]">
1051 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1052 </xsl:apply-templates>
1054 <xsl:call-template name="make_indent">
1055 <xsl:with-param name="current_indent" select="$current_indent"/>
1056 </xsl:call-template>
1058 <xsl:apply-templates select="*[5]"/>
1060 <xsl:apply-templates select="*[6]">
1061 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1062 </xsl:apply-templates>
1064 <xsl:call-template name="make_indent">
1065 <xsl:with-param name="current_indent" select="$current_indent"/>
1066 </xsl:call-template>
1067 <xsl:apply-templates select="*[7]">
1068 <xsl:with-param name="current_indent" select="$current_indent"/>
1069 </xsl:apply-templates>
1071 <!-- full_or_ind -->
1072 <xsl:when test="$name='full_or_ind'">
1074 <xsl:when test="name(*[2])='m:apply'">
1075 <xsl:apply-templates select="*[2]">
1076 <xsl:with-param name="current_indent" select="$current_indent"/>
1077 </xsl:apply-templates>
1080 <FONT color="red">Consider </FONT>
1081 <xsl:apply-templates select="*[2]"/>
1085 <xsl:call-template name="make_indent">
1086 <xsl:with-param name="current_indent" select="$current_indent"/>
1087 </xsl:call-template>
1088 <FONT color="red">We proceed by cases to prove </FONT>
1089 <xsl:apply-templates select="*[3]"/>
1091 <xsl:call-template name="make_indent">
1092 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1093 </xsl:call-template>
1094 <FONT color="red">Left: suppose </FONT>
1095 <xsl:text>(</xsl:text>
1096 <xsl:value-of select="*[4]/m:bvar/m:ci"/>
1097 <xsl:text>) </xsl:text>
1098 <xsl:apply-templates
1099 select="*[4]/m:bvar/m:type/*[1]"/>
1101 <xsl:call-template name="make_indent">
1102 <xsl:with-param name="current_indent" select="$current_indent+15"/>
1103 </xsl:call-template>
1104 <xsl:apply-templates
1106 <xsl:with-param name="current_indent" select="$current_indent+15"/>
1107 </xsl:apply-templates>
1109 <xsl:call-template name="make_indent">
1110 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1111 </xsl:call-template>
1112 <FONT color="red">Right: suppose </FONT>
1113 <xsl:text>(</xsl:text>
1114 <xsl:value-of select="*[5]/m:bvar/m:ci"/>
1115 <xsl:text>) </xsl:text>
1116 <xsl:apply-templates
1117 select="*[5]/m:bvar/m:type/*[1]"/>
1119 <xsl:call-template name="make_indent">
1120 <xsl:with-param name="current_indent" select="$current_indent+16"/>
1121 </xsl:call-template>
1122 <xsl:apply-templates
1124 <xsl:with-param name="current_indent" select="$current_indent+16"/>
1125 </xsl:apply-templates>
1128 <xsl:when test="$name='or_ind'">
1130 <xsl:when test="name(*[2])='m:apply'">
1131 <xsl:apply-templates select="*[2]">
1132 <xsl:with-param name="current_indent" select="$current_indent"/>
1133 </xsl:apply-templates>
1136 <FONT color="red">Consider </FONT>
1137 <xsl:apply-templates select="*[2]"/>
1141 <xsl:call-template name="make_indent">
1142 <xsl:with-param name="current_indent" select="$current_indent"/>
1143 </xsl:call-template>
1144 <FONT color="red">We prove </FONT>
1145 <xsl:apply-templates select="*[3]"/>
1146 <FONT color="red"> by cases:</FONT>
1148 <xsl:call-template name="make_indent">
1149 <xsl:with-param name="current_indent" select="$current_indent"/>
1150 </xsl:call-template>
1152 <xsl:apply-templates select="*[4]">
1153 <xsl:with-param name="current_indent" select="$current_indent"/>
1154 </xsl:apply-templates>
1156 <xsl:call-template name="make_indent">
1157 <xsl:with-param name="current_indent" select="$current_indent"/>
1158 </xsl:call-template>
1160 <xsl:apply-templates select="*[5]">
1161 <xsl:with-param name="current_indent" select="$current_indent"/>
1162 </xsl:apply-templates>
1165 <xsl:when test="$name='ex_ind'">
1167 <xsl:when test="name(*[2])='m:apply'">
1168 <xsl:apply-templates select="*[2]">
1169 <xsl:with-param name="current_indent" select="$current_indent"/>
1170 </xsl:apply-templates>
1173 <FONT color="red">Consider </FONT>
1174 <xsl:apply-templates select="*[2]">
1175 <xsl:with-param name="current_indent" select="$current_indent"/>
1176 </xsl:apply-templates>
1180 <xsl:call-template name="make_indent">
1181 <xsl:with-param name="current_indent" select="$current_indent"/>
1182 </xsl:call-template>
1183 <FONT color="red">Let </FONT>
1184 <xsl:apply-templates mode="inline" select="*[3]"/>
1186 <xsl:apply-templates mode="inline" select="*[4]"/>
1187 <FONT color="red"> such that</FONT>
1189 <xsl:call-template name="make_indent">
1190 <xsl:with-param name="current_indent" select="$current_indent"/>
1191 </xsl:call-template>
1193 <xsl:apply-templates mode="inline" select="*[5]"/>
1195 <xsl:apply-templates select="*[6]">
1196 <xsl:with-param name="current_indent" select="$current_indent +7"/>
1197 </xsl:apply-templates>
1199 <xsl:call-template name="make_indent">
1200 <xsl:with-param name="current_indent" select="$current_indent"/>
1201 </xsl:call-template>
1202 <xsl:apply-templates select="*[7]">
1203 <xsl:with-param name="current_indent" select="$current_indent"/>
1204 </xsl:apply-templates>
1206 <!-- ***************************************** -->
1207 <!-- *********** LAMBDA ELEMENTS ************** -->
1208 <!-- ***************************************** -->
1209 <xsl:when test="$name='subst'">
1210 <xsl:apply-templates select="*[3]"/>
1211 <xsl:text>[</xsl:text>
1212 <xsl:apply-templates select="*[4]"/>
1213 <a href="{*[1]/@definitionURL}">
1214 <FONT color="blue" SIZE="+0" FACE="symbol">
1215 <xsl:text>¬</xsl:text>
1218 <xsl:apply-templates select="*[2]"/>
1219 <xsl:text>]</xsl:text>
1222 <xsl:when test="$name='lift_with_base'">
1224 <xsl:apply-templates select="*[3]" mode="inline"/>
1226 <a href="{*[1]/@definitionURL}">
1227 <FONT color="green" FACE="symbol">
1228 <xsl:text>­</xsl:text>
1232 <xsl:apply-templates select="*[4]" mode="inline"/>
1234 <xsl:text>(</xsl:text>
1235 <xsl:apply-templates select="*[2]" mode="inline"/>
1236 <xsl:text>)</xsl:text>
1239 <xsl:when test="$name='lift'">
1240 <a href="{*[1]/@definitionURL}">
1241 <FONT color="green" FACE="symbol">
1242 <xsl:text>­</xsl:text>
1246 <xsl:apply-templates select="*[2]" mode="inline"/>
1248 <xsl:text>(</xsl:text>
1249 <xsl:apply-templates select="*[3]" mode="inline"/>
1250 <xsl:text>)</xsl:text>
1254 <xsl:when test="$name='beta_red1'">
1255 <xsl:apply-templates select="*[2]" mode="inline"/>
1256 <a href="{*[1]/@definitionURL}">
1257 <FONT color="green" FACE="symbol">
1258 <xsl:text>®</xsl:text>
1261 <FONT color="green" FACE="symbol">
1262 <xsl:text>b</xsl:text>
1266 <xsl:apply-templates select="*[3]" mode="inline"/>
1269 <xsl:when test="$name='beta_red'">
1270 <xsl:apply-templates select="*[2]" mode="inline"/>
1271 <a href="{*[1]/@definitionURL}">
1272 <FONT color="green" FACE="symbol">
1273 <xsl:text>®</xsl:text>
1276 <FONT color="green" FACE="symbol">
1277 <xsl:text>b*</xsl:text>
1281 <xsl:apply-templates select="*[3]" mode="inline"/>
1284 <xsl:when test="$name='par_beta_red1'">
1285 <xsl:apply-templates select="*[2]" mode="inline"/>
1286 <a href="{*[1]/@definitionURL}">
1287 <FONT color="green" FACE="symbol">
1288 <xsl:text>Þ</xsl:text>
1291 <FONT color="green" FACE="symbol">
1292 <xsl:text>b</xsl:text>
1296 <xsl:apply-templates select="*[3]" mode="inline"/>
1299 <xsl:when test="$name='par_beta_red'">
1300 <xsl:apply-templates select="*[2]" mode="inline"/>
1301 <a href="{*[1]/@definitionURL}">
1302 <FONT color="green" FACE="symbol">
1303 <xsl:text>Þ</xsl:text>
1306 <FONT color="green" FACE="symbol">
1307 <xsl:text>b*</xsl:text>
1311 <xsl:apply-templates select="*[3]" mode="inline"/>
1315 <xsl:when test="$name='forgetful'">
1316 <a href="{*[1]/@definitionURL}">|</a>
1317 <xsl:apply-templates select="*[2]" mode="inline"/>
1318 <a href="{*[1]/@definitionURL}">|</a>
1321 <!-- boolean algebra of redexes -->
1324 <xsl:when test="$name='isomorphic'">
1325 <xsl:apply-templates select="*[2]" mode="inline"/>
1326 <a href="{*[1]/@definitionURL}">
1327 <FONT color="green" FACE="symbol">
1328 <xsl:text>@</xsl:text>
1331 <xsl:apply-templates select="*[3]" mode="inline"/>
1335 <xsl:when test="$name='interp'">
1336 <font color="green">[</font>
1337 <xsl:apply-templates select="*[2]"/>
1338 <font color="green">]</font>
1346 <xsl:template match="m:lambda">
1347 <xsl:param name="current_indent" select="0"/>
1348 <xsl:variable name="charlength">
1349 <xsl:apply-templates select="*[position()=1]" mode="charcount"/>
1350 <!-- <xsl:apply-templates select="." mode="charcount"/> -->
1352 <!-- <xsl:value-of select="$charlength"/> -->
1353 <!-- <xsl:value-of select="$current_indent"/> -->
1355 <xsl:when test="$charlength > $framewidth">
1357 <FONT SIZE="+2" color="red" FACE="symbol">l</FONT>
1358 <xsl:apply-templates select="m:bvar/m:ci"/>
1359 <xsl:text>:</xsl:text>
1360 <xsl:apply-templates select="m:bvar/m:type">
1361 <xsl:with-param name="current_indent"
1362 select="$current_indent + 4 + 2*string-length(m:bvar/m:ci)"/>
1363 </xsl:apply-templates><br/>
1364 <xsl:call-template name="make_indent">
1365 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1366 </xsl:call-template>
1367 <xsl:text>.</xsl:text>
1368 <xsl:apply-templates select="*[position()=2]">
1369 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1370 </xsl:apply-templates>
1373 <xsl:apply-templates mode="inline" select="."/>
1379 <xsl:template match="m:ci">
1381 <xsl:when test="boolean(@definitionURL)">
1382 <a href="{@definitionURL}">
1383 <xsl:apply-templates/>
1387 <xsl:value-of select="."/>
1394 <xsl:template match="m:ci|m:csymbol" mode="charcount">
1395 <xsl:param name="incurrent_length" select="0"/>
1397 <xsl:when test="$framewidth >= ($incurrent_length + string-length())">
1398 <xsl:variable name="siblength"><xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length + string-length()"/></xsl:apply-templates></xsl:variable>
1400 <xsl:when test="string($siblength) = """>
1401 <xsl:value-of select="$incurrent_length + string-length()"/>
1404 <xsl:value-of select="number($siblength)"/>
1409 <xsl:value-of select="$incurrent_length + string-length()"/>
1414 <xsl:template match="*" mode="charcount">
1415 <xsl:param name="incurrent_length" select="0"/>
1417 <xsl:when test="count(child::*) = 0">
1418 <xsl:value-of select="$incurrent_length"/>
1421 <xsl:variable name="childlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length"/></xsl:apply-templates></xsl:variable>
1423 <xsl:when test="$framewidth >= number($childlength)">
1424 <xsl:variable name="siblength"><xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$childlength"/></xsl:apply-templates></xsl:variable>
1426 <xsl:when test="string($siblength) = """>
1427 <xsl:value-of select="number($childlength)"/>
1430 <xsl:value-of select="number($siblength)"/>
1435 <xsl:value-of select="number($childlength)"/>
1443 <!--***********************************************************************-->
1445 <!--***********************************************************************-->
1449 <xsl:template match="Definition">
1450 <xsl:param name="current_indent" select="0"/>
1452 DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
1454 <xsl:call-template name="make_indent">
1455 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1456 </xsl:call-template>
1457 <xsl:apply-templates select="type/*[1]">
1458 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1459 </xsl:apply-templates><br/>
1461 <xsl:call-template name="make_indent">
1462 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1463 </xsl:call-template>
1464 <xsl:apply-templates select="body/*[1]">
1465 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1466 </xsl:apply-templates>
1472 <xsl:template match="Axiom">
1473 <xsl:param name="current_indent" select="0"/>
1475 AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
1477 <xsl:call-template name="make_indent">
1478 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1479 </xsl:call-template>
1480 <xsl:apply-templates select="type/*[1]">
1481 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1482 </xsl:apply-templates>
1486 <!-- UNFINISHED PROOF -->
1488 <xsl:template match="CurrentProof">
1489 <xsl:param name="current_indent" select="0"/>
1491 UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
1492 THESIS: <xsl:apply-templates select="type/*[1]">
1493 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
1494 </xsl:apply-templates><br/>
1496 <xsl:for-each select="Conjecture">
1498 <xsl:call-template name="make_indent">
1499 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
1500 </xsl:call-template>
1501 <xsl:value-of select="./@no"/> :
1502 <xsl:apply-templates select="./*[1]">
1503 <xsl:with-param name="current_indent" select="$current_indent + 11"/>
1504 </xsl:apply-templates>
1508 <xsl:apply-templates select="body/*[1]">
1509 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
1510 </xsl:apply-templates>
1514 <!-- MUTUAL INDUCTIVE DEFINITION -->
1516 <xsl:template match="InductiveDefinition">
1517 <xsl:param name="current_indent" select="0"/>
1519 <xsl:for-each select="InductiveType">
1521 <xsl:when test="position() = 1">
1523 <xsl:when test="string(./@inductive) = "true"">
1524 INDUCTIVE DEFINITION
1527 COINDUCTIVE DEFINITION
1535 <xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != """><xsl:value-of select="../Params"/></xsl:if>)
1537 <xsl:if test="string(../Param) != """>
1538 <xsl:for-each select="../Param">
1539 <xsl:value-of select="./@name"/>
1541 <xsl:apply-templates select="*"/>
1546 <xsl:apply-templates select="./arity/*[1]">
1547 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1548 </xsl:apply-templates> <br/>
1550 <xsl:for-each select="./Constructor">
1552 <xsl:call-template name="make_indent">
1553 <xsl:with-param name="current_indent" select="$current_indent + 3"/>
1554 </xsl:call-template>
1556 <xsl:when test="position() = 1">
1557 <xsl:text>  </xsl:text>
1560 <xsl:text>| </xsl:text>
1563 <xsl:value-of select="./@name"/>
1564 <xsl:text>: </xsl:text>
1565 <xsl:apply-templates select="./*[1]">
1566 <xsl:with-param name="current_indent" select="$current_indent + 2*string-length(./@name) + 5"/>
1567 </xsl:apply-templates>
1575 <xsl:template match="Variable">
1576 <xsl:param name="current_indent" select="0"/>
1578 VARIABLE <xsl:value-of select="@name"/><br/>
1579 TYPE = <xsl:apply-templates select="type/*[1]">
1580 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1581 </xsl:apply-templates>
1585 <!--***********************************************************************-->
1587 <!--***********************************************************************-->
1591 <xsl:template match="SECTION">
1592 <xsl:param name="current_indent" select="0"/>
1593 <h1>BEGIN OF SECTION</h1>
1594 <xsl:apply-templates/>
1595 <h1>END OF SECTION</h1>