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 <!-- ***************************************** -->
737 <!-- *********** PROOF ELEMENTS ************** -->
738 <!-- ***************************************** -->
740 <xsl:when test="$name='proof'">
741 <xsl:apply-templates select="*[position()=2]">
742 <xsl:with-param name="current_indent" select="$current_indent"/>
743 </xsl:apply-templates>
745 <!-- <xsl:element name="br"/> -->
746 <xsl:call-template name="make_indent">
747 <xsl:with-param name="current_indent" select="$current_indent"/>
749 <FONT color="red">we proved </FONT>
750 <xsl:apply-templates select="*[position()=3]">
751 <xsl:with-param name="current_indent" select="$current_indent + 16"/>
752 </xsl:apply-templates>
755 <xsl:when test="$name='letin1'">
756 <xsl:apply-templates select="*[position()=2]">
757 <xsl:with-param name="current_indent" select="$current_indent"/>
758 </xsl:apply-templates>
760 <xsl:call-template name="make_indent">
761 <xsl:with-param name="current_indent" select="$current_indent"/>
763 <xsl:apply-templates select="*[position()=3]">
764 <xsl:with-param name="current_indent" select="$current_indent"/>
765 </xsl:apply-templates>
768 <xsl:when test="$name='letin'">
769 <xsl:for-each select="*[position()>1 and last()>position()]">
770 <xsl:apply-templates select=".">
771 <xsl:with-param name="current_indent" select="$current_indent"/>
772 </xsl:apply-templates>
774 <xsl:call-template name="make_indent">
775 <xsl:with-param name="current_indent" select="$current_indent"/>
778 <xsl:apply-templates select="*[position()=last()]">
779 <xsl:with-param name="current_indent" select="$current_indent"/>
780 </xsl:apply-templates>
783 <xsl:when test="$name='let'">
785 <xsl:apply-templates select="m:ci"/>
787 <xsl:apply-templates select="*[3]">
788 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
789 </xsl:apply-templates>
792 <xsl:when test="$name='rw_step'">
794 <xsl:when test="name(*[2])='m:apply'">
795 <xsl:apply-templates select="*[2]">
796 <xsl:with-param name="current_indent" select="$current_indent"/>
797 </xsl:apply-templates>
800 <FONT color="red">Consider </FONT>
801 <xsl:apply-templates select="*[2]"/>
804 <xsl:variable name="charlength_first">
805 <xsl:apply-templates select="*[3]/*[1]" mode="charcount"/>
807 <xsl:variable name="charlength_second">
808 <xsl:apply-templates select="*[4]/*[1]" mode="charcount"/>
810 <xsl:variable name="charlength_side_proof">
811 <xsl:apply-templates select="*[5]/*[1]" mode="charcount"/>
813 <xsl:variable name="split1"
814 select="$charlength_first + $charlength_second > $framewidth"/>
815 <xsl:variable name="split2"
816 select="$charlength_second + $charlength_side_proof > $framewidth"/>
817 <!-- <xsl:value-of select="$current_indent"/> -->
818 <!-- <xsl:value-of select="$charlength"/> -->
820 <xsl:call-template name="make_indent">
821 <xsl:with-param name="current_indent" select="$current_indent"/>
823 <FONT color="red">Rewrite </FONT>
824 <xsl:apply-templates mode="inline" select="*[3]"/>
825 <xsl:text> </xsl:text>
826 <xsl:if test="$split1">
828 <xsl:call-template name="make_indent">
829 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
832 <FONT color="red">with </FONT>
833 <xsl:apply-templates mode="inline" select="*[4]"/>
834 <xsl:text> </xsl:text>
835 <xsl:if test="$split2">
837 <xsl:call-template name="make_indent">
838 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
841 <FONT color="red">by </FONT>
842 <xsl:apply-templates select="*[5]">
843 <xsl:with-param name="current_indent" select="$current_indent+7"/>
844 </xsl:apply-templates>
846 <!-- rewrite and apply -->
847 <xsl:when test="$name='rewrite_and_apply'">
848 <xsl:apply-templates select="*[2]">
849 <xsl:with-param name="current_indent" select="$current_indent"/>
850 </xsl:apply-templates>
852 <xsl:call-template name="make_indent">
853 <xsl:with-param name="current_indent" select="$current_indent"/>
855 <FONT color="red">Then apply it to </FONT>
856 <xsl:apply-templates select="*[position()>2]"/>
858 <!-- by_induction -->
859 <xsl:when test="$name='by_induction'">
860 <FONT color="red">We prove </FONT>
861 <xsl:apply-templates select="../*[3]">
862 <xsl:with-param name="current_indent" select="$current_indent+18"/>
863 </xsl:apply-templates>
865 <xsl:call-template name="make_indent">
866 <xsl:with-param name="current_indent" select="$current_indent"/>
868 <FONT color="red">by induction on </FONT>
869 <xsl:apply-templates select="*[position()=last()]/*[position()=last()]">
870 <xsl:with-param name="current_indent" select="$current_indent+30"/>
871 </xsl:apply-templates>
874 <xsl:call-template name="make_indent">
875 <xsl:with-param name="current_indent" select="$current_indent"/>
877 <xsl:text>The induction property is</xsl:text>
879 <xsl:call-template name="make_indent">
880 <xsl:with-param name="current_indent" select="$current_indent"/>
882 <xsl:apply-templates select="*[3]">
883 <xsl:with-param name="current_indent" select="$current_indent"/>
884 </xsl:apply-templates>
887 select="*[position()>3 and not(position()=last())]">
888 <xsl:with-param name="current_indent" select="$current_indent+4"/>
889 </xsl:apply-templates>
891 <xsl:call-template name="make_indent">
892 <xsl:with-param name="current_indent" select="$current_indent"/>
894 <xsl:text>End induction</xsl:text> -->
896 <!-- inductive_case -->
897 <xsl:when test="$name='inductive_case'">
899 <xsl:call-template name="make_indent">
900 <xsl:with-param name="current_indent" select="$current_indent"/>
902 <FONT color="red">Case </FONT>
903 <xsl:apply-templates select="*[2]">
904 <xsl:with-param name="current_indent" select="$current_indent +10"/>
905 </xsl:apply-templates>
906 <xsl:if test="*[3]/*[position()>1]">
908 <xsl:call-template name="make_indent">
909 <xsl:with-param name="current_indent" select="$current_indent+4"/>
911 <FONT color="red">By induction hypothesis, we have:</FONT>
912 <xsl:for-each select="*[3]/*[position()>1]">
914 <xsl:call-template name="make_indent">
915 <xsl:with-param name="current_indent" select="$current_indent + 4"/>
917 <xsl:text>(</xsl:text>
918 <xsl:apply-templates select="m:ci"/>
919 <xsl:text>) </xsl:text>
920 <xsl:apply-templates select="m:type">
921 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
922 </xsl:apply-templates>
926 <xsl:call-template name="make_indent">
927 <xsl:with-param name="current_indent" select="$current_indent + 4"/>
929 <xsl:apply-templates select="*[4]">
930 <xsl:with-param name="current_indent" select="$current_indent +4"/>
931 </xsl:apply-templates>
933 <xsl:call-template name="make_indent">
934 <xsl:with-param name="current_indent" select="$current_indent"/>
936 <xsl:text>End Case</xsl:text> -->
939 <xsl:when test="$name='case_lhs'">
941 <xsl:when test="count(*)=2">
942 <xsl:apply-templates mode="inline" select="*[2]"/>
945 <xsl:text>(</xsl:text>
946 <xsl:apply-templates mode="inline" select="*[2]"/>
947 <xsl:for-each select="m:bvar">
948 <xsl:text> </xsl:text>
949 <xsl:apply-templates mode="inline" select="*[1]"/>
950 <xsl:text>:</xsl:text>
951 <xsl:apply-templates mode="inline" select="m:type/*[1]"/>
953 <xsl:text>)</xsl:text>
958 <xsl:when test="$name='nat_ind_complete'">
959 <FONT color="red">By induction on </FONT>
960 <xsl:apply-templates select="*[2]"/>:
962 <xsl:call-template name="make_indent">
963 <xsl:with-param name="current_indent" select="$current_indent"/>
965 <xsl:text>0 </xsl:text>
966 <FONT FACE="Symbol" mathcolor="green">Þ</FONT>
967 <xsl:apply-templates select="*[3]">
968 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
969 </xsl:apply-templates>
971 <xsl:call-template name="make_indent">
972 <xsl:with-param name="current_indent" select="$current_indent"/>
974 <xsl:text>S(</xsl:text>
975 <xsl:apply-templates select="*[4]"/>
976 <xsl:text>) </xsl:text>
977 <FONT FACE="Symbol" mathcolor="green">Þ</FONT>
978 <FONT color="red">Assume by induction</FONT>
980 <xsl:call-template name="make_indent">
981 <xsl:with-param name="current_indent" select="$current_indent +10"/>
983 <xsl:text>(</xsl:text>
984 <xsl:apply-templates select="*[5]"/>
985 <xsl:text>)</xsl:text>
986 <xsl:apply-templates select="*[6]">
987 <xsl:with-param name="current_indent" select="$current_indent + 14"/>
988 </xsl:apply-templates>
990 <xsl:call-template name="make_indent">
991 <xsl:with-param name="current_indent" select="$current_indent +10"/>
993 <xsl:apply-templates select="*[7]">
994 <xsl:with-param name="current_indent" select="$current_indent + 10"/>
995 </xsl:apply-templates>
998 <xsl:when test="$name='false_ind'">
999 <xsl:apply-templates select="*[3]">
1000 <xsl:with-param name="current_indent" select="$current_indent"/>
1001 </xsl:apply-templates>
1003 <xsl:call-template name="make_indent">
1004 <xsl:with-param name="current_indent" select="$current_indent"/>
1005 </xsl:call-template>
1006 <FONT color="red">Contradiction.</FONT>
1009 <xsl:when test="$name='and_ind'">
1011 <xsl:when test="name(*[2])='m:apply'">
1012 <xsl:apply-templates select="*[2]">
1013 <xsl:with-param name="current_indent" select="$current_indent"/>
1014 </xsl:apply-templates>
1017 <FONT color="red">Consider </FONT>
1018 <xsl:apply-templates select="*[2]"/>
1022 <xsl:call-template name="make_indent">
1023 <xsl:with-param name="current_indent" select="$current_indent"/>
1024 </xsl:call-template>
1025 <FONT color="red">In particular, we have</FONT>
1027 <xsl:call-template name="make_indent">
1028 <xsl:with-param name="current_indent" select="$current_indent"/>
1029 </xsl:call-template>
1031 <xsl:apply-templates select="*[3]"/>
1033 <xsl:apply-templates select="*[4]">
1034 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1035 </xsl:apply-templates>
1037 <xsl:call-template name="make_indent">
1038 <xsl:with-param name="current_indent" select="$current_indent"/>
1039 </xsl:call-template>
1041 <xsl:apply-templates select="*[5]"/>
1043 <xsl:apply-templates select="*[6]">
1044 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1045 </xsl:apply-templates>
1047 <xsl:call-template name="make_indent">
1048 <xsl:with-param name="current_indent" select="$current_indent"/>
1049 </xsl:call-template>
1050 <xsl:apply-templates select="*[7]">
1051 <xsl:with-param name="current_indent" select="$current_indent"/>
1052 </xsl:apply-templates>
1054 <!-- full_or_ind -->
1055 <xsl:when test="$name='full_or_ind'">
1057 <xsl:when test="name(*[2])='m:apply'">
1058 <xsl:apply-templates select="*[2]">
1059 <xsl:with-param name="current_indent" select="$current_indent"/>
1060 </xsl:apply-templates>
1063 <FONT color="red">Consider </FONT>
1064 <xsl:apply-templates select="*[2]"/>
1068 <xsl:call-template name="make_indent">
1069 <xsl:with-param name="current_indent" select="$current_indent"/>
1070 </xsl:call-template>
1071 <FONT color="red">We proceed by cases to prove </FONT>
1072 <xsl:apply-templates select="*[3]"/>
1074 <xsl:call-template name="make_indent">
1075 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1076 </xsl:call-template>
1077 <FONT color="red">Left: suppose </FONT>
1078 <xsl:text>(</xsl:text>
1079 <xsl:value-of select="*[4]/m:bvar/m:ci"/>
1080 <xsl:text>) </xsl:text>
1081 <xsl:apply-templates
1082 select="*[4]/m:bvar/m:type/*[1]"/>
1084 <xsl:call-template name="make_indent">
1085 <xsl:with-param name="current_indent" select="$current_indent+15"/>
1086 </xsl:call-template>
1087 <xsl:apply-templates
1089 <xsl:with-param name="current_indent" select="$current_indent+15"/>
1090 </xsl:apply-templates>
1092 <xsl:call-template name="make_indent">
1093 <xsl:with-param name="current_indent" select="$current_indent+4"/>
1094 </xsl:call-template>
1095 <FONT color="red">Right: suppose </FONT>
1096 <xsl:text>(</xsl:text>
1097 <xsl:value-of select="*[5]/m:bvar/m:ci"/>
1098 <xsl:text>) </xsl:text>
1099 <xsl:apply-templates
1100 select="*[5]/m:bvar/m:type/*[1]"/>
1102 <xsl:call-template name="make_indent">
1103 <xsl:with-param name="current_indent" select="$current_indent+16"/>
1104 </xsl:call-template>
1105 <xsl:apply-templates
1107 <xsl:with-param name="current_indent" select="$current_indent+16"/>
1108 </xsl:apply-templates>
1111 <xsl:when test="$name='or_ind'">
1113 <xsl:when test="name(*[2])='m:apply'">
1114 <xsl:apply-templates select="*[2]">
1115 <xsl:with-param name="current_indent" select="$current_indent"/>
1116 </xsl:apply-templates>
1119 <FONT color="red">Consider </FONT>
1120 <xsl:apply-templates select="*[2]"/>
1124 <xsl:call-template name="make_indent">
1125 <xsl:with-param name="current_indent" select="$current_indent"/>
1126 </xsl:call-template>
1127 <FONT color="red">We prove </FONT>
1128 <xsl:apply-templates select="*[3]"/>
1129 <FONT color="red"> by cases:</FONT>
1131 <xsl:call-template name="make_indent">
1132 <xsl:with-param name="current_indent" select="$current_indent"/>
1133 </xsl:call-template>
1135 <xsl:apply-templates select="*[4]">
1136 <xsl:with-param name="current_indent" select="$current_indent"/>
1137 </xsl:apply-templates>
1139 <xsl:call-template name="make_indent">
1140 <xsl:with-param name="current_indent" select="$current_indent"/>
1141 </xsl:call-template>
1143 <xsl:apply-templates select="*[5]">
1144 <xsl:with-param name="current_indent" select="$current_indent"/>
1145 </xsl:apply-templates>
1148 <xsl:when test="$name='ex_ind'">
1150 <xsl:when test="name(*[2])='m:apply'">
1151 <xsl:apply-templates select="*[2]">
1152 <xsl:with-param name="current_indent" select="$current_indent"/>
1153 </xsl:apply-templates>
1156 <FONT color="red">Consider </FONT>
1157 <xsl:apply-templates select="*[2]">
1158 <xsl:with-param name="current_indent" select="$current_indent"/>
1159 </xsl:apply-templates>
1163 <xsl:call-template name="make_indent">
1164 <xsl:with-param name="current_indent" select="$current_indent"/>
1165 </xsl:call-template>
1166 <FONT color="red">Let </FONT>
1167 <xsl:apply-templates mode="inline" select="*[3]"/>
1169 <xsl:apply-templates mode="inline" select="*[4]"/>
1170 <FONT color="red"> such that</FONT>
1172 <xsl:call-template name="make_indent">
1173 <xsl:with-param name="current_indent" select="$current_indent"/>
1174 </xsl:call-template>
1176 <xsl:apply-templates mode="inline" select="*[5]"/>
1178 <xsl:apply-templates select="*[6]">
1179 <xsl:with-param name="current_indent" select="$current_indent +7"/>
1180 </xsl:apply-templates>
1182 <xsl:call-template name="make_indent">
1183 <xsl:with-param name="current_indent" select="$current_indent"/>
1184 </xsl:call-template>
1185 <xsl:apply-templates select="*[7]">
1186 <xsl:with-param name="current_indent" select="$current_indent"/>
1187 </xsl:apply-templates>
1189 <!-- ***************************************** -->
1190 <!-- *********** LAMBDA ELEMENTS ************** -->
1191 <!-- ***************************************** -->
1192 <xsl:when test="$name='subst'">
1193 <xsl:apply-templates select="*[2]"/>
1194 <xsl:text>[</xsl:text>
1195 <xsl:apply-templates select="*[4]"/>
1196 <a href="{*[1]/@definitionURL}">
1197 <FONT color="blue" SIZE="+0" FACE="symbol">
1198 <xsl:text>¬</xsl:text>
1201 <xsl:apply-templates select="*[3]"/>
1202 <xsl:text>]</xsl:text>
1205 <xsl:when test="$name='lift_with_base'">
1207 <xsl:apply-templates select="*[3]" mode="inline"/>
1209 <a href="{*[1]/@definitionURL}">
1210 <FONT color="green" FACE="symbol">
1211 <xsl:text>­</xsl:text>
1215 <xsl:apply-templates select="*[4]" mode="inline"/>
1217 <xsl:text>(</xsl:text>
1218 <xsl:apply-templates select="*[2]" mode="inline"/>
1219 <xsl:text>)</xsl:text>
1222 <xsl:when test="$name='lift'">
1223 <a href="{*[1]/@definitionURL}">
1224 <FONT color="green" FACE="symbol">
1225 <xsl:text>­</xsl:text>
1229 <xsl:apply-templates select="*[2]" mode="inline"/>
1231 <xsl:text>(</xsl:text>
1232 <xsl:apply-templates select="*[3]" mode="inline"/>
1233 <xsl:text>)</xsl:text>
1237 <xsl:when test="$name='beta_red1'">
1238 <xsl:apply-templates select="*[2]" mode="inline"/>
1239 <a href="{*[1]/@definitionURL}">
1240 <FONT color="green" FACE="symbol">
1241 <xsl:text>®</xsl:text>
1244 <FONT color="green" FACE="symbol">
1245 <xsl:text>b</xsl:text>
1249 <xsl:apply-templates select="*[3]" mode="inline"/>
1252 <xsl:when test="$name='beta_red'">
1253 <xsl:apply-templates select="*[2]" mode="inline"/>
1254 <a href="{*[1]/@definitionURL}">
1255 <FONT color="green" FACE="symbol">
1256 <xsl:text>®</xsl:text>
1259 <FONT color="green" FACE="symbol">
1260 <xsl:text>b*</xsl:text>
1264 <xsl:apply-templates select="*[3]" mode="inline"/>
1267 <xsl:when test="$name='par_beta_red1'">
1268 <xsl:apply-templates select="*[2]" mode="inline"/>
1269 <a href="{*[1]/@definitionURL}">
1270 <FONT color="green" FACE="symbol">
1271 <xsl:text>Þ</xsl:text>
1274 <FONT color="green" FACE="symbol">
1275 <xsl:text>b</xsl:text>
1279 <xsl:apply-templates select="*[3]" mode="inline"/>
1282 <xsl:when test="$name='par_beta_red'">
1283 <xsl:apply-templates select="*[2]" mode="inline"/>
1284 <a href="{*[1]/@definitionURL}">
1285 <FONT color="green" FACE="symbol">
1286 <xsl:text>Þ</xsl:text>
1289 <FONT color="green" FACE="symbol">
1290 <xsl:text>b*</xsl:text>
1294 <xsl:apply-templates select="*[3]" mode="inline"/>
1298 <xsl:when test="$name='forgetful'">
1299 <a href="{*[1]/@definitionURL}">|</a>
1300 <xsl:apply-templates select="*[2]" mode="inline"/>
1301 <a href="{*[1]/@definitionURL}">|</a>
1304 <!-- boolean algebra of redexes -->
1307 <xsl:when test="$name='isomorphic'">
1308 <xsl:apply-templates select="*[2]" mode="inline"/>
1309 <a href="{*[1]/@definitionURL}">
1310 <FONT color="green" FACE="symbol">
1311 <xsl:text>@</xsl:text>
1314 <xsl:apply-templates select="*[3]" mode="inline"/>
1318 <xsl:when test="$name='interp'">
1319 <font color="green">[</font>
1320 <xsl:apply-templates select="*[2]"/>
1321 <font color="green">]</font>
1329 <xsl:template match="m:lambda">
1330 <xsl:param name="current_indent" select="0"/>
1331 <xsl:variable name="charlength">
1332 <xsl:apply-templates select="*[position()=1]" mode="charcount"/>
1333 <!-- <xsl:apply-templates select="." mode="charcount"/> -->
1335 <!-- <xsl:value-of select="$charlength"/> -->
1336 <!-- <xsl:value-of select="$current_indent"/> -->
1338 <xsl:when test="$charlength > $framewidth">
1340 <FONT SIZE="+2" color="red" FACE="symbol">l</FONT>
1341 <xsl:apply-templates select="m:bvar/m:ci"/>
1342 <xsl:text>:</xsl:text>
1343 <xsl:apply-templates select="m:bvar/m:type">
1344 <xsl:with-param name="current_indent"
1345 select="$current_indent + 4 + 2*string-length(m:bvar/m:ci)"/>
1346 </xsl:apply-templates><br/>
1347 <xsl:call-template name="make_indent">
1348 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1349 </xsl:call-template>
1350 <xsl:text>.</xsl:text>
1351 <xsl:apply-templates select="*[position()=2]">
1352 <xsl:with-param name="current_indent" select="$current_indent + 2"/>
1353 </xsl:apply-templates>
1356 <xsl:apply-templates mode="inline" select="."/>
1362 <xsl:template match="m:ci">
1364 <xsl:when test="boolean(@definitionURL)">
1365 <a href="{@definitionURL}">
1366 <xsl:apply-templates/>
1370 <xsl:value-of select="."/>
1377 <xsl:template match="m:ci|m:csymbol" mode="charcount">
1378 <xsl:param name="incurrent_length" select="0"/>
1380 <xsl:when test="$framewidth >= ($incurrent_length + string-length())">
1381 <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>
1383 <xsl:when test="string($siblength) = """>
1384 <xsl:value-of select="$incurrent_length + string-length()"/>
1387 <xsl:value-of select="number($siblength)"/>
1392 <xsl:value-of select="$incurrent_length + string-length()"/>
1397 <xsl:template match="*" mode="charcount">
1398 <xsl:param name="incurrent_length" select="0"/>
1400 <xsl:when test="count(child::*) = 0">
1401 <xsl:value-of select="$incurrent_length"/>
1404 <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>
1406 <xsl:when test="$framewidth >= number($childlength)">
1407 <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>
1409 <xsl:when test="string($siblength) = """>
1410 <xsl:value-of select="number($childlength)"/>
1413 <xsl:value-of select="number($siblength)"/>
1418 <xsl:value-of select="number($childlength)"/>
1426 <!--***********************************************************************-->
1428 <!--***********************************************************************-->
1432 <xsl:template match="Definition">
1433 <xsl:param name="current_indent" select="0"/>
1435 DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
1437 <xsl:call-template name="make_indent">
1438 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1439 </xsl:call-template>
1440 <xsl:apply-templates select="type/*[1]">
1441 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1442 </xsl:apply-templates><br/>
1444 <xsl:call-template name="make_indent">
1445 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1446 </xsl:call-template>
1447 <xsl:apply-templates select="body/*[1]">
1448 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1449 </xsl:apply-templates>
1455 <xsl:template match="Axiom">
1456 <xsl:param name="current_indent" select="0"/>
1458 AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
1460 <xsl:call-template name="make_indent">
1461 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1462 </xsl:call-template>
1463 <xsl:apply-templates select="type/*[1]">
1464 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1465 </xsl:apply-templates>
1469 <!-- UNFINISHED PROOF -->
1471 <xsl:template match="CurrentProof">
1472 <xsl:param name="current_indent" select="0"/>
1474 UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)<br/>
1475 THESIS: <xsl:apply-templates select="type/*[1]">
1476 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
1477 </xsl:apply-templates><br/>
1479 <xsl:for-each select="Conjecture">
1481 <xsl:call-template name="make_indent">
1482 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
1483 </xsl:call-template>
1484 <xsl:value-of select="./@no"/> :
1485 <xsl:apply-templates select="./*[1]">
1486 <xsl:with-param name="current_indent" select="$current_indent + 11"/>
1487 </xsl:apply-templates>
1491 <xsl:apply-templates select="body/*[1]">
1492 <xsl:with-param name="current_indent" select="$current_indent + 8"/>
1493 </xsl:apply-templates>
1497 <!-- MUTUAL INDUCTIVE DEFINITION -->
1499 <xsl:template match="InductiveDefinition">
1500 <xsl:param name="current_indent" select="0"/>
1502 <xsl:for-each select="InductiveType">
1504 <xsl:when test="position() = 1">
1506 <xsl:when test="string(./@inductive) = "true"">
1507 INDUCTIVE DEFINITION
1510 COINDUCTIVE DEFINITION
1518 <xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != """><xsl:value-of select="../Params"/></xsl:if>)
1520 <xsl:if test="string(../Param) != """>
1521 <xsl:for-each select="../Param">
1522 <xsl:value-of select="./@name"/>
1524 <xsl:apply-templates select="*"/>
1529 <xsl:apply-templates select="./arity/*[1]">
1530 <xsl:with-param name="current_indent" select="$current_indent + 9"/>
1531 </xsl:apply-templates> <br/>
1533 <xsl:for-each select="./Constructor">
1535 <xsl:call-template name="make_indent">
1536 <xsl:with-param name="current_indent" select="$current_indent + 3"/>
1537 </xsl:call-template>
1539 <xsl:when test="position() = 1">
1540 <xsl:text>  </xsl:text>
1543 <xsl:text>| </xsl:text>
1546 <xsl:value-of select="./@name"/>
1547 <xsl:text>: </xsl:text>
1548 <xsl:apply-templates select="./*[1]">
1549 <xsl:with-param name="current_indent" select="$current_indent + 2*string-length(./@name) + 5"/>
1550 </xsl:apply-templates>
1558 <xsl:template match="Variable">
1559 <xsl:param name="current_indent" select="0"/>
1561 VARIABLE <xsl:value-of select="@name"/><br/>
1562 TYPE = <xsl:apply-templates select="type/*[1]">
1563 <xsl:with-param name="current_indent" select="$current_indent + 7"/>
1564 </xsl:apply-templates>
1568 <!--***********************************************************************-->
1570 <!--***********************************************************************-->
1574 <xsl:template match="SECTION">
1575 <xsl:param name="current_indent" select="0"/>
1576 <h1>BEGIN OF SECTION</h1>
1577 <xsl:apply-templates/>
1578 <h1>END OF SECTION</h1>