Section LeBool.
Fixpoint le_bool (a b : nat) {struct b} : bool :=
match a, b with
| O, _ => true
| S a1, S b1 => le_bool a1 b1
| _, _ => false
end.
Proof using.
intros a; elim a; simpl in |- *; auto.
intros b; case b; simpl in |- *; auto.
intros n H b; case b; simpl in |- *.
intros H1; inversion H1.
intros n0 H0; apply H.
apply le_S_n; auto.
Qed.
Proof using.
intros a; elim a; simpl in |- *; auto.
intros b H1; inversion H1.
intros n H b; case b; simpl in |- *; auto.
intros n0 H0; apply H.
apply lt_S_n; auto.
Qed.
Proof using.
intros a; elim a; simpl in |- *; auto.
intros b; case b; simpl in |- *; auto with arith.
intros n H b; case b; simpl in |- *; try (intros; discriminate);
auto with arith.
Qed.

Theorem le_bool_correct4 : forall a b : nat, le_bool a b = false -> b <= a.