πŸ“₯ Download raw
open import Padova2025.ProgrammingBasics.Lists
open import Padova2025.ProvingBasics.Connectives

module Padova2025.VerifiedAlgorithms.InsertionSort.Implementation
  (A : Set) (_≀_ : A β†’ A β†’ Set) (cmp? : (x y : A) β†’ x ≀ y ⊎ y ≀ x) where

Implementation

Explanation

Contract: β€œinsert x ys” is ascendingly ordered, if β€œys” is ascendingly ordered.

insert : A β†’ List A β†’ List A
insert = {!!}
sort : List A β†’ List A
sort = {!!}