All Projects → pi8027 → stablesort

pi8027 / stablesort

Licence: other
Stable sort algorithms and their stability proofs in Coq

Programming Languages

Coq
218 projects
ocaml
1615 projects
haskell
3896 projects
Nix
1067 projects
Makefile
30231 projects

Projects that are alternatives of or similar to stablesort

autosubst
Automation for de Bruijn syntax and substitution in Coq [maintainers=@RalfJung,@co-dan]
Stars: ✭ 41 (+115.79%)
Mutual labels:  coq, ssreflect, mathcomp
Actuary
Formalization of the basic actuarial mathematics using Coq
Stars: ✭ 17 (-10.53%)
Mutual labels:  coq, ssreflect, mathcomp
finmap
Finite sets, finite maps, multisets and generic sets
Stars: ✭ 45 (+136.84%)
Mutual labels:  coq, ssreflect, mathcomp
odd-order
The formal proof of the Odd Order Theorem
Stars: ✭ 20 (+5.26%)
Mutual labels:  coq, ssreflect, mathcomp
multinomials
Multinomials for the Mathematical Components library.
Stars: ✭ 12 (-36.84%)
Mutual labels:  coq, ssreflect, mathcomp
gaia
Implementation of books from Bourbaki's Elements of Mathematics in Coq [maintainer=@thery]
Stars: ✭ 15 (-21.05%)
Mutual labels:  coq, ssreflect, mathcomp
Abel
A proof of Abel-Ruffini theorem.
Stars: ✭ 26 (+36.84%)
Mutual labels:  coq, ssreflect, mathcomp
ShiftSort
Sorting algorithm quicker than MergeSort, and is adaptive and stable.
Stars: ✭ 39 (+105.26%)
Mutual labels:  mergesort, sorting-algorithms
Sorting-Visualiser
A mobile application that visualizes various sorting algorithms such as Bubble sort, selection sort, quick sort etc. The sorting process is visualized as the rearrangement of vertical lines of different lengths from shortest to tallest.
Stars: ✭ 32 (+68.42%)
Mutual labels:  insertion-sort, sorting-algorithms
Sorting-Algorithms
sorting algorithms in python
Stars: ✭ 15 (-21.05%)
Mutual labels:  insertion-sort, sorting-algorithms
Algods
Implementation of Algorithms and Data Structures, Problems and Solutions
Stars: ✭ 3,295 (+17242.11%)
Mutual labels:  mergesort, sorting-algorithms
Sorting-Visualizer
📊 Sorting.Visualizer is a web app for visualizing a bunch of different sorting algorithms Like Selection Sort, Bubble Sort, Insertion Sort, Merge Sort, Quick Sort, Heap Sort With the functionality of (Speed Control) and (Array Size Control)...
Stars: ✭ 37 (+94.74%)
Mutual labels:  insertion-sort, sorting-algorithms
Python Algorithms
Code for various YouTube video lessons + extras
Stars: ✭ 26 (+36.84%)
Mutual labels:  mergesort, insertion-sort
coqeal
The Coq Effective Algebra Library [maintainers=@CohenCyril,@proux01]
Stars: ✭ 62 (+226.32%)
Mutual labels:  coq, mathcomp
corn
Coq Repository at Nijmegen [maintainers=@spitters,@VincentSe]
Stars: ✭ 106 (+457.89%)
Mutual labels:  coq
RainbowSorting
Python application to visualize sorting algorithms using RGB colours.
Stars: ✭ 45 (+136.84%)
Mutual labels:  sorting-algorithms
Golang Examples
Some examples for the programming language Go.
Stars: ✭ 14 (-26.32%)
Mutual labels:  sorting-algorithms
radix-sorting
Radix sorting from the ground up
Stars: ✭ 27 (+42.11%)
Mutual labels:  sorting-algorithms
toychain
A minimalistic blockchain consensus implemented and verified in Coq
Stars: ✭ 103 (+442.11%)
Mutual labels:  coq
Algorithm-Implementation
This is our effort to collect the best implementations to tough algorithms. All codes are written in c++.
Stars: ✭ 16 (-15.79%)
Mutual labels:  sorting-algorithms

Stable sort algorithms in Coq

Docker CI

This library provides two kinds of optimized mergesort functions written in Coq. The first kind is non-tail-recursive mergesort functions. In the call-by-need evaluation, they allow us to compute the first k smallest elements of a list of length n in the optimal O(n + k log k) time complexity of the partial and incremental sorting problems. However, the non-tail-recursive merge function linearly consumes the call stack and triggers a stack overflow in the call-by-value evaluation. The second kind is tail-recursive mergesort functions and thus solves the above issue in the call-by-value evaluation. However, it does not allow us to compute the output incrementally in the optimal O(n + k log k) time regardless of the evaluation strategy. The point is that the best mergesort function for lists depends on the situation, in particular, the evaluation strategy and whether it should be incremental or not.

To prove the correctness (including stability) of these mergesort functions, this library also provides a generic way to prove these properties. The correctness lemmas provided in this library are overloaded using a canonical structure (StableSort.function). Stable sort functions are characterized in this interface by the parametricity axiom and binary trees representing the divide-and-conquer structure of sort. Thus, one may prove the stability of a new sorting function by using the parametricity translation (Paramcoq) and by providing a lemma corresponding to the binary tree construction.

Meta

Building and installation instructions

The easiest way to install the latest released version of Stable sort algorithms in Coq is via OPAM:

opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-stablesort

To instead build and install manually, do:

git clone https://github.com/pi8027/stablesort.git
cd stablesort
make   # or make -j <number-of-cores-on-your-machine> 
make install

Credits

The mergesort functions and the stability proofs provided in this library are mostly based on ones in the path library of Mathematical Components.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].