Use the Scheme command to generate the maximal induction principle for le.
The following text defines a function with a pre-condition based on le and proves a small theorem about this function.
Definition pred_partial: forall (n : nat), n <> 0 -> nat.
Proof.
refine (fun n:nat => match n return n <> 0 -> nat
with
| 0 => fun h => False_rec _ _
| S p => fun h => p
end).
- now destruct h.
Defined.
Theorem le_2_n_not_zero: forall (n : nat), 2 <= n -> n <> 0.
Proof.
intros n Hle; elim Hle; intros; discriminate.
Qed.
Prove the following theorem, using the maximal induction principle.
Theorem le_2_n_pred: forall (n : nat) (h : 2 <= n), pred_partial n (le_2_n_not_zero n h) <> 0.