Hint Resolve rmax_t_Z_leaf: searchtrees.
(* We study the case of a search tree (Z_bnode n t1 (Z_bnode p t2 t3))  *)
Section RMAX_np.
Variable n p q : Z.
Variable t1 t2 t3 t' : Z_btree.
Hypothesis S1 : search (Z_bnode n t1 (Z_bnode p t2 t3)).
Hypothesis R1 : RMAX (Z_bnode p t2 t3) t' q.
Hint Resolve S1 R1: searchtrees.
Remark rmax_1 : occ q (Z_bnode n t1 (Z_bnode p t2 t3)).
Hint Resolve rmax_1: searchtrees.
Remark rmax_2 : (n < p)%Z.
Hint Resolve rmax_2: searchtrees.
Remark rmax_3 : min n t'.
Hint Resolve rmax_3: searchtrees.
Remark rmax_4 : search (Z_bnode n t1 t').
Hint Resolve rmax_4: searchtrees.
Remark rmax_5 : (n < q)%Z.
Hint Resolve rmax_5: searchtrees.
Remark rmax_6 :
forall p0 : Z, occ p0 (Z_bnode n t1 (Z_bnode p t2 t3)) -> (p0 <= q)%Z.
Hint Resolve rmax_6: searchtrees.
Remark rmax_7 :
forall q' : Z,
occ q' (Z_bnode n t1 t') -> occ q' (Z_bnode n t1 (Z_bnode p t2 t3)).
Hint Resolve rmax_7: searchtrees.
Remark rmax_8 : ~ occ q (Z_bnode n t1 t').
Hint Resolve rmax_8: searchtrees.
Remark rmax_9 :
forall q0 : Z,
occ q0 (Z_bnode n t1 (Z_bnode p t2 t3)) ->
occ q0 (Z_bnode n t1 t') \/ q = q0.
Hint Resolve rmax_9: searchtrees.

Lemma rmax_t1_t2t3 :
RMAX (Z_bnode n t1 (Z_bnode p t2 t3)) (Z_bnode n t1 t') q.