This is a listing of all goals defined over the current specification. Axioms are marked yellow, proved theorems green and unproved theorems blue. Click on individual names to get more information on the proof.
| Name: | Sequent: | Type: |
|---|---|---|
| dll_to_bst_correct | dll(head, x)(h), ordered≤(x) ⊦ ⟪dll_to_bst#(head; h; root)⟫ ∃ t. tr(root, t)(h) ∧ t.toList = x ∧ ordered≤(t) ∧ balanced(t) | A User Theorem |
| size_iter | size_iter#(head, h; count){count := 0; while head ≠ null do {head := h[head].right; count := count + 1}} | An Axiom |
| dll_to_bst_rec_correct | n ≤ # x, ¬ null ∈ h, ((hP * dlls(head, r0, null, x)))(h) ⊦ ⟪dll_to_bst_rec#(head, n; h; root, right)⟫ (¬ null ∈ h ∧ (∃ t, r1. ((hP * tr(root, t) * dlls(right, r1, null, restn(n, x))))(h) ∧ t.toList = firstn(n, x) ∧ balanced(t))) | A User Theorem |
| size | size#(head, h; count){if head ≠ null then {let next = h[head].right in size#(next, h; count); count := count + 1} else count := 0} | An Axiom |
| dll_to_bst_iter | dll_to_bst_iter#(head; h; root){let right = null, n = 0 in {size_iter#(head, h; n); dll_to_bst_rec#(head, n; h; root, right)}} | An Axiom |
| dll-size-iter-correct | ((hP * dlls(head, r0, null, x)))(h) ⊦ ⟪size_iter#(head, h; count)⟫ (count = # x) | A User Theorem |
| dll-size-correct | ((hP * dlls(head, r0, null, x)))(h) ⊦ ⟪size#(head, h; count)⟫ (count = # x) | A User Theorem |
| dll_to_bst | dll_to_bst#(head; h; root){let right = null, n = 0 in {size#(head, h; n); dll_to_bst_rec#(head, n; h; root, right)}} | An Axiom |
| dll_to_bst_rec | dll_to_bst_rec#(head, n; h; root, right) {if n > 0 then {let m = n / 2, left = null in {dll_to_bst_rec#(head, m; h; left, root); h[root].left := left}; let m = n - n / 2 - 1, temp = null, next = h[root].right in {dll_to_bst_rec#(next, m; h; temp, right); h[root].right := temp}} else {root := null; right := head} } | An Axiom |
| dll_to_bst_iter_correct | dll(head, x)(h), ordered≤(x) ⊦ ⟪dll_to_bst_iter#(head; h; root)⟫ ∃ t. tr(root, t)(h) ∧ t.toList = x ∧ ordered≤(t) ∧ balanced(t) | A User Theorem |