Definition var_env_or (ve1 ve2 : var_env) (x : ad) := ve1 x || ve2 x.
Definition var_env'_or (ve1 ve2 : var_env') (x : nat) := ve1 x || ve2 x.

(* Specifications: *)
Lemma forall_lemma1 :
forall (be : bool_expr) (ve : var_env) (a : ad),
bool_fun_of_bool_expr (forall_ a be) ve = true ->
bool_fun_of_bool_expr be ve = true.
Lemma renamef_ext :
forall (be : bool_expr) (f g : ad -> ad),
(forall x : ad, f x = g x) -> renamef f be = renamef g be.
Lemma renamef_id : forall be : bool_expr, renamef (fun x => x) be = be.
Lemma renamefS :
forall (be : bool_expr) (n : nat),
n < N ->
renamef (renfnad (S n)) be =
subst (ap n) (Var (ap' N n)) (renamef (renfnad n) be).
Lemma replacel_lemma :
forall (n : nat) (be : bool_expr),
n <= N -> replacel be (lx_1 n) (lx'_1 N n) = renamef (renfnad n) be.
Lemma replacel_lemma2 :
forall be : bool_expr,
be_ok (var_lu 0 N) be -> replacel be (lx N) (lx' N) = be_dash be.
Lemma exl_semantics :
forall (lx : list ad) (be : bool_expr) (ve : var_env'),
(forall n : nat, ve n = true -> ~ In (N_of_nat n) lx) ->
no_dup_list _ lx ->
(eval_be' (exl be lx) ve = true <->
(exists ve' : var_env',
(forall n : nat, ve' n = true -> In (N_of_nat n) lx) /\
eval_be' be (var_env'_or ve ve') = true)).
Lemma univl_semantics :
forall (lx : list ad) (be : bool_expr) (ve : var_env'),
(forall n : nat, ve n = true -> ~ In (N_of_nat n) lx) ->
no_dup_list _ lx ->
(eval_be' (univl be lx) ve = true <->
(forall ve' : var_env',
(forall n : nat, ve' n = true -> In (N_of_nat n) lx) ->
eval_be' be (var_env'_or ve ve') = true)).
Lemma bool_fun_of_be_ext1 :
forall (be : bool_expr) (ve ve' : var_env'),
(forall x : ad,
be_x_free x be = true -> ve (nat_of_N x) = ve' (nat_of_N x)) ->
eval_be' be ve = eval_be' be ve'.
Lemma no_dup_lx'_1 : forall n : nat, no_dup_list _ (lx'_1 N n).
Lemma mu_all_eval_semantics1 :
forall t be : bool_expr,
be_ok (var_lu 0 N) be ->
forall ve : var_env',
(forall n : nat, ve n = true -> var_lu 0 N (N_of_nat n) = true) ->
eval_be' (mu_all_eval N t be) ve = true ->
forall ve' : var_env',
(forall n : nat, ve' n = true -> var_lu 0 N (N_of_nat n) = true) ->
eval_be' t (var_env'_or ve (var_env'_dash ve')) = true ->
eval_be' be ve' = true.
Lemma mu_ex_eval_semantics1 :
forall t be : bool_expr,
be_ok (var_lu 0 N) be ->
forall ve : var_env',
(forall n : nat, ve n = true -> var_lu 0 N (N_of_nat n) = true) ->
eval_be' (mu_ex_eval N t be) ve = true ->
exists ve' : var_env',
(forall n : nat, ve' n = true -> var_lu 0 N (N_of_nat n) = true) /\
eval_be' t (var_env'_or ve (var_env'_dash ve')) = true /\
eval_be' be ve' = true.
Lemma mu_ex_eval_semantics2 :
forall t be : bool_expr,
be_ok (var_lu 0 N) be ->
forall ve : var_env',
(forall n : nat, ve n = true -> var_lu 0 N (N_of_nat n) = true) ->
(exists ve' : var_env',
(forall n : nat, ve' n = true -> var_lu 0 N (N_of_nat n) = true) /\
eval_be' t (var_env'_or ve (var_env'_dash ve')) = true /\
eval_be' be ve' = true) -> eval_be' (mu_ex_eval N t be) ve = true.
Lemma mu_all_eval_semantics2 :
forall t be : bool_expr,
be_ok (var_lu 0 N) be ->
forall ve : var_env',
(forall n : nat, ve n = true -> var_lu 0 N (N_of_nat n) = true) ->
(forall ve' : var_env',
(forall n : nat, ve' n = true -> var_lu 0 N (N_of_nat n) = true) ->
eval_be' t (var_env'_or ve (var_env'_dash ve')) = true ->
eval_be' be ve' = true) -> eval_be' (mu_all_eval N t be) ve = true.