M5: Lemma T1 (sorted tags) #
(O1), (O2) and (W3) imply that the tags spelled by the paths strictly increase along the chunk
list (docs/PROOF.md §4.5.1). So every guarded tag write of the top structure passes its guard
when the state after the write satisfies Shape.
Labels in a table #
theorem
OrderMaintenance.Proof.Top.lookup_lt_of_before
{t : List (ℕ × ℕ)}
(hk : (List.map (fun (x : ℕ × ℕ) => x.1) t).Nodup)
(hl : List.IsChain (fun (x1 x2 : ℕ) => x1 < x2) (List.map (fun (x : ℕ × ℕ) => x.2) t))
{a b : ℕ}
(h : Before (List.map (fun (x : ℕ × ℕ) => x.1) t) a b)
:
In a table with distinct entries and increasing labels, label order is table order.