Skip to content

Instantly share code, notes, and snippets.

@mbrcknl
Created January 8, 2015 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbrcknl/c99cc6f99b8fed1b1d2e to your computer and use it in GitHub Desktop.
Save mbrcknl/c99cc6f99b8fed1b1d2e to your computer and use it in GitHub Desktop.
Theorem combine_split : forall X Y (l : list (X * Y)) l1 l2,
split l = (l1, l2) ->
combine l1 l2 = l.
Proof.
induction l as [|[x y] ps];
try (simpl; destruct (split ps));
inversion 1;
try (simpl; apply f_equal; apply IHps);
reflexivity.
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment