Created
August 26, 2013 19:53
-
-
Save anonymous/6345872 to your computer and use it in GitHub Desktop.
generalize map2 for ilist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixpoint map2gen {A B C n} (f : A -> B -> C) (xs : ilist A n) : ilist B n -> ilist C n := | |
match xs in ilist _ n return ilist B n -> ilist C n with | |
| INil => fun _ => INil | |
| ICons n' x xs' => fun ys => ICons (f x (hd ys)) (map2gen f xs' (tl ys)) | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment