diff --git a/app/__init__.py b/app/__init__.py index a9e4de4..39da4b4 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -21,7 +21,8 @@ def index(): @app.route("/api/vault-update") #webhook for vault updated def update_vault(): # TODO SECURE THIS WITH SECRETTTTT or auth header - print(build.public_vault(PRIVATE_VAULT_DIR, PUBLIC_VAULT_DIR))# initialize the public notes from the private repo + build.obsidian_vault(PRIVATE_VAULT_DIR) # initialize the private obsidian repo + build.public_vault(PRIVATE_VAULT_DIR, PUBLIC_VAULT_DIR)# initialize the public notes from the private repo return "vault-rebuilt" @app.route ("/") # renders a filename if not otherwise specified def render_post(filename): diff --git a/content/Homework.md b/content/Homework.md new file mode 100644 index 0000000..dfc9ad8 --- /dev/null +++ b/content/Homework.md @@ -0,0 +1,79 @@ +#public +# Homework + +Questions (P7.) +1. a + 1. A. True + 2. B. Order does not matter in sets +2. MISSISSIPPI +3. + 1. $\subseteq$ + 2. $\in$ + 3. $\subseteq$ + 4. $\in$ + 5. $\in$ x wrong $\emptyset$ is a $\subseteq$ of all sets + 6. $\subseteq$ +4. 9. + 1. a) $\{S_4, S_5, S_9\}$ + 2. b) **??** + 3. c) quadrillion + 4. d) + 1. F + 2. T (if order does not matter) + 3. T + 4. F + 5. T + 6. T + 7. F + 8. F + 9. F + 10. T + 11. F + 12. F + 13. T + 14. F + 15. T + 16. T +5. 10. + 1. $D_1=\{1\}, D_2=\{1,2\}, D_{10}=\{1,2,5\}$ + 2. b) + 1. T + 2. F + 3. T + 4. T + 5. T? + 6. F + 7. T + 8. F + 9. F + 10. F + 11. F + 12. T + 3. c) $|D_{10}|=3$, $|D_{19}|=2$ + 4. D) $|\mathcal{D}|=9$ + + +| Questions | Answer | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | +| 1.
1. (a) True or false? {red, white, blue} = {white, blue, red}.
2. (b) What is wrong with this statement: Red is the first element of the set {red, white, blue}? | a. True
b. Order does not matter in sets | +| 2. Which has the larger cardinality? The set of letters in the word MISSISSIPPI or the set of letters in the word FLORIDA ? | MISSIPPI | +| 3. Fill in the blank with the appropriate symbol, โˆˆ or โІ.
1. (a) {1, 2, 3} {1, 2, 3, 4}
2. (b) 3 {1, 2, 3, 4}
3. (c) {3} {1, 2, 3, 4}
4. (d) {๐‘Ž} {{๐‘Ž}, {๐‘}, {๐‘Ž, ๐‘}}
5. (e) โˆ… {{๐‘Ž}, {๐‘}, {๐‘Ž, ๐‘}}
6. (f) {{๐‘Ž}, {๐‘}} {{๐‘Ž}, {๐‘}, {๐‘Ž, ๐‘}} | | +| 9. Let ๐‘†1 = {๐‘œ, ๐‘›, ๐‘’}, ๐‘†2 = {๐‘ก, ๐‘ค, ๐‘œ}, ๐‘†3 = {๐‘ก, โ„Ž, ๐‘Ÿ, ๐‘’, ๐‘’}, and so on.
1. (a) Find all ๐‘˜ โˆˆ {1, 2, . . . , 10} with \|๐‘†๐‘˜\| = 4.
2. (b) Find distinct indices ๐‘—, ๐‘˜ โˆˆ โ„• with ๐‘†๐‘— = ๐‘†๐‘˜.
3. (c) Find the smallest value of ๐‘˜ โˆˆ โ„• with ๐‘Ž โˆˆ ๐‘†๐‘˜.
4. (d) Let ๐’ฎ = {๐‘†๐‘˜}40 ๐‘˜=1. Determine whether the following statements are true or false.
1. (i) ๐‘†13 = {๐‘›, ๐‘’, ๐‘–, ๐‘ก, โ„Ž, ๐‘’, ๐‘Ÿ}
2. (ii) {๐‘›, ๐‘’, ๐‘ก} โІ ๐‘†20
3. (iii) ๐‘†1 โˆˆ ๐’ฎ
4. (iv) ๐‘†3 โІ ๐’ฎ
5. (v) โˆ… โˆˆ ๐’ฎ
6. (vi) โˆ… โŠ‚ ๐’ฎ
7. (vii) โˆ… โІ ๐’ฎ
8. (viii) ๐‘†1 โІ ๐‘†11
9. (ix) ๐‘†1 โІ ๐‘†21
10. (x) ๐‘†1 โŠ‚ ๐‘†21
11. (xi) {๐‘›, ๐‘–, ๐‘’} โˆˆ ๐’ฎ
12. (xii) {{๐‘“, ๐‘œ, ๐‘ข, ๐‘Ÿ}} โІ ๐’ฎ
13. (xiii) ๐‘ข โˆˆ ๐‘†40
14. (xiv) ๐’ซ(๐‘†9) โІ ๐’ซ(๐‘†19)
15. (xv) {๐‘ , ๐‘–} โˆˆ ๐’ซ(๐‘†6)
16. (xvi) ๐‘ค โˆˆ ๐’ซ(๐‘†2) | | +| 10. For ๐‘˜ โˆˆ {1, 2, . . . , 20}, let ๐ท๐‘˜ = {๐‘ฅ โˆฃ ๐‘ฅ is a prime number which divides ๐‘˜} and let ๐’Ÿ = {๐ท๐‘˜ โˆฃ ๐‘˜ โˆˆ {1, 2, . . . , 20}}.
1. (a) Find ๐ท1, ๐ท2, ๐ท10, and ๐ท20.
2. (b) True or False:
1. (i) ๐ท2 โŠ‚ ๐ท10
2. (ii) ๐ท7 โІ ๐ท10
3. (iii) ๐ท10 โŠ‚ ๐ท20
4. (iv) โˆ… โˆˆ ๐’Ÿ
5. (v) โˆ… โŠ‚ ๐’Ÿ
6. (vi) 5 โˆˆ ๐’Ÿ
7. (vii) {5} โˆˆ ๐’Ÿ
8. (viii) {4, 5} โˆˆ ๐’Ÿ
9. (ix) {{3}} โІ ๐’Ÿ
10. (x) ๐’ซ(๐ท9) โІ ๐’ซ(๐ท6)
11. (xi) ๐’ซ({3, 4}) โІ ๐’Ÿ
12. (xii) {2, 3} โˆˆ ๐’ซ(๐ท12)
3. (c) Find \|๐ท10\| and \|๐ท19\|.
4. (d) Find \|๐’Ÿ\| | | +# Unit 1 +## Krish Hw 2 +1. A = {1, 2, 3}, B = {2, 3, 4} and C = {1, 2, 4}. List the elements of the specified set + 1. (a) A โˆฉ B; | {2,3} + 2. (b) A โˆช B; | {1,2,3,4} + 3. (c) C\A; | {1} + 4. (d) A โˆช (B โˆฉ C); | {2,1,3} + 5. (e) (A โˆฉ C) โˆช (B โˆฉ C); | {1,2,4} + 6. (f) A ร— B; | {(1,2),(1,3),(1,4),(2,3),(2,2),(2,4),(3,2),(3,3),(3,4)} + 7. (g) B ร— A; | {(2,1),(2,2),(2,3),(3,1),(3,2),(3,3),(4,1),(4,2) ,(4,3)} + 8. (h) (A ร— B) โˆฉ (B ร— A). | {(2,2),(3,3)} +2. $M_2$ = {2, 4, 6, 8, 10, ยท ยท ยท } and $M_3$ = {3, 6, 9, 12, 15, ยท ยท ยท }. Find: + 1. (a) $M_2$ โˆฉ $M_3$; + 1. $M_6$ + 2. (b) $M_3 \backslash M_2$ + 1. $\{x|x=6k-3 \space\forall\space k \in\mathbb{N}\}$ + diff --git a/content/Unit 1 Sets and Logic.md b/content/Unit 1 Sets and Logic.md new file mode 100644 index 0000000..4cff5c4 --- /dev/null +++ b/content/Unit 1 Sets and Logic.md @@ -0,0 +1,157 @@ +--- +tags: + - Math-301 + - Math + - School + - notes + - Spring-25 + - public +Slides: "[[Wed 1-7.pdf]]" +Topic: Sets and Logic +Unit: 1.1 - 1.6 +--- +# 1.1 Basic definitions +A set is a collection of objects. The objects in a set are called its elements or members. +> Let A={a,b,c}. +> $a\in A$ -- means *a* is an element of *A* +> $d \notin A$ -- means *d* is not an element of *A* + +**Def**. the [[Cardinality]] of a finite set `S`, demoted `|S|`. is the number of elements in `S`. +In the example, `|A| = 3`. + +### Notation for some sets of numbers +> Natural numbers: $\mathbb{N}$ = {1,2,3,...} +> Whole Numbers: $\mathbb{W}$ = {0,1,2,3,...} +> The set of integers: $\mathbb{Z}$ = {...-3,-2,-1,0,1,2,3,} = {0,1,-1,2,-2,3,-3...} +> Rational Numbers: $\mathbb{Q}$ = $\{\frac{a}{b}\vert a,b\in\mathbb{Z},b\neq0\}$ +> Set of real numbers: $\mathbb{R}$ +--- +## 2 subsets + +- Let *A* and *B* be sets. We say that *B* is a [[subset]] of *A*, if every element of *B* is also an element of *A*, denoted $B\subseteq A$ +- Two sets are [[equal]], denoted $A = B$, if $A\subseteq B$ and $B\subseteq A$ +>Ex. Let *A* = $\{x\vert x\in\mathbb{Z}\hspace{7px}and\hspace{7px}0\lt x\lt6\}$. +>We see that $A=\{1,2,3,4,5\}$. +>Note: $1\in A, 4\in A$, but $6\notin A$. +>$\{1,3,5\}\subseteq A,\{2\}\subseteq A$, but $\{2\}\notin A$ +>{2,4,6}$\subsetneq A$ since $6 \notin A$ +>|A| = 5. +>Ex. $\mathbb{N}\subseteq \mathbb{W} \subseteq \mathbb{Z} \subseteq \mathbb{Q} \subseteq \mathbb{R}$ + +[[Proper subset]]: $B\subset A$ if $B\subseteq A$ and $B\neq A$ + +### Intervals of $\mathbb{R}$ +> (a,b) = {x$\in \mathbb{R}$ | a < x < b}, where $-\infty\le a \le b \le\infty$ +> \[a,b] = {x$\in \mathbb{R}$ | a $\le$ x $\le$ b}, where $-\infty\lt a \le b \lt\infty$ +> \[a,b) = \{x$\in \mathbb{R}$ | a $\le$ x < b}, where $-\infty\lt a \lt b \le\infty$ +> \(a,b] = \{x$\in \mathbb{R}$ | a $\lt$ x $\le$ b}, where $-\infty\le a \lt b \lt\infty$ + +## 3. Collections of Sets +The elements of a set may themselves be sets, and so is is a collections of sets +> Ex. $\mathcal{C}$ = { {1}, {1, 2}, {1, 2, 3} }. Note that +> {1} $\in \mathcal{C}$, {1,2} $\notin\mathcal{C}$, {1,2,3} $\in\mathcal{C}$ **??** +> {1} $\subsetneq\mathcal{C}$ since $1\notin\mathcal{C}$ +> {{1}, {1,2}} $\subseteq\mathcal{C}$ +> {{1}, {1,2}} $\notin\mathcal{C}$. + +### Indexed Collection of Sets +Let `I` be a set. Suppose $S_i$ is a set for each `i` $\in$ `I`. +Then we say that $\{S_i\}_{i\in I}$ = $\{S_i|i\in I\}$ Is called a [[collection of sets indexed]] by `I`. +> Ex. Let $S_n$ = (n-1, n) for each $n\in\mathbb{N}$. Then +> $\{S_n\}_{n=1}^{3}$ = {$S_1,S_2,S_3$} = $\{(0,1), (1,2), (2,3)\}$ +> $\{S_n\}_{n\in\mathbb{N}}$ = $\{(0,1), (1,2), (2,3),...\}$ + +## 4. The Empty Set +Let `E` be a set with no elements. Then for any Set `A`, we have `E`$\subseteq$`A` [[(Vacuously True)]]. +If `E'` is another set with no elements, then `E`$\subseteq$`E'` `E'`$\subseteq$`E` +So `E`=`E'` Therefore, there is a unique set with no elements. We call it the [[empty set]], denoted by $\emptyset$ = {}. +**Property: For every set `A`, $\emptyset\subseteq$`A`.** + +## 5. The Power Set of a Set +the [[power set]] of a set `S` is the collection of all subsets of `S` and is denoted $\wp(S)$. +> $\wp(S) = \{A | A \subseteq S\}$. + +>Ex. Let $A$ = $\{a,b,c\}$. Then +>$\wp(A)\{\emptyset\,\{a\},\{b\},\{c\},\{a,b\},\{a,c\},\{b,c\},\{a,b,c\}\}$ +>Note: |$\wp(A)$ = 8 = $2^3$ = $2^{|A|}$. + +## 6. Summarizing example +Consider the set: +> $S = \{1,2,\emptyset,\{a,b\}\}$. Then +> $2\in S, 2\subsetneq S$ +> ${2}\notin S, 2\subseteq S$ +> > $\emptyset, 2\subsetneq S$ + + +# 1.2 Set Operations +## 1 Intersections and Unions +>Let `A` and `B` be sets. The [[Intersection]] of `A` and `B` is the set. +>$A\cap B$ {X | x $\in$ A and x $\in$ B} +>![[Pasted image 20260114205835.png]] + +The [[Union]] of `A` and `B` is the set +> $A \cup B$ = {x | $\in$ a A or x $\in$ B } ## "Or" is the "Inclusive or" +> ![[Pasted image 20260114210548.png]] + +> Ex. Let `A`={0,2,4,6,8}, `B`={0,3,6,9}, and C={1,2,3,4,5,6,8,9}. Then +> (a) $A\cap B$ = {0,6} +> (b) $A\cup B = \{0,2,4,6,8,3,9\}=\{0,2,3,4,6,8,9\}$ +> (c) $B\cap C$ = {3} +> (d) $A\cup(B\cap C) = \{0,2,3,4,6,8\}$ +> (e) $(A\cup B)\cap C = \{2,3,4\}$ +> Note: $A\cup(B\cap C)\neq(A\cup B)\cap C$ + +**Def. We say that two sets A and B and [[disjoint]] if $A\cap B=\emptyset$** +![[Pasted image 20260115174934.png]] +> **Theorem. Let `A` and `B` be finite sets.** +> (a) $|A\cup B|=|A|+|B|-|A\cup B|$ +> ![[Pasted image 20260115175142.png]] +> (b) if `A` and `B` and disjoint then $|A\cup B| = |A| + |B|$ +> ![[Pasted image 20260115175132.png]] +> (c) If $A\subseteq B, then |A|\leq|B|$ +## 2 Arbitrary Collections +Let $\mathcal{C}=\{S_i|i\in I\}$ be a collection of sets indexed by a set `I` (Assume $I\neq0$.) Then the [[Intersection]] of $\mathcal{C}$ is defined as +> $\cap\mathcal{C}=\cap_{i\in I} S_i=\{x|x\in S_i$ for all $i\in I\}$. + + The [[Union]] of the collection $\mathcal{C}$ is the set +>$\cup\mathcal{C}=$ $\cup_{i\in I}S_i=\{x|x\in S_i$ for at least one $i\in I\}$ + +For a finite collection of sets indeed by $I=\{1,2 ... , n\}$ +we often write the intersection and unions of $\mathcal{C}=\{S_1,S_2, ... ,S_n\}$ as +> $\cap_{i=1}^n S_i = S_1\cap S_2\cap S_3\cap ... \cap S_n$ +> $\cup_{i\in I}^n S_i=S_1\cup S_2\cup ... \cup S_n$ + +Def. Let $\{\S_i|i\in I\}$ be an indexed collection of sets. +> (a) The collection is [[Mutually disjoint]] if for all $i,j\in I$, if $S_i\neq S_j, then S_I =\cap S_j\space\emptyset$ +> Equivalently: for all $i,j\in I$, $S_i=S_j\space or\space S_i\cap S_j=\emptyset$ +> (b) The collection is [[nested]] if for all $i,j\in I$, $S_i\subseteq S_j$ or $S_j\subseteq S_i$ + + + +$S=\{x\in\mathbb{W}|x\notin M_{5}, x\in M_3\}$ + + + + + +--- +> $B_n$ = $\{x\in\mathbb{R}\space\vert\space |x| < n\}$ + +$B_1$ = (-1,1) +$B_2$ = (-2,2) +$B_3$ =(-3, 3) + + +> [!note] incluse vs exclusion +$[-1,1]\neq (-1,1)$ where $n=\mathbb{R}$ +let $A$ = $(-1,1)$ +let $B$ = $[-1,1]$ +$A\subseteq B$ +$A\neq B$ + +| Q | P | A | +| ------------------ | ---------------------- | ------------------ | +| Mutually disjoint? | $B_n\subseteq B_{n+1}$ | False | +| Nested?
| $B_n\subseteq B_{n+1}$ | True | +| Intersect | $B\cap B_n$ | $B_1$ | +| Union
| $B\cup B_n$ | $(-\infty,\infty)$ |