Search arXiv⌕ Search

arXiv · 2610.38616

Order Maintenance in Worst-Case Constant Time, Verified

Abstract

Order maintenance asks for a data structure that keeps a sequence of elements under insertions and deletions and tells which of two elements comes first. We give an algorithm, assembled from published components, that performs each operation in worst-case constant time, and verify it in Lean 4. The algorithm is a program for a random-access machine deeply embedded in Lean, whose interpreter counts every instruction. We prove that the program answers every query as a simple reference specification does, that each operation takes at most a fixed number of steps, independent of the number of elements and of the history, and that after $t$ operations no value it has computed has more than $O(\log t)$ bits, so it runs unchanged on a machine with words of that size. A verified translation that preserves step counts exactly connects the high-level proofs to the machine program, so the interpreter is the only cost model to trust. An unverified native implementation shows the algorithm's practical cost.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Denis Firsov. 2026-10-28. Order Maintenance in Worst-Case Constant Time, Verified. https://arxiv.org/abs/2610.38616

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Negative Translations for Affine and Lukasiewicz Logic

We investigate four well-known negative translations of classical logic into intuitionistic logic within a substructural setting. We find that in \emph{affine logic} the translation schemes due to Kolmogorov and Gödel both satisfy Troelstra's criteria for a negative translation. On the other hand, the schemes of Glivenko and Gentzen both fail for affine logic, but for different reasons: one can extend affine logic to make Glivenko work and Gentzen fail and {\it vice versa}. By contrast, in the setting of \emph{Łukasiewicz logic}, we can prove a general result asserting that a wide class of formula translations including those of Kolmogorov, Gödel, Gentzen and Glivenko not only satisfy Troelstra's criteria with respect to a natural intuitionistic fragment of Łukasiewicz logic but are all equivalent.

cs.LO↗

A Complete Mental Temporal Logic for Intelligent Agents

In this paper, we present a mental temporal logic BPICTL together with a sound and complete axiomatization, which generalizes CTL by introducing mental modalities. A sound and complete inference system of BPICTL is given. We also prove the finite model property and decidability of BPICTL. Furthermore, we present a model checking algorithm for BPICTL.

cs.LO↗

Hereditary History-Preserving Bisimilarity: Characterizations via Backward Ready Multisets

We devise two complementary characterizations of hereditary history-preserving bisimilarity (HHPB): a denotational one, over stable configuration structures, and an operational one, in a reversible process calculus. Our characterizations rely on forward-reverse bisimilarity (FRB) augmented with backward ready multiset equality, which is able to distinguish between autoconcurrency and autocausation. With respect to previous work, we thus shift the emphasis from uniquely identifying events, as done in other characterizations, to counting occurrences of identically labeled events associated with incoming transitions. This yields a more lightweight behavioral equivalence than HHPB: our bisimulations are still binary relations instead of ternary ones and do not need to incrementally build any labeling- and causality-preserving bijection for occurred events. We show that our characterizations are valid in the absence of non-local autoconflicts. We then study the logical foundations of these characterizations by relating event identifier logic, which captures HHPB, and backward ready multiset logic, developed for our extension of FRB.

cs.LO↗