I am trying to use induction starting from 1 in a Coq proof. From this question I got a proof of the induction principle I need:
Section induction_at_1.
Variable P : nat -> Prop.
Hypothesis p1 : P 1.
Hypothesis pS : forall n, P n -> P (S n).
Theorem induction_at_1:
forall n, n > 0 -> P n.
induction n; intro.
- exfalso; omega.
- destruct n.
+ apply p1.
+ assert (S n >= 1) by omega.
intuition.
Qed.
End induction_at_1.
What I get looks structurally very similar to standard induction. In fact, Check nat_ind yields
nat_ind:
forall P : nat -> Prop,
P 0 ->
(forall n : nat, P n -> P (S n)) ->
forall n : nat, P n
while Check induction_at_1 yields
induction_at_1:
forall P : nat -> Prop,
P 1 ->
(forall n : nat, P n -> P (S n)) ->
forall n : nat, n > 0 -> P n
The issue arises when I try to apply this induction principle. For instance, I would like to prove by induction
Lemma cancellation:
forall a b c: nat, a > 0 -> a * b = a * c -> b = c.
This seems exactly suited to the kind of induction I have above, but when I start my proof like this
intros a b c H0 H1.
induction a using induction_at_1.
I get the following error, which I cannot interpret:
Not the right number of induction arguments (expected 2 arguments).
Since the two induction principles look almost identical to me, I am not sure why this does not work. Any ideas?