2.3 Theorem styles

preamble/SoM.tex defines a range of theorem-like styles, and sets up sequential numbering indexed on chapter. Here is an example of a theorem and a proof environment. Theorem 2.1 and its proof will be in the exam:

Theorem 2.1.

Let 𝐞k=𝐑k𝐞0\mathbf{e}_{k}=\mathbf{R}^{k}\mathbf{e}_{0}, for kk\in\mathbb{N} and some 𝐑n×n\mathbf{R}\in\mathbb{R}^{n\times n}. If 𝐑p<1\left\|\mathbf{R}\right\|_{p}<1, then 𝐞kp0\left\|\mathbf{e}_{k}\right\|_{p}\to 0 as kk\to\infty. Change

Proof.

We have

𝐞kp\displaystyle\left\|\mathbf{e}_{k}\right\|_{p} =𝐑k𝐞0p\displaystyle=\left\|\mathbf{R}^{k}\mathbf{e}_{0}\right\|_{p}
𝐑kp𝐞0p\displaystyle\leqslant\left\|\mathbf{R}^{k}\right\|_{p}\left\|\mathbf{e}_{0}% \right\|_{p}
𝐑pk𝐞0p\displaystyle\leqslant\left\|\mathbf{R}\right\|_{p}^{k}\left\|\mathbf{e}_{0}% \right\|_{p}

and so 𝐞kp0\left\|\mathbf{e}_{k}\right\|_{p}\to 0 as kk\to\infty if 𝐑p<1\left\|\mathbf{R}\right\|_{p}<1. ∎

Note that the align environment is used in the proof, and also works as expected in the HTML version.

There is also a numbered “Example” environment, which has a left-side bar to differentiate it from the rest of the notes. To remove the numbering, see SoM.tex.

Example 2.2.

Let

𝐀=[211433879].\mathbf{A}=\begin{bmatrix}2&1&1\\ 4&3&3\\ 8&7&9\\ \end{bmatrix}.

We want to put 𝐀\mathbf{A} into row echelon form. We create zeros below the diagonal in the first column by subtracting multiples of the first row from the other rows:

𝐋1𝐀=[100210401][211433879]=[211011035].\mathbf{L}_{1}\mathbf{A}=\begin{bmatrix}1&0&0\\ -2&1&0\\ -4&0&1\\ \end{bmatrix}\cdot\begin{bmatrix}2&1&1\\ 4&3&3\\ 8&7&9\\ \end{bmatrix}=\begin{bmatrix}2&1&1\\ 0&1&1\\ 0&3&5\\ \end{bmatrix}.

Repeating this for the second column

𝐋2(𝐋1𝐀)=[100010031][211011035]=[211011002]=𝐔.\mathbf{L}_{2}\left(\mathbf{L}_{1}\mathbf{A}\right)=\begin{bmatrix}1&0&0\\ 0&1&0\\ 0&-3&1\\ \end{bmatrix}\cdot\begin{bmatrix}2&1&1\\ 0&1&1\\ 0&3&5\\ \end{bmatrix}=\begin{bmatrix}2&1&1\\ 0&1&1\\ 0&0&2\\ \end{bmatrix}=\mathbf{U}.

The above procedure factorises 𝐀\mathbf{A} as 𝐀=(𝐋2𝐋1)1𝐔\mathbf{A}=\left(\mathbf{L}_{2}\mathbf{L}_{1}\right)^{-1}\mathbf{U}.

And some extra text after the example to show the return to the regular layout.

If you wish to use a different theorem style, you can do so by editing preamble/SoM.tex. To reflect these changes in the HTML, you can edit the CSS in bmluser/SoM.css. .ltx_theorem_theorem is the class for theorems, and .ltx_theorem_proof and similar. to edit specifically wish to edit the way it looks in sepia mode or night mode. Add css to .color-theme-1 .ltx_theorem_theorem and .color-theme-1 .ltx_theorem_theorem respectively.

2.3.1 Solutions

If you wish to hide create a version of the documents with and without solutions, this is generally done using the version package. This is not compatible with BookML. However, we can navigate this with a few options.

The first choice is to replicate the package using the comment package. Add this code to your preamble.

\iflatexml

      \usepackage{comment}

     % \excludecomment{sol}

      \includecomment{sol}

\else

      \usepackage{version}

      % \excludeversion{sol}

      \includeversion{sol}

\fi

Alternatively, if you wish to allow students to view solutions but have them hidden, you can use HTML to create a dropdown that students can access with the solution under. Uncomment the following code in SoM.tex.

\iflatexml

    \renewenvironment{solution}

    {\<details style="text-align: left; width: 100\%" open="">

    \<summary>  \textbf{Solution}  \</summary>  \\}

    {\</details> }

\else

    \usepackage{version}

    % \excludeversion{solution}

    \includeversion{solution}

\fi

This would look like:

Solution

This is how we solve a quadratic.