add new stackrel-compatible-auto-inserting-padding-environment
This commit is contained in:
@@ -15,28 +15,28 @@
|
||||
|
||||
\begin{proof}
|
||||
Sei $x \in \mathbb{K}^{n}$. Dann ist
|
||||
\begin{align*}
|
||||
\Vert (\mathbb{I} + B) x \Vert \qquad
|
||||
&= \qquad \Vert x + B x\Vert \\
|
||||
&\stackrel{\text{Dreiecksungl.}}{\ge } \qquad \Vert x \Vert - \Vert Bx \Vert \\
|
||||
\begin{salign}
|
||||
\Vert (\mathbb{I} + B) x \Vert
|
||||
&= \Vert x + B x\Vert \\
|
||||
&\stackrel{\text{Dreiecksungl.}}{\ge } \Vert x \Vert - \Vert Bx \Vert \\
|
||||
&\stackrel{\Vert Bx \Vert \le \Vert B \Vert \Vert x \Vert}{\ge }
|
||||
\qquad \Vert x \Vert - \Vert B \Vert \cdot \Vert x \Vert \\
|
||||
&= \qquad ( \underbrace{1 - \Vert B \Vert}_{> 0}) \Vert x \Vert
|
||||
.\end{align*}
|
||||
\Vert x \Vert - \Vert B \Vert \cdot \Vert x \Vert \\
|
||||
&= ( \underbrace{1 - \Vert B \Vert}_{> 0}) \Vert x \Vert
|
||||
.\end{salign}
|
||||
Also hat die Gleichung $(\mathbb{I} + B) x = 0$ nur die Lösung $x = 0$, also
|
||||
ist $(\mathbb{I} + B)$ injektiv und mit \ref{lemma:linabb} regulär.
|
||||
|
||||
Bleibt zu zeigen: $\Vert (\mathbb{I} + B)^{-1} \Vert \le \frac{1}{1 - \Vert B \Vert}$.
|
||||
Es gilt
|
||||
\begin{align*}
|
||||
1 \qquad &= \qquad \Vert \mathbb{I}\Vert \\
|
||||
&= \qquad \Vert (\mathbb{I} + B) (\mathbb{I} + B)^{-1} \Vert \\
|
||||
&= \qquad \Vert (\mathbb{I} + B)^{-1} + B (\mathbb{I} + B)^{-1} \Vert \\
|
||||
&\stackrel{\text{Dreicksungl.}}{\ge } \qquad \Vert (\mathbb{I} + B)^{-1} \Vert
|
||||
\begin{salign}
|
||||
1 &= \Vert \mathbb{I}\Vert \\
|
||||
&= \Vert (\mathbb{I} + B) (\mathbb{I} + B)^{-1} \Vert \\
|
||||
&= \Vert (\mathbb{I} + B)^{-1} + B (\mathbb{I} + B)^{-1} \Vert \\
|
||||
&\stackrel{\text{Dreicksungl.}}{\ge } \Vert (\mathbb{I} + B)^{-1} \Vert
|
||||
- \Vert B (\mathbb{I} + B)^{-1} \Vert \\
|
||||
&\ge \qquad \Vert (\mathbb{I} + B)^{-1} \Vert - \Vert B \Vert \cdot \Vert (\mathbb{I} + B)^{-1} \Vert \\
|
||||
&= \qquad (1 - \Vert B \Vert) \Vert (\mathbb{I} + B)^{-1} \Vert
|
||||
.\end{align*}
|
||||
&\ge \Vert (\mathbb{I} + B)^{-1} \Vert - \Vert B \Vert \cdot \Vert (\mathbb{I} + B)^{-1} \Vert \\
|
||||
&= (1 - \Vert B \Vert) \Vert (\mathbb{I} + B)^{-1} \Vert
|
||||
.\end{salign}
|
||||
Damit folgt die Behauptung.
|
||||
\end{proof}
|
||||
|
||||
|
||||
Binary file not shown.
+64
@@ -24,6 +24,7 @@
|
||||
\RequirePackage[hidelinks, unicode]{hyperref} %[unicode, hidelinks]{hyperref}
|
||||
\RequirePackage{bookmark}
|
||||
\RequirePackage{wasysym}
|
||||
\RequirePackage{environ}
|
||||
|
||||
\usetikzlibrary{quotes, angles}
|
||||
|
||||
@@ -153,3 +154,66 @@
|
||||
|
||||
% people seem to prefer varepsilon over epsilon
|
||||
\renewcommand{\epsilon}{\varepsilon}
|
||||
|
||||
\ExplSyntaxOn
|
||||
|
||||
% S-tackrelcompatible ALIGN environment
|
||||
% some might also call it the S-uper ALIGN environment
|
||||
% uses regular expressions to calculate the widest stackrel
|
||||
% to put additional padding on both sides of relation symbols
|
||||
\NewEnviron{salign}
|
||||
{
|
||||
\begin{align*}
|
||||
\lec_insert_padding:V \BODY
|
||||
.\end{align*}
|
||||
}
|
||||
|
||||
% some helper variables
|
||||
\tl_new:N \l__lec_text_tl
|
||||
\seq_new:N \l_lec_stackrels_seq
|
||||
\int_new:N \l_stackrel_count_int
|
||||
\int_new:N \l_idx_int
|
||||
\box_new:N \l_tmp_box
|
||||
\dim_new:N \l_tmp_dim_a
|
||||
\dim_new:N \l_tmp_dim_b
|
||||
\dim_new:N \l_tmp_dim_needed
|
||||
|
||||
% function to insert padding according to widest stackrel
|
||||
\cs_new_protected:Nn \lec_insert_padding:n
|
||||
{
|
||||
\tl_set:Nn \l__lec_text_tl { #1 }
|
||||
% get all stackrels in this align environment
|
||||
\regex_extract_all:nnN { \c{stackrel}{(.*?)}{(.*?)} } { #1 } \l_lec_stackrels_seq
|
||||
% get number of stackrels
|
||||
\int_set:Nn \l_stackrel_count_int { \seq_count:N \l_lec_stackrels_seq }
|
||||
\int_set:Nn \l_idx_int { 1 }
|
||||
\dim_set:Nn \l_tmp_dim_needed { 0pt }
|
||||
% iterate over stackrels
|
||||
\int_while_do:nn { \l_idx_int <= \l_stackrel_count_int }
|
||||
{
|
||||
% calculate width of text
|
||||
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 1 }$}
|
||||
\dim_set:Nn \l_tmp_dim_a {\box_wd:N \l_tmp_box}
|
||||
% calculate width of relation symbol
|
||||
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 2 }$}
|
||||
\dim_set:Nn \l_tmp_dim_b {\box_wd:N \l_tmp_box}
|
||||
% check if 0.5*(a-b) > minimum padding, if yes updated minimum padding
|
||||
\dim_compare:nNnTF
|
||||
{ 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } > { \l_tmp_dim_needed }
|
||||
{ \dim_set:Nn \l_tmp_dim_needed { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } }
|
||||
{ }
|
||||
\quad
|
||||
% increment list index by three, as every stackrel produces three list entries
|
||||
\int_incr:N \l_idx_int
|
||||
\int_incr:N \l_idx_int
|
||||
\int_incr:N \l_idx_int
|
||||
}
|
||||
% replace all relations with align characters (&) and add the needed padding
|
||||
\regex_replace_all:nnN
|
||||
{ (&=|&\c{le}|&\c{ge}|&\c{stackrel}{.*?}{.*?}|&\c{neq}) }
|
||||
{ \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
|
||||
\l__lec_text_tl
|
||||
\l__lec_text_tl
|
||||
}
|
||||
\cs_generate_variant:Nn \lec_insert_padding:n { V }
|
||||
\ExplSyntaxOff
|
||||
|
||||
Reference in New Issue
Block a user