Symmetries in Sorting
Vikraman Choudhury, Wind Wong

TL;DR
This paper conceptualizes sorting algorithms as abstract functions, establishing a connection between total orders and correct sorting functions through universal algebra and type theory, with formal verification in Cubical Agda.
Contribution
It introduces a novel axiomatization of sorting functions independent of total order assumptions, linking them to algebraic structures and formalizing in type theory.
Findings
Sorting functions form sections of a surjection from lists to multisets.
Decidable total orders correspond to correct sorting functions.
Formalization achieved in Cubical Agda.
Abstract
Sorting algorithms are fundamental to computer science, and their correctness criteria are well understood as rearranging elements of a list according to a specified total order on the underlying set of elements. As mathematical functions, they are functions on lists that perform combinatorial operations on the representation of the input list. In this paper, we study sorting algorithms conceptually as abstract sorting functions. There is a canonical surjection from the free monoid on a set (lists of elements) to the free commutative monoid on the same set (multisets of elements). We show that sorting functions determine a section (right inverse) to this surjection satisfying two axioms, that do not presuppose a total order on the underlying set. Then, we establish an equivalence between (decidable) total orders on the underlying set and correct sorting functions. The first part of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
Topicssemigroups and automata theory · Advanced Algebra and Logic · Polynomial and algebraic computation
