Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit fc170d3

Browse files
committed
Add example Proof Blocks problem
1 parent 8a45b7b commit fc170d3

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

runestone/parsons/test/_sources/index.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,47 @@ Section 2: Labeling
113113
=====
114114
print(sum)
115115

116+
117+
============
118+
Proof Blocks
119+
============
120+
121+
.. raw:: html
122+
123+
<embed>
124+
<!-- TODO load dependencies properly through NPM -->
125+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
126+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
127+
</embed>
128+
129+
.. parsonsprob:: test_parsons_4
130+
:language: math
131+
:grader: dag
132+
133+
.. raw:: html
134+
135+
<embed> Drag and drop <strong style="color:red;">all</strong> of the blocks below to create a proof by induction of the following statement.
136+
Claim: for all natural numbers \(n\),
137+
$$
138+
\sum_{j=0}^n 2(-7)^j = \frac{1-(-7)^{n+1}}{4}
139+
$$
140+
</embed>
141+
142+
-----
143+
Proof by induction on \(n\). #tag:0;depends:;
144+
=====
145+
Inductive Predicate: \(P(n): \sum_{j=0}^n 2(-7)^j = \frac{1-(-7)^{n+1}}{4}\) #tag:1;depends:0;
146+
=====
147+
Base case: At \(n=0\), \(\sum_{j=0}^n 2(-7)^j = 2\) and \(\frac{1-(-7)^{n+1}}{4} = \frac{1-(-7)}{4} = 2\), so the base case, \(P(0)\), holds #tag:2;depends:0,1;
148+
=====
149+
Inductive Hypothesis: Suppose that \(P(n):\) \(\sum_{j=0}^n 2(-7)^j = \frac{1-(-7)^{n+1}}{4}\) holds for \(n=0,1,...,k\). #tag:3;depends:1;
150+
=====
151+
Inductive Step: We need to show that \(P(k+1):\) \(\sum_{j=0}^{k+1} 2(-7)^j = \frac{1-(-7)^{k+2}}{4}\) holds #tag:4;depends:3;
152+
=====
153+
The left hand side is \(\sum_{j=0}^{k+1} 2(-7)^j = \sum_{j=0}^k 2(-7)^j + 2(-7)^{k+1}\) #tag:5;depends:4;
154+
=====
155+
By the inductive hypothesis we have \(\sum_{j=0}^k 2(-7)^j = \frac{1-(-7)^{k+1}}{4}\). So then substituting we get \(= \frac{1-(-7)^{k+1}}{4} + 2(-7)^{k+1}\) \(= \frac{1-(-7)^{k+1} + 8(-7)^{k+1}}{4}\) \(= \frac{1+7(-7)^{k+1}}{4}\) which simplifies to \(= \frac{1-(-7)^{k+2}}{4}\) #tag:6;depends:5;
156+
=====
157+
So \(\sum_{j=0}^{k+1} 2(-7)^j = \frac{1-(-7)^{k+2}}{4}\), which was what we needed to show. #tag:7;depends:6;
158+
159+

0 commit comments

Comments
 (0)