Fixpoint ve''_to_be (ve : var_env'') (n : nat) {struct n} : bool_expr :=
  match n with
  | O => One
  | S m =>
      match in_dom _ (N_of_nat m) ve with
      | true => ANd (ve''_to_be ve m) (Var (N_of_nat m))
      | false => ANd (ve''_to_be ve m) (Neg (Var (N_of_nat m)))
      end
  end.

Lemma muevaleqset : forall (te : trans_env) (ste : set_tenv), ad_to_be_ok (var_lu 0 (2 * N)) te -> te_ste_ok te ste -> forall (f : mu_form) (re : rel_env) (sre : set_renv), f_ok f -> mu_form_ap_ok (var_lu 0 N) f -> ad_to_be_ok (var_lu 0 N) re -> re_sre_ok re sre -> mu_form2set ste f sre = bool_expr_to_var_env'' 0 N (mu_eval N te f re).