Set Implicit Arguments.
(* nat misc *)
Definition ltb (x y: nat): bool := negb (leb y x).
Definition geb (x y: nat): bool := leb y x.
Ltac subst_tac x y z := (* todo: rename *)
match z with
| x => y
| ?l + ?r =>
let l' := subst_tac x y l in
let r' := subst_tac x y r in
constr: (l' + r')
| ?l * ?r =>
let l' := subst_tac x y l in
let r' := subst_tac x y r in
constr: (l' * r')
| _ => z
end.
Ltac deep_le_trans h :=
match type of h with
| ?n <= ?u =>
match goal with
| |- ?l <= _ =>
let q := subst_tac n u l
in apply le_trans with q
end
end.
Instance Transitive_le: Transitive le := le_trans.
Proof with auto with arith.
destruct a... destruct b...
intros. simpl. discriminate.
Qed.

Lemma weak_lt_S_n n m: S n < m -> n < m.