add new stackrel-compatible-auto-inserting-padding-environment
This commit is contained in:
@@ -15,28 +15,28 @@
|
|||||||
|
|
||||||
\begin{proof}
|
\begin{proof}
|
||||||
Sei $x \in \mathbb{K}^{n}$. Dann ist
|
Sei $x \in \mathbb{K}^{n}$. Dann ist
|
||||||
\begin{align*}
|
\begin{salign}
|
||||||
\Vert (\mathbb{I} + B) x \Vert \qquad
|
\Vert (\mathbb{I} + B) x \Vert
|
||||||
&= \qquad \Vert x + B x\Vert \\
|
&= \Vert x + B x\Vert \\
|
||||||
&\stackrel{\text{Dreiecksungl.}}{\ge } \qquad \Vert x \Vert - \Vert Bx \Vert \\
|
&\stackrel{\text{Dreiecksungl.}}{\ge } \Vert x \Vert - \Vert Bx \Vert \\
|
||||||
&\stackrel{\Vert Bx \Vert \le \Vert B \Vert \Vert x \Vert}{\ge }
|
&\stackrel{\Vert Bx \Vert \le \Vert B \Vert \Vert x \Vert}{\ge }
|
||||||
\qquad \Vert x \Vert - \Vert B \Vert \cdot \Vert x \Vert \\
|
\Vert x \Vert - \Vert B \Vert \cdot \Vert x \Vert \\
|
||||||
&= \qquad ( \underbrace{1 - \Vert B \Vert}_{> 0}) \Vert x \Vert
|
&= ( \underbrace{1 - \Vert B \Vert}_{> 0}) \Vert x \Vert
|
||||||
.\end{align*}
|
.\end{salign}
|
||||||
Also hat die Gleichung $(\mathbb{I} + B) x = 0$ nur die Lösung $x = 0$, also
|
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.
|
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}$.
|
Bleibt zu zeigen: $\Vert (\mathbb{I} + B)^{-1} \Vert \le \frac{1}{1 - \Vert B \Vert}$.
|
||||||
Es gilt
|
Es gilt
|
||||||
\begin{align*}
|
\begin{salign}
|
||||||
1 \qquad &= \qquad \Vert \mathbb{I}\Vert \\
|
1 &= \Vert \mathbb{I}\Vert \\
|
||||||
&= \qquad \Vert (\mathbb{I} + B) (\mathbb{I} + B)^{-1} \Vert \\
|
&= \Vert (\mathbb{I} + B) (\mathbb{I} + B)^{-1} \Vert \\
|
||||||
&= \qquad \Vert (\mathbb{I} + B)^{-1} + B (\mathbb{I} + B)^{-1} \Vert \\
|
&= \Vert (\mathbb{I} + B)^{-1} + B (\mathbb{I} + B)^{-1} \Vert \\
|
||||||
&\stackrel{\text{Dreicksungl.}}{\ge } \qquad \Vert (\mathbb{I} + B)^{-1} \Vert
|
&\stackrel{\text{Dreicksungl.}}{\ge } \Vert (\mathbb{I} + B)^{-1} \Vert
|
||||||
- \Vert B (\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 \\
|
&\ge \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
|
&= (1 - \Vert B \Vert) \Vert (\mathbb{I} + B)^{-1} \Vert
|
||||||
.\end{align*}
|
.\end{salign}
|
||||||
Damit folgt die Behauptung.
|
Damit folgt die Behauptung.
|
||||||
\end{proof}
|
\end{proof}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
+64
@@ -24,6 +24,7 @@
|
|||||||
\RequirePackage[hidelinks, unicode]{hyperref} %[unicode, hidelinks]{hyperref}
|
\RequirePackage[hidelinks, unicode]{hyperref} %[unicode, hidelinks]{hyperref}
|
||||||
\RequirePackage{bookmark}
|
\RequirePackage{bookmark}
|
||||||
\RequirePackage{wasysym}
|
\RequirePackage{wasysym}
|
||||||
|
\RequirePackage{environ}
|
||||||
|
|
||||||
\usetikzlibrary{quotes, angles}
|
\usetikzlibrary{quotes, angles}
|
||||||
|
|
||||||
@@ -153,3 +154,66 @@
|
|||||||
|
|
||||||
% people seem to prefer varepsilon over epsilon
|
% people seem to prefer varepsilon over epsilon
|
||||||
\renewcommand{\epsilon}{\varepsilon}
|
\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