induction 1; intuition; simpl in *.
inversion H0; clear H0; subst.
econstructor.
inversion H0; clear H0; subst.
inversion H; clear H; subst.
eapply H2; eauto.
omega.
inversion H2; clear H2; subst.
inversion H1; clear H1; subst.
econstructor.
eapply IHdat_better1.
eauto.
eauto.
destruct (le_dec (datDepth tb1) (datDepth tb2)).
rewrite Max.max_r in H3; eauto.
omega.
rewrite Max.max_l in H3; omega.
eauto.
eapply IHdat_better2.
eauto.
eauto.
destruct (le_dec (datDepth tb1) (datDepth tb2)).
rewrite Max.max_r in H3; omega.
rewrite Max.max_l in H3; omega.
eauto.
Qed.

(* Specifications: *)
Lemma datCorrect_datDepth : forall (A : Set)(c : Comp A) n t,
dat_correct c n t ->
(datDepth t <= n)%nat.