Documentation

CslibFrontier.DataStructure.AVLTree.PointerMachine.Context

AVL validity at a linked subtree focus #

A linked focus inside a matched valid AVL tree itself matches a valid AVL subtree. This connects pointer-machine ancestor contexts to the existing AVL invariants.

theorem Cslib.DataStructure.AVLTree.PointerMachine.Matches.exists_valid_focus {M : PointerMachine.Model} {extra : ℕ} [LinearOrder M.Value] {encode : ℕ → M.Value} {field : Fin (extra + 1)} {cs : List (SearchTree.PointerMachine.Frame M extra)} {tree : BinaryTree (SearchTree.PointerMachine.Label M extra)} {t : AVLTree M.Value} (matched : Matches encode field (SearchTree.PointerMachine.plug cs tree) t) (valid : t.Valid) :
∃ (u : AVLTree M.Value), Matches encode field tree u ∧ u.Valid

Extract the existing valid AVL subtree at a linked focus. The surrounding frames are proof data; following parent or child links does not require a machine stack.