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 env_to_be_lemma : forall S : Ensemble var_env'', Finite _ S -> Included _ S (Evar_env'' 0 N) -> exists be : bool_expr, bool_expr_to_var_env'' 0 N be = S /\ be_ok (var_lu 0 N) be.