From 4ad3b9ab829e8897a27aabb32fc08b1b2a6aac09 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 21:41:54 +0000 Subject: [PATCH] Split the indicator section into one div per subfile Pure move: each div is unchanged and the section file includes it in place, so the rendered main content is identical. No heading changes. check-one-div-per-subfile judges a whole touched file, so this lets the indicator headings be promoted in a later PR. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_019xfc9r2idFsJ4pHCsRGyGx --- .../_def-indicator-function.qmd | 18 +++ .../_def-iverson-bracket.qmd | 15 ++ .../_def-kronecker-delta.qmd | 15 ++ .../_def-predicate-indicator.qmd | 17 +++ .../_exm-indicator-numerical.qmd | 22 +++ .../_exm-iverson-bracket.qmd | 8 ++ .../_exm-kronecker-delta.qmd | 32 +++++ .../_sec-indicator-functions.qmd | 134 +----------------- 8 files changed, 134 insertions(+), 127 deletions(-) create mode 100644 _subfiles/indicator-functions/_def-indicator-function.qmd create mode 100644 _subfiles/indicator-functions/_def-iverson-bracket.qmd create mode 100644 _subfiles/indicator-functions/_def-kronecker-delta.qmd create mode 100644 _subfiles/indicator-functions/_def-predicate-indicator.qmd create mode 100644 _subfiles/indicator-functions/_exm-indicator-numerical.qmd create mode 100644 _subfiles/indicator-functions/_exm-iverson-bracket.qmd create mode 100644 _subfiles/indicator-functions/_exm-kronecker-delta.qmd diff --git a/_subfiles/indicator-functions/_def-indicator-function.qmd b/_subfiles/indicator-functions/_def-indicator-function.qmd new file mode 100644 index 000000000..a6776dc43 --- /dev/null +++ b/_subfiles/indicator-functions/_def-indicator-function.qmd @@ -0,0 +1,18 @@ +:::{#def-indicator-function} +#### Indicator function, set indicator + +For any subset $A \subseteq \universe$ of a universal set $\universe$, +the **indicator function** of $A$, +[@wikipedia_indicator_function] +or **set indicator**, +is the function +$\indic{A} : \universe \to \{0, 1\}$ defined by: + +$$ +\indic{A}(x) \eqdef \begin{cases} +1, & x \in A \\ +0, & x \notin A +\end{cases} +$$ + +::: diff --git a/_subfiles/indicator-functions/_def-iverson-bracket.qmd b/_subfiles/indicator-functions/_def-iverson-bracket.qmd new file mode 100644 index 000000000..925a3cff4 --- /dev/null +++ b/_subfiles/indicator-functions/_def-iverson-bracket.qmd @@ -0,0 +1,15 @@ +:::{#def-iverson-bracket} +#### Iverson bracket + +For any logical proposition $P$, +the **Iverson bracket** of $P$ is +[@wikipedia_iverson_bracket] + +$$ +[P] \eqdef \begin{cases} +1, & \text{if } P \text{ is true} \\ +0, & \text{if } P \text{ is false} +\end{cases} +$$ + +::: diff --git a/_subfiles/indicator-functions/_def-kronecker-delta.qmd b/_subfiles/indicator-functions/_def-kronecker-delta.qmd new file mode 100644 index 000000000..af411fb48 --- /dev/null +++ b/_subfiles/indicator-functions/_def-kronecker-delta.qmd @@ -0,0 +1,15 @@ +:::{#def-kronecker-delta} +#### Kronecker delta + +For integers $i$ and $j$, +the **Kronecker delta** is +[@wikipedia_kronecker_delta] + +$$\kron_{ij} \eqdef [i = j]$$ + +that is, +$\kron_{ij} = 1$ when $i = j$ +and $\kron_{ij} = 0$ when $i \neq j$ +(@def-iverson-bracket). + +::: diff --git a/_subfiles/indicator-functions/_def-predicate-indicator.qmd b/_subfiles/indicator-functions/_def-predicate-indicator.qmd new file mode 100644 index 000000000..d1d1b829d --- /dev/null +++ b/_subfiles/indicator-functions/_def-predicate-indicator.qmd @@ -0,0 +1,17 @@ +:::{#def-predicate-indicator} +#### Predicate indicator + +For any logical proposition or predicate $P$, +the **indicator** of $P$, +or **predicate indicator**, +takes the value $1$ when $P$ is true +and $0$ when $P$ is false: + +$$ +\indicp{P} \eqdef \begin{cases} +1, & \text{if } P \text{ is true} \\ +0, & \text{if } P \text{ is false} +\end{cases} +$$ + +::: diff --git a/_subfiles/indicator-functions/_exm-indicator-numerical.qmd b/_subfiles/indicator-functions/_exm-indicator-numerical.qmd new file mode 100644 index 000000000..3e97dd664 --- /dev/null +++ b/_subfiles/indicator-functions/_exm-indicator-numerical.qmd @@ -0,0 +1,22 @@ +:::{#exm-indicator-numerical} +#### Evaluating set and predicate indicators + +Consider the real line $\universe = \reals$, +the set of nonnegative numbers $A = [0, \infty)$, +and a continuous +[random variable](https://morrison-lab.github.io/pds/random-variables.html#def-random-variable) +$Y$ (defined in the Morrison Lab's probability notes). + +1. Set indicator $\indic{A}(x)$: + - For $x = 3.5$: since $3.5 \in [0, \infty)$, $\indic{A}(3.5) = 1$. + - For $x = -2.1$: since $-2.1 \notin [0, \infty)$, $\indic{A}(-2.1) = 0$. + +2. Predicate indicator $\indicp{Y > 5}$: + - If an observation yields $Y = 7.2$, + the predicate $7.2 > 5$ is true, + so $\indicp{7.2 > 5} = 1$. + - If an observation yields $Y = 4.1$, + the predicate $4.1 > 5$ is false, + so $\indicp{4.1 > 5} = 0$. + +::: diff --git a/_subfiles/indicator-functions/_exm-iverson-bracket.qmd b/_subfiles/indicator-functions/_exm-iverson-bracket.qmd new file mode 100644 index 000000000..ebb20a5f9 --- /dev/null +++ b/_subfiles/indicator-functions/_exm-iverson-bracket.qmd @@ -0,0 +1,8 @@ +:::{#exm-iverson-bracket} +#### Evaluating Iverson brackets + +- $[3 > 2] = 1$, because $3 > 2$ is true. +- $[2 > 3] = 0$, because $2 > 3$ is false. +- $[4 \in \cb{1, 2}] = 0$, because $4$ is not an element of $\cb{1, 2}$. + +::: diff --git a/_subfiles/indicator-functions/_exm-kronecker-delta.qmd b/_subfiles/indicator-functions/_exm-kronecker-delta.qmd new file mode 100644 index 000000000..5a818cbbd --- /dev/null +++ b/_subfiles/indicator-functions/_exm-kronecker-delta.qmd @@ -0,0 +1,32 @@ +:::{#exm-kronecker-delta} +#### Evaluating the Kronecker delta + +- $$ + \begin{aligned} + \kron_{11} &= [1 = 1] \\ + &= 1. + \end{aligned} + $$ + +- $$ + \begin{aligned} + \kron_{12} &= [1 = 2] \\ + &= 0. + \end{aligned} + $$ + +- $$ + \begin{aligned} + \kron_{22} &= [2 = 2] \\ + &= 1. + \end{aligned} + $$ + +- $$ + \begin{aligned} + \kron_{23} &= [2 = 3] \\ + &= 0. + \end{aligned} + $$ + +::: diff --git a/_subfiles/indicator-functions/_sec-indicator-functions.qmd b/_subfiles/indicator-functions/_sec-indicator-functions.qmd index 56915c528..2b7934adf 100644 --- a/_subfiles/indicator-functions/_sec-indicator-functions.qmd +++ b/_subfiles/indicator-functions/_sec-indicator-functions.qmd @@ -23,69 +23,15 @@ This section summarizes the principal notational conventions. {{< slidebreak >}} -:::{#def-indicator-function} -#### Indicator function, set indicator - -For any subset $A \subseteq \universe$ of a universal set $\universe$, -the **indicator function** of $A$, -[@wikipedia_indicator_function] -or **set indicator**, -is the function -$\indic{A} : \universe \to \{0, 1\}$ defined by: - -$$ -\indic{A}(x) \eqdef \begin{cases} -1, & x \in A \\ -0, & x \notin A -\end{cases} -$$ - -::: +{{< include mds/_subfiles/indicator-functions/_def-indicator-function.qmd >}} {{< slidebreak >}} -:::{#def-predicate-indicator} -#### Predicate indicator - -For any logical proposition or predicate $P$, -the **indicator** of $P$, -or **predicate indicator**, -takes the value $1$ when $P$ is true -and $0$ when $P$ is false: - -$$ -\indicp{P} \eqdef \begin{cases} -1, & \text{if } P \text{ is true} \\ -0, & \text{if } P \text{ is false} -\end{cases} -$$ - -::: +{{< include mds/_subfiles/indicator-functions/_def-predicate-indicator.qmd >}} {{< slidebreak >}} -:::{#exm-indicator-numerical} -#### Evaluating set and predicate indicators - -Consider the real line $\universe = \reals$, -the set of nonnegative numbers $A = [0, \infty)$, -and a continuous -[random variable](https://morrison-lab.github.io/pds/random-variables.html#def-random-variable) -$Y$ (defined in the Morrison Lab's probability notes). - -1. Set indicator $\indic{A}(x)$: - - For $x = 3.5$: since $3.5 \in [0, \infty)$, $\indic{A}(3.5) = 1$. - - For $x = -2.1$: since $-2.1 \notin [0, \infty)$, $\indic{A}(-2.1) = 0$. - -2. Predicate indicator $\indicp{Y > 5}$: - - If an observation yields $Y = 7.2$, - the predicate $7.2 > 5$ is true, - so $\indicp{7.2 > 5} = 1$. - - If an observation yields $Y = 4.1$, - the predicate $4.1 > 5$ is false, - so $\indicp{4.1 > 5} = 0$. - -::: +{{< include mds/_subfiles/indicator-functions/_exm-indicator-numerical.qmd >}} {{< slidebreak >}} @@ -173,32 +119,11 @@ the Iverson bracket {{< slidebreak >}} -:::{#def-iverson-bracket} -#### Iverson bracket - -For any logical proposition $P$, -the **Iverson bracket** of $P$ is -[@wikipedia_iverson_bracket] - -$$ -[P] \eqdef \begin{cases} -1, & \text{if } P \text{ is true} \\ -0, & \text{if } P \text{ is false} -\end{cases} -$$ - -::: +{{< include mds/_subfiles/indicator-functions/_def-iverson-bracket.qmd >}} {{< slidebreak >}} -:::{#exm-iverson-bracket} -#### Evaluating Iverson brackets - -- $[3 > 2] = 1$, because $3 > 2$ is true. -- $[2 > 3] = 0$, because $2 > 3$ is false. -- $[4 \in \cb{1, 2}] = 0$, because $4$ is not an element of $\cb{1, 2}$. - -::: +{{< include mds/_subfiles/indicator-functions/_exm-iverson-bracket.qmd >}} {{< slidebreak >}} @@ -232,56 +157,11 @@ $$ {{< slidebreak >}} -:::{#def-kronecker-delta} -#### Kronecker delta - -For integers $i$ and $j$, -the **Kronecker delta** is -[@wikipedia_kronecker_delta] - -$$\kron_{ij} \eqdef [i = j]$$ - -that is, -$\kron_{ij} = 1$ when $i = j$ -and $\kron_{ij} = 0$ when $i \neq j$ -(@def-iverson-bracket). - -::: +{{< include mds/_subfiles/indicator-functions/_def-kronecker-delta.qmd >}} {{< slidebreak >}} -:::{#exm-kronecker-delta} -#### Evaluating the Kronecker delta - -- $$ - \begin{aligned} - \kron_{11} &= [1 = 1] \\ - &= 1. - \end{aligned} - $$ - -- $$ - \begin{aligned} - \kron_{12} &= [1 = 2] \\ - &= 0. - \end{aligned} - $$ - -- $$ - \begin{aligned} - \kron_{22} &= [2 = 2] \\ - &= 1. - \end{aligned} - $$ - -- $$ - \begin{aligned} - \kron_{23} &= [2 = 3] \\ - &= 0. - \end{aligned} - $$ - -::: +{{< include mds/_subfiles/indicator-functions/_exm-kronecker-delta.qmd >}} ### Strengths and limitations of the Iverson bracket