Inductive BDDdummy_type1 : Set :=
    BDDdummy1 : BDDconfig * ad * BDDneg_memo -> BDDdummy_type1.Inductive BDDdummy_type1 : Set :=
    BDDdummy1 : BDDconfig * ad * BDDneg_memo -> BDDdummy_type1.Inductive BDDdummy_type2 : Set :=
    BDDdummy2 : BDDconfig * ad -> BDDdummy_type2.Inductive BDDdummy_type2 : Set :=
    BDDdummy2 : BDDconfig * ad -> BDDdummy_type2.Inductive BDDdummy_type3 : Set :=
    BDDdummy3 : BDDconfig * (ad * BDDor_memo) -> BDDdummy_type3.Inductive BDDdummy_type3 : Set :=
    BDDdummy3 : BDDconfig * (ad * BDDor_memo) -> BDDdummy_type3.Definition initBDDneg_memo : BDDneg_memo := newMap ad.Fixpoint BDDneg_1_1 (cfg : BDDconfig) (memo : BDDneg_memo) 
 (node : ad) (bound : nat) {struct bound} : BDDconfig * ad * BDDneg_memo :=
  match BDDneg_memo_lookup memo node with
  | Some node' => (cfg, node', memo)
  | None =>
      match MapGet _ (fst cfg) node with
      | None =>
          if Neqb node BDDzero
          then (cfg, BDDone, BDDneg_memo_put memo BDDzero BDDone)
          else (cfg, BDDzero, BDDneg_memo_put memo BDDone BDDzero)
      | Some (x, (l, r)) =>
          match bound with
          | O => (initBDDconfig, BDDzero, initBDDneg_memo)
          | S bound' =>
              match BDDdummy1 (BDDneg_1_1 cfg memo l bound') with
              | BDDdummy1 ((cfgl, nodel), memol) =>
                  match BDDdummy1 (BDDneg_1_1 cfgl memol r bound') with
                  | BDDdummy1 ((cfgr, noder), memor) =>
                      match BDDdummy2 (BDDmake cfgr x nodel noder) with
                      | BDDdummy2 (cfg', node') =>
                          (cfg', node', BDDneg_memo_put memor node node')
                      end
                  end
              end
          end
      end
  end.

Lemma BDDneg_1_1_eq_1 : forall (bound : nat) (cfg : BDDconfig) (memo : BDDneg_memo) (node : ad), BDDneg_1_1 cfg memo node bound = BDDneg_1 (cfg, node, memo) bound.