intuition.
unfold dat_correct_repeat, dat_correct_repeat2 in *.
destruct H0.
destruct H1.
intuition.
eapply datRepeat_depth_better.
eauto.
2:{
eauto.
}
eapply sqrt_le_lin_gen.
eapply div2_le.
eapply dat_correct_dat_better.
eauto.
eauto.
eapply sqrt_le_lin_gen.
eapply div2_le.
eapply le_trans.
eapply plus_le_compat.
eapply Nat.sqrt_spec.
omega.
eapply le_trans.
eapply datCorrect_datDepth.
eauto.
eapply Nat.sqrt_le_lin.
eapply div2_ge_double.
intuition.
eapply dat_correct_dat_better; eauto.
intuition.
inversion H1; clear H1; subst.
inversion H8; clear H8; subst.
destruct H.
assert (x1 = a).
eapply evalDet_steps_nil_eq; eauto.
eapply filter_In; eauto.
subst.
eapply filter_In; eauto.
intuition.
eapply datCorrect_datDepth; eauto.
Qed.

(* Specifications: *)
Lemma lowDistApprox_repeat_sqrt_le : forall n (A : Set)(c : Comp A)(P : A -> bool) a v1 v2,
well_formed_comp c ->
(exists a, In a (filter P (getSupport c))) ->
lowDistApprox (Repeat c P) a n v1 ->
lowDistApprox_repeat c P a (Nat.sqrt (div2 n)) v2 ->
n > 1 ->
v2 <= v1.