Skip to content

Instantly share code, notes, and snippets.

Created December 8, 2012 22:48
Show Gist options
  • Save anonymous/4242358 to your computer and use it in GitHub Desktop.
Save anonymous/4242358 to your computer and use it in GitHub Desktop.
Dealing with absurdity in Coq.
Inductive Fin : nat -> Set :=
| fzero : forall {n:nat}, Fin (S n)
| fsucc : forall {n:nat}, Fin n -> Fin (S n).
Lemma nonempty : forall f:Fin O, False.
Proof. intros H; inversion H. Qed.
Definition not_so_magic {A:Set} (f:Fin O) : A :=
match nonempty f with
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment