Index and function sets.

c-declarations
Joshua Potter 2024-07-12 05:29:41 -06:00
parent 65517ee3f8
commit cd8d44a55e
8 changed files with 330 additions and 9 deletions

View File

@ -229,7 +229,7 @@
"_journal/2024-02/2024-02-14.md": "aa009f9569e175a8104b0537ebcc5520", "_journal/2024-02/2024-02-14.md": "aa009f9569e175a8104b0537ebcc5520",
"_journal/2024-02-16.md": "5cc129254afd553829be3364facd23db", "_journal/2024-02-16.md": "5cc129254afd553829be3364facd23db",
"_journal/2024-02/2024-02-15.md": "16cb7563d404cb543719b7bb5037aeed", "_journal/2024-02/2024-02-15.md": "16cb7563d404cb543719b7bb5037aeed",
"algebra/floor-ceiling.md": "aa89a485faeb7e71ef68da9200544184", "algebra/floor-ceiling.md": "a22efe853ad1234b2d3e0d7cc7e6fc47",
"algebra/index.md": "90b842eb694938d87c7c68779a5cacd1", "algebra/index.md": "90b842eb694938d87c7c68779a5cacd1",
"algorithms/binary-search.md": "8533a05ea372e007ab4e8a36fd2772a9", "algorithms/binary-search.md": "8533a05ea372e007ab4e8a36fd2772a9",
"_journal/2024-02-17.md": "7c37cb10515ed3d2f5388eaf02a67048", "_journal/2024-02-17.md": "7c37cb10515ed3d2f5388eaf02a67048",
@ -460,7 +460,7 @@
"_journal/2024-05/2024-05-16.md": "9fdfadc3f9ea6a4418fd0e7066d6b10c", "_journal/2024-05/2024-05-16.md": "9fdfadc3f9ea6a4418fd0e7066d6b10c",
"_journal/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c", "_journal/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c",
"hashing/direct-addressing.md": "f75cc22e74ae974fe4f568a2ee9f951f", "hashing/direct-addressing.md": "f75cc22e74ae974fe4f568a2ee9f951f",
"hashing/index.md": "378d86af6fe91fa93a6d9a6d8e52a1bf", "hashing/index.md": "e90b8e0eb7b93fda713c364027da71c2",
"set/classes.md": "6776b4dc415021e0ef60b323b5c2d436", "set/classes.md": "6776b4dc415021e0ef60b323b5c2d436",
"_journal/2024-05-19.md": "fddd90fae08fab9bd83b0ef5d362c93a", "_journal/2024-05-19.md": "fddd90fae08fab9bd83b0ef5d362c93a",
"_journal/2024-05/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c", "_journal/2024-05/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c",
@ -483,7 +483,7 @@
"_journal/2024-05/2024-05-25.md": "3e8a0061fa58a6e5c48d12800d1ab869", "_journal/2024-05/2024-05-25.md": "3e8a0061fa58a6e5c48d12800d1ab869",
"_journal/2024-05-27.md": "b36636d10eab34380f17f288868df3ae", "_journal/2024-05-27.md": "b36636d10eab34380f17f288868df3ae",
"_journal/2024-05/2024-05-26.md": "abe84b5beae74baa25501c818e64fc95", "_journal/2024-05/2024-05-26.md": "abe84b5beae74baa25501c818e64fc95",
"algebra/set.md": "237c9817db3d26f247e81ceb6a86b97f", "algebra/set.md": "204dba5e6da6257c01440758c17d305c",
"algebra/boolean.md": "ee41e624f4d3d3aca00020d9a9ae42c8", "algebra/boolean.md": "ee41e624f4d3d3aca00020d9a9ae42c8",
"git/merge-conflicts.md": "761ad6137ec51d3877f7d5b3615ca5cb", "git/merge-conflicts.md": "761ad6137ec51d3877f7d5b3615ca5cb",
"_journal/2024-05-28.md": "0f6aeb5ec126560acdc2d8c5c6570337", "_journal/2024-05-28.md": "0f6aeb5ec126560acdc2d8c5c6570337",
@ -537,7 +537,7 @@
"set/functions.md": "4fd3388fb21c77e96c6cfb703f3ed153", "set/functions.md": "4fd3388fb21c77e96c6cfb703f3ed153",
"_journal/2024-06-15.md": "92cb8dc5c98e10832fb70c0e3ab3cec4", "_journal/2024-06-15.md": "92cb8dc5c98e10832fb70c0e3ab3cec4",
"_journal/2024-06/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307", "_journal/2024-06/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307",
"lambda-calculus/beta-reduction.md": "5386403713b42ee1831d15c84de133ba", "lambda-calculus/beta-reduction.md": "e233c8352a8180d19f7b717946c379d1",
"_journal/2024-06-16.md": "ded6ab660ecc7c3dce3afd2e88e5a725", "_journal/2024-06-16.md": "ded6ab660ecc7c3dce3afd2e88e5a725",
"_journal/2024-06/2024-06-15.md": "c3a55549da9dfc2770bfcf403bf5b30b", "_journal/2024-06/2024-06-15.md": "c3a55549da9dfc2770bfcf403bf5b30b",
"_journal/2024-06-17.md": "63df6757bb3384e45093bf2b9456ffac", "_journal/2024-06-17.md": "63df6757bb3384e45093bf2b9456ffac",
@ -589,7 +589,10 @@
"_journal/2024-07-09.md": "00c357e9cfac6de17825b02fdbd00c80", "_journal/2024-07-09.md": "00c357e9cfac6de17825b02fdbd00c80",
"_journal/2024-07/2024-07-08.md": "03ed5604e680ac9742ee99ae4b1eee8b", "_journal/2024-07/2024-07-08.md": "03ed5604e680ac9742ee99ae4b1eee8b",
"_journal/2024-07-10.md": "2bb3db1f506f4ec7726cb5f2ed2daf24", "_journal/2024-07-10.md": "2bb3db1f506f4ec7726cb5f2ed2daf24",
"_journal/2024-07/2024-07-09.md": "00c357e9cfac6de17825b02fdbd00c80" "_journal/2024-07/2024-07-09.md": "00c357e9cfac6de17825b02fdbd00c80",
"_journal/2024-07-12.md": "247909b64d6b0dd7702d6a4482165c4d",
"_journal/2024-07/2024-07-11.md": "298cc3688675ee669b5a51d545fd61b5",
"_journal/2024-07/2024-07-10.md": "a0fe22d8be519bf435a5949999eeb4de"
}, },
"fields_dict": { "fields_dict": {
"Basic": [ "Basic": [

View File

@ -0,0 +1,11 @@
---
title: "2024-07-12"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Notes on [[set#Index Sets|index sets]] and [[set#Function Sets|function sets]].

View File

@ -0,0 +1,9 @@
---
title: "2024-07-11"
---
- [x] Anki Flashcards
- [x] KoL
- [ ] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)

View File

@ -291,7 +291,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
Given `A[p:q]` and $r = \lfloor (p + q) / 2 \rfloor$, what is the size of `A[p:r]` in terms of $n = q - p + 1$? Given `A[p:q]` and $r = \lfloor (p + q) / 2 \rfloor$, what is the size of `A[p:r]` in terms of $n = q - p + 1$?
Back: $\lceil n / 2 \rceil$. Back: $\lceil n / 2 \rceil$
Reference: Thomas H. Cormen et al., *Introduction to Algorithms*, 3rd ed (Cambridge, Mass: MIT Press, 2009). Reference: Thomas H. Cormen et al., *Introduction to Algorithms*, 3rd ed (Cambridge, Mass: MIT Press, 2009).
<!--ID: 1708742467192--> <!--ID: 1708742467192-->
END%% END%%
@ -299,7 +299,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
Given `A[p:q]` and $r = \lfloor (p + q) / 2 \rfloor$, what is the size of `A[r+1:q]` in terms of $n = q - p + 1$? Given `A[p:q]` and $r = \lfloor (p + q) / 2 \rfloor$, what is the size of `A[r+1:q]` in terms of $n = q - p + 1$?
Back: $\lfloor n / 2 \rfloor$. Back: $\lfloor n / 2 \rfloor$
Reference: Thomas H. Cormen et al., *Introduction to Algorithms*, 3rd ed (Cambridge, Mass: MIT Press, 2009). Reference: Thomas H. Cormen et al., *Introduction to Algorithms*, 3rd ed (Cambridge, Mass: MIT Press, 2009).
<!--ID: 1708742467198--> <!--ID: 1708742467198-->
END%% END%%

View File

@ -794,6 +794,304 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1718107987936--> <!--ID: 1718107987936-->
END%% END%%
## Index Sets
Let $I$ be a set, called the **index set**. Let $F$ be a [[functions|function]] whose domain includes $I$. Then we define $$\bigcup_{i \in I} F(i) = \bigcup\,\{F(i) \mid i \in I\}$$
and, if $I \neq \varnothing$, $$\bigcap_{i \in I} F(i) = \bigcap\, \{F(i) \mid i \in I\}$$
%%ANKI
Basic
What name does $I$ go by in expression $\bigcup_{i \in I} F(i)$?
Back: The "index set".
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492681-->
END%%
%%ANKI
Basic
How is $\bigcup_{i \in I} F(i)$ alternatively denoted?
Back: $\bigcup_{i \in I} F_i$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492687-->
END%%
%%ANKI
Basic
What kind of mathematic object is $I$ in expression $\bigcup_{i \in I} F(i)$?
Back: A set.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492690-->
END%%
%%ANKI
Basic
What kind of mathematic object is $F$ in expression $\bigcup_{i \in I} F(i)$?
Back: A function.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492693-->
END%%
%%ANKI
Basic
How is $\bigcup_{i \in I} F_i$ alternatively denoted?
Back: $\bigcup_{i \in I} F(i)$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782592276-->
END%%
%%ANKI
Basic
What kind of mathematic object is $F$ in expression $\bigcup_{i \in I} F_i$?
Back: A function.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782592281-->
END%%
%%ANKI
Basic
What is the domain of $F$ assumed to be in expression $\bigcup_{i \in I} F(i)$?
Back: Some superset of $I$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492696-->
END%%
%%ANKI
Basic
What condition must $I$ satisfy in expression $\bigcup_{i \in I} F(i)$?
Back: N/A.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492699-->
END%%
%%ANKI
Basic
Suppose $I = \{0, 1, 2\}$. What does $\bigcup_{i \in I} F(i)$ evaluate to?
Back: $F(0) \cup F(1) \cup F(2)$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492702-->
END%%
%%ANKI
Basic
Suppose $I = \varnothing$. What does $\bigcup_{i \in I} F(i)$ evaluate to?
Back: $\varnothing$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492705-->
END%%
%%ANKI
Basic
What kind of mathematic object is $F$ in expression $\bigcap_{i \in I} F(i)$?
Back: A function.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492709-->
END%%
%%ANKI
Basic
How is $\bigcap_{i \in I} F(i)$ often alternatively denoted?
Back: $\bigcap_{i \in I} F_i$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492712-->
END%%
%%ANKI
Basic
What is the domain of $F$ assumed to be in expression $\bigcap_{i \in I} F(i)$?
Back: Some superset of $I$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492716-->
END%%
%%ANKI
Basic
What condition must $I$ satisfy in expression $\bigcap_{i \in I} F(i)$?
Back: $I \neq \varnothing$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492720-->
END%%
%%ANKI
Basic
Suppose $I = \{0, 1, 2\}$. What does $\bigcap_{i \in I} F(i)$ evaluate to?
Back: $F(0) \cap F(1) \cap F(2)$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492724-->
END%%
%%ANKI
Basic
Suppose $I = \varnothing$. What does $\bigcap_{i \in I} F(i)$ evaluate to?
Back: N/A. This is undefined.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782492727-->
END%%
%%ANKI
Basic
How is $\bigcap_{i \in I} F_i$ alternatively denoted?
Back: $\bigcap_{i \in I} F(i)$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782592285-->
END%%
%%ANKI
Basic
What kind of mathematic object is $F$ in expression $\bigcap_{i \in I} F_i$?
Back: A function.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782592288-->
END%%
## Function Sets
For sets $A$ and $B$, the collection of functions $F$ from $A$ into $B$ is: $$^AB = \{F \mid F \colon A \rightarrow B\}$$
$^AB$ is read as "$B$-pre-$A$". It is often written as $B^A$ instead.
%%ANKI
Basic
For sets $A$ and $B$, how is set $B^A$ defined?
Back: $\{F \mid F \colon A \rightarrow B\}$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782833225-->
END%%
%%ANKI
Basic
For sets $A$ and $B$, how is set $^AB$ defined?
Back: $\{F \mid F \colon A \rightarrow B\}$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782923177-->
END%%
%%ANKI
Basic
For any function $F \colon A \rightarrow B$, $F$ is a subset of what other set?
Back: $A \times B$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782833233-->
END%%
%%ANKI
Basic
For any function $F \colon A \rightarrow B$, $F$ is a member of what other set?
Back: $\mathscr{P}(A \times B)$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782833236-->
END%%
%%ANKI
Basic
For sets $A$ and $B$, how is set $B^A$ pronounced?
Back: As "$B$-pre-$A$".
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782923183-->
END%%
%%ANKI
Basic
Why prefer notation $B^A$ over $^AB$?
Back: The notation mirrors $|B|^{|A|}$, the number of elements in $B^A$ given both sets are finite.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607431-->
END%%
%%ANKI
Basic
For sets $A$ and $B$, how is set $^AB$ pronounced?
Back: As "$B$-pre-$A$".
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782923193-->
END%%
%%ANKI
Basic
Why prefer notation $^AB$ over $B^A$?
Back: Because the sets are written left-to-right, from domain to codomain.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607434-->
END%%
%%ANKI
Basic
*Why* is set $B^A$ denoted the way it is?
Back: If $A$ and $B$ are finite, then $B^A$ has $|B|^{|A|}$ members.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720782923188-->
END%%
%%ANKI
Basic
What is the domain of $^\omega\{0, 1\}$?
Back: $\varnothing$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607437-->
END%%
%%ANKI
Basic
What is the domain of a member of $^\omega\{0, 1\}$?
Back: $\omega$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607440-->
END%%
%%ANKI
Basic
What is the range of $\{0, 1\}^\omega$?
Back: $\varnothing$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607444-->
END%%
%%ANKI
Basic
What is the range of a member of $\{0, 1\}^\omega$?
Back: $\{0, 1\}$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607448-->
END%%
%%ANKI
Basic
What does $\varnothing^\varnothing$ evaluate to?
Back: $\{\varnothing\}$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607451-->
END%%
%%ANKI
Basic
For $A \neq \varnothing$, what does $\varnothing^A$ evaluate to?
Back: $\varnothing$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607455-->
END%%
%%ANKI
Basic
For $A \neq \varnothing$, *why* does $\varnothing^A = \varnothing$?
Back: No function can map a nonempty domain to an empty range.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607459-->
END%%
%%ANKI
Basic
For $A \neq \varnothing$, what does $^\varnothing A$ evaluate to?
Back: $\{\varnothing\}$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607463-->
END%%
%%ANKI
Basic
For $A \neq \varnothing$, *why* does $^\varnothing A = \{\varnothing\}$?
Back: $\varnothing$ is the only function with empty domain.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720783607468-->
END%%
## Bibliography ## Bibliography
* Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). * Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).

View File

@ -108,7 +108,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
What does a hash table collision refer to? What does a hash table collision refer to?
Back: Two keys hashing to the same slot. Back: Two different keys hashing to the same slot.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1716307180976--> <!--ID: 1716307180976-->
END%% END%%

View File

@ -559,7 +559,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
If a $\lambda$-term has $\beta$-normal forms $P$ and $Q$, what can be said about $P$ and $Q$? If a $\lambda$-term has $\beta$-normal forms $P$ and $Q$, how do $P$ and $Q$ relate to one another?
Back: $P \equiv_\alpha Q$ Back: $P \equiv_\alpha Q$
Reference: Hindley, J Roger, and Jonathan P Seldin. “Lambda-Calculus and Combinators, an Introduction,” n.d. [https://www.cin.ufpe.br/~djo/files/Lambda-Calculus%20and%20Combinators.pdf](https://www.cin.ufpe.br/~djo/files/Lambda-Calculus%20and%20Combinators.pdf). Reference: Hindley, J Roger, and Jonathan P Seldin. “Lambda-Calculus and Combinators, an Introduction,” n.d. [https://www.cin.ufpe.br/~djo/files/Lambda-Calculus%20and%20Combinators.pdf](https://www.cin.ufpe.br/~djo/files/Lambda-Calculus%20and%20Combinators.pdf).
<!--ID: 1719577152610--> <!--ID: 1719577152610-->