Skip to content

Instantly share code, notes, and snippets.

@techtangents
Created May 9, 2014 10:43
Show Gist options
  • Save techtangents/6e5c30232f1297105c78 to your computer and use it in GitHub Desktop.
Save techtangents/6e5c30232f1297105c78 to your computer and use it in GitHub Desktop.
total
natToFin2 : (m : Nat) -> (n : Nat) -> {p : Nat.LT m n} -> Fin n
natToFin2 Z (S j) = fZ
natToFin2 (S k) (S j) = fS (natToFin2 k j)
-- *natto> :r
-- Type checking ./natto.idr
-- natto.idr:17:11:Incomplete term fS (natToFin2 k j)
-- Metavariables: Main.natToFin2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment