induction n2; induction t2; intuition.
assert (reps = O).
omega.
subst.
inversion H1; clear H1; subst.
inversion H0; clear H0; subst.
econstructor.
inversion H0; clear H0; subst.
inversion H; clear H; subst.
econstructor.
congruence.
econstructor.
inversion H1; clear H1; subst.
inversion H0; clear H0; subst.
econstructor.
inversion H0; clear H0; subst.
inversion H; clear H; subst.
econstructor.
eapply IHt2_1; eauto; omega.
eapply IHt2_2; eauto; omega.
inversion H1; clear H1; subst.
inversion H0; clear H0; subst.
econstructor.
inversion H0; clear H0; subst.
inversion H; clear H; subst.
econstructor.
congruence.
econstructor.
inversion H; clear H; subst.
congruence.
eapply IHn2.
eauto.
eauto.
eapply H4; eauto.
trivial.
omega.
trivial.
trivial.
trivial.
inversion H1; clear H1; subst.
inversion H0; clear H0; subst.
econstructor.
inversion H; clear H; subst.
inversion H0; clear H0; subst.
econstructor.
eapply IHt2_1; eauto; omega.
eapply IHt2_2; eauto; omega.
Qed.

Lemma dat_repeat_better:
forall (A : Set) n (c : Comp A) (P : A -> bool)
(t1 t2 : DistApproxTree A),
(exists a : A, In a (filter P (getSupport c))) ->
dat_correct_repeat c P n t1 ->
dat_correct_repeat2 c P n t2 ->
dat_better t2 t1.