An Optimal Deterministic Adversary for Sorting

Nicholas Nash

For n distinct labeled keys, one deterministic adversary initialized from n can answer comparisons online, keeping every answer transcript consistent with a total order, using polynomially many bit operations per query. It forces every correct comparison sorter to use at least (1−o(1))(1 - o(1)) n log⁡2\log _{2} n comparisons.

What was already known

The worst-case information bound is log⁡2(n!)\log _{2}(n!), which has leading term n log⁡2\log _{2} n. Kaplan, Zamir and Zwick gave an efficient deterministic adversary forcing at least (37/64) n log⁡2\log _{2} n comparisons and asked whether the leading coefficient could reach one.

How the result developed

  1. 10 Nov 2026 · Manuscript date [1]

    Nicholas Nash reported the AI-assisted result in this manuscript.

  2. 12 Nov 2026 · Formal checking [2]

    Nicholas Nash’s project passed Lean and leanchecker verification of the continuous sorting adversary’s legality, comparison bound and polynomial-work guarantee.

Follow new evidence and revisions to this result.

Get email updates

Download contribution history

Contribution Assessment

AI involvementAI-led
ImportanceNotable
Technical verificationFormal (Lean + human)
Human understandingPartial

AI involvement

Nick Nash credits the model with the deterministic sorting adversary and the analysis of its guarantee. The adversary and its analysis are due to AI (GPT 6 Astra). Nash shaped the exposition and abstractions and reviewed the main text.

Importance

One efficient online strategy reaches the asymptotically optimal comparison bound against every correct sorter by maintaining a hierarchy of acyclic graphs that represent orders consistent with the answers so far.

Technical verification

Lean verifies legal online answers, the asymptotic comparison lower bound against every correct decision-tree sorter, and polynomial initialization and per-query binary charge for the same continuous strategy. The pinned GitHub Actions run reports a successful build, kernel replay and axiom audit. Nash separately reports partial human checking of the paper.

Formal checking

Pinned theorem, successful trusted build and kernel replay with continuous-library axiom audit

Checker
Lean kernel in the project’s GitHub Actions workflow
Scope
The online legality, asymptotic comparison bound and polynomial binary charge of the continuous adversary
Basis
Reported by the linked checker

Human understanding

Nash reports understanding some parts and shaping the exposition and abstractions. His account leaves the extent of his understanding of the full runtime analysis unspecified and identifies the appendices as outside his review.

Other useful sources

View revision history
· addition

Added the research timeline.

· addition

Added a source excerpt documenting AI involvement.

· publication

Nash credits GPT 6 Astra with the construction and analysis. The result reaches the information-theoretic leading coefficient with an efficient online adversary, improving the 37/64 coefficient of Kaplan, Zamir and Zwick.