Skip to content

Commit 8fa81eb

Browse files
committed
begin implementation of custom pandoc for validation
1 parent dbbbc6f commit 8fa81eb

10 files changed

Lines changed: 421 additions & 58 deletions

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,4 +695,9 @@ log
695695
/tex
696696
pastpapers/
697697
media/
698-
media_ans/
698+
media_ans/
699+
700+
# Haskell build artifacts
701+
dist-newstyle/
702+
dist/
703+
.stack-work/

conversion2025/mathpix_to_llm_to_in2lambda_to_JSON.ipynb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,11 @@
406406
" Your task is to extract all individual questions and their worked solutions from the provided markdown content.\n",
407407
"\n",
408408
" 1. **Content Extraction:**\n",
409-
" - Identify a suitable `name` for the set of questions.\n",
409+
" - You may choose a suitable `name` for the set of questions.\n",
410410
" - Identify the `year` if mentioned; otherwise, use \"0\".\n",
411-
" - For each question, carefully extract the full question text into `question_content` and the corresponding full solution/answer text into `solution_content`. They may not be in the same section.\n",
411+
" - Using the question numbers to identify the full questions, for each question:\n",
412+
" - Carefully extract the full question text into `question_content`.\n",
413+
" - Carefully extract the corresponding full solution/answer text into `solution_content`. They may not be in the same section.\n",
412414
" - If no solution is found, leave `solution_content` as an empty string `\"\"`.\n",
413415
" - Preserve all image tags like `![pictureTag](filename.jpg)`, making sure they are placed with their respective \"question_content\" and \"solution_content\". Do not duplicate it.\n",
414416
" - For Each Question extract all image references (e.g., `filename.jpg`) found within the `question_content` and `solution_content` and place them in the `images` list.\n",
@@ -670,16 +672,18 @@
670672
" response = llm_mini.invoke(seperate_parts_solution_prompt)\n",
671673
" \n",
672674
" try:\n",
673-
" cleaned_response = escape_latex_backslashes(response.content.strip())\n",
674-
" parsed_output_solution_part = solution_parser.parse(cleaned_response)\n",
675+
" parsed_output_solution_part = solution_parser.parse(response.content)\n",
675676
" print(f\"LLM response successfully parsed solution for part {part_idx + 1} of question {question_idx + 1}.\")\n",
676677
" return parsed_output_solution_part\n",
677678
" except Exception as e:\n",
678679
" print(f\"Error parsing LLM response as JSON for part {part_idx + 1} of question {question_idx + 1}:\")\n",
679680
" print(f\"Retrying... Attempt No.{attempt_idx + 1}\")\n",
680681
" time.sleep(2)\n",
681682
" \n",
682-
" raise Exception(f\"Failed to parse LLM response as JSON after multiple attempts for part {part_idx + 1} of question {question_idx + 1}.\")\n",
683+
" else:\n",
684+
" print(\"Final LLM Response:\")\n",
685+
" print(response.content)\n",
686+
" raise Exception(f\"Failed to parse LLM response as JSON after multiple attempts part {part_idx + 1} of question {question_idx + 1}:\")\n",
683687
"\n",
684688
" # Process all parts in parallel\n",
685689
" with concurrent.futures.ThreadPoolExecutor() as executor:\n",

conversion2025/out2.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,79 @@
4646
{
4747
"t": "Para",
4848
"c": [
49+
{
50+
"t": "Math",
51+
"c": [
52+
{
53+
"t": "DisplayMath"
54+
},
55+
"\nhello bossman\n"
56+
]
57+
}
58+
]
59+
},
60+
{
61+
"t": "Para",
62+
"c": [
63+
{
64+
"t": "Str",
65+
"c": "$"
66+
},
67+
{
68+
"t": "Space"
69+
},
70+
{
71+
"t": "Str",
72+
"c": "wowie"
73+
},
74+
{
75+
"t": "Space"
76+
},
77+
{
78+
"t": "Str",
79+
"c": "$"
80+
},
81+
{
82+
"t": "SoftBreak"
83+
},
84+
{
85+
"t": "Math",
86+
"c": [
87+
{
88+
"t": "InlineMath"
89+
},
90+
"wowie"
91+
]
92+
},
93+
{
94+
"t": "SoftBreak"
95+
},
96+
{
97+
"t": "Math",
98+
"c": [
99+
{
100+
"t": "InlineMath"
101+
},
102+
"wo\\$wie"
103+
]
104+
}
105+
]
106+
},
107+
{
108+
"t": "Para",
109+
"c": [
110+
{
111+
"t": "Math",
112+
"c": [
113+
{
114+
"t": "DisplayMath"
115+
},
116+
"nope"
117+
]
118+
},
119+
{
120+
"t": "SoftBreak"
121+
},
49122
{
50123
"t": "Str",
51124
"c": "bye"

conversion2025/pandoc_testingv2.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@ hello_world
22
$$
33
this is maths
44

5+
$$
6+
hello bossman
7+
$$
8+
9+
$ wowie $
10+
$wowie$
11+
$wo\$wie$
12+
13+
$$nope$$
514
bye

conversion2025/testing.json

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
{
2+
"name": "Real Analysis - Sequences and Convergence",
3+
"year": "0",
4+
"questions": [
5+
{
6+
"title": "Equivalences of properties of sequences",
7+
"content": "Consider the following properties of a sequence of real numbers $(a_n)_{n\\ge0}$\u2026:\n\n1. $a_n\\to a$, or\n\n2. \"$a_n$ eventually equals $a$\" -- i.e.\n$\\exists N\\in\\mathbb N_{>0}$ such that\n$\\forall n\\ge N,\\ a_n = a$, or\n\n3. \"$(a_n)$ is bounded\" -- i.e. $\\exists\\,R\\in\\mathbb R$ such that\n$|a_n|<R\\ \\ \\forall n\\in \\mathbb N_{>0}$.\n\nFor each statement (a-e) below, which of (i-iii) is it equivalent\nto? Proof?",
8+
"parts": [
9+
"1. $\\exists\\, N\\in\\mathbb N_{>0}$ such that\n$\\forall n\\ge N,\\ \\forall\\epsilon>0,\\ |a_n-a|<\\epsilon$.",
10+
"2. $\\forall\\epsilon>0$ there are only finitely many\n$n\\in\\mathbb N_{>0}$ for which $|a_n-a|\\ge\\epsilon$.",
11+
"3. $\\forall N\\in\\mathbb N_{>0},\\ \\exists\\,\\epsilon>0$ such that\n$n\\ge N\\ \\Rightarrow\\ |a_n-a|<\\epsilon$.",
12+
"4. $\\exists\\,\\epsilon>0$ such that\n$\\forall N\\in\\mathbb N_{>0},\\ |a_n-a|<\\epsilon\\ \\forall n\\ge N$.",
13+
"5. $\\forall R >0\\ \\exists\\, N\\in\\mathbb N_{>0}$ such that\n$n\\ge N\\ \\Rightarrow\\ a_n\\in(a-\\frac1R,a+\\frac1R)$."
14+
],
15+
"images": [],
16+
"parts_solutions": [
17+
"(a) $\\iff$ (ii) because \"$\\forall\\epsilon>0,\\ |a_n-a|<\\epsilon$\"\nis the same statement as \"$a_n = a$.\"\n\n(Proof: if $a_n\\ne a$ then set $\\epsilon:= |a_n-a| > 0$ so that\n$|a_n-a| <\\epsilon$ is not true.)",
18+
"(b) $\\iff$ (i). Suppose (b) is true. Fix any $\\epsilon > 0$ and\nlet $n_1,\\ldots, n_r$ be the finite number of $n_i$ with\n$|a_{n_i}- a|\\ge\\epsilon$.\n\nSet $N :=\\max\\{n_1,\\ldots, n_r\\} + 1$. Then $\\forall n\\ge N$ we have\n$|a_n -a| < \\epsilon$, so $a_n\\to a$.\n\nSuppose (i) is true. Fix any $\\epsilon > 0$, then\n$\\exists\\, N\\in\\mathbb N_{>0}$ such that\n$|a_n -a| < \\epsilon\\ \\forall n\\ge N$. In particular if\n$|a_n- a|\\ge\\epsilon$ then $n<N$ so there are only finitely many\nsuch $n\\in\\mathbb N_{>0}$.}",
19+
"(c) $\\iff$ (iii). Suppose (c) is true and take $N = 1$. Then\n$\\exists\\,\\epsilon > 0$ such that\n$|a_n -a| < \\epsilon\\ \\forall n\\ge 1$. So, by the triangle\ninequality, $|a_n| < |a| + \\epsilon$. Putting $R := |a| + \\epsilon$\ngives (iii).\n\nSuppose (iii) is true, i.e. $\\exists\\, R\\in\\mathbb R$ such that\n$|a_n|<R\\ \\ \\forall n\\in N$. By the triangle inequality, $|a_n- a| <\nR + |a|\\ \\,\\forall n\\ge N$. Putting $\\epsilon := R + |a|$ proves\n(c).",
20+
"(d) \\iff (iii). Suppose (d) is true and take $N = 1$. Then\n$|a_n -a| < \\epsilon\\ \\forall n\\ge 1$. So, by the triangle\ninequality, $|a_n| < |a| +\\epsilon$. Putting $R := |a| + \\epsilon$\ngives (iii).\n\nSuppose (iii) is true, i.e. $\\exists\\, R\\in\\mathbb R$ such that\n$|a_n|<R\\ \\ \\forall n\\in N$. By the triangle inequality,\n$|a_n - a| <\nR + |a|\\ \\forall n\\ge N$. Putting $\\epsilon:= R + |a|$ proves (d).",
21+
"(e) \\iff (i): just replace \\epsilon by \\frac1R in the definition\nof convergence."
22+
]
23+
},
24+
{
25+
"title": "Convergence in the Complex Plane",
26+
"content": "Given a sequence $(a_n)_{n\\ge1}$ of *complex* numbers, define what\na_n\\to a means. For $x,y\\in\\mathbb R$ and $z:=x+iy\\in\\mathbb C$\nshow $\\max(|x|,|y|)\\ \\le\\ |z|\\ \\le\\ \\sqrt2\\max(|x|,|y|),$ and\n$$a_n\\to a+ib\\in\\mathbb C\\quad\\iff\\quad \\mathrm{Re}(a_n)\\to a \\quad\\mathrm{and\\quad Im}(a_n)\\to b.$$",
27+
"parts": [
28+
"Given a sequence $(a_n)_{n\\ge1}$ of *complex* numbers, define what\na_n\\to a means. For $x,y\\in\\mathbb R$ and $z:=x+iy\\in\\mathbb C$\nshow $\\max(|x|,|y|)\\ \\le\\ |z|\\ \\le\\ \\sqrt2\\max(|x|,|y|),$ and\n$$a_n\\to a+ib\\in\\mathbb C\\quad\\iff\\quad \\mathrm{Re}(a_n)\\to a \\quad\\mathrm{and\\quad Im}(a_n)\\to b.$$"
29+
],
30+
"images": [],
31+
"parts_solutions": [
32+
"The inequalties\n$$\\max(x^2,y^2)\\ \\le\\ x^2+y^2\\ \\le\\ \\max(x^2,y^2)+\\max(x^2,y^2)$$\ngive $$\\max(|x|,|y|)^2\\ \\le\\ |z|^2\\ \\le\\ 2\\max(|x|,|y|)^2.$$ Suppose\na_n\\to a+ib and fix any $\\epsilon>0$. Then\n$\\exists\\, N\\in\\mathbb N_{>0}$ such that\n$$n\\ge N\\ \\Rightarrow\\ |a_n-(a+ib)|<\\epsilon\\ \\Rightarrow\\ \\max(|\\mathrm{Re}(a_n)-a|,|\\mathrm{Im}(a_n)-b|)<\\epsilon,$$\nusing the first stated inequality. Therefore\n$|\\mathrm{Re}(a_n)-a|<\\epsilon$ and $|\\mathrm{Im}(a_n)-b|<\\epsilon$\nas required.\n\nConversely, suppose\n$\\mathrm{Re}(a_n)\\to a \\quad\\mathrm{and\\quad Im}(a_n)\\to b$ and fix\nany $\\epsilon>0$. Then $\\exists\\, N\\in\\mathbb N_{>0}$ such that\n$n\\ge N\\ \\Rightarrow\\ |\\mathrm{Re}(a_n)-a|<\\epsilon/\\sqrt 2$ and\n$|\\mathrm{Im}(a_n)-b|<\\epsilon/\\sqrt 2$. Thus\n$$|a_n-(a+ib)|\\ <\\ \\sqrt 2\\max(|\\mathrm{Re}(a_n)-a|,|\\mathrm{Im}(a_n)-b|)\\ <\\ \\sqrt 2\\epsilon/\\sqrt 2\\ =\\ \\epsilon,$$\nusing the second stated inequality."
33+
]
34+
},
35+
{
36+
"title": "Squeeze Theorem for Sequences",
37+
"content": "Suppose that $a_n\\le b_n\\le c_n\\ \\forall n$ and that $a_n\\to a$ and\n$c_n\\to a$. Prove that $b_n\\to a$.",
38+
"parts": [
39+
"Suppose that $a_n\\le b_n\\le c_n\\ \\forall n$ and that $a_n\\to a$ and\n$c_n\\to a$. Prove that $b_n\\to a$.",
40+
""
41+
],
42+
"images": [],
43+
"parts_solutions": [
44+
"$\\exists\\, N_1\\in\\mathbb N_{>0}$ such that\\nn\\ge N_1\\ \\Rightarrow\\ |a_n-a|<\\epsilon\\ \\Rightarrow\\ a_n>a-\\epsilon.$\\n\\n$\\exists\\, N_2\\in\\mathbb N_{>0}$ such that\\nn\\ge N_2\\ \\Rightarrow\\ |c_n-a|<\\epsilon\\ \\Rightarrow\\ c_n<a+\\epsilon.$\\n\\nSet $N:=\\max(N_1,N_2)$. Then\\nn\\ge N\\ \\Rightarrow\\ a-\\epsilon<a_n\\le b_n\\le c_n<a+\\epsilon$.\\nTherefore $|b_n-a|<\\epsilon$.}",
45+
"$\\exists\\, N_1\\in\\mathbb N_{>0}$ such that\\nn\\ge N_1\\ \\Rightarrow\\ |a_n-a|<\\epsilon\\ \\Rightarrow\\ a_n>a-\\epsilon.$\\n\\n$\\exists\\, N_2\\in\\mathbb N_{>0}$ such that\\nn\\ge N_2\\ \\Rightarrow\\ |c_n-a|<\\epsilon\\ \\Rightarrow\\ c_n<a+\\epsilon.$\\n\\nSet $N:=\\max(N_1,N_2)$. Then\\nn\\ge N\\ \\Rightarrow\\ a-\\epsilon<a_n\\le b_n\\le c_n<a+\\epsilon$.\\nTherefore $|b_n-a|<\\epsilon$. "
46+
]
47+
},
48+
{
49+
"title": "Convergence of product of sequences",
50+
"content": "Suppose that $a_n\\to0$ and $(b_n)$ is bounded. Prove that\n$a_nb_n\\to0$.",
51+
"parts": [
52+
"Suppose that $a_n\\to0$ and $(b_n)$ is bounded. Prove that\n$a_nb_n\\to0$."
53+
],
54+
"images": [],
55+
"parts_solutions": [
56+
"$\\exists\\, B>0$ such that $|b_n|\\le B\\ \\forall n$.\n\nGiven $\\epsilon>0,\\ \\exists\\, N\\in\\mathbb N_{>0}$ such that\n$n\\ge N\\ \\Rightarrow\\ |a_n|<\\epsilon/B$.\n\nTherefore $|a_nb_n|=|a_n||b_n|\\le(\\epsilon/B)B=\\epsilon$, as\nrequired."
57+
]
58+
},
59+
{
60+
"title": "Boundedness of the sequence and bound on $b_n$",
61+
"content": "$\\!\\!$ Suppose that $(a_n)$ and $(b_n)$ are sequences of real\nnumbers such that $a_n\\to a$ and $b_n\\to b\\ne0$. Prove that the set\n$\\{a_n\\colon n\\in\\mathbb N_{>0}\\}$ is bounded and that\n$$\\exists\\, N\\in\\mathbb N_{>0} \\quad\\mathrm{such\\ that}\\quad n\\ge N\\ \\Rightarrow\\ |b_n|>|b|/2.$$",
62+
"parts": [
63+
"Prove that the set $\\{a_n\\colon n\\in\\mathbb N_{>0}\\}$ is bounded.",
64+
"Prove that $$\\exists\\, N\\in\\mathbb N_{>0} \\quad\\mathrm{such\\ that}\\quad n\\ge N\\ \\Rightarrow\\ |b_n|>|b|/2.$$"
65+
],
66+
"images": [],
67+
"parts_solutions": [
68+
"",
69+
"Set $\\epsilon=|b|/2>0$. Then $\\exists\\, N\\in\\mathbb N_{>0}$ such that $$n\\ge N\\ \\Rightarrow\\ |b_n-b|<\\epsilon\\ \\Rightarrow\\ |b|<|b_n|+\\epsilon\\ \\Rightarrow\\ |b_n|>|b|-\\epsilon=|b|/2.$$"
70+
]
71+
},
72+
{
73+
"title": "Limit of quotient of sequences",
74+
"content": "Therefore $(a_n/b_n)_{n\\ge N}$ is a sequence of real numbers; prove\nit tends to $a/b$.",
75+
"parts": [
76+
"Therefore $(a_n/b_n)_{n\\ge N}$ is a sequence of real numbers; prove\nit tends to $a/b$."
77+
],
78+
"images": [],
79+
"parts_solutions": [
80+
"$$\\left|\\frac{a_n}{b_n}-\\frac ab\\right|\\ =\\ \\left|\\frac{a_nb-ab_n}{bb_n}\\right|\\ =\\ \\left|\\frac{(a_n-a)b+a(b-b_n)}{bb_n}\\right|\\ \\le\\ \\left|\\frac{(a_n-a)}{b_n}\\right|+\n\\left|\\frac{a(b-b_n)}{bb_n}\\right|.$$ From above we can find\n$N_1\\in\\mathbb N_{>0}$ such that\n$n\\ge N_1\\ \\Rightarrow\\ |b_n|\\ge|b|/2$, which in turn implies that\n$$\\left|\\frac{a_n}{b_n}-\\frac ab\\right|\\ \\le\\ \\frac{|a_n-a|}{|b|/2}+\n|a|\\frac{|b-b_n|}{|b|.|b|/2}\\ =\\ \\frac{2}{|b|}|a_n-a|+\n\\frac{2|a|}{b^2}|b-b_n|.$$ Now fix any $\\epsilon>0$. There exists\n$N_2\\in\\mathbb N_{>0}$ such that\n$n\\ge N_2\\ \\Rightarrow\\ |a_n-a|<|b|\\epsilon/4$. And there exists\n$N_3\\in\\mathbb N_{>0}$ such that\n$n\\ge N_3\\ \\Rightarrow\\ |b_n-b|<|b|^2\\epsilon/4(1+|a|)$.\\n\nTherefore if we set $N:=\\max\\{N_1,N_2,N_3\\}$ then\n$$n\\ge N\\ \\ \\Rightarrow\\ \\ \\left|\\frac{a_n}{b_n}-\\frac ab\\right|\\ <\\ \\frac{2|b|\\epsilon/4}{|b|}+\\n\\frac{2|a|}{b^2}\\frac{b^2\\epsilon}{4(1+|a|)}\\ <\\ \\epsilon/2+\\epsilon/2\\ =\\ \\epsilon.$$"
81+
]
82+
},
83+
{
84+
"title": "Sorta-Cauchy sequences and divergence",
85+
"content": "We call a sequence *sorta-Cauchy* if it satisfies the condition\n$$\\forall\\epsilon>0\\ \\exists\\, N\\in\\mathbb N_{>0}\\ \\ n\\ge N\\ \\Rightarrow\\ |a_n-a_{n+1}|<\\epsilon.$$",
86+
"parts": [
87+
"Give an example of a sorta-Cauchy sequence which diverges to\n$+\\infty$. Conclude that sorta-Cauchy is not as strong as Cauchy."
88+
],
89+
"images": [],
90+
"parts_solutions": [
91+
"Any $a_n$ that increases so slowly to infinity that $a_{n+1}-a_n$ converges to zero. Eg $a_n=\\sqrt n$ or $a_n=\\log n$ or $a_n=\\sum_{i=1}^n\\frac 1i$."
92+
]
93+
},
94+
{
95+
"title": "Cauchy sequence in \\mathbb Q not converging in \\mathbb Q",
96+
"content": "Give an example of a Cauchy sequence in $\\mathbb Q$ which does not\nconverge in $\\mathbb Q$.",
97+
"parts": [
98+
"We know that in $\\mathbb R$, a sequence is Cauchy if and only if it\nis convergent. Show that it is impossible to prove this using only\nthe arithmetic and order axioms of $\\mathbb R$ (i.e. all the axioms\nexcept the completeness axioms -- the one about the existence of\nleast upper bounds)."
99+
],
100+
"images": [],
101+
"parts_solutions": [
102+
"Suppose that we could prove that a sequence is Cauchy if and only if\nit is convergent with only the arithmetic and order axioms. We know\nin $\\mathbb Q$ that the order and arithmetic axioms hold, this would\nsuggest that any Cauchy sequence in $\\mathbb Q$ must converge in\n$\\mathbb Q$. This is a contradiction since we have just shown that\nthere are Cauchy sequences in $\\mathbb Q$ that do not converge in\n$\\mathbb Q$ in the first part of this question."
103+
]
104+
},
105+
{
106+
"title": "Bounded sequence and supremum of sets",
107+
"content": "Let $(a_{n})_{n \\in \\mathbb N_{>0}}$ be a bounded sequence.",
108+
"parts": [
109+
"For each $n \\in \\mathbb N_{>0}$, define the set\n$S_{n} = \\{ a_{j}: j \\ge n\\}$. Prove that, for every\n$n \\in \\mathbb N_{>0}$, there exists some $b_{n} \\in \\mathbb{R}$\nsuch that $b_{n} = \\sup(S_{n})$.",
110+
""
111+
],
112+
"images": [],
113+
"parts_solutions": [
114+
"Let $M$ be an upper bound for $(a_{n})_{n \\in \\mathbb N_{>0}}$, then the set $S_{n}$ is non-empty with $M$ as an upper bound, so by the completeness axiom $S_{n}$ has a supremum.",
115+
""
116+
]
117+
},
118+
{
119+
"title": "Existence of the Limit Supremum of a Sequence",
120+
"content": "Let $B = \\{ b_{n}: n \\in \\mathbb N_{>0}\\}$ where $b_{n}$ is\ndefined as above. Prove that there exists some\n$l \\in \\mathbb{R}$ such that $l = \\inf(B)$.",
121+
"parts": [
122+
"(Remark: $l$ is\ncalled the limit supremum of the sequence\n$(a_{n})_{n \\in \\mathbb N_{>0}}$, and the usual notation is\n$l = \\limsup_{n \\rightarrow \\infty} a_{n}$)."
123+
],
124+
"images": [],
125+
"parts_solutions": [
126+
"The set $B$ is clearly non-empty. Let $\\tilde{M}$ be a lower\nbound for $(a_{n})_{n \\in \\mathbb N_{>0}}$. Then\n$b_{n} = \\sup(S_{n}) \\ge \\tilde{M}$. This means $\\tilde{M}$ is a\nlower bound for $B$ and so by the completeness axiom, $B$ has an\ninfimum."
127+
]
128+
},
129+
{
130+
"title": "Limit superior of sequences",
131+
"content": "For each of the sequences below, find the value of\n$\\limsup_{n \\rightarrow \\infty} a_{n}$ and give justification\nfor your answer.",
132+
"parts": [
133+
"$a_{n} = (-1)^{n}$"
134+
],
135+
"images": [],
136+
"parts_solutions": [
137+
"$\\limsup_{n \\rightarrow \\infty} a_{n} = 1$. Note that, for\nevery $j \\in \\mathbb N_{>0}$, one has $S_{j} = \\{-1,1\\}$ so\nthat $b_{j} = \\sup(S_{j}) = 1$. Therefore\n$\\limsup_{n \\rightarrow \\infty} a_{n} = \\inf \\{1\\} = 1$."
138+
]
139+
},
140+
{
141+
"title": "Limit Superior and Infimum of a Sequence",
142+
"content": "$a_{n} = \\frac{(-1)^n}{n}$",
143+
"parts": [
144+
"$a_{n} = \\frac{(-1)^n}{n}$"
145+
],
146+
"images": [],
147+
"parts_solutions": [
148+
"$\\limsup_{n \\rightarrow \\infty} a_{n} = 0$. Note that, for\nevery $j \\in \\mathbb N_{>0}$, one has\n$b_{j} = \\sup(S_{j}) = \\frac{1}{j}$ for $j$ even and\n$\\frac{1}{j+1}$ for $j$ odd. Therefore we argue that\n$\\inf(B) = 0$. Clearly $0$ is a lower bound. To show that it\nis an infimum, we show that for any $\\epsilon > 0$, there\nexists $b \\in B$ such that $b - \\epsilon < 0$. Note that, by\nthe Archimedean Axiom, we can find an $j \\in \\mathbb N_{>0}$\nsuch that $j \\ge \\frac{1}{\\epsilon}$, so that\n$\\frac{1}{j} < \\epsilon$. It then follows that\n$b_{j} - \\epsilon < 0$, which finishes the proof since\n$b_{j} \\in B$."
149+
]
150+
}
151+
]
152+
}

0 commit comments

Comments
 (0)