I'm trying to prove the following toy theorem about the ordering of the naturals:
Inductive Le: nat -> nat -> Prop :=
| le_n: forall n, Le n n
| le_S: forall n m, Le n m -> Le n (S m).
Theorem le_Sn_m: forall n m,
Le (S n) m -> Le n m.
On paper, this is a simple induction on Le (S n) m
. In particular, the base case of le_n
is trivial.
In Coq though, beginning my proof with induction gives me the following:
Proof.
intros n m H. induction H.
1 subgoal
n, n0 : nat
______________________________________(1/1)
Le n n0
...in which case I am blocked.
How should I proceed instead?
<=
relation, this is total overkill and will give you many headaches. I suggest indeed you define your relation as a functionnat -> nat -> bool
. – ejgallego