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 ve''_to_be_ok1 : forall (n : nat) (ve ve' : var_env''), Evar_env'' 0 n ve -> bool_expr_to_var_env'' 0 n (ve''_to_be ve n) ve' -> ve = ve'.