From f2781330dbbd2bb54c5d554c571ef8a3c27f65f9 Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Sun, 29 Sep 2024 12:07:51 -0600 Subject: [PATCH] More notes on the recursion theorem and C loop constructs. --- .../plugins/obsidian-to-anki-plugin/data.json | 28 ++-- notes/_journal/2024-09-29.md | 7 +- notes/algebra/sequences/delta-constant.md | 4 +- notes/combinatorics/permutations.md | 2 +- .../logical-system/pred-logic.md | 4 +- .../formal-system/proof-system/equiv-trans.md | 2 +- notes/git/remotes.md | 8 -- notes/lambda-calculus/index.md | 2 +- notes/set/functions.md | 2 +- notes/set/natural-numbers.md | 125 ++++++++++++++++-- notes/set/order.md | 8 +- notes/startups/financing-rounds.md | 2 +- notes/x86-64/instructions/arithmetic.md | 10 +- notes/x86-64/instructions/conditions.md | 31 +++++ 14 files changed, 185 insertions(+), 50 deletions(-) diff --git a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json index 6892d21..6eeadac 100644 --- a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json +++ b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json @@ -306,7 +306,7 @@ "combinatorics/additive-principle.md": "d036ac511e382d5c1caca437341a5915", "_journal/2024-02-19.md": "30d16c5373deb9cb128d2e7934ae256a", "_journal/2024-02/2024-02-18.md": "67e36dbbb2cac699d4533b5a2eaeb629", - "combinatorics/permutations.md": "f2f3188f4e1142ec39de1e44ac5a1f0a", + "combinatorics/permutations.md": "d8f81c9e4bf903913aa40bff4851ee71", "combinatorics/combinations.md": "396fc32255710eaf33213efaafdc43d4", "_journal/2024-02-20.md": "b85ba0eeeb16e30a602ccefabcc9763e", "_journal/2024-02/2024-02-19.md": "df1a9ab7ab89244021b3003c84640c78", @@ -446,7 +446,7 @@ "_journal/2024-04-16.md": "0bf6e2f2a3afab73d528cee88c4c1a92", "_journal/2024-04/2024-04-15.md": "256253b0633d878ca58060162beb7587", "algebra/polynomials.md": "da56d2d6934acfa2c6b7b2c73c87b2c7", - "algebra/sequences/delta-constant.md": "5c8b3e48d054d332a54b85a439e135b8", + "algebra/sequences/delta-constant.md": "b744b0d8decdfff4ad40b07af848bf74", "_journal/2024-04-19.md": "a293087860a7f378507a96df0b09dd2b", "_journal/2024-04/2024-04-18.md": "f6e5bee68dbef90a21ca92a846930a88", "_journal/2024-04/2024-04-17.md": "331423470ea83fc990c1ee1d5bd3b3f1", @@ -508,7 +508,7 @@ "_journal/2024-05/2024-05-06.md": "bc9306348b7063b87741768391d9d8a7", "_journal/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b", "_journal/2024-05/2024-05-12.md": "ca9f3996272152ef89924bb328efd365", - "git/remotes.md": "cbe2cd867f675f156e7fe71ec615890d", + "git/remotes.md": "6fbbc95efa421c720e40500e5d133639", "programming/pred-trans.md": "c02471c6c9728dd19f8df7bc180ef8b1", "set/axioms.md": "063955bf19c703e9ad23be2aee4f1ab7", "_journal/2024-05-14.md": "f6ece1d6c178d57875786f87345343c5", @@ -578,10 +578,10 @@ "_journal/2024-06-08.md": "b20d39dab30b4e12559a831ab8d2f9b8", "_journal/2024-06/2024-06-07.md": "c6bfc4c1e5913d23ea7828a23340e7d3", "lambda-calculus/alpha-conversion.md": "6df655e60976715e5c6fbbe72b628c6d", - "lambda-calculus/index.md": "76d58f85c135c7df00081f47df31168e", + "lambda-calculus/index.md": "aab579d6826d40d2984e5289c3f547e5", "x86-64/instructions/condition-codes.md": "9c05ed99f5c96162e25f0ec4db55c656", "x86-64/instructions/logical.md": "49d40018f1fcb4ed1595d9175bbaab57", - "x86-64/instructions/arithmetic.md": "1a8e0731c60f44b40366b475179377b8", + "x86-64/instructions/arithmetic.md": "a6e6ef93b7c37b058cffc6dff5786ab7", "x86-64/instructions/access.md": "3efe399b89b947ab280dc1e045675390", "x86-64/instructions/index.md": "72c19067e938ab39ea51d25d6ac2bad9", "_journal/2024-06-09.md": "935b3ddf65c51e680ac5c000c7e380af", @@ -598,7 +598,7 @@ "_journal/2024-06/2024-06-12.md": "f82dfa74d0def8c3179d3d076f94558e", "_journal/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307", "_journal/2024-06/2024-06-13.md": "e2722a00585d94794a089e8035e05728", - "set/functions.md": "b93f460500a6a7228607f842636ed3b3", + "set/functions.md": "3d08bbd3fb31eba419058264ed804e22", "_journal/2024-06-15.md": "92cb8dc5c98e10832fb70c0e3ab3cec4", "_journal/2024-06/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307", "lambda-calculus/beta-reduction.md": "0935987f2bac0e6298735f2b26fd5885", @@ -687,9 +687,9 @@ "logic/classical/index.md": "ee0a4b2bfcfa2cab0880db449cb62df1", "logic/classical/truth-tables.md": "b739e2824a4a5c26ac446e7c15ce02aa", "formal-system/proof-system/index.md": "800e93b72a9852ea4823ab0a40854bba", - "formal-system/proof-system/equiv-trans.md": "e2eae52f49249b622b87c7fd06967666", + "formal-system/proof-system/equiv-trans.md": "fd837abff3eaac4f4c949a1bb69127c5", "formal-system/logical-system/index.md": "708bb1547e7343c236068c18da3f5dc0", - "formal-system/logical-system/pred-logic.md": "34e872f4f920bf4e8c2cd00ee95b310f", + "formal-system/logical-system/pred-logic.md": "4559020fde708b9d0184d9fd56559c98", "formal-system/logical-system/prop-logic.md": "b61ce051795d5a951c763b928ec5cea8", "formal-system/index.md": "28b596a8ffa7dca05e8c0b890be43aec", "programming/short-circuit.md": "c256ced42dc3b493aff5a356e5383b6e", @@ -698,7 +698,7 @@ "_journal/2024-07/2024-07-21.md": "62c2651999371dd9ab10d964dac3d0f8", "formal-system/proof-system/natural-deduction.md": "f105a27843518778cb6662652a9d7aed", "startups/term-sheet.md": "6b6152af78addb3fe818a7fc9d375fbf", - "startups/financing-rounds.md": "00a622fda2b4b442901bde2842309088", + "startups/financing-rounds.md": "fc242cd68de8cdd654552335d84d3bda", "_journal/2024-07-23.md": "35e18a1d9a8dd0a97e1d9898bc1d8f01", "_journal/2024-07/2024-07-22.md": "8170a92496c2c5374fc3411bddf3b17d", "_journal/2024-07-24.md": "9a7bdbfc23996908645d00dd622db6bf", @@ -758,7 +758,7 @@ "_journal/2024-08/2024-08-15.md": "7c3a96a25643b62b0064bf32cb17d92f", "_journal/2024-08-17.md": "b06a551560c377f61a1b39286cd43cee", "_journal/2024-08/2024-08-16.md": "da1127a1985074a3930b4c3512344025", - "set/order.md": "07f5799751f0b4080c13626a0b8c95ef", + "set/order.md": "6c0e404f6d228919b2a7d741476ebeca", "_journal/2024-08-18.md": "6f8aec69e00401b611db2a377a3aace5", "ontology/philosophy/properties.md": "41b32249d3e4c23d73ddb3a417d65a4c", "_journal/2024-08-19.md": "94836e52ec04a72d3e1dbf3854208f65", @@ -766,7 +766,7 @@ "_journal/2024-08/2024-08-17.md": "b06a551560c377f61a1b39286cd43cee", "calculus/bounds.md": "cbae7421eaa096cd17a2f9de079f593d", "calculus/index.md": "5ee4d950533ae330ca5ef9e113fe87f3", - "x86-64/instructions/conditions.md": "e95de2b5a5e47a8d00e66020a5c6ee15", + "x86-64/instructions/conditions.md": "60f1b9a7779bf4e5a817699b60e727eb", "_journal/2024-08-20.md": "e8bec308d1b29e411c6799ace7ef6571", "algebra/arch-prop.md": "bca3724ef5aae3f7f20907108087af47", "_journal/2024-08/2024-08-19.md": "94836e52ec04a72d3e1dbf3854208f65", @@ -775,7 +775,7 @@ "_journal/2024-08/2024-08-21.md": "1637b8ec8475cf3eb4f41d1d86cbf5df", "_journal/2024-08/2024-08-20.md": "e8bec308d1b29e411c6799ace7ef6571", "_journal/2024-08-23.md": "3b2feab2cc927e267263cb1e9c173d50", - "set/natural-numbers.md": "676bf8295cf8ea27dbcb2750de4ae197", + "set/natural-numbers.md": "52f33a992318b164829eaeab07f1c58c", "_journal/2024-08-24.md": "563fad24740e44734a87d7c3ec46cec4", "_journal/2024-08/2024-08-23.md": "7b5a40e83d8f07ff54cd9708017d029c", "_journal/2024-08/2024-08-22.md": "050235d5dc772b542773743b57ce3afe", @@ -783,7 +783,7 @@ "c17/enums.md": "9414fb67aa256a0a11b7240534c67bf6", "c17/derived-types.md": "6fb8f23a2423f05d5bdccb6672a32e38", "c17/basic-types.md": "7c6653bf6dc24c2f2aa72fc95c4f7875", - "c17/types/simple.md": "d9579d4f34e525494f63fbaa72e00f70", + "c17/types/simple.md": "78ad78da8382f8af6418b519409b927d", "c17/types/enumerated.md": "e1f70a30677c776b7b44ac3e0ff4e76d", "c17/types/derived.md": "aff0d2b6d218fb67af3cc92ead924de3", "c17/types/basic.md": "5064e21e683c0218890058882e06b6f3", @@ -848,7 +848,7 @@ "_journal/2024-09-28.md": "7726baed125a2561def07dcaf48bf5a0", "_journal/2024-09/2024-09-27.md": "d788fa04c029009f42387317c549d93e", "encoding/binary.md": "0b9beb6913906aa2523d8ab193c67f67", - "_journal/2024-09-29.md": "0afacc43ea98a86a50a5248e0d7afba6", + "_journal/2024-09-29.md": "232733c9ad7ebd89e8834cd61e1536d7", "_journal/2024-09/2024-09-28.md": "1b47792313acf09b1ae768d5918df703" }, "fields_dict": { diff --git a/notes/_journal/2024-09-29.md b/notes/_journal/2024-09-29.md index 3bc9874..204cc3b 100644 --- a/notes/_journal/2024-09-29.md +++ b/notes/_journal/2024-09-29.md @@ -2,8 +2,11 @@ title: "2024-09-29" --- -- [ ] Anki Flashcards +- [x] Anki Flashcards - [x] KoL - [x] OGS - [ ] Sheet Music (10 min.) -- [ ] Korean (Read 1 Story) \ No newline at end of file +- [ ] Korean (Read 1 Story) + +* Flashcards on the proof of the recursion theorem on $\omega$. +* Read through how different C loop constructs are compiled into assembly. \ No newline at end of file diff --git a/notes/algebra/sequences/delta-constant.md b/notes/algebra/sequences/delta-constant.md index 8b55e0e..ae7c9be 100644 --- a/notes/algebra/sequences/delta-constant.md +++ b/notes/algebra/sequences/delta-constant.md @@ -46,8 +46,8 @@ END%% %%ANKI Basic -What is the recurrence of the recursive definition of the $(k + 1)$st differences of $(a_n)$? -Back: The $(k + 1)$st differences is the differences of the $k$th differences. +How are the $(k + 1)$st differences of $(a_n)$ defined recursively? +Back: As the differences of the $k$th differences of $(a_n)$. Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf). END%% diff --git a/notes/combinatorics/permutations.md b/notes/combinatorics/permutations.md index 96359ff..01ad3c9 100644 --- a/notes/combinatorics/permutations.md +++ b/notes/combinatorics/permutations.md @@ -104,7 +104,7 @@ END%% %%ANKI Basic -$n!$ is shorthand for what other "big operator" formula? +$n!$ is an abbreviation of what "big operator" formula? Back: $\Pi_{k=1}^n k$ Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf). diff --git a/notes/formal-system/logical-system/pred-logic.md b/notes/formal-system/logical-system/pred-logic.md index f5830fe..c600794 100644 --- a/notes/formal-system/logical-system/pred-logic.md +++ b/notes/formal-system/logical-system/pred-logic.md @@ -92,7 +92,7 @@ END%% %%ANKI Basic -$\exists x : S, P(x)$ is shorthand for what? +$\exists x : S, P(x)$ is an abbreviation for what? Back: $\exists x, x \in S \land P(x)$ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. @@ -261,7 +261,7 @@ END%% %%ANKI Basic -$\forall x : S, P(x)$ is shorthand for what? +$\forall x : S, P(x)$ is an abbreviation for what? Back: $\forall x, x \in S \Rightarrow P(x)$ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. diff --git a/notes/formal-system/proof-system/equiv-trans.md b/notes/formal-system/proof-system/equiv-trans.md index 0e6ee10..d5ec9b6 100644 --- a/notes/formal-system/proof-system/equiv-trans.md +++ b/notes/formal-system/proof-system/equiv-trans.md @@ -1393,7 +1393,7 @@ END%% %%ANKI Basic -What proposition represents states $\{(b, T), (c, T)\}$ and $\{(b, F), (c, F)\}$? +What DNF proposition represents states $\{(b, T), (c, T)\}$ and $\{(b, F), (c, F)\}$? Back: $(b \land c) \lor (\neg b \land \neg c)$ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. diff --git a/notes/git/remotes.md b/notes/git/remotes.md index 1134731..2b0ce47 100644 --- a/notes/git/remotes.md +++ b/notes/git/remotes.md @@ -30,14 +30,6 @@ Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Soft END%% -%%ANKI -Basic -Where are git remotes specified within the `.git` directory? -Back: In `.git/config` -Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014). - -END%% - %%ANKI Basic What kind of git refs are associated with remotes? diff --git a/notes/lambda-calculus/index.md b/notes/lambda-calculus/index.md index 5b984d1..95af745 100644 --- a/notes/lambda-calculus/index.md +++ b/notes/lambda-calculus/index.md @@ -370,7 +370,7 @@ END%% %%ANKI Cloze -The phrase "{induction on $M$}" is shorthand for phrase "{induction on $lgh(M)$}". +The phrase "{induction on $M$}" is an abbrevation of phrase "{induction on $lgh(M)$}". 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). END%% diff --git a/notes/set/functions.md b/notes/set/functions.md index 7130020..3b10cc5 100644 --- a/notes/set/functions.md +++ b/notes/set/functions.md @@ -1747,7 +1747,7 @@ END%% %%ANKI Basic -Let $F \colon A \rightarrow B$. Term "$\mathop{\text{coim}}F$" is shorthand for what? +Let $F \colon A \rightarrow B$. Term "$\mathop{\text{coim}}F$" is an abbreviation for what? Back: The **coim**age of $F$. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). diff --git a/notes/set/natural-numbers.md b/notes/set/natural-numbers.md index 07adb45..4890d72 100644 --- a/notes/set/natural-numbers.md +++ b/notes/set/natural-numbers.md @@ -850,6 +850,14 @@ Reference: “Recursion,” in _Wikipedia_, September 23, 2024, [https://en.wiki END%% +%%ANKI +Basic +The recursion theorem assumes existence of what Peano system? +Back: $\langle \omega, \sigma, 0 \rangle$ where $\sigma$ is the successor operation restricted to the natural numbers. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + %%ANKI Basic What entities does the recursion theorem presume the existence of? @@ -906,14 +914,6 @@ Reference: “Recursion,” in _Wikipedia_, September 23, 2024, [https://en.wiki END%% -%%ANKI -Basic -The recursion theorem proves $h$ exists. What kind of mathematical entity is $h$? -Back: A function. -Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - -END%% - %%ANKI Basic The recursion theorem proves function $h$ exists. What is the domain of $h$? @@ -938,6 +938,14 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% +%%ANKI +Basic +The recursion theorem shows existence of $h \colon \omega \rightarrow A$. What is $A$? +Back: A set fixed before application of the recursion theorem. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + %%ANKI Basic Let $a \in A$ and $F \colon A \rightarrow A$. Using the recursion theorem, how else is $F(F(F(F(a))))$ expressed? @@ -954,6 +962,107 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% +%%ANKI +Basic +In Enderton's recursion theorem proof, function $h \colon \omega \rightarrow A$ is defined as the union of what? +Back: All "acceptable" functions. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +In Enderton's recursion theorem proof, what is the domain of an acceptable function? +Back: A subset of $\omega$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +In Enderton's recursion theorem proof, what is the codomain of an acceptable function? +Back: A subset of some fixed set. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +In Enderton's recursion theorem proof, what follows if $0 \in \mathop{\text{dom}} v$ for acceptable function $v$? +Back: $v(0) = a$ for some fixed $a \in A$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +In Enderton's recursion theorem proof, what follows if $n^+ \in \mathop{\text{dom}} v$ for acceptable function $v$? +Back: $n \in \mathop{\text{dom}} v$ and $v(n^+) = F(v(n))$ for some fixed $F \colon A \rightarrow A$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% +\ +%%ANKI +Basic +In Enderton's recursion theorem proof, what term refers to the "approximating" functions? +Back: They are called "acceptable". +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Cloze +In Enderton's recursion theorem proof, desired $h \colon \omega \rightarrow A$ is defined as $\bigcup$ {$\{ v \mid v \text{ is acceptable} \}$}. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Cloze +In Enderton's recursion theorem proof, desired $h \colon \omega \rightarrow A$ is {a function} because {$\{ n \in \omega \mid \text{ at most one } y \text{ such that } \langle n, y \rangle \in h \}$} is {an inductive set}. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +In Enderton's recursion theorem proof, how is it shown the domain of desired $h \colon \omega \rightarrow A$ equals $\omega$? +Back: By proving $\mathop{\text{dom}} h$ is an inductive set. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Cloze +In Enderton's recursion theorem proof,desired $h \colon \omega \rightarrow A$ is {unique} because {$\{ n \in \omega \mid h_1(n) = h_2(n) \}$} is {an inductive set}. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +*Why* is there no function $h \colon \mathbb{Z} \rightarrow \mathbb{Z}$ such that for all $n \in \mathbb{Z}$, $$\begin{align*} h(0) & = 0 \\ h(n + 1) & = h(n) + 1 \end{align*}$$ +Back: Because $\mathbb{Z}$ has no "starting point" to ground the recursive definition. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +*Why* is there no function $h \colon \mathbb{N} \rightarrow \mathbb{N}$ such that for all $n \in \mathbb{N}$$, $$\begin{align*} h(0) & = 0 \\ h(n + 1) & = h(n) + 1 \end{align*}$$ +Back: N/A. The resursive theorem of $\omega$ states such an $h$ exists. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +In what natural way could we generalize the recursion theorem on $\omega$? +Back: By stating the theorem in terms of arbitrary Peano systems. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + ## Bibliography * Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). diff --git a/notes/set/order.md b/notes/set/order.md index ab0f6a4..b748dd6 100644 --- a/notes/set/order.md +++ b/notes/set/order.md @@ -350,8 +350,8 @@ A binary relation $R$ on set $A$ is an **equivalence relation on $A$** iff it is %%ANKI Basic -Given $R = \{\langle a, a \rangle, \langle b, b \rangle\}$, which of reflexivity (on $\{a, b\}$), symmetry, and transitivity does $R$ exhibit? -Back: Reflexivity on $\{a, b\}$ and symmetry. +Given $R = \{\langle a, a \rangle, \langle b, b \rangle\}$, which of reflexivity, symmetry, and/or transitivity does $R$ exhibit? +Back: All three. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). END%% @@ -562,8 +562,8 @@ END%% %%ANKI Basic -Let $\Pi$ be a partition of set $A$. What property must each *individual* member of $\Pi$ exhibit? -Back: Each member is nonempty. +Let $\Pi$ be a partition of set $A$. What two properties must each *individual* member of $\Pi$ exhibit? +Back: Each member is a nonempty subset of $A$. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). END%% diff --git a/notes/startups/financing-rounds.md b/notes/startups/financing-rounds.md index 4dffe2a..14aca6f 100644 --- a/notes/startups/financing-rounds.md +++ b/notes/startups/financing-rounds.md @@ -377,7 +377,7 @@ END%% %%ANKI Cloze -An {angel} is a shorthand term for an {angel investor}. +An {angel} is an abbreviated term for an {angel investor}. Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d. END%% diff --git a/notes/x86-64/instructions/arithmetic.md b/notes/x86-64/instructions/arithmetic.md index c69a638..a19fb63 100644 --- a/notes/x86-64/instructions/arithmetic.md +++ b/notes/x86-64/instructions/arithmetic.md @@ -98,20 +98,20 @@ Assume `%rbx` holds $p$. What is the value of `%rax` in the following? ```asm leaq 2(%rbx, %rbx, 7),%rax ``` -Back: $2 + 8p$ +Back: N/A. A scaling factor of $7$ is not allowed. Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. - + END%% %%ANKI Basic Assume `%rdx` holds $q$. What is the value of `%rax` in the following? ```asm -leaq 0xE(, %rdx, 3),%rax +leaq 0xE(, %rdx, 4),%rax ``` -Back: $14 + 3q$ +Back: $14 + 4q$ Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. - + END%% ### Unary Operations diff --git a/notes/x86-64/instructions/conditions.md b/notes/x86-64/instructions/conditions.md index f7d7e9e..f935359 100644 --- a/notes/x86-64/instructions/conditions.md +++ b/notes/x86-64/instructions/conditions.md @@ -898,6 +898,37 @@ Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Program END%% +%%ANKI +Basic +In most cases, how can the following `for` loop be rewritten as a `while` loop? +```c +for (init; test; update) { body; } +``` +Back: +```c +init; +while (test) { body; update } +``` +Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. +Tags: c17 + +END%% + +%%ANKI +Basic +In what situation are the following two blocks of code not equivalent? +```c +for (init; test; update) { body; } + +init; +while (test) { body; update } +``` +Back: Situations in which the `for`-loop has a `continue` statement in the `body`. +Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. +Tags: c17 + +END%% + ### CMOV Like [[access#MOV|MOV]] instructions, but with the data transfer only happening if the move condition is satisfied.