Definition bool_fun_mu_ex (bft bfg : bool_fun) : bool_fun :=
bool_fun_exl (bool_fun_and bft (bool_fun_replacel bfg lx lx')) lx'.
Definition mu_all_eval (t be : bool_expr) : bool_expr :=
univl (Impl t (replacel be lx lx')) lx'.
Definition mu_ex_eval (t be : bool_expr) : bool_expr :=
exl (ANd t (replacel be lx lx')) lx'.
Definition BDDmu_all (gc : BDDconfig -> list ad -> BDDconfig)
(cfg : BDDconfig) (ul : list ad) (nodet nodeg : ad) :=
match BDDreplacel gc cfg ul nodeg lx lx' with
| (cfgr, noder) =>
match BDDimpl gc cfgr (noder :: ul) nodet noder with
| (cfgi, nodei) => BDDunivl gc cfgi (nodei :: ul) nodei lx'
end
end.
Definition BDDmu_ex (gc : BDDconfig -> list ad -> BDDconfig)
(cfg : BDDconfig) (ul : list ad) (nodet nodeg : ad) :=
match BDDreplacel gc cfg ul nodeg lx lx' with
| (cfgr, noder) =>
match BDDand gc cfgr (noder :: ul) nodet noder with
| (cfga, nodea) => BDDexl gc cfga (nodea :: ul) nodea lx'
end
end.

(* Specifications: *)
Lemma bool_fun_univl_preserves_eq :
forall (l : list ad) (bf1 bf2 : bool_fun),
bool_fun_eq bf1 bf2 ->
bool_fun_eq (bool_fun_univl bf1 l) (bool_fun_univl bf2 l).
Lemma bool_fun_exl_preserves_eq :
forall (l : list ad) (bf1 bf2 : bool_fun),
bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_exl bf1 l) (bool_fun_exl bf2 l).
Lemma mu_all_eval_ok :
forall t be : bool_expr,
bool_fun_eq (bool_fun_of_bool_expr (mu_all_eval t be))
(bool_fun_mu_all (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be)).
Lemma mu_ex_eval_ok :
forall t be : bool_expr,
bool_fun_eq (bool_fun_of_bool_expr (mu_ex_eval t be))
(bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be)).
Lemma bool_fun_replacel_preserves_eq :
forall (lz ly : list ad) (bf1 bf2 : bool_fun),
bool_fun_eq bf1 bf2 ->
bool_fun_eq (bool_fun_replacel bf1 lz ly) (bool_fun_replacel bf2 lz ly).
Lemma bool_fun_mu_all_preserves_eq :
forall bft1 bft2 bfg1 bfg2 : bool_fun,
bool_fun_eq bft1 bft2 ->
bool_fun_eq bfg1 bfg2 ->
bool_fun_eq (bool_fun_mu_all bft1 bfg1) (bool_fun_mu_all bft2 bfg2).
Lemma bool_fun_mu_ex_preserves_eq :
forall bft1 bft2 bfg1 bfg2 : bool_fun,
bool_fun_eq bft1 bft2 ->
bool_fun_eq bfg1 bfg2 ->
bool_fun_eq (bool_fun_mu_ex bft1 bfg1) (bool_fun_mu_ex bft2 bfg2).
Lemma mu_all_eq :
forall t be1 be2 : bool_expr,
be_eq be1 be2 -> be_eq (mu_all_eval t be1) (mu_all_eval t be2).
Lemma mu_ex_eq :
forall t be1 be2 : bool_expr,
be_eq be1 be2 -> be_eq (mu_ex_eval t be1) (mu_ex_eval t be2).
Lemma length_lx_1_eq_lx'_1 :
forall n : nat, length (lx_1 n) = length (lx'_1 n).
Lemma length_lx_eq_lx' : length lx = length lx'.
Lemma ap'_eq_ap : forall n : nat, ap' n = ap (N + n).
Lemma in_lx'_1 : forall n m : nat, m < n -> In (ap' m) (lx'_1 n).
Lemma in_lx' : forall n : nat, N <= n -> S n <= 2 * N -> In (N_of_nat n) lx'.
Lemma in_lx'_1_conv :
forall n m : nat, In (N_of_nat m) (lx'_1 n) -> N <= m /\ m < N + n.
Lemma mu_all_x_free :
forall (t be : bool_expr) (x : BDDvar),
be_x_free x (mu_all_eval t be) = true ->
~ In x lx' /\ (be_x_free x t = true \/ be_x_free x be = true /\ ~ In x lx).
Lemma mu_ex_x_free :
forall (t be : bool_expr) (x : BDDvar),
be_x_free x (mu_ex_eval t be) = true ->
~ In x lx' /\ (be_x_free x t = true \/ be_x_free x be = true /\ ~ In x lx).