diff options
| author | Andreas Grois <andi@grois.info> | 2024-07-30 22:39:00 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2024-07-30 22:39:00 +0200 |
| commit | 084ae8e9fea7b92c72d0cee83590d32d98038f45 (patch) | |
| tree | 111bd0676458d3208c7c3fdc0f697ffd612b97c0 /TODO | |
| parent | 28eaf0274c580e3d5bb479d7160a18cbe474a04c (diff) | |
Update TODO file
Diffstat (limited to 'TODO')
| -rw-r--r-- | TODO | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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: |
