aboutsummaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2024-07-30 22:39:00 +0200
committerAndreas Grois <andi@grois.info>2024-07-30 22:39:00 +0200
commit084ae8e9fea7b92c72d0cee83590d32d98038f45 (patch)
tree111bd0676458d3208c7c3fdc0f697ffd612b97c0 /TODO
parent28eaf0274c580e3d5bb479d7160a18cbe474a04c (diff)
Update TODO file
Diffstat (limited to 'TODO')
-rw-r--r--TODO9
1 files changed, 3 insertions, 6 deletions
diff --git a/TODO b/TODO
index 5f8f446..c4ed7da 100644
--- a/TODO
+++ b/TODO
@@ -5,14 +5,11 @@ This is a rough outline of upcoming tasks:
[ ] Prove that CompleteTree.heapUpdateAt returns the element at the given index
[ ] Prove that CompleteTree.heapRemoveLastWithIndex and CompleteTree.heapRemoveLast yield the same tree
[ ] Prove that CompleteTree.heapRemoveLastWithIndex and CompleteTree.heapRemoveLast yield the same element
-[ ] Prove that CompleteTree.heapRemoveLastWithIndex only removes one element and leaves the rest unchanged
+[x] Prove that CompleteTree.heapRemoveLastWithIndex only removes one element and leaves the rest unchanged
- This automatically serves as a proof for CompleteTree.heapRemoveLast, once it is shown that they
yield the same tree
- - A potential approach is to show that any index in the resulting tree can be converted into an index
- in the original tree (by adding one if it's >= the returned index of heapRemoveLastWithIndex), and getting
- elements from both trees.
- - Maybe easier: Or show that except for the n=1 case the value is unchanged.
- The type signature proves the rest, so try, like induction maybe?
+ - Done by showing that each element of the input tree is in the output tree, except for the one at the
+ returned index.
[ ] Prove that if CompleteTree.indexOf returns some, CompleteTree.get with that result fulfills the predicate.
[ ] Prove that CompleteTree.heapUpdateRoot indeed exchanges the value at the root.
- Straightforward, but hard to prove: