Verified implementation of a total mergesort in Idris in under 133 loc. The type signature of the mergesort function is total mergeSort : (xs : List Nat) -> (ys : List Nat ** (Ordered ys, Permutation xs ys))
, where the definition of the type families Ordered
and Permutation
are borrowed from the standard library of Coq. mergeSort
is only defined on lists of natural numbers, because it seems Idris standard library lacks a type class for decidable orderability (similar to DecEq). The time complexity of the mergeSort
function is probably higher than O(n*log(n))
since the split function used, which is from Idris standard library, has time complexity O(n*log(n))
.
-
Notifications
You must be signed in to change notification settings - Fork 0
Verified mergesort in Idris
License
adrwes/idris-mergesort
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Verified mergesort in Idris
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published