Edit File by line
/home/barbar84/www/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/stex
File: index.html
<!doctype html>
[0] Fix | Delete
[1] Fix | Delete
<title>CodeMirror: sTeX mode</title>
[2] Fix | Delete
<meta charset="utf-8"/>
[3] Fix | Delete
<link rel=stylesheet href="../../doc/docs.css">
[4] Fix | Delete
[5] Fix | Delete
<link rel="stylesheet" href="../../lib/codemirror.css">
[6] Fix | Delete
<script src="../../lib/codemirror.js"></script>
[7] Fix | Delete
<script src="stex.js"></script>
[8] Fix | Delete
<style>.CodeMirror {background: #f8f8f8;}</style>
[9] Fix | Delete
<div id=nav>
[10] Fix | Delete
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
[11] Fix | Delete
[12] Fix | Delete
<ul>
[13] Fix | Delete
<li><a href="../../index.html">Home</a>
[14] Fix | Delete
<li><a href="../../doc/manual.html">Manual</a>
[15] Fix | Delete
<li><a href="https://github.com/codemirror/codemirror">Code</a>
[16] Fix | Delete
</ul>
[17] Fix | Delete
<ul>
[18] Fix | Delete
<li><a href="../index.html">Language modes</a>
[19] Fix | Delete
<li><a class=active href="#">sTeX</a>
[20] Fix | Delete
</ul>
[21] Fix | Delete
</div>
[22] Fix | Delete
[23] Fix | Delete
<article>
[24] Fix | Delete
<h2>sTeX mode</h2>
[25] Fix | Delete
<form><textarea id="code" name="code">
[26] Fix | Delete
\begin{module}[id=bbt-size]
[27] Fix | Delete
\importmodule[balanced-binary-trees]{balanced-binary-trees}
[28] Fix | Delete
\importmodule[\KWARCslides{dmath/en/cardinality}]{cardinality}
[29] Fix | Delete
[30] Fix | Delete
\begin{frame}
[31] Fix | Delete
\frametitle{Size Lemma for Balanced Trees}
[32] Fix | Delete
\begin{itemize}
[33] Fix | Delete
\item
[34] Fix | Delete
\begin{assertion}[id=size-lemma,type=lemma]
[35] Fix | Delete
Let $G=\tup{V,E}$ be a \termref[cd=binary-trees]{balanced binary tree}
[36] Fix | Delete
of \termref[cd=graph-depth,name=vertex-depth]{depth}$n>i$, then the set
[37] Fix | Delete
$\defeq{\livar{V}i}{\setst{\inset{v}{V}}{\gdepth{v} = i}}$ of
[38] Fix | Delete
\termref[cd=graphs-intro,name=node]{nodes} at
[39] Fix | Delete
\termref[cd=graph-depth,name=vertex-depth]{depth} $i$ has
[40] Fix | Delete
\termref[cd=cardinality,name=cardinality]{cardinality} $\power2ijQuery.
[41] Fix | Delete
\end{assertion}
[42] Fix | Delete
\item
[43] Fix | Delete
\begin{sproof}[id=size-lemma-pf,proofend=,for=size-lemma]{via induction over the depth $ijQuery.}
[44] Fix | Delete
\begin{spfcases}{We have to consider two cases}
[45] Fix | Delete
\begin{spfcase}{$i=0$}
[46] Fix | Delete
\begin{spfstep}[display=flow]
[47] Fix | Delete
then $\livar{V}i=\set{\livar{v}r}$, where $\livar{v}r$ is the root, so
[48] Fix | Delete
$\eq{\card{\livar{V}0},\card{\set{\livar{v}r}},1,\power20}jQuery.
[49] Fix | Delete
\end{spfstep}
[50] Fix | Delete
\end{spfcase}
[51] Fix | Delete
\begin{spfcase}{$i>0$}
[52] Fix | Delete
\begin{spfstep}[display=flow]
[53] Fix | Delete
then $\livar{V}{i-1}$ contains $\power2{i-1}$ vertexes
[54] Fix | Delete
\begin{justification}[method=byIH](IH)\end{justification}
[55] Fix | Delete
\end{spfstep}
[56] Fix | Delete
\begin{spfstep}
[57] Fix | Delete
By the \begin{justification}[method=byDef]definition of a binary
[58] Fix | Delete
tree\end{justification}, each $\inset{v}{\livar{V}{i-1}}$ is a leaf or has
[59] Fix | Delete
two children that are at depth $ijQuery.
[60] Fix | Delete
\end{spfstep}
[61] Fix | Delete
\begin{spfstep}
[62] Fix | Delete
As $G$ is \termref[cd=balanced-binary-trees,name=balanced-binary-tree]{balanced} and $\gdepth{G}=n>i$, $\livar{V}{i-1}$ cannot contain
[63] Fix | Delete
leaves.
[64] Fix | Delete
\end{spfstep}
[65] Fix | Delete
\begin{spfstep}[type=conclusion]
[66] Fix | Delete
Thus $\eq{\card{\livar{V}i},{\atimes[cdot]{2,\card{\livar{V}{i-1}}}},{\atimes[cdot]{2,\power2{i-1}}},\power2i}jQuery.
[67] Fix | Delete
\end{spfstep}
[68] Fix | Delete
\end{spfcase}
[69] Fix | Delete
\end{spfcases}
[70] Fix | Delete
\end{sproof}
[71] Fix | Delete
\item
[72] Fix | Delete
\begin{assertion}[id=fbbt,type=corollary]
[73] Fix | Delete
A fully balanced tree of depth $d$ has $\power2{d+1}-1$ nodes.
[74] Fix | Delete
\end{assertion}
[75] Fix | Delete
\item
[76] Fix | Delete
\begin{sproof}[for=fbbt,id=fbbt-pf]{}
[77] Fix | Delete
\begin{spfstep}
[78] Fix | Delete
Let $\defeq{G}{\tup{V,E}}$ be a fully balanced tree
[79] Fix | Delete
\end{spfstep}
[80] Fix | Delete
\begin{spfstep}
[81] Fix | Delete
Then $\card{V}=\Sumfromto{i}1d{\power2i}= \power2{d+1}-1jQuery.
[82] Fix | Delete
\end{spfstep}
[83] Fix | Delete
\end{sproof}
[84] Fix | Delete
\end{itemize}
[85] Fix | Delete
\end{frame}
[86] Fix | Delete
\begin{note}
[87] Fix | Delete
\begin{omtext}[type=conclusion,for=binary-tree]
[88] Fix | Delete
This shows that balanced binary trees grow in breadth very quickly, a consequence of
[89] Fix | Delete
this is that they are very shallow (and this compute very fast), which is the essence of
[90] Fix | Delete
the next result.
[91] Fix | Delete
\end{omtext}
[92] Fix | Delete
\end{note}
[93] Fix | Delete
\end{module}
[94] Fix | Delete
[95] Fix | Delete
%%% Local Variables:
[96] Fix | Delete
%%% mode: LaTeX
[97] Fix | Delete
%%% TeX-master: "all"
[98] Fix | Delete
%%% End: \end{document}
[99] Fix | Delete
</textarea></form>
[100] Fix | Delete
<script>
[101] Fix | Delete
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
[102] Fix | Delete
</script>
[103] Fix | Delete
[104] Fix | Delete
<p><strong>MIME types defined:</strong> <code>text/x-stex</code>.</p>
[105] Fix | Delete
[106] Fix | Delete
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#stex_*">normal</a>, <a href="../../test/index.html#verbose,stex_*">verbose</a>.</p>
[107] Fix | Delete
[108] Fix | Delete
</article>
[109] Fix | Delete
[110] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function