I'm stuck on a lemma "left as an exercise" from this lecture. It goes like this:
Lemma even_double : forall n, even n -> exists k, n = 2 * k.
Proof.
intros n H.
induction H.
...
Where even
is an inductive predicate defined like this:
Inductive even : nat -> Prop :=
| even0 : even 0
| evenS : forall p:nat, even p -> even (S (S p).
Help, please? I always end up with (S (S p) = 2
or similar.
EDIT
Some lemmas and tactics I used (not complete proof):
destruct IHeven
exists (S x)
rewrite mult_succ_l
apply eq_S
apply plus_n_Sm