Created
October 24, 2010 15:00
-
-
Save t0yv0/643581 to your computer and use it in GitHub Desktop.
The only list of length zero is the empty list.
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
Require Import Coq.Lists.List. | |
(** The only list of length zero is the empty list. *) | |
Lemma length_zero : forall (a : Type) (x : list a), | |
length x = 0 <-> x = nil. | |
Proof. | |
intros; split; intro. | |
induction x; auto; discriminate. | |
rewrite H; compute; auto. | |
Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment