diff --git a/.gitignore b/.gitignore
index fe0b780..993d75b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/public/
/.packages/
/.org-cache/
+/content/ltximg/
diff --git a/assets/css/site.css b/assets/css/site.css
index 6186ce6..28e8268 100644
--- a/assets/css/site.css
+++ b/assets/css/site.css
@@ -106,7 +106,7 @@ body {
font-size: 1.3rem;
line-height: 1.5;
color: #eeffff;
- background-color: #000000;
+ background-color: #857470;
}
p {
@@ -154,7 +154,7 @@ h1 {
}
h2 {
- color: #c11146;
+ color: #fc9600;
}
h3 {
@@ -339,7 +339,7 @@ strong {
margin-top: 1rem;
color: #93309f;
font-size: 1rem;
- background-color: #38033a;
+ background-color: #000000;
border-top: 0.05rem solid #c3e88d;
}
diff --git a/assets/pics/Countable_union_of_Countable_sets.jpg b/assets/pics/Countable_union_of_Countable_sets.jpg
new file mode 100644
index 0000000..b6a4f2d
Binary files /dev/null and b/assets/pics/Countable_union_of_Countable_sets.jpg differ
diff --git a/content/blogs.org b/content/blogs.org
index 4e46d17..2f34155 100644
--- a/content/blogs.org
+++ b/content/blogs.org
@@ -15,7 +15,8 @@
* A list of All Blogs
-|-----------+------------------+------------------|
-| Title | Last Modified | Created |
-|-----------+------------------+------------------|
-| [[/test_blog][Test Blog]] | [2024-08-17 Sat] | [2024-08-17 Sat] |
+|--------------------------------------------------+------------------+------------------|
+| Title | Last Modified | Created |
+|--------------------------------------------------+------------------+------------------|
+| [[/countable_union_of_countable_sets_is_countable][A Countable Union of Countable Sets is Countable]] | [2024-12-06 Fri] | [2024-12-05 Thu] |
+| [[/test_blog][Test Blog]] | [2024-08-17 Sat] | [2024-08-17 Sat] |
diff --git a/content/countable_union_of_countable_sets_is_countable.org b/content/countable_union_of_countable_sets_is_countable.org
new file mode 100644
index 0000000..9a1c31f
--- /dev/null
+++ b/content/countable_union_of_countable_sets_is_countable.org
@@ -0,0 +1,178 @@
+#+title: A Countable Union of Countable Sets is Countable
+#+created: [2024-12-05 Thu]
+#+last_modified: [2024-12-06 Fri]
+#+author: Dibyashanu Pati
+#+OPTIONS: tex:dvipng
+#+OPTIONS: \n:t
+#+OPTIONS: toc:2
+
+* Union of Finite Countable Sets
+It is straight forward to show that the union of two countable set is countable.
+Let $S_0$ and $S_1$ be two countable infinite sets(in case when either is finite the proof trivial), that is,
+
+\[\exists f_0 : S_0 \rightarrow \mathbb{N}\] and
+
+\[\exists f_1 : S_1 \rightarrow \mathbb{N}\]
+
+such that $f_0$ and $f_1$ are bijections,
+
+then the set $S = S_0 \cup S_1$ is also countable meaning that
+
+\[\exists f: S \rightarrow \mathbb{N}\] so that $f$ is a bijection.
+
+To construct such a map $f$ all the elements in $S_0$ to all the all the even naturals and all the elements in $S_1$ to the even naturals, so
+
+\[S_0 = \{a_0, a_1 , a_2 , \hdots\}\]
+
+\[S_1 = \{b_0, b_1 , b_2 , \hdots\}\]
+
+let \[f(a_n) = 2n\] and \[f(b_n) = 2n + 1\]
+
+Such a map is surjective because we cover all cases modulo $2$ and hence all the integers, and this map is injective because $f$ is injective on all $a$'s and $b$'s separately.
+
+Either using induction or using a similar argument with the naturals modulo $k$ for any finite $k$ we can show that the union of any $k$ countable sets is also countable
+
+$S = S_0 \cup S_1 \cup S_2 \hdots \cup S_k$.
+* Larger Unions?
+We know that an arbitrary union of countable sets is not necessarily countable.
+Consider as a counterexample the union of all singletons $\{r\}, r \in \mathbb{R}$, this is $\mathbb{R}$ itself which we know not to be countable.
+
+It turns out that a countable union of countable sets is countable, to show this we *cannot* use a induction or a modulo $k$ argument.
+
+The key idea in the modulo k argument is that there are $k$ equivalence classes and hence we can break the Naturals into $k$ infinite countable sequences(countable infinite sets), but can we break the naturals into infinitely many infinite sub-sequences? - Yes.
+
+The first time I encountered this it was supposed to be justified was by observing that the Naturals can be arranged into the following two dimensional array,
+
+\begin{matrix}
+\, \\
+0 & 1 & 3 & 6 & \dots \\
+2 & 4 & 7 & \dots \\
+5 & 8 & \dots \\
+9 & \dots \\
+\vdots
+\end{matrix}
+
+Although this is convincing, a thought process that would lead me to come up with this eluded me until now, I explain this thought process below.
+
+* The Argument
+In the modulo $k$ argument we have a constant gap between each consecutive element of a sequence, because of this we are limited by the gap size($k$). So the key idea is constructing such a partitioning of the Naturals is to keep increasing the gap size, but since the gap size is finite at any point we can only have elements from a finite number of the countably infinite sub-sequences at any particular, so we are forced to start subsequent sub-sequences at larger and larger points.
+
+The most simple way to increase the gap size in this way is to keep increasing it by one after each gap.
+
+[[pics/Countable_union_of_Countable_sets.jpg][image]]
+
+Look at the $0^{th}$ sequence we just get the [[https://en.wikipedia.org/wiki/Triangular_number][Triangular numbers]] and zero.
+
+For elements of the first sequence we get the fill all places immediately after all Triangular numbers starting from the first Triangular number.
+
+For elements of the second sequence we get the fill all places one place after all Triangular numbers starting from the second triangular number.
+
+So we come up with the function $S$ that maps the $n^{th}$ element of the $m^{th}$ sub-sequence.
+
+$S(m,n) = m + \frac{(m+n)(m + n + 1)}{2}$
+
+This is equivalent to the 2D array I mentioned earlier.
+#+begin_src python :results output
+for m in range(0,5):
+ row = f" S_{m} = "
+ for n in range(0,5):
+ s = m + n
+ row += (str(m + int(s*(s+1)/2)) + ' , ')
+ print(row + ' ... \n')
+print('.\n.\n.\n')
+#+end_src
+
+#+RESULTS:
+#+begin_example
+ S_0 = 0 , 1 , 3 , 6 , 10 , ...
+
+ S_1 = 2 , 4 , 7 , 11 , 16 , ...
+
+ S_2 = 5 , 8 , 12 , 17 , 23 , ...
+
+ S_3 = 9 , 13 , 18 , 24 , 31 , ...
+
+ S_4 = 14 , 19 , 25 , 32 , 40 , ...
+
+.
+.
+.
+
+#+end_example
+
+
+Now we just have to show that $S: \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{N}$ is bijective.
+
+------
+
+/Claim 1/: If $S(m_0, n_0) = S(m_1, n_1)$ then $m_0 + n_0 = m_1 + n_1$
+
+This equivalent to showing that if $m_0 + n_0 \ne m_1 + n_1$ then $S(m_0, n_0) \ne S(m_1, n_1)$.
+
+Without loss of generality let us assume $m_0 + n_0 < m_1 + n_1$.
+
+Let $s_0 = m_0 + n_0$ and $s_1 = m_1 + n_1$ since $s_1>s_0$ the difference of there triangular numbers $T(s_1)$ and $T(s_0)$ is atleast $s_1$ because $s_0 \le s_1 - 1$.
+
+Then
+\[
+S(m_1, n_1) - S(m_0, n_0) &= \frac{s_1(s_1 + 1)}{2} - \frac{s_0(s_0 - 1)}{2} + m_1 - m_0
+\]
+\[
+ \ge s_1 + m_1 - m_0
+\]
+\[ \ge s_1 - m_0
+\]
+\[ = m_1 + n_1 - m_0
+\]
+\[ > n_0
+\]
+\[ \ge 0
+\]
+
+So \[S(m_1, n_1) > S(m_0, n_0)\]
+
+Similarly we can show that if $m_0 + n_0 > m_1 + n_1$ then $S(m_0, n_0) > S(m_1, n_1)$
+
+------
+
+
+Now we show injectivity using /Claim 1/
+
+If $S(m_0, n_0) = S(m_1, n_1)$ then by /Claim 1/ $m_0 + n_0 = m_1 + n_1$
+
+Let $s_0 = m_0 + n_0$ and $s_1 = m_1 + n_1$ in this case Let $s = s_0 = s_1$
+
+So,
+
+\[
+\implies S(m_1, n_1) - S(m_0, n_0) &= \frac{s_1(s_1 + 1)}{2} - \frac{s_0(s_0 - 1)}{2} + m_1 - m_0 = 0 \]
+\[\implies 0 = 0 + m_1 - m_0 \]
+\[\implies m_1 = m_0 \]
+\[\implies s - m_1 = s - m_0 \]
+\[\implies n_1 = n_0 \
+\]
+
+Now we show surjectivity
+
+Let $N \in \mathbb{N}$
+
+let $T(s)$ be the largest triangular number less than $N$.
+
+Let $m = N - T(n)$
+
+Let $n = s - m$
+
+Then
+
+ $S(m,n) = N$
+
+Since $S: \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{N}$ is both injective and surjective, it is a bijection, we are done.
+
+* An Interesting Applications
+*The set of finite subsets of $\mathbb{N}$ is countable.*
+Let $A_i$ be set of all subsets of $\mathbb{N}$ containing $i$ elements, that is with cardinality $i$.
+
+$A_1$ is just the set of all singletons of $\mathbb{N}$, there is an obvious bijection of this with $\mathbb{N}$, the identity map - hence it is countable.
+Now we just use induction,
+Let $A_k$ be countable, then $A_{k + 1} = \bigcup\limits_{i \in \mathbb{N}} \{S \cup i : i \notin S \land S \in A_k \}$ is a countable union of countable sets.
+Since all all $A_i$'s are countable the set of all finite subsets $A = \bigcup A_i$ being a countable union of countables is also countable.
diff --git a/content/index.org b/content/index.org
index dd08fec..41849cc 100644
--- a/content/index.org
+++ b/content/index.org
@@ -6,5 +6,11 @@ Cosmicflow is a site devoted to the interests of Dibyashanu Pati.
I'm currently a student, I love Physics, Mathematics, Astronomy and Computers.
+* Recent Blogs
+|--------------------------------------------------+------------------+------------------|
+| Title | Last Modified | Created |
+|--------------------------------------------------+------------------+------------------|
+| [[/countable_union_of_countable_sets_is_countable][A Countable Union of Countable Sets is Countable]] | [2024-12-06 Fri] | [2024-12-05 Thu] |
+
diff --git a/create-site.el b/create-site.el
index 4811d2d..60b7933 100755
--- a/create-site.el
+++ b/create-site.el
@@ -198,18 +198,37 @@
(file-name-sans-extension
(org-element-property :path link)))))
- (let ((exported-link (org-export-custom-protocol-maybe link contents 'html info)))
- (cond
- (exported-link exported-link)
- ((equal contents nil)
- (format "%s"
- (org-element-property :raw-link link)
- (org-element-property :raw-link link)))
- ((string-prefix-p "/" (org-element-property :raw-link link))
- (format "%s"
- (org-element-property :raw-link link)
- contents))
- (t (org-export-with-backend 'html link contents info)))))
+;; (let ((exported-link (org-export-custom-protocol-maybe link contents 'html info)))
+;; (cond
+;; (exported-link exported-link)
+;; ((equal contents nil)
+;; (format "%s"
+;; (org-element-property :raw-link link)
+;; (org-element-property :raw-link link)))
+;; ((string-prefix-p "/" (org-element-property :raw-link link))
+;; (format "%s"
+;; (org-element-property :raw-link link)
+;; contents))
+;; (t (org-export-with-backend 'html link contents info))))
+(let ((exported-link (org-export-custom-protocol-maybe link contents 'html info)))
+ (cond
+ (exported-link exported-link)
+ ((equal contents nil)
+ (format "%s"
+ (org-element-property :raw-link link)
+ (org-element-property :raw-link link)))
+ ((string-prefix-p "/" (org-element-property :raw-link link))
+ (format "%s"
+ (org-element-property :raw-link link)
+ contents))
+ ((and (string-match-p (concat "\\." (regexp-opt '("jpg" "jpeg" "png" "gif")))
+ (org-element-property :raw-link link))
+ (not (equal contents nil)))
+ (format ""
+ (org-element-property :raw-link link)
+ contents))
+ (t (org-export-with-backend 'html link contents info))))
+)
(defun my/make-heading-anchor-name (headline-text)
@@ -256,25 +275,25 @@
(code (org-html-format-code src-block info)))
(format "
%s" (string-trim code)))) -(defun my/org-html-special-block (special-block contents info) - "Transcode a SPECIAL-BLOCK element from Org to HTML. -CONTENTS holds the contents of the block. INFO is a plist -holding contextual information." - (let* ((block-type (org-element-property :type special-block)) - (attributes (org-export-read-attribute :attr_html special-block))) - (format "