Indicator functions and comprehension [00LL]
- January 25, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Definition Predicate [00LO]
- January 25, 2024
- Jon Sterling
A predicate on a set A is defined to be a function \phi \colon A\to {\mathopen {}\left [2\right ]\mathclose {}} from A to the two-element set {\mathopen {}\left [2\right ]\mathclose {}}={\mathopen {}\left \{0,1\right \}\mathclose {}}. We say that a predicate \phi holds of a given element a:A when \phi {\mathopen {}\left (a\right )\mathclose {}}=1.
Definition The indicator function of a subset [00LM]
- January 25, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The indicator function or characteristic function of S\subseteq A is defined to be the predicate \chi _S\colon A\to {\mathopen {}\left [2\right ]\mathclose {}} defined piecewise below:
\chi _S{\mathopen {}\left (a\right )\mathclose {}} = \begin {cases} 1 & \text {if } a \in S\\ 0 & \text {if } a \not \in S \end {cases}Definition The comprehension of a predicate [00LP]
- January 25, 2024
- Jon Sterling
Let \phi \colon A\to {\mathopen {}\left [2\right ]\mathclose {}} be a predicate on a set A. The comprehension of \phi is defined to be the following subset {\mathopen {}\left [\phi \right ]\mathclose {}}\subseteq A spanned by elements at which \phi holds, as specified below:
{\mathopen {}\left [\phi \right ]\mathclose {}} = {\mathopen {}\left \{a: A\,\middle \vert \,\phi {\mathopen {}\left (a\right )\mathclose {}}=1\right \}\mathclose {}}Theorem Universal property of indicator functions [00LN]
- January 25, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The mappings \chi _{{\mathopen {}\left (-\right )\mathclose {}}}\colon \mathcal {P}{\mathopen {}\left (A\right )\mathclose {}}\to {\mathopen {}\left (A\to {\mathopen {}\left [2\right ]\mathclose {}}\right )\mathclose {}} and {\mathopen {}\left [-\right ]\mathclose {}}\colon {\mathopen {}\left (A\to {\mathopen {}\left [2\right ]\mathclose {}}\right )\mathclose {}}\to \mathcal {P}{\mathopen {}\left (A\right )\mathclose {}} given by indicator functions and comprehension are mutually inverse. Thus we have \mathcal {P}{\mathopen {}\left (A\right )\mathclose {}}\cong {\mathopen {}\left (A\to {\mathopen {}\left [2\right ]\mathclose {}}\right )\mathclose {}}.
Proof.
- January 25, 2024
- Jon Sterling
Fixing S\subseteq A, we compute:
\begin {aligned} {\mathopen {}\left [\chi _{S}\right ]\mathclose {}} &= {\mathopen {}\left \{a: A\,\middle \vert \,\chi _S{\mathopen {}\left (a\right )\mathclose {}}=1\right \}\mathclose {}}\\ &= {\mathopen {}\left \{a: A\,\middle \vert \,a\in S\right \}\mathclose {}}\\ &= S \end {aligned}Conversely, we fix \phi \colon A \to {\mathopen {}\left [2\right ]\mathclose {}} and compute:
\begin {aligned} \chi _{{\mathopen {}\left [\phi \right ]\mathclose {}}}{\mathopen {}\left (a\right )\mathclose {}} &= \begin {cases} 1 & \text {if } a \in {\mathopen {}\left [\phi \right ]\mathclose {}}\\ 0 & \text {if } a \not \in {\mathopen {}\left [\phi \right ]\mathclose {}} \end {cases} \\ &= \begin {cases} 1 &\text {if } \phi {\mathopen {}\left (a\right )\mathclose {}}=1\\ 0 &\text {if } \phi {\mathopen {}\left (a\right )\mathclose {}}\not =1 \end {cases} \\ &= \begin {cases} 1 &\text {if } \phi {\mathopen {}\left (a\right )\mathclose {}}=1\\ 0 &\text {if } \phi {\mathopen {}\left (a\right )\mathclose {}}=0 \end {cases} \\ &= \phi {\mathopen {}\left (a\right )\mathclose {}} \end {aligned}Example An identity involving indicator functions [00LQ]
- January 25, 2024
- Jon Sterling
For any set X, we have \mathcal {P}{\mathopen {}\left (X+{\mathopen {}\left [1\right ]\mathclose {}}\right )\mathclose {}} \cong \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}+\mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}, where + denotes disjoint union.
Proof.
- January 25, 2024
- Jon Sterling
We first note that \mathcal {P}{\mathopen {}\left (X+{\mathopen {}\left [1\right ]\mathclose {}}\right )\mathclose {}}\cong {\mathopen {}\left ({\mathopen {}\left (X+{\mathopen {}\left [1\right ]\mathclose {}}\right )\mathclose {}}\to {\mathopen {}\left [2\right ]\mathclose {}}\right )\mathclose {}} by Theorem [00LN]. A map out of a disjoint union is given by one map for each side, so this is isomorphic to {\mathopen {}\left (X\to {\mathopen {}\left [2\right ]\mathclose {}}\right )\mathclose {}}\times {\mathopen {}\left ({\mathopen {}\left [1\right ]\mathclose {}}\to {\mathopen {}\left [2\right ]\mathclose {}}\right )\mathclose {}}. Applying Theorem [00LN] again in the other direction, this is isomorphic to \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}\times {\mathopen {}\left [2\right ]\mathclose {}}. We finally compute:
\begin {aligned} \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}\times {\mathopen {}\left [2\right ]\mathclose {}} &= \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}\times {\mathopen {}\left ({\mathopen {}\left [1\right ]\mathclose {}}+{\mathopen {}\left [1\right ]\mathclose {}}\right )\mathclose {}}\\ &= \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}\times {\mathopen {}\left [1\right ]\mathclose {}}+\mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}\times {\mathopen {}\left [1\right ]\mathclose {}}\\ &= \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}+\mathcal {P}{\mathopen {}\left (X\right )\mathclose {}} \end {aligned}