</xsl:otherwise>
        </xsl:choose>
       </xsl:when>
+      <xsl:when test="$name='let_in'">
+       <xsl:text>let </xsl:text>
+       <xsl:apply-templates select="m:bvar/m:ci"/>
+       <xsl:text> := </xsl:text>
+       <xsl:apply-templates select="*[3]">
+        <xsl:with-param name="current_indent" select="$current_indent+14"/>
+       </xsl:apply-templates>
+       <br/>
+       <xsl:call-template name="make_indent">
+        <xsl:with-param name="current_indent" select="$current_indent"/> 
+       </xsl:call-template>
+       <xsl:text>in </xsl:text>
+       <xsl:apply-templates select="*[4]">
+        <xsl:with-param name="current_indent" select="$current_indent+5"/>
+       </xsl:apply-templates>
+      </xsl:when>
+
       <!-- ***************************************** -->
       <!-- *********** PROOF ELEMENTS ************** -->
       <!-- ***************************************** -->
       <!-- *********** LAMBDA ELEMENTS ************** -->
       <!-- ***************************************** -->
       <xsl:when test="$name='subst'">
-       <xsl:apply-templates select="*[2]"/>
+       <xsl:apply-templates select="*[3]"/>
        <xsl:text>[</xsl:text>
        <xsl:apply-templates select="*[4]"/>
        <a href="{*[1]/@definitionURL}">
         <xsl:text>¬</xsl:text>
        </FONT>
        </a>
-       <xsl:apply-templates select="*[3]"/>
+       <xsl:apply-templates select="*[2]"/>
        <xsl:text>]</xsl:text>
       </xsl:when>