Created
September 2, 2016 05:25
-
-
Save mukeshtiwari/5a1ecc113c5fb655c11dc3cb1a9f26fd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Lemma length_pair : forall {A : Type} (n : nat) (l : list A), | |
length l <= n -> length (all_pairs l) <= n * n. | |
Proof. | |
intros A n l. generalize dependent n. induction l. | |
intros n H. auto with arith. | |
intros n H. destruct n. | |
inversion H. | |
simpl. simpl in H. | |
repeat rewrite app_length. repeat rewrite map_length. | |
Open Scope nat_scope. | |
apply le_n_S. apply le_S_n in H. | |
SearchAbout ( _ + _ <= _). | |
A : Type | |
a : A | |
l : list A | |
IHl : forall n : nat, length l <= n -> length (all_pairs l) <= n * n | |
n : nat | |
H : length l <= n | |
============================ | |
length (all_pairs l) + (length l + length l) <= n + n * S n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment