(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)


Require Import Bool.
Require Import Sumbool.
Require Import Arith.
Require Import ZArith NArith Nnat Ndec Ndigits.
From IntMap Require Import Allmaps.
Require Import Wf_nat.

Require Import BDDvar_ad_nat.
Require Import bdd1.
Require Import bdd2.
Require Import bdd3.
Require Import bdd4.
Require Import bdd5_1.
Require Import bdd5_2.
Require Import bdd6.
Require Import bdd7.
Require Import BDDdummy_lemma_2.
Require Import BDDdummy_lemma_3.
Require Import BDDdummy_lemma_4.
Require Import bdd8.
Require Import bdd9.
Require Import bdd10.

Definition BDDimpl (cfg : BDDconfig) (negm : BDDneg_memo) 
  (orm : BDDor_memo) (node1 node2 : ad) :=
  match BDDneg cfg negm node1 with
  | (cfg', (node1', negm')) =>
      match BDDor cfg' orm node1' node2 with
      | (cfg'', (node, orm')) => (cfg'', (node, (negm', orm')))
      end
  end.

Lemma BDDimpl_keeps_config_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 BDDconfig_OK (fst (BDDimpl cfg negm orm node1 node2)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDimpl in |- *.  elim (prod_sum _ _ (BDDneg cfg negm node1)).  intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' negm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  rewrite H4.  elim (prod_sum _ _ (BDDor cfg' orm node1' node2)).  intros cfg'' H5.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H5; clear H5.  intro.  elim x; clear x.  intros node negm'' H5.  rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
  simpl in |- *.  cut (BDDconfig_OK cfg').  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm).  intros.
(* Goal: BDDor_memo_OK cfg'' negm'' *)
(* Goal: BDDor_memo_OK cfg' orm *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDor cfg' orm node1' node2)).  apply BDDor_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  replace negm' with (snd (snd (BDDneg cfg negm node1))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node1' with (fst (snd (BDDneg cfg negm node1))).  apply BDDneg_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
Qed.

Lemma BDDimpl_node_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 config_node_OK (fst (BDDimpl cfg negm orm node1 node2))
   (fst (snd (BDDimpl cfg negm orm node1 node2))).
Proof.

(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDimpl in |- *.  elim (prod_sum _ _ (BDDneg cfg negm node1)).  intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' negm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  rewrite H4.  elim (prod_sum _ _ (BDDor cfg' orm node1' node2)).  intros cfg'' H5.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H5; clear H5.  intro.  elim x; clear x.  intros node negm'' H5.  rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
  simpl in |- *.  cut (BDDconfig_OK cfg').  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm).  intros.
(* Goal: BDDor_memo_OK cfg'' negm'' *)
(* Goal: BDDor_memo_OK cfg' orm *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDor cfg' orm node1' node2)).  replace node with (fst (snd (BDDor cfg' orm node1' node2))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDor_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  rewrite H5; reflexivity.  
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  replace negm' with (snd (snd (BDDneg cfg negm node1))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_neg_memo_OK.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node1' with (fst (snd (BDDneg cfg negm node1))).  apply BDDneg_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.

Qed.

Definition bool_fun_impl (bf1 bf2 : bool_fun) : bool_fun :=
  fun vb : var_binding => implb (bf1 vb) (bf2 vb).

Lemma bool_fun_impl_is_neg_or_bf2 :
 forall bf1 bf2 : bool_fun,
 bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_or (bool_fun_neg bf1) bf2).
Proof.
(* Goal: forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_or (bool_fun_neg bf1) bf2) *)
  unfold bool_fun_eq, bool_fun_impl, bool_fun_or, bool_fun_neg in |- *.  unfold bool_fun_eval in |- *.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  elim (bf1 vb).  elim (bf2 vb).  reflexivity.  reflexivity.  reflexivity.
Qed.

Lemma BDDimpl_is_impl :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 bool_fun_eq
   (bool_fun_of_BDD (fst (BDDimpl cfg negm orm node1 node2))
      (fst (snd (BDDimpl cfg negm orm node1 node2))))
   (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDimpl in |- *.  elim (prod_sum _ _ (BDDneg cfg negm node1)).  intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' negm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  rewrite H4.  elim (prod_sum _ _ (BDDor cfg' orm node1' node2)).  intros cfg'' H5.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H5; clear H5.  intro.  elim x; clear x.  intros node negm'' H5.  rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
  simpl in |- *.  cut (BDDconfig_OK cfg').  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm).  intros.
  apply
   bool_fun_eq_trans
    with
      (bf2 := bool_fun_or (bool_fun_of_BDD cfg' node1')
                (bool_fun_of_BDD cfg' node2)).
(* Goal: BDDor_memo_OK cfg'' negm'' *)
(* Goal: BDDor_memo_OK cfg' orm *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDor cfg' orm node1' node2)).  replace node with (fst (snd (BDDor cfg' orm node1' node2))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDor_is_or.  assumption.  assumption.  assumption.  assumption.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  rewrite H5; reflexivity.  apply
   bool_fun_eq_trans
    with
      (bf2 := bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1))
                (bool_fun_of_BDD cfg node2)).
(* Goal: BDDconfig_OK cfg' *)
  apply bool_fun_or_preserves_eq.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node1' with (fst (snd (BDDneg cfg negm node1))).  apply BDDneg_is_neg.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_preserves_bool_fun.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: bool_fun_eq (bool_fun_and (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_impl (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node1' *)
(* Goal: config_node_OK cfg'' node2' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  apply bool_fun_eq_symm.  apply bool_fun_impl_is_neg_or_bf2.  
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  replace negm' with (snd (snd (BDDneg cfg negm node1))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_neg_memo_OK.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node1' with (fst (snd (BDDneg cfg negm node1))).  apply BDDneg_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.

Qed.

Lemma BDDimpl_preserves_nodes :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 nodes_preserved cfg (fst (BDDimpl cfg negm orm node1 node2)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDimpl in |- *.  elim (prod_sum _ _ (BDDneg cfg negm node1)).  intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' negm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  rewrite H4.  elim (prod_sum _ _ (BDDor cfg' orm node1' node2)).  intros cfg'' H5.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H5; clear H5.  intro.  elim x; clear x.  intros node negm'' H5.  rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
  simpl in |- *.  cut (BDDconfig_OK cfg').  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm).  intros.
(* Goal: BDDconfig_OK cfg' *)
  apply nodes_preserved_trans with (cfg2 := cfg').  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_preserves_nodes.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: BDDor_memo_OK cfg'' negm'' *)
(* Goal: BDDor_memo_OK cfg' orm *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDor cfg' orm node1' node2)).  apply BDDor_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  replace negm' with (snd (snd (BDDneg cfg negm node1))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_neg_memo_OK.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node1' with (fst (snd (BDDneg cfg negm node1))).  apply BDDneg_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.

Qed.

Lemma BDDimpl_keeps_node_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 forall node : ad,
 config_node_OK cfg node ->
 config_node_OK (fst (BDDimpl cfg negm orm node1 node2)) node.
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply nodes_preserved_2 with (cfg := cfg).  assumption.  apply BDDimpl_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.
Qed.

Lemma BDDimpl_preserves_bool_fun :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 forall node : ad,
 config_node_OK cfg node ->
 bool_fun_eq (bool_fun_of_BDD (fst (BDDimpl cfg negm orm node1 node2)) node)
   (bool_fun_of_BDD cfg node).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply nodes_preserved_3.  assumption.  apply BDDimpl_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  apply BDDimpl_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  assumption.
Qed.

Lemma BDDimpl_keeps_neg_memo_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 BDDneg_memo_OK_2 (fst (BDDimpl cfg negm orm node1 node2))
   (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDimpl in |- *.  elim (prod_sum _ _ (BDDneg cfg negm node1)).  intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' negm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  rewrite H4.  elim (prod_sum _ _ (BDDor cfg' orm node1' node2)).  intros cfg'' H5.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H5; clear H5.  intro.  elim x; clear x.  intros node negm'' H5.  rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
  simpl in |- *.  cut (BDDconfig_OK cfg').  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm).  intros.
(* Goal: BDDor_memo_OK cfg'' negm'' *)
(* Goal: BDDor_memo_OK cfg' orm *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDor cfg' orm node1' node2)).  apply BDDor_keeps_neg_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  replace negm' with (snd (snd (BDDneg cfg negm node1))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_neg_memo_OK.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node1' with (fst (snd (BDDneg cfg negm node1))).  apply BDDneg_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.

Qed.

Lemma BDDimpl_keeps_or_memo_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 BDDor_memo_OK (fst (BDDimpl cfg negm orm node1 node2))
   (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDimpl in |- *.  elim (prod_sum _ _ (BDDneg cfg negm node1)).  intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' negm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  rewrite H4.  elim (prod_sum _ _ (BDDor cfg' orm node1' node2)).  intros cfg'' H5.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H5; clear H5.  intro.  elim x; clear x.  intros node negm'' H5.  rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
  simpl in |- *.  cut (BDDconfig_OK cfg').  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm).  intros.
(* Goal: BDDor_memo_OK cfg'' negm'' *)
(* Goal: BDDor_memo_OK cfg' orm *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDor cfg' orm node1' node2)).  replace negm'' with (snd (snd (BDDor cfg' orm node1' node2))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDor_keeps_or_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  rewrite H5; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  replace negm' with (snd (snd (BDDneg cfg negm node1))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_neg_memo_OK.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDneg cfg negm node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node1' with (fst (snd (BDDneg cfg negm node1))).  apply BDDneg_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.
(* Goal: BDDconfig_OK cfg' *)
  replace cfg' with (fst (BDDneg cfg negm node1)).  apply BDDneg_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
Qed.


Definition BDDiff (cfg : BDDconfig) (negm : BDDneg_memo) 
  (orm : BDDor_memo) (node1 node2 : ad) :=
  match BDDimpl cfg negm orm node1 node2 with
  | (cfg', (node1', (negm', orm'))) =>
      match BDDimpl cfg' negm' orm' node2 node1 with
      | (cfg'', (node2', (negm'', orm''))) =>
          BDDand cfg'' negm'' orm'' node1' node2'
      end
  end.

Lemma BDDiff_keeps_config_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 BDDconfig_OK (fst (BDDiff cfg negm orm node1 node2)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDiff in |- *.  elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg' H4.  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' y.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim y; clear y.  intros negm' orm' H4.  rewrite H4.  elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg'' H5.  elim H5; clear H5.  intro.  elim x; clear x.  intros node2' y.
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
  elim y; clear y.  intros negm'' orm'' H5.  rewrite H5.  cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
(* Goal: BDDconfig_OK cfg' *)
  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node1).  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm').  intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDconfig_OK cfg'').  cut (config_node_OK cfg'' node2').  cut (config_node_OK cfg'' node1').
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg'' negm'').  cut (BDDor_memo_OK cfg'' orm'').  intros.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDand_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.  assumption.  
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).  replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_or_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: config_node_OK cfg'' node1' *)
(* Goal: config_node_OK cfg'' node2' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))).  apply BDDimpl_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.
Qed.

Lemma BDDiff_node_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 config_node_OK (fst (BDDiff cfg negm orm node1 node2))
   (fst (snd (BDDiff cfg negm orm node1 node2))).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDiff in |- *.  elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg' H4.  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' y.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim y; clear y.  intros negm' orm' H4.  rewrite H4.  elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg'' H5.  elim H5; clear H5.  intro.  elim x; clear x.  intros node2' y.
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
  elim y; clear y.  intros negm'' orm'' H5.  rewrite H5.  cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
(* Goal: BDDconfig_OK cfg' *)
  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node1).  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm').  intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDconfig_OK cfg'').  cut (config_node_OK cfg'' node2').  cut (config_node_OK cfg'' node1').
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg'' negm'').  cut (BDDor_memo_OK cfg'' orm'').  intros.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDand_node_OK.  assumption.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).  replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_or_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: config_node_OK cfg'' node1' *)
(* Goal: config_node_OK cfg'' node2' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))).  apply BDDimpl_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.
Qed.

Lemma BDDiff_preserves_nodes :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 nodes_preserved cfg (fst (BDDiff cfg negm orm node1 node2)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDiff in |- *.  elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg' H4.  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' y.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim y; clear y.  intros negm' orm' H4.  rewrite H4.  elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg'' H5.  elim H5; clear H5.  intro.  elim x; clear x.  intros node2' y.
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
  elim y; clear y.  intros negm'' orm'' H5.  rewrite H5.  cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
(* Goal: BDDconfig_OK cfg' *)
  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node1).  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm').  intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDconfig_OK cfg'').  cut (config_node_OK cfg'' node2').  cut (config_node_OK cfg'' node1').
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg'' negm'').  cut (BDDor_memo_OK cfg'' orm'').  intros.
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  apply nodes_preserved_trans with (cfg2 := cfg').  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_preserves_nodes.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.  apply nodes_preserved_trans with (cfg2 := cfg'').
(* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).  apply BDDimpl_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDand_preserves_nodes.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).  replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_or_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: config_node_OK cfg'' node1' *)
(* Goal: config_node_OK cfg'' node2' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))).  apply BDDimpl_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.
Qed. 

Lemma BDDiff_keeps_neg_memo_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 BDDneg_memo_OK_2 (fst (BDDiff cfg negm orm node1 node2))
   (fst (snd (snd (BDDiff cfg negm orm node1 node2)))).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDiff in |- *.  elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg' H4.  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' y.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim y; clear y.  intros negm' orm' H4.  rewrite H4.  elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg'' H5.  elim H5; clear H5.  intro.  elim x; clear x.  intros node2' y.
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
  elim y; clear y.  intros negm'' orm'' H5.  rewrite H5.  cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
(* Goal: BDDconfig_OK cfg' *)
  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node1).  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm').  intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDconfig_OK cfg'').  cut (config_node_OK cfg'' node2').  cut (config_node_OK cfg'' node1').
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg'' negm'').  cut (BDDor_memo_OK cfg'' orm'').  intros.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDand_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).  replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_or_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: config_node_OK cfg'' node1' *)
(* Goal: config_node_OK cfg'' node2' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))).  apply BDDimpl_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.
Qed.

Lemma BDDiff_keeps_or_memo_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 BDDor_memo_OK (fst (BDDiff cfg negm orm node1 node2))
   (snd (snd (snd (BDDiff cfg negm orm node1 node2)))).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDiff in |- *.  elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg' H4.  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' y.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim y; clear y.  intros negm' orm' H4.  rewrite H4.  elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg'' H5.  elim H5; clear H5.  intro.  elim x; clear x.  intros node2' y.
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
  elim y; clear y.  intros negm'' orm'' H5.  rewrite H5.  cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
(* Goal: BDDconfig_OK cfg' *)
  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node1).  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm').  intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDconfig_OK cfg'').  cut (config_node_OK cfg'' node2').  cut (config_node_OK cfg'' node1').
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg'' negm'').  cut (BDDor_memo_OK cfg'' orm'').  intros.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDand_keeps_or_memo_OK.  assumption.  assumption.  assumption.  assumption.  assumption.  
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).  replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_or_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: config_node_OK cfg'' node1' *)
(* Goal: config_node_OK cfg'' node2' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))).  apply BDDimpl_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.
Qed.

Definition bool_fun_iff (bf1 bf2 : bool_fun) : bool_fun :=
  fun vb : var_binding => eqb (bf1 vb) (bf2 vb).

Lemma bool_fun_iff_is_and_impl_impl :
 forall bf1 bf2 : bool_fun,
 bool_fun_eq (bool_fun_iff bf1 bf2)
   (bool_fun_and (bool_fun_impl bf1 bf2) (bool_fun_impl bf2 bf1)).
Proof.
(* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => ifb (vb0 x) true false) vb) (bool_fun_eval (fun vb0 : var_binding => vb0 x) vb) *)
  unfold bool_fun_iff, bool_fun_eq, bool_fun_and, bool_fun_impl in |- *.  unfold bool_fun_eval in |- *.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  elim (bf1 vb).  elim (bf2 vb).  reflexivity.  reflexivity.  reflexivity.
Qed.

Lemma bool_fun_and_preserves_eq :
 forall bf1 bf2 bf1' bf2' : bool_fun,
 bool_fun_eq bf1 bf1' ->
 bool_fun_eq bf2 bf2' ->
 bool_fun_eq (bool_fun_and bf1 bf2) (bool_fun_and bf1' bf2').
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold bool_fun_eq in H, H0.  unfold bool_fun_eval in H, H0.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  unfold bool_fun_eq, bool_fun_and in |- *.  unfold bool_fun_eval in |- *.  intro.  rewrite (H vb).
(* Goal: @eq bool (ifb false true false) false *)
  rewrite (H0 vb).  reflexivity.
Qed.

Lemma bool_fun_impl_preserves_eq :
 forall bf1 bf2 bf1' bf2' : bool_fun,
 bool_fun_eq bf1 bf1' ->
 bool_fun_eq bf2 bf2' ->
 bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_impl bf1' bf2').
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold bool_fun_eq in H, H0.  unfold bool_fun_eval in H, H0.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  unfold bool_fun_eq, bool_fun_impl in |- *.  unfold bool_fun_eval in |- *.  intro.  rewrite (H vb).
(* Goal: @eq bool (ifb false true false) false *)
  rewrite (H0 vb).  reflexivity.
Qed.

Lemma bool_fun_iff_preserves_eq :
 forall bf1 bf2 bf1' bf2' : bool_fun,
 bool_fun_eq bf1 bf1' ->
 bool_fun_eq bf2 bf2' ->
 bool_fun_eq (bool_fun_iff bf1 bf2) (bool_fun_iff bf1' bf2').
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold bool_fun_eq in H, H0.  unfold bool_fun_eval in H, H0.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  unfold bool_fun_eq, bool_fun_iff in |- *.  unfold bool_fun_eval in |- *.  intro.  rewrite (H vb).
(* Goal: @eq bool (ifb false true false) false *)
  rewrite (H0 vb).  reflexivity.
Qed.

Lemma BDDiff_is_iff :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 bool_fun_eq
   (bool_fun_of_BDD (fst (BDDiff cfg negm orm node1 node2))
      (fst (snd (BDDiff cfg negm orm node1 node2))))
   (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDiff in |- *.  elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg' H4.  elim H4; clear H4.  intro.  elim x; clear x.  intros node1' y.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim y; clear y.  intros negm' orm' H4.  rewrite H4.  elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intros cfg'' H5.  elim H5; clear H5.  intro.  elim x; clear x.  intros node2' y.
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
  elim y; clear y.  intros negm'' orm'' H5.  rewrite H5.  cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
(* Goal: BDDconfig_OK cfg' *)
  cut (config_node_OK cfg' node1').  cut (config_node_OK cfg' node1).  cut (config_node_OK cfg' node2).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm').  intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDconfig_OK cfg'').  cut (config_node_OK cfg'' node2').  cut (config_node_OK cfg'' node1').
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg'' negm'').  cut (BDDor_memo_OK cfg'' orm'').  intros.
  apply
   bool_fun_eq_trans
    with
      (bf2 := bool_fun_and (bool_fun_of_BDD cfg'' node1')
                (bool_fun_of_BDD cfg'' node2')).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDand_is_and.  assumption.  assumption.  assumption.  assumption.  assumption.
  apply
   bool_fun_eq_trans
    with
      (bf2 := bool_fun_and
                (bool_fun_impl (bool_fun_of_BDD cfg node1)
                   (bool_fun_of_BDD cfg node2))
                (bool_fun_impl (bool_fun_of_BDD cfg node2)
                   (bool_fun_of_BDD cfg node1))).
(* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  apply bool_fun_and_preserves_eq.  apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1').
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).  apply BDDimpl_preserves_bool_fun.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  assumption.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) node1' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))).  apply BDDimpl_is_impl.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  apply
   bool_fun_eq_trans
    with
      (bf2 := bool_fun_impl (bool_fun_of_BDD cfg' node2)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
                (bool_fun_of_BDD cfg' node1)).  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))).  apply BDDimpl_is_impl.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  apply bool_fun_impl_preserves_eq.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_preserves_bool_fun.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_preserves_bool_fun.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  apply bool_fun_eq_symm.
(* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_impl (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))) *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node1' *)
(* Goal: config_node_OK cfg'' node2' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  apply bool_fun_iff_is_and_impl_impl.  
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).  replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_or_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: config_node_OK cfg'' node1' *)
(* Goal: config_node_OK cfg'' node2' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H5; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H5; reflexivity.  replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H5; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))).  apply BDDimpl_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *)
(* Goal: config_node_OK cfg' node2 *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: config_node_OK cfg' node1' *)
(* Goal: BDDconfig_OK cfg' *)
  replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_neg_memo_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_node_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))).  apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDimpl_keeps_config_OK.  assumption.  assumption.  assumption.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H4; reflexivity.
Qed.

Lemma BDDiff_keeps_node_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 forall node : ad,
 config_node_OK cfg node ->
 config_node_OK (fst (BDDiff cfg negm orm node1 node2)) node.
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply nodes_preserved_2 with (cfg := cfg).  assumption.  apply BDDiff_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.
Qed.

Lemma BDDiff_preserves_bool_fun :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo)
   (node1 node2 : ad),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 config_node_OK cfg node1 ->
 config_node_OK cfg node2 ->
 forall node : ad,
 config_node_OK cfg node ->
 bool_fun_eq (bool_fun_of_BDD (fst (BDDiff cfg negm orm node1 node2)) node)
   (bool_fun_of_BDD cfg node).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply nodes_preserved_3.  assumption.  apply BDDiff_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  apply BDDiff_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  assumption.  assumption.
Qed.

Definition BDDvar_make (cfg : BDDconfig) (x : BDDvar) :=
  BDDmake cfg x BDDzero BDDone.

Lemma BDDvar_make_keeps_config_OK :
 forall (cfg : BDDconfig) (x : BDDvar),
 BDDconfig_OK cfg -> BDDconfig_OK (fst (BDDvar_make cfg x)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  refine (proj1 (BDDmake_semantics _ _ _ _ _ _ _ _ _)).  assumption.  
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  left; reflexivity.  right; left; reflexivity.  intros.  rewrite (config_OK_zero cfg H) in H0.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  discriminate.  intros.  rewrite (config_OK_one cfg H) in H0.  discriminate.
Qed.

Lemma BDDvar_make_node_OK :
 forall (cfg : BDDconfig) (x : BDDvar),
 BDDconfig_OK cfg ->
 config_node_OK (fst (BDDvar_make cfg x)) (snd (BDDvar_make cfg x)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  refine
   (proj2 (proj2 (proj2 (proj2 (BDDmake_semantics _ _ _ _ _ _ _ _ _))))).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  assumption.  left; reflexivity.  right; left; reflexivity.  intros.  rewrite (config_OK_zero cfg H) in H0.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  discriminate.  intros.  rewrite (config_OK_one cfg H) in H0.  discriminate.
Qed.

Lemma BDDvar_make_preserves_nodes :
 forall (cfg : BDDconfig) (x : BDDvar),
 BDDconfig_OK cfg -> nodes_preserved cfg (fst (BDDvar_make cfg x)).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  unfold BDDvar_make in |- *.  apply BDDmake_preserves_nodes.  assumption.
Qed.

Lemma BDDvar_make_keeps_neg_memo_OK :
 forall (cfg : BDDconfig) (negm : BDDneg_memo) (x : BDDvar),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm -> BDDneg_memo_OK_2 (fst (BDDvar_make cfg x)) negm.
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply nodes_preserved_negm_OK with (cfg := cfg).  assumption.  apply BDDvar_make_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  apply BDDvar_make_preserves_nodes.  assumption.  assumption.
Qed.

Lemma BDDvar_make_keeps_or_memo_OK :
 forall (cfg : BDDconfig) (orm : BDDor_memo) (x : BDDvar),
 BDDconfig_OK cfg ->
 BDDor_memo_OK cfg orm -> BDDor_memo_OK (fst (BDDvar_make cfg x)) orm.
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply nodes_preserved_orm_OK with (cfg := cfg).  assumption.  apply BDDvar_make_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  apply BDDvar_make_preserves_nodes.  assumption.  assumption.
Qed.

Lemma BDDvar_make_keeps_node_OK :
 forall (cfg : BDDconfig) (x : BDDvar),
 BDDconfig_OK cfg ->
 forall node : ad,
 config_node_OK cfg node -> config_node_OK (fst (BDDvar_make cfg x)) node.
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply nodes_preserved_2 with (cfg := cfg).  assumption.  apply BDDvar_make_preserves_nodes.  assumption.
Qed.

Lemma BDDvar_make_preserves_bool_fun :
 forall (cfg : BDDconfig) (x : BDDvar),
 BDDconfig_OK cfg ->
 forall node : ad,
 config_node_OK cfg node ->
 bool_fun_eq (bool_fun_of_BDD (fst (BDDvar_make cfg x)) node)
   (bool_fun_of_BDD cfg node).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply nodes_preserved_3.  assumption.  apply BDDvar_make_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  apply BDDvar_make_preserves_nodes.  assumption.  assumption.
Qed.

Definition bool_fun_var (x : BDDvar) : bool_fun :=
  fun vb : var_binding => vb x.

Lemma BDDvar_make_is_var :
 forall (cfg : BDDconfig) (x : BDDvar),
 BDDconfig_OK cfg ->
 bool_fun_eq
   (bool_fun_of_BDD (fst (BDDvar_make cfg x)) (snd (BDDvar_make cfg x)))
   (bool_fun_var x).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  apply
   bool_fun_eq_trans with (bf2 := bool_fun_if x bool_fun_one bool_fun_zero).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make cfg x)) (@snd BDDconfig ad (BDDvar_make cfg x))) (bool_fun_if x bool_fun_one bool_fun_zero) *)
(* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *)
  unfold BDDvar_make in |- *.  apply
   bool_fun_eq_trans
    with
      (bool_fun_if x (bool_fun_of_BDD cfg BDDone)
         (bool_fun_of_BDD cfg BDDzero)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDmake_bool_fun.  assumption.  left; reflexivity.  right; left; reflexivity.  
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intro.  inversion H0.  inversion H1.  inversion H2.  rewrite (config_OK_zero cfg H) in H3; discriminate.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intro.  inversion H0.  inversion H1.  inversion H2.  rewrite (config_OK_one cfg H) in H3; discriminate.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply bool_fun_if_preserves_eq.  apply bool_fun_of_BDDone.  assumption.  
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply bool_fun_of_BDDzero.  assumption.  unfold bool_fun_eq, bool_fun_one, bool_fun_zero, bool_fun_var, bool_fun_if
   in |- *.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  unfold bool_fun_eval in |- *.  intro.  elim (vb x).  reflexivity.  reflexivity.  
Qed.




Inductive bool_expr : Set :=
  | Zero : bool_expr
  | One : bool_expr
  | Var : BDDvar -> bool_expr
  | Neg : bool_expr -> bool_expr
  | Or : bool_expr -> bool_expr -> bool_expr
  | ANd : bool_expr -> bool_expr -> bool_expr
  | Impl : bool_expr -> bool_expr -> bool_expr
  | Iff : bool_expr -> bool_expr -> bool_expr.

Fixpoint bool_fun_of_bool_expr (be : bool_expr) : bool_fun :=
  match be with
  | Zero => bool_fun_zero
  | One => bool_fun_one
  | Var x => bool_fun_var x
  | Neg be' => bool_fun_neg (bool_fun_of_bool_expr be')
  | Or be1 be2 =>
      bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)
  | ANd be1 be2 =>
      bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)
  | Impl be1 be2 =>
      bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)
  | Iff be1 be2 =>
      bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)
  end.

Fixpoint BDDof_bool_expr (cfg : BDDconfig) (negm : BDDneg_memo)
 (orm : BDDor_memo) (be : bool_expr) {struct be} :
 BDDconfig * (ad * (BDDneg_memo * BDDor_memo)) :=
  match be with
  | Zero => (cfg, (BDDzero, (negm, orm)))
  | One => (cfg, (BDDone, (negm, orm)))
  | Var x =>
      match BDDvar_make cfg x with
      | (cfg', node) => (cfg', (node, (negm, orm)))
      end
  | Neg be' =>
      match BDDof_bool_expr cfg negm orm be' with
      | (cfg', (node, (negm', orm'))) =>
          match BDDneg cfg' negm' node with
          | (cfg'', (node', negm'')) => (cfg'', (node', (negm'', orm')))
          end
      end
  | Or be1 be2 =>
      match BDDof_bool_expr cfg negm orm be1 with
      | (cfg', (node1, (negm', orm'))) =>
          match BDDof_bool_expr cfg' negm' orm' be2 with
          | (cfg'', (node2, (negm'', orm''))) =>
              match BDDor cfg'' orm'' node1 node2 with
              | (cfg''', (node, orm''')) =>
                  (cfg''', (node, (negm'', orm''')))
              end
          end
      end
  | ANd be1 be2 =>
      match BDDof_bool_expr cfg negm orm be1 with
      | (cfg', (node1, (negm', orm'))) =>
          match BDDof_bool_expr cfg' negm' orm' be2 with
          | (cfg'', (node2, (negm'', orm''))) =>
              BDDand cfg'' negm'' orm'' node1 node2
          end
      end
  | Impl be1 be2 =>
      match BDDof_bool_expr cfg negm orm be1 with
      | (cfg', (node1, (negm', orm'))) =>
          match BDDof_bool_expr cfg' negm' orm' be2 with
          | (cfg'', (node2, (negm'', orm''))) =>
              BDDimpl cfg'' negm'' orm'' node1 node2
          end
      end
  | Iff be1 be2 =>
      match BDDof_bool_expr cfg negm orm be1 with
      | (cfg', (node1, (negm', orm'))) =>
          match BDDof_bool_expr cfg' negm' orm' be2 with
          | (cfg'', (node2, (negm'', orm''))) =>
              BDDiff cfg'' negm'' orm'' node1 node2
          end
      end
  end.

Lemma BDDof_bool_expr_correct :
 forall (be : bool_expr) (cfg : BDDconfig) (negm : BDDneg_memo)
   (orm : BDDor_memo),
 BDDconfig_OK cfg ->
 BDDneg_memo_OK_2 cfg negm ->
 BDDor_memo_OK cfg orm ->
 BDDconfig_OK (fst (BDDof_bool_expr cfg negm orm be)) /\
 config_node_OK (fst (BDDof_bool_expr cfg negm orm be))
   (fst (snd (BDDof_bool_expr cfg negm orm be))) /\
 BDDneg_memo_OK_2 (fst (BDDof_bool_expr cfg negm orm be))
   (fst (snd (snd (BDDof_bool_expr cfg negm orm be)))) /\
 BDDor_memo_OK (fst (BDDof_bool_expr cfg negm orm be))
   (snd (snd (snd (BDDof_bool_expr cfg negm orm be)))) /\
 nodes_preserved cfg (fst (BDDof_bool_expr cfg negm orm be)) /\
 bool_fun_eq
   (bool_fun_of_BDD (fst (BDDof_bool_expr cfg negm orm be))
      (fst (snd (BDDof_bool_expr cfg negm orm be))))
   (bool_fun_of_bool_expr be).
Proof.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  simple induction be.  intros.  simpl in |- *.  split.  assumption.  split.  left; reflexivity.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  split.  assumption.  split.  assumption.  split.  unfold nodes_preserved in |- *.  intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
  assumption.  apply bool_fun_of_BDDzero.  assumption.  simpl in |- *.  split.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  split.  right; left; reflexivity.  split.  assumption.  split.  assumption.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  split.  unfold nodes_preserved in |- *.  intros; assumption.  apply bool_fun_of_BDDone.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  assumption.  simpl in |- *.  intros.  elim (prod_sum _ _ (BDDvar_make cfg b)).  intros cfg' H2.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
  elim H2; clear H2.  intros node H2.  rewrite H2.  simpl in |- *.  split.  replace cfg' with (fst (BDDvar_make cfg b)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDvar_make_keeps_config_OK.  assumption.  rewrite H2; reflexivity.  
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  split.  replace cfg' with (fst (BDDvar_make cfg b)).  replace node with (snd (BDDvar_make cfg b)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDvar_make_node_OK.  assumption.  rewrite H2; reflexivity.  rewrite H2; reflexivity.
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  split.  replace cfg' with (fst (BDDvar_make cfg b)).  apply BDDvar_make_keeps_neg_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  rewrite H2; reflexivity.  split.  replace cfg' with (fst (BDDvar_make cfg b)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDvar_make_keeps_or_memo_OK.  assumption.  assumption.  rewrite H2; reflexivity.
(* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDvar_make cfg b)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make cfg b)) cfg' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_var b) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))))) (bool_fun_of_bool_expr (Neg b))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  split.  replace cfg' with (fst (BDDvar_make cfg b)).  apply BDDvar_make_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  rewrite H2; reflexivity.  replace cfg' with (fst (BDDvar_make cfg b)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  replace node with (snd (BDDvar_make cfg b)).  apply BDDvar_make_is_var.  assumption.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  rewrite H2; reflexivity.  rewrite H2; reflexivity.  intros.  simpl in |- *.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))))) (bool_fun_neg (bool_fun_of_bool_expr b))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm b)).  intros cfg' H3.  elim H3; clear H3.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  intro.  elim x; clear x.  intros node y.  elim y; clear y.  intros negm' orm' H3.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))))) (bool_fun_neg (bool_fun_of_bool_expr b))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  rewrite H3.  elim (prod_sum _ _ (BDDneg cfg' negm' node)).  intros cfg'' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  elim H4; clear H4.  intro.  elim x; clear x.  intros node' negm''.  intro H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
  rewrite H4.  simpl in |- *.  cut (BDDconfig_OK cfg').  cut (config_node_OK cfg' node).
(* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  cut (BDDneg_memo_OK_2 cfg' negm').  cut (BDDor_memo_OK cfg' orm').  cut (nodes_preserved cfg cfg').
(* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK cfg'') (and (config_node_OK cfg'' node') (and (BDDneg_memo_OK_2 cfg'' negm'') (and (BDDor_memo_OK cfg'' orm') (and (nodes_preserved cfg cfg'') (bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_bool_expr b))))))) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  cut (bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
  intros.  split.  replace cfg'' with (fst (BDDneg cfg' negm' node)).  apply BDDneg_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  split.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_BDD cfg' node)) *)
(* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace cfg'' with (fst (BDDneg cfg' negm' node)).  replace node' with (fst (snd (BDDneg cfg' negm' node))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_node_OK.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  rewrite H4; reflexivity.  split.  replace cfg'' with (fst (BDDneg cfg' negm' node)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) (@snd ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node))) *)
(* Goal: @eq BDDneg_memo (@snd ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node))) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) cfg'' *)
(* Goal: and (BDDor_memo_OK cfg'' orm') (and (nodes_preserved cfg cfg'') (bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_bool_expr b)))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  replace negm'' with (snd (snd (BDDneg cfg' negm' node))).  apply BDDneg_keeps_neg_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  rewrite H4; reflexivity.  rewrite H4; reflexivity.
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) cfg'' *)
(* Goal: and (nodes_preserved cfg cfg'') (bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_bool_expr b))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
  split.  replace cfg'' with (fst (BDDneg cfg' negm' node)).  apply BDDneg_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  assumption.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  split.  apply nodes_preserved_trans with (cfg2 := cfg').  assumption.  replace cfg'' with (fst (BDDneg cfg' negm' node)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
  apply BDDneg_preserves_nodes.  assumption.  assumption.  assumption.  rewrite H4; reflexivity.

apply
 bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg' node)).
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_BDD cfg' node)) *)
(* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg'' with (fst (BDDneg cfg' negm' node)).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) node') (bool_fun_neg (bool_fun_of_BDD cfg' node)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace node' with (fst (snd (BDDneg cfg' negm' node))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)))) (bool_fun_neg (bool_fun_of_BDD cfg' node)) *)
(* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node))) node' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDneg_is_neg.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply bool_fun_eq_neg_1.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) node *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace node with (fst (snd (BDDof_bool_expr cfg negm orm b))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)).
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm b)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) cfg' *)
(* Goal: config_node_OK cfg' node *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm b)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) node *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace node with (fst (snd (BDDof_bool_expr cfg negm orm b))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
refine (proj1 (H _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H3; reflexivity.

(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
clear be.
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
intros be1 H.
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (bool_fun_of_bool_expr (Iff be1 b))))))) *)
intros be2 H0.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
simpl in |- *.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm be1)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim H4; clear H4.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intro.
(* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim x; clear x.
(* Goal: forall (a : ad) (b : prod BDDneg_memo BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intros node1 y.
(* Goal: forall (a : BDDneg_memo) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDimpl cfg negm orm node1 node2) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) node1' (@pair BDDneg_memo BDDor_memo a b)))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
elim y; clear y; intros negm' orm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
rewrite H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim (prod_sum _ _ (BDDof_bool_expr cfg' negm' orm' be2)).
intros cfg'' H5; elim H5; clear H5; intro; elim x; clear x; intros node2 y;
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
 elim y; clear y; intros negm'' orm'' H5; rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
elim (prod_sum _ _ (BDDor cfg'' orm'' node1 node2)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad BDDor_memo) (fun b : prod ad BDDor_memo => @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor cfg'' orm'' node1 node2) (@pair BDDconfig (prod ad BDDor_memo) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
intros cfg''' H6.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
elim H6; clear H6.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intro.
(* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim x; clear x.
(* Goal: forall (a : ad) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor cfg'' orm'' node1 node2) (@pair BDDconfig (prod ad BDDor_memo) cfg''' (@pair ad BDDor_memo a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
intros node orm''' H6.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
rewrite H6.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
simpl in |- *.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg' node1).
(* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDneg_memo_OK_2 cfg' negm').
(* Goal: forall (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDor_memo_OK cfg' orm').
(* Goal: forall (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (nodes_preserved cfg cfg').
(* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDconfig_OK cfg'').
(* Goal: forall _ : BDDconfig_OK cfg'', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg'' node2).
(* Goal: forall (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDneg_memo_OK_2 cfg'' negm'').
(* Goal: forall (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDor_memo_OK cfg'' orm'').
(* Goal: forall (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (nodes_preserved cfg' cfg'').
(* Goal: forall (_ : nodes_preserved cfg' cfg'') (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg'' node1).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: and (config_node_OK cfg''' node) (and (BDDneg_memo_OK_2 cfg''' negm'') (and (BDDor_memo_OK cfg''' orm''') (and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDor_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace node with (fst (snd (BDDor cfg'' orm'' node1 node2))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) *)
(* Goal: @eq ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) node *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: and (BDDneg_memo_OK_2 cfg''' negm'') (and (BDDor_memo_OK cfg''' orm''') (and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDor_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: and (BDDor_memo_OK cfg''' orm''') (and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDor_keeps_neg_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) orm''' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace orm''' with (snd (snd (BDDor cfg'' orm'' node1 node2))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) *)
(* Goal: @eq BDDor_memo (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) orm''' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDor_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_trans with (cfg2 := cfg').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_trans with (cfg2 := cfg'').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)).
(* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDor_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

apply
 bool_fun_eq_trans
  with
    (bf2 := bool_fun_or (bool_fun_of_BDD cfg'' node1)
              (bool_fun_of_BDD cfg'' node2)).
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
replace node with (fst (snd (BDDor cfg'' orm'' node1 node2))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)))) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: @eq ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) node *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *)
(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDor_is_or.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

(* Goal: @eq bool (ifb false true false) false *)
rewrite H6; reflexivity.

(* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply bool_fun_or_preserves_eq.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1).
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg' node1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_3.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_2 with (cfg := cfg').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) (bool_fun_of_bool_expr be2) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) orm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace orm'' with (snd (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) orm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace negm'' with (fst (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H0 _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H0 _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (H0 _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm be1)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm be1)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
refine (proj1 (H _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
clear be.
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
intros be1 H.
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (bool_fun_of_bool_expr (Iff be1 b))))))) *)
intros be2 H0.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
simpl in |- *.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm be1)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim H4; clear H4.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intro.
(* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim x; clear x.
(* Goal: forall (a : ad) (b : prod BDDneg_memo BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intros node1 y.
(* Goal: forall (a : BDDneg_memo) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDimpl cfg negm orm node1 node2) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) node1' (@pair BDDneg_memo BDDor_memo a b)))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
elim y; clear y; intros negm' orm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
rewrite H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim (prod_sum _ _ (BDDof_bool_expr cfg' negm' orm' be2)).
intros cfg'' H5; elim H5; clear H5; intro; elim x; clear x; intros node2 y;
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
 elim y; clear y; intros negm'' orm'' H5; rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg' node1).
(* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDneg_memo_OK_2 cfg' negm').
(* Goal: forall (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDor_memo_OK cfg' orm').
(* Goal: forall (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (nodes_preserved cfg cfg').
(* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDconfig_OK cfg'').
(* Goal: forall _ : BDDconfig_OK cfg'', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg'' node2).
(* Goal: forall (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDneg_memo_OK_2 cfg'' negm'').
(* Goal: forall (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDor_memo_OK cfg'' orm'').
(* Goal: forall (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (nodes_preserved cfg' cfg'').
(* Goal: forall (_ : nodes_preserved cfg' cfg'') (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg'' node1).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) *)
(* Goal: and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDand_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDand_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDand_keeps_neg_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDand_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_trans with (cfg2 := cfg').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_trans with (cfg2 := cfg'').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDand_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

apply
 bool_fun_eq_trans
  with
    (bf2 := bool_fun_and (bool_fun_of_BDD cfg'' node1)
              (bool_fun_of_BDD cfg'' node2)).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDand_is_and.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply bool_fun_and_preserves_eq.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1).
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg' node1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_3.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_2 with (cfg := cfg').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) (bool_fun_of_bool_expr be2) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) orm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace orm'' with (snd (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) orm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace negm'' with (fst (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H0 _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H0 _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (H0 _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm be1)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm be1)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
refine (proj1 (H _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(************ End of script.v ********)


(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
clear be.
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
intros be1 H.
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (bool_fun_of_bool_expr (Iff be1 b))))))) *)
intros be2 H0.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
simpl in |- *.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm be1)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim H4; clear H4.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intro.
(* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim x; clear x.
(* Goal: forall (a : ad) (b : prod BDDneg_memo BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intros node1 y.
(* Goal: forall (a : BDDneg_memo) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDimpl cfg negm orm node1 node2) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) node1' (@pair BDDneg_memo BDDor_memo a b)))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
elim y; clear y; intros negm' orm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
rewrite H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim (prod_sum _ _ (BDDof_bool_expr cfg' negm' orm' be2)).
intros cfg'' H5; elim H5; clear H5; intro; elim x; clear x; intros node2 y;
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
 elim y; clear y; intros negm'' orm'' H5; rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg' node1).
(* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDneg_memo_OK_2 cfg' negm').
(* Goal: forall (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDor_memo_OK cfg' orm').
(* Goal: forall (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (nodes_preserved cfg cfg').
(* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDconfig_OK cfg'').
(* Goal: forall _ : BDDconfig_OK cfg'', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg'' node2).
(* Goal: forall (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDneg_memo_OK_2 cfg'' negm'').
(* Goal: forall (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDor_memo_OK cfg'' orm'').
(* Goal: forall (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (nodes_preserved cfg' cfg'').
(* Goal: forall (_ : nodes_preserved cfg' cfg'') (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg'' node1).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) *)
(* Goal: and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDimpl_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDimpl_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDimpl_keeps_neg_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDimpl_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_trans with (cfg2 := cfg').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_trans with (cfg2 := cfg'').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDimpl_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

apply
 bool_fun_eq_trans
  with
    (bf2 := bool_fun_impl (bool_fun_of_BDD cfg'' node1)
              (bool_fun_of_BDD cfg'' node2)).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_impl (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply BDDimpl_is_impl.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: bool_fun_eq (bool_fun_impl (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
apply bool_fun_impl_preserves_eq.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1).
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg' node1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_3.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_2 with (cfg := cfg').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) (bool_fun_of_bool_expr be2) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) orm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace orm'' with (snd (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) orm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace negm'' with (fst (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H0 _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H0 _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (H0 _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm be1)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm be1)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
refine (proj1 (H _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.
(*********** End of tempimpl.v ***********************)



(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
clear be.
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *)
intros be1 H.
(* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (bool_fun_of_bool_expr (Iff be1 b))))))) *)
intros be2 H0.
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *)
simpl in |- *.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm be1)).
(* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intros cfg' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim H4; clear H4.
(* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intro.
(* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim x; clear x.
(* Goal: forall (a : ad) (b : prod BDDneg_memo BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
intros node1 y.
(* Goal: forall (a : BDDneg_memo) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDimpl cfg negm orm node1 node2) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) node1' (@pair BDDneg_memo BDDor_memo a b)))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
elim y; clear y; intros negm' orm' H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
rewrite H4.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
elim (prod_sum _ _ (BDDof_bool_expr cfg' negm' orm' be2)).
intros cfg'' H5; elim H5; clear H5; intro; elim x; clear x; intros node2 y;
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *)
 elim y; clear y; intros negm'' orm'' H5; rewrite H5.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
cut (BDDconfig_OK cfg').
(* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg' node1).
(* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDneg_memo_OK_2 cfg' negm').
(* Goal: forall (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDor_memo_OK cfg' orm').
(* Goal: forall (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (nodes_preserved cfg cfg').
(* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDconfig_OK cfg'').
(* Goal: forall _ : BDDconfig_OK cfg'', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg'' node2).
(* Goal: forall (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDneg_memo_OK_2 cfg'' negm'').
(* Goal: forall (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (BDDor_memo_OK cfg'' orm'').
(* Goal: forall (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (nodes_preserved cfg' cfg'').
(* Goal: forall (_ : nodes_preserved cfg' cfg'') (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2)).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
cut (config_node_OK cfg'' node1).
(* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
intros.
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply BDDiff_keeps_config_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) *)
(* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply BDDiff_node_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply BDDiff_keeps_neg_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) *)
(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply BDDiff_keeps_or_memo_OK.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
split.
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_trans with (cfg2 := cfg').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_trans with (cfg2 := cfg'').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply BDDiff_preserves_nodes.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

apply
 bool_fun_eq_trans
  with
    (bf2 := bool_fun_iff (bool_fun_of_BDD cfg'' node1)
              (bool_fun_of_BDD cfg'' node2)).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *)
(* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply BDDiff_is_iff.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply bool_fun_iff_preserves_eq.
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1).
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg' node1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_3.
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: config_node_OK cfg'' node1 *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
apply nodes_preserved_2 with (cfg := cfg').
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) (bool_fun_of_bool_expr be2) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: nodes_preserved cfg' cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDor_memo_OK cfg'' orm'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) orm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace orm'' with (snd (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) orm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDneg_memo_OK_2 cfg'' negm'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace negm'' with (fst (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) negm'' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: config_node_OK cfg'' node2 *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H0 _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H0 _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (H0 _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *)
(* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
rewrite H5; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))).
(* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: nodes_preserved cfg cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDor_memo_OK cfg' orm' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm be1)))).
(* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDneg_memo_OK_2 cfg' negm' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm be1)))).
(* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *)
(* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: config_node_OK cfg' node1 *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))).
(* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *)
(* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
(* Goal: BDDconfig_OK cfg' *)
refine (proj1 (proj2 (H _ _ _ _ _ _))).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

(* Goal: BDDconfig_OK cfg' *)
replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)).
(* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
refine (proj1 (H _ _ _ _ _ _)).
(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: BDDor_memo_OK cfg orm *)
(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
assumption.

(* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *)
rewrite H4; reflexivity.

Qed.