OAI/Combinatorics/EditApproximation/Geometry/RankedMemoStorage.lean
8 declarations, 0 contain sorry, 0 declared as axioms
Every value retained by the actual binary dictionary obeys the semantic value bound. This includes every allocated path, not only keys queried after the computation.
- def
OAI.EditApproximation.BinaryMemo.AllValuesline 14 - theorem
OAI.EditApproximation.BinaryMemo.allValues_emptyline 17 - theorem
OAI.EditApproximation.BinaryMemo.AllValues.insertline 22 - def
OAI.EditApproximation.BinaryMemo.rationalStorageline 36Source documentation
One word each for the tag and two child pointers, plus the value bits. Counting bits individually is an upper bound on logarithmic-word storage.
def rationalStorage : BinaryMemo ℚ → ℕ | .empty => 0 | .node value left right => 3 + (value.map rationalEncodingBits).getD 0 + left.rationalStorage + right.rationalStorageMentions: OAI.EditApproximation.BinaryMemo, OAI.EditApproximation.BinaryMemo.value, OAI.EditApproximation.BinaryMemo.left, OAI.EditApproximation.BinaryMemo.right, OAI.EditApproximation.rationalEncodingBits
- theorem
OAI.EditApproximation.BinaryMemo.rationalStorage_leline 41 - theorem
OAI.EditApproximation.FiniteQuery.run_invariantline 66 - theorem
OAI.EditApproximation.rankedMemoEvaluate_allValuesline 77 - theorem
OAI.EditApproximation.SourceRanked.memo_allValuesline 129