Fixpoint predta_ref_ok_check_0 (d : preDTA) : preDTA -> bool :=
  fun d' : preDTA =>
  match d with
  | M0 => true
  | M1 a s => state_ref_ok_check s d'
  | M2 x y => predta_ref_ok_check_0 x d' && predta_ref_ok_check_0 y d'
  end.Definition predta_ref_ok_check (d : preDTA) : bool :=
  predta_ref_ok_check_0 d d.

(* Specifications: *)
Lemma predta_ref_ok_check_correct_0 : forall d d' : preDTA, preDTA_ref_ok_distinct d d' -> predta_ref_ok_check_0 d d' = true.
Lemma predta_ref_ok_check_complete_0 : forall d d' : preDTA, predta_ref_ok_check_0 d d' = true -> preDTA_ref_ok_distinct d d'.
Lemma predta_ref_ok_check_correct : forall d : preDTA, preDTA_ref_ok d -> predta_ref_ok_check d = true.
Lemma predta_ref_ok_check_complete : forall d : preDTA, predta_ref_ok_check d = true -> preDTA_ref_ok d.