Skip to content

Instantly share code, notes, and snippets.

@LeifW
Created April 23, 2015 00:42
Show Gist options
  • Select an option

  • Save LeifW/174bd2ea0e0a352094ba to your computer and use it in GitHub Desktop.

Select an option

Save LeifW/174bd2ea0e0a352094ba to your computer and use it in GitHub Desktop.
import Data.Fin
record DivMod : (dividend, divisor : Nat) -> Type where
result : (quotient : Nat) ->
(remainder : Fin divisor) ->
(property : dividend = finToNat remainder + quotient * divisor) ->
DivMod dividend divisor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment