(*==========================================================
============================================================
            TOPOLOGICAL FMAPS, QHMAPS, HMAPS -

       PROOF OF EULER RELATION AND GENUS THEOREM 

        PART 2: CLOSURE OF QHMAPS, FACES, PATHS

         (J.-F. Dufourd, June 2006 - FOR PUBLICATION
              completed in October 2007)

============================================================
==========================================================*)

(*==========================================================
               CLOSURE of qhmap
==========================================================*)

Require Export Euler1.

(* Closure designed for qhmaps, but written on fmaps,
as usual: *)

Fixpoint clos(m:fmap):fmap:=
  match m with
    V => V
  | I m0 x0 =>
      i (clos m0) x0
  | L m0 k x0 y0 =>
      let mr:= clos m0 in
        if eq_dart_dec y0 (A mr k x0)
	then mr
        else l mr k x0 y0
  end.

(* Preservation of the dart set in the closure: *)

Lemma exd_clos : forall (m:fmap)(x:dart),
  inv_qhmap m -> (exd m x <-> exd (clos m) x).
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: forall (_ : iff (exd (clos m) x) (exd (B (clos m) d d0) x)) (_ : iff (exd (B (clos m) d d0) x) (exd (B_1 (B (clos m) d d0) d d1) x)), iff (exd m x) (exd (B_1 (B (clos m) d d0) d d1) x) *)
   generalize (IHm x).
(* Goal: forall _ : forall _ : inv_qhmap m, iff (exd m x) (exd (clos m) x), iff (exd (I m d) x) (exd (clos (I m d)) x) *)
(* Goal: forall (x : dart) (_ : inv_qhmap (L m d d0 d1)), iff (exd (L m d d0 d1) x) (exd (clos (L m d d0 d1)) x) *)
   unfold inv_qhmap in H.
(* Goal: forall _ : forall _ : inv_qhmap m, iff (exd m x) (exd (clos m) x), iff (exd (I m d) x) (exd (clos (I m d)) x) *)
(* Goal: forall (x : dart) (_ : inv_qhmap (L m d d0 d1)), iff (exd (L m d d0 d1) x) (exd (clos (L m d d0 d1)) x) *)
   fold inv_qhmap in H.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
   simpl in H.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   simpl in |- *.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
   elim (eq_dart_dec d1 (A (clos m) d d0)).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: forall (_ : iff (exd (clos m) x) (exd (B (clos m) d d0) x)) (_ : iff (exd (B (clos m) d d0) x) (exd (B_1 (B (clos m) d d0) d d1) x)), iff (exd m x) (exd (B_1 (B (clos m) d d0) d d1) x) *)
    generalize (IHm x).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: iff (exd m x) (exd (B_1 (B (clos m) d d0) d d1) x) *)
    generalize (exd_B_1 (B (clos m) d d0) d d1 x).
(* Goal: forall _ : iff (exd (B (clos m) d d0) x) (exd (B_1 (B (clos m) d d0) d d1) x), iff (exd m x) (exd (B_1 (B (clos m) d d0) d d1) x) *)
    generalize (exd_B (clos m) d d0 x).
(* Goal: forall (_ : iff (exd (clos m) x) (exd (B (clos m) d d0) x)) (_ : iff (exd (B (clos m) d d0) x) (exd (B_1 (B (clos m) d d0) d d1) x)), iff (exd m x) (exd (B_1 (B (clos m) d d0) d d1) x) *)
    generalize (IHm x).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
Qed.

(* Two corollaries more usable: *)

Lemma exd_clos_r : forall (m:fmap)(x:dart),
  inv_qhmap m -> exd m x -> exd (clos m) x.
Proof.
(* Goal: exd (clos m) d0 *)
(* Goal: and (exd (clos m) d1) (not (@eq dart d1 (A (clos m) d d0))) *)
generalize exd_clos.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: exd m x *)
generalize (H m x).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
tauto.
Qed.

Lemma exd_clos_qmap_l : forall (m:fmap)(x:dart),
  inv_qhmap m -> exd (clos m) x -> exd m x.
Proof.
(* Goal: exd (clos m) d0 *)
(* Goal: and (exd (clos m) d1) (not (@eq dart d1 (A (clos m) d d0))) *)
generalize exd_clos.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: exd m x *)
generalize (H m x).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
tauto.
Qed.

(* The closure is a true hypermap: *)

Theorem inv_hmap_clos : forall (m:fmap),
  inv_qhmap m -> inv_hmap (clos m).
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: inv_hmap V *)
(* Goal: inv_hmap (clos (I m d)) *)
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
   unfold inv_hmap in |- *.
(* Goal: and (exd m x) (exd m y) *)
   split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall (x : dart) (k : dim) (_ : exd V x), and (succ V k x) (pred V k x) *)
(* Goal: inv_hmap (clos (I m d)) *)
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
  unfold succ in |- *; unfold pred in |- *.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: inv_hmap (i (clos m) d) *)
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
   apply inv_hmap_i.
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
  simpl in H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: prec_i (clos m) d *)
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
  unfold prec_i in |- *.
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
    simpl in H.
(* Goal: forall (x y z : dart) (_ : and (inv_qhmap m) (prec_I m d)) (_ : or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (_ : or (expf m z y) (and (@eq dart z d) (@eq dart y d))), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
    unfold prec_I in |- *.
(* Goal: and (not (@eq dart d nil)) (not (exd (clos m) d)) *)
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
    unfold prec_I in H.
(* Goal: and (not (@eq dart d nil)) (not (exd (clos m) d)) *)
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
    intuition.
(* Goal: False *)
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
    generalize (exd_clos m d).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: inv_hmap (clos (L m d d0 d1)) *)
 simpl in H.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   simpl in |- *.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
   elim (eq_dart_dec d1 (A (clos m) d d0)).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: inv_hmap (l (clos m) d d0 d1) *)
    apply inv_hmap_l.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: prec_lh (clos m) d d0 d1 *)
   unfold prec_lh in |- *.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: exd (clos m) d0 *)
(* Goal: and (exd (clos m) d1) (not (@eq dart d1 (A (clos m) d d0))) *)
    generalize exd_clos.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intros.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
      apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: exd m d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
     unfold prec_Lq in H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: and (exd m x) (exd m y) *)
    split.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
     apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: exd m d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
      unfold prec_Lq in H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
Qed.

(* IDENTITY between A, A_1 on the closure
and the closure of A, A_1: *)

Theorem A_clos_eq_cA :
  forall (m:fmap)(k:dim)(z:dart),
    inv_qhmap m -> exd m z ->
       A (clos m) k z = cA m k z
    /\ A_1 (clos m) k z = cA_1 m k z.
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
 unfold clos in |- *; fold clos in |- *.
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (I m d)) (_ : exd (I m d) z), and (@eq dart (A (i (clos m) d) k z) (cA (I m d) k z)) (@eq dart (A_1 (i (clos m) d) k z) (cA_1 (I m d) k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   unfold inv_qhmap in |- *.
(* Goal: forall (k : dim) (z : dart) (_ : and ((fix inv_qhmap (m : fmap) : Prop := match m with | V => True | I m0 x0 => and (inv_qhmap m0) (prec_I m0 x0) | L m0 k0 x0 y0 => and (inv_qhmap m0) (prec_Lq m0 k0 x0 y0) end) m) (prec_I m d)) (_ : exd (I m d) z), and (@eq dart (A (i (clos m) d) k z) (cA (I m d) k z)) (@eq dart (A_1 (i (clos m) d) k z) (cA_1 (I m d) k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   fold inv_qhmap in |- *.
(* Goal: forall (x y z : dart) (_ : and (inv_qhmap m) (prec_I m d)) (_ : or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (_ : or (expf m z y) (and (@eq dart z d) (@eq dart y d))), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   unfold prec_I in |- *.
(* Goal: forall (k : dim) (z : dart) (_ : and (inv_qhmap m) (and (not (@eq dart d nil)) (not (exd m d)))) (_ : exd (I m d) z), and (@eq dart (A (i (clos m) d) k z) (cA (I m d) k z)) (@eq dart (A_1 (i (clos m) d) k z) (cA_1 (I m d) k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   intros k z H Ez.
(* Goal: and (@eq dart (A (i (clos m) d) k z) (cA (I m d) k z)) (@eq dart (A_1 (i (clos m) d) k z) (cA_1 (I m d) k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   simpl in Ez.
(* Goal: and (@eq dart (A (i (clos m) d) k z) (cA (I m d) k z)) (@eq dart (A_1 (i (clos m) d) k z) (cA_1 (I m d) k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   unfold i in |- *.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   simpl in |- *.
(* Goal: and (@eq dart (if eq_dim_dec k di1 then if eq_dart_dec z d then d else if eq_dim_dec k di0 then if eq_dart_dec z d then d else A (clos m) k z else A (clos m) k z else if eq_dim_dec k di0 then if eq_dart_dec z d then d else A (clos m) k z else A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (if eq_dim_dec k di1 then if eq_dart_dec z d then d else if eq_dim_dec k di0 then if eq_dart_dec z d then d else A_1 (clos m) k z else A_1 (clos m) k z else if eq_dim_dec k di0 then if eq_dart_dec z d then d else A_1 (clos m) k z else A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   elim (eq_dim_dec k di1).
(* Goal: forall (_ : @eq dim k di0) (_ : not (@eq dim k di1)), and (@eq dart (if eq_dart_dec z d then d else A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (if eq_dart_dec z d then d else A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k di0)) (_ : not (@eq dim k di1)), and (@eq dart (A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
  elim (eq_dart_dec z d).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     rewrite a.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : not (@eq dim k di1), and (@eq dart (if eq_dim_dec k di0 then if eq_dart_dec z d then d else A (clos m) k z else A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (if eq_dim_dec k di0 then if eq_dart_dec z d then d else A_1 (clos m) k z else A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   elim (eq_dim_dec k di0).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k di0)) (_ : not (@eq nat z d)) (_ : @eq dim k di1), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k di1), and (@eq dart (if eq_dim_dec k di0 then if eq_dart_dec z d then d else A (clos m) k z else A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (if eq_dim_dec k di0 then if eq_dart_dec z d then d else A_1 (clos m) k z else A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
      rewrite a0 in a.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k di0)) (_ : not (@eq nat z d)) (_ : @eq dim k di1), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k di1), and (@eq dart (if eq_dim_dec k di0 then if eq_dart_dec z d then d else A (clos m) k z else A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (if eq_dim_dec k di0 then if eq_dart_dec z d then d else A_1 (clos m) k z else A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
      inversion a.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : not (@eq dim k di1), and (@eq dart (if eq_dim_dec k di0 then if eq_dart_dec z d then d else A (clos m) k z else A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (if eq_dim_dec k di0 then if eq_dart_dec z d then d else A_1 (clos m) k z else A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
  elim (eq_dim_dec k di0).
(* Goal: forall (_ : @eq dim k di0) (_ : not (@eq dim k di1)), and (@eq dart (if eq_dart_dec z d then d else A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (if eq_dart_dec z d then d else A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k di0)) (_ : not (@eq dim k di1)), and (@eq dart (A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   elim (eq_dart_dec z d).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      rewrite a.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : not (@eq dim k di0)) (_ : not (@eq dim k di1)), and (@eq dart (A (clos m) k z) (if eq_dart_dec z d then z else cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d then z else cA_1 m k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   induction k.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
 unfold clos in |- *; fold clos in |- *.
(* Goal: forall (k : dim) (z : dart) (_ : and ((fix inv_qhmap (m : fmap) : Prop := match m with | V => True | I m0 x0 => and (inv_qhmap m0) (prec_I m0 x0) | L m0 k0 x0 y0 => and (inv_qhmap m0) (prec_Lq m0 k0 x0 y0) end) m) (prec_I m d)) (_ : exd (I m d) z), and (@eq dart (A (i (clos m) d) k z) (cA (I m d) k z)) (@eq dart (A_1 (i (clos m) d) k z) (cA_1 (I m d) k z)) *)
(* Goal: forall (k : dim) (z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : exd (L m d d0 d1) z), and (@eq dart (A (clos (L m d d0 d1)) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (clos (L m d d0 d1)) k z) (cA_1 (L m d d0 d1) k z)) *)
   unfold inv_qhmap in |- *; fold inv_qhmap in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   unfold prec_Lq in |- *.
(* Goal: forall (k : dim) (z : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m d d0)) (not (pred m d d1)))))) (_ : exd (L m d d0 d1) z), and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
   unfold exd in |- *; fold exd in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
   rename H0 into Ez.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
   decompose [and] H.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
   clear H.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
   elim (eq_dart_dec d1 (A (clos m) d d0)).
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: and (@eq dart (if eq_dim_dec k d then if eq_dart_dec z d0 then d1 else if eq_dart_dec z (A_1 (clos m) d d1) then A (clos m) d d0 else A (clos m) d z else A (clos m) k z) (if eq_dim_dec k d then if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z else cA m k z)) (@eq dart (if eq_dim_dec k d then if eq_dart_dec z d1 then d0 else if eq_dart_dec z (A (clos m) d d0) then A_1 (clos m) d d1 else A_1 (clos m) d z else A_1 (clos m) k z) (if eq_dim_dec k d then if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z else cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
    elim (eq_dim_dec k d).
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   elim (eq_dart_dec z d0).
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
    elim (eq_dart_dec z d1).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : not (@eq nat (A_1 m di1 d0) x), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
       rewrite <- a.
(* Goal: @eq dart d0 (cA_1 m k (cA m d d0)) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       rewrite a0.
(* Goal: and (@eq dart (A (clos m) k d0) d0) (@eq dart (A_1 (clos m) k d0) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : @eq nat z d0) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) d1) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       rewrite <- a in a2.
(* Goal: and (@eq dart (A (clos m) k d0) d0) (@eq dart (A_1 (clos m) k d0) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : @eq nat z d0) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) d1) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       rewrite a0 in a2.
(* Goal: and (exd m x) (exd m y) *)
       split.
      symmetry  in |- *.
(* Goal: @eq dart d0 (cA_1 m k d1) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite a1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
      symmetry  in |- *.
(* Goal: @eq nat d1 (A_1 m di0 (A m di0 d1)) *)
(* Goal: expf m x (A m di0 d1) *)
        apply A_A_1.
(* Goal: inv_qhmap (clos m) *)
(* Goal: exd (clos m) d0 *)
(* Goal: exd (clos m) z *)
(* Goal: @eq dart z (A (clos m) d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       assert (inv_hmap (clos m)).
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
        apply inv_hmap_clos.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: inv_qhmap (clos m) *)
(* Goal: exd (clos m) d0 *)
(* Goal: exd (clos m) z *)
(* Goal: @eq dart z (A (clos m) d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        unfold inv_hmap in H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
       apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
       apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: @eq dart d0 (cA_1 m k d1) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       rewrite a1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
     elim (eq_dart_dec z (cA m k d0)).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intros.
        assert (A (clos m) d d0 =
	cA m d d0).
(* Goal: @eq dart (A (clos m) d d0) (cA m d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       generalize (IHm d d0).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       rewrite H in a2.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
         rewrite a1 in a.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
         rewrite <- a2 in a.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intros.
(* Goal: and (@eq dart (A (clos m) k z) d1) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite <- a in a1.
(* Goal: @eq dart d0 (cA_1 m k d1) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite a1.
(* Goal: and (@eq dart (A (clos m) k z) (A (clos m) d z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite <- a0.
(* Goal: and (exd m x) (exd m y) *)
        split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       generalize (IHm k z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
    elim (eq_dart_dec z (cA_1 m k d1)).
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
     elim (eq_dart_dec z d1).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intros.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        assert (d0 = A_1 (clos m) d d1).
(* Goal: @eq nat d1 (A_1 m di0 (A m di0 d1)) *)
(* Goal: expf m x (A m di0 d1) *)
       apply A_A_1.
(* Goal: inv_qhmap (clos m) *)
(* Goal: exd (clos m) d0 *)
(* Goal: exd (clos m) z *)
(* Goal: @eq dart z (A (clos m) d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        assert (inv_hmap (clos m)).
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
         apply inv_hmap_clos.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: inv_qhmap (clos m) *)
(* Goal: exd (clos m) d0 *)
(* Goal: exd (clos m) z *)
(* Goal: @eq dart z (A (clos m) d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
         unfold inv_hmap in H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
        apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
        apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
       assert (A_1 (clos m) d d1 =
       cA_1 m d d1).
(* Goal: @eq dart (A_1 (clos m) d d1) (cA_1 m d d1) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        generalize (IHm d d1).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite H4 in H.
(* Goal: inv_qhmap m *)
(* Goal: exd m d0 *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
          rewrite <- a1 in H.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
          rewrite <- H in a0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
      elim (eq_dart_dec z (cA m k d0)).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intros.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
         rewrite <- a1 in a2.
         assert (A (clos m) k d0 =
	 cA m k d0).
(* Goal: @eq dart (A (clos m) k d0) (cA m k d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        generalize (IHm k d0).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite H in a2.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : @eq nat z (cA_1 m k d1)) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
          rewrite <- a2 in a.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intros.
         assert (A (clos m) d d0 =
	 cA m d d0).
(* Goal: @eq dart (A (clos m) d d0) (cA m d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        generalize (IHm d d0).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite H in a1.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
          assert (d0 = z).
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         rewrite a.
(* Goal: @eq dart d0 (cA_1 m k d1) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
           rewrite a1.
(* Goal: @eq dart d0 (cA_1 m k (cA m d d0)) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
           rewrite a0.
(* Goal: @eq dart d0 (cA_1 m d (cA m d d0)) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
           rewrite cA_1_cA.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: inv_qhmap m *)
(* Goal: exd m d0 *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k d0)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
          rewrite <- a1 in H.
            assert (A (clos m) d d0 =
	    cA m d d0).
           assert (A (clos m) d d0 =
	   cA m d d0).
(* Goal: @eq dart (A (clos m) d d0) (cA m d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
            generalize (IHm d d0).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
              tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
            tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
         symmetry  in H4.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
     elim (eq_dart_dec z d1).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intros.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite a1 in a.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        assert (d0 = A_1 (clos m) d z).
(* Goal: @eq nat d1 (A_1 m di0 (A m di0 d1)) *)
(* Goal: expf m x (A m di0 d1) *)
       apply A_A_1.
(* Goal: inv_qhmap (clos m) *)
(* Goal: exd (clos m) d0 *)
(* Goal: exd (clos m) z *)
(* Goal: @eq dart z (A (clos m) d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        assert (inv_hmap (clos m)).
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
         apply inv_hmap_clos.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: inv_qhmap (clos m) *)
(* Goal: exd (clos m) d0 *)
(* Goal: exd (clos m) z *)
(* Goal: @eq dart z (A (clos m) d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
         unfold inv_hmap in H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
        apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
        apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) d0) *)
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       rewrite <- a0 in H.
(* Goal: and (@eq dart (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (A_1 (clos m) k d1) then A (clos m) k d0 else A (clos m) k z) (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (A (clos m) k d0) then A_1 (clos m) k d1 else A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k d), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
         rewrite H.
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
         generalize (IHm k z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
      elim (eq_dart_dec z (cA m k d0)).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intros.
         assert (A (clos m) d d0 =
	 cA m d d0).
(* Goal: @eq dart (A (clos m) d d0) (cA m d d0) *)
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        generalize (IHm d d0).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
        rewrite H in a1.
(* Goal: and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k d1)) *)
(* Goal: forall (_ : not (@eq nat z (cA m k d0))) (_ : not (@eq nat z d1)) (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
          rewrite a0 in a; rewrite <- a1 in a.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       generalize (IHm k z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
   generalize (IHm k z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
    rewrite A_l.
(* Goal: and (@eq dart (if eq_dim_dec k d then if eq_dart_dec z d0 then d1 else if eq_dart_dec z (A_1 (clos m) d d1) then A (clos m) d d0 else A (clos m) d z else A (clos m) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
   rewrite A_1_l.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    simpl in |- *.
      assert (A (clos m) k d0 =
      cA m k d0).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     generalize (IHm k d0); tauto.
     assert (A (clos m) k z =
     cA m k z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      generalize (IHm k z); tauto.
      assert (A (clos m) k d1 =
      cA m k d1).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       generalize (IHm k d1); tauto.
       assert (A_1 (clos m) k d0 =
       cA_1 m k d0).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        generalize (IHm k d0); tauto.
        assert (A_1 (clos m) k z =
	cA_1 m k z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         generalize (IHm k z); tauto.
         assert (A_1 (clos m) k d1 =
	 cA_1 m k d1).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          generalize (IHm k d1); tauto.
(* Goal: and (@eq dart (if eq_dim_dec k d then if eq_dart_dec z d0 then d1 else if eq_dart_dec z (A_1 (clos m) d d1) then A (clos m) d d0 else A (clos m) d z else A (clos m) k z) (if eq_dim_dec k d then if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z else cA m k z)) (@eq dart (if eq_dim_dec k d then if eq_dart_dec z d1 then d0 else if eq_dart_dec z (A (clos m) d d0) then A_1 (clos m) d d1 else A_1 (clos m) d z else A_1 (clos m) k z) (if eq_dim_dec k d then if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z else cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
          elim (eq_dim_dec k d).
(* Goal: forall _ : @eq dim k d, and (@eq dart (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (A_1 (clos m) d d1) then A (clos m) d d0 else A (clos m) d z) (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (A (clos m) d d0) then A_1 (clos m) d d1 else A_1 (clos m) d z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k d), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
           intro Ekd.
(* Goal: and (@eq dart (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (A_1 (clos m) d d1) then A (clos m) d d0 else A (clos m) d z) (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (A (clos m) d d0) then A_1 (clos m) d d1 else A_1 (clos m) d z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k d), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
             rewrite <- Ekd.
(* Goal: and (@eq dart (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (A_1 (clos m) k d1) then A (clos m) k d0 else A (clos m) k z) (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (A (clos m) k d0) then A_1 (clos m) k d1 else A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k d), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
             rewrite H.
(* Goal: and (@eq dart (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (A_1 (clos m) k d1) then cA m k d0 else A (clos m) k z) (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then A_1 (clos m) k d1 else A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k d), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
             rewrite H9.
(* Goal: and (@eq dart (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else A (clos m) k z) (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k d), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
             rewrite H4.
(* Goal: and (@eq dart (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z) (if eq_dart_dec z d0 then d1 else if eq_dart_dec z (cA_1 m k d1) then cA m k d0 else cA m k z)) (@eq dart (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall _ : not (@eq dim k d), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
             rewrite H8.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
             tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
    apply inv_hmap_clos.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    simpl in |- *.
(* Goal: prec_lh (clos m) d d0 d1 *)
      unfold prec_lh in |- *.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
     apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
      apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: inv_hmap (clos m) *)
(* Goal: prec_lh (clos m) d d0 d1 *)
   apply inv_hmap_clos.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: prec_lh (clos m) d d0 d1 *)
   unfold prec_lh in |- *.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
    split.
(* Goal: exd (clos m) d1 *)
(* Goal: not (@eq dart d1 (A (clos m) d d0)) *)
     apply exd_clos_r.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
Qed.

(*========================================================
             FACE OPERATIONS IN QHMAPS
========================================================*)

(* The following operations are designed for qhmaps,
but are defined on fmap for convenience *)

(* Successor F in a face - direct version, 
designed for qhmaps: *)

Definition F(m:fmap)(x:dart):=
  A_1 m di1 (A_1 m di0 x).

(* To have a successor in a (direct) face for x: *)

Definition succf(m:fmap)(x:dart):Prop:=
  pred m di0 x /\ pred m di1 (A_1 m di0 x).

(* Decidability of succf:*)

Lemma succf_dec :
  forall (m:fmap)(x:dart),
    {succf m x}+{~succf m x}.
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (A_1 m di1 (A_1 m di0 x)) (A_1 m di1 (A_1 m di0 x'))), @eq dart x x' *)
unfold succf in |- *.
(* Goal: sumbool (and (pred m di0 x) (pred m di1 (A_1 m di0 x))) (not (and (pred m di0 x) (pred m di1 (A_1 m di0 x)))) *)
elim (pred_dec m di1 (A_1 m di0 x)).
(* Goal: forall _ : pred m di1 (A_1 m di0 x), sumbool (and (pred m di0 x) (pred m di1 (A_1 m di0 x))) (not (and (pred m di0 x) (pred m di1 (A_1 m di0 x)))) *)
(* Goal: forall _ : not (pred m di1 (A_1 m di0 x)), sumbool (and (pred m di0 x) (pred m di1 (A_1 m di0 x))) (not (and (pred m di0 x) (pred m di1 (A_1 m di0 x)))) *)
 elim (pred_dec m di0 x).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(* OK: *)

Lemma succf_exd : forall (m:fmap)(x:dart),
  inv_qhmap m -> succf m x -> exd m x.
Proof.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (A_1 m di1 (A_1 m di0 x)) (A_1 m di1 (A_1 m di0 x'))), @eq dart x x' *)
unfold succf in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: exd m x *)
unfold pred in H0.
(* Goal: exd m x *)
elim (exd_dec m x).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
(* Goal: exd m x *)
   elim H0.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: exd m x *)
   clear H0.
(* Goal: False *)
   elim H1.
(* Goal: @eq dart (A_1 m di0 x) nil *)
(* Goal: not (exd m (A_1 m di0 x)) *)
   apply not_exd_A_1_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
Qed.

(* Predecessor in a face - direct version: *)

Definition F_1 (m:fmap)(x:dart):=
  A m di0 (A m di1 x).

(* To have a predecessor in a (direct) face for x: *)

Definition predf(m:fmap)(y:dart):Prop:=
  succ m di1 y /\ succ m di0 (A m di1 y).

(* Decidability of succf: *)

Lemma predf_dec :
  forall (m:fmap)(x:dart),
    {predf m x}+{~predf m x}.
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : predf m x), exd m (F_1 m x) *)
unfold predf in |- *.
(* Goal: sumbool (and (succ m di1 x) (succ m di0 (A m di1 x))) (not (and (succ m di1 x) (succ m di0 (A m di1 x)))) *)
elim (succ_dec m di0 (A m di1 x)).
(* Goal: forall _ : succ m di0 (A m di1 x), sumbool (and (succ m di1 x) (succ m di0 (A m di1 x))) (not (and (succ m di1 x) (succ m di0 (A m di1 x)))) *)
(* Goal: forall _ : not (succ m di0 (A m di1 x)), sumbool (and (succ m di1 x) (succ m di0 (A m di1 x))) (not (and (succ m di1 x) (succ m di0 (A m di1 x)))) *)
 elim (succ_dec m di1 x).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

Lemma predf_exd : forall (m:fmap)(x:dart),
  inv_qhmap m -> predf m x -> exd m x.
Proof.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : predf m x), exd m (F_1 m x) *)
unfold predf in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: exd m x *)
unfold succ in H0.
(* Goal: exd m x *)
elim (exd_dec m x).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
(* Goal: exd m x *)
   elim H0.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: exd m x *)
   clear H0.
(* Goal: False *)
   elim H1.
(* Goal: @eq dart (A m di1 x) nil *)
(* Goal: not (exd m (A m di1 x)) *)
   apply not_exd_A_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
Qed.

(* OK: *)

Lemma F_nil : forall m:fmap,
    inv_qhmap m -> F m nil = nil.
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (F m x) (F m x')), @eq dart x x' *)
unfold F in |- *.
(* Goal: @eq dart (A_1 m di1 (A_1 m di0 nil)) nil *)
assert (A_1 m di0 nil = nil).
(* Goal: @eq dart (A_1 m di1 nil) nil *)
 apply A_1_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: or (expf m x x) (and (@eq dart x d) (@eq dart x d)) *)
(* Goal: forall _ : exd m x, or (expf m x x) (and (@eq dart x d) (@eq dart x d)) *)
(* Goal: forall (x : dart) (_ : exd (L m d d0 d1) x), expf (L m d d0 d1) x x *)
 rewrite H0.
(* Goal: @eq dart (A_1 m di1 nil) nil *)
   apply A_1_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
Qed.

(* Idem: *)

Lemma F_1_nil : forall m:fmap,
    inv_qhmap m -> F_1 m nil = nil.
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : not (exd m x)), @eq dart (F_1 m x) nil *)
unfold F_1 in |- *.
(* Goal: @eq dart (A m di0 (A m di1 nil)) nil *)
assert (A m di1 nil = nil).
(* Goal: @eq dart (A m di0 nil) nil *)
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
 apply A_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: or (expf m x x) (and (@eq dart x d) (@eq dart x d)) *)
(* Goal: forall _ : exd m x, or (expf m x x) (and (@eq dart x d) (@eq dart x d)) *)
(* Goal: forall (x : dart) (_ : exd (L m d d0 d1) x), expf (L m d d0 d1) x x *)
 rewrite H0.
(* Goal: @eq dart (A m di0 nil) nil *)
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
   apply A_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
Qed.

(* OK: *)

Lemma succf_exd_F : forall (m:fmap)(x:dart),
  inv_qhmap m -> succf m x -> exd m (F m x).
Proof.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (A_1 m di1 (A_1 m di0 x)) (A_1 m di1 (A_1 m di0 x'))), @eq dart x x' *)
unfold succf in |- *.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (F m x) (F m x')), @eq dart x x' *)
unfold F in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: exd m (A_1 m di1 (A_1 m di0 x)) *)
apply pred_exd_A_1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(* Idem: *)

Lemma predf_exd_F_1 : forall (m:fmap)(x:dart),
    inv_qhmap m -> predf m x -> exd m (F_1 m x).
Proof.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : predf m x), exd m (F_1 m x) *)
unfold predf in |- *.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : not (exd m x)), @eq dart (F_1 m x) nil *)
unfold F_1 in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: exd m (A m di1 x) *)
(* Goal: @eq dart t (A m di1 x) *)
apply succ_exd_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(* Idem: *)

Lemma succf_F: forall (m:fmap)(x:dart),
  inv_qhmap m -> (succf m x <-> F m x <> nil).
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: and (exd m x) (exd m y) *)
split.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
   generalize (succf_exd_F m x H H0).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
    eapply exd_not_nil.
    apply H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (A_1 m di1 (A_1 m di0 x)) (A_1 m di1 (A_1 m di0 x'))), @eq dart x x' *)
  unfold succf in |- *.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (F m x) (F m x')), @eq dart x x' *)
  unfold F in |- *.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
  assert (A_1 m di0 x <> nil).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
   rewrite H1 in H0.
   rewrite A_1_nil in H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
unfold pred in |- *.
(* Goal: and (exd m x) (exd m y) *)
  split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

Lemma predf_F_1: forall (m:fmap)(y:dart),
  inv_qhmap m -> (predf m y <-> F_1 m y <> nil).
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: and (exd m x) (exd m y) *)
split.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
   generalize (predf_exd_F_1 m y H H0).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
    eapply exd_not_nil.
    apply H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : predf m x), exd m (F_1 m x) *)
  unfold predf in |- *.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : not (exd m x)), @eq dart (F_1 m x) nil *)
  unfold F_1 in |- *.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
  assert (A m di1 y <> nil).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
   rewrite H1 in H0.
   rewrite A_nil in H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
unfold pred in |- *.
(* Goal: and (exd m x) (exd m y) *)
  split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(* OK: *)

Lemma not_exd_F_nil : forall (m:fmap)(x:dart),
    inv_qhmap m -> ~exd m x -> F m x = nil.
Proof.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (F m x) (F m x')), @eq dart x x' *)
unfold F in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: @eq dart (A_1 m di0 x) nil *)
(* Goal: not (exd m (A_1 m di0 x)) *)
apply not_exd_A_1_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: not (exd m (A_1 m di0 x)) *)
 assert (A_1 m di0 x = nil).
(* Goal: @eq dart (A_1 m di0 x) nil *)
(* Goal: not (exd m (A_1 m di0 x)) *)
  apply not_exd_A_1_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (not (@eq dart (A m di0 (A m di1 d0)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
  rewrite H1.
(* Goal: forall _ : exd m nil, False *)
(* Goal: @eq dart t (A m di1 x) *)
    apply not_exd_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
Qed.

Lemma not_exd_F_1_nil : forall (m:fmap)(x:dart),
    inv_qhmap m -> ~exd m x -> F_1 m x = nil.
Proof.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : not (exd m x)), @eq dart (F_1 m x) nil *)
unfold F_1 in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: @eq dart (A m di1 x) nil *)
(* Goal: not (exd m (A m di1 x)) *)
apply not_exd_A_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: not (exd m (A m di1 x)) *)
 assert (A m di1 x = nil).
(* Goal: @eq dart (A m di1 x) nil *)
(* Goal: not (exd m (A m di1 x)) *)
  apply not_exd_A_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (not (@eq dart (A m di0 (A m di1 d0)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
  rewrite H1.
(* Goal: forall _ : exd m nil, False *)
(* Goal: @eq dart t (A m di1 x) *)
    apply not_exd_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
Qed.

(* F and F_1 are inverses of each other: *)

Lemma F_F_1 : forall (m:fmap)(x:dart),
   inv_qhmap m -> exd m x -> exd m (F_1 m x) ->
   F m (F_1 m x) = x.
Proof.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : not (exd m x)), @eq dart (F_1 m x) nil *)
unfold F in |- *; unfold F_1 in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: @eq dart (A_1 m di1 (A_1 m di0 (A m di0 (A m di1 x)))) x *)
set (y := A m di1 x) in |- *.
(* Goal: @eq dart (A_1 m di1 (A_1 m di0 (A m di0 y))) x *)
set (z := A m di0 y) in |- *.
(* Goal: @eq dart (A_1 m di1 (A_1 m di0 z)) x *)
set (t := A_1 m di0 z) in |- *.
(* Goal: @eq dart (A_1 m di1 t) x *)
assert (y = t).
(* Goal: @eq dart y t *)
(* Goal: @eq dart (A_1 m di1 t) x *)
 unfold t in |- *.
(* Goal: @eq nat d1 (A_1 m di0 (A m di0 d1)) *)
(* Goal: expf m x (A m di0 d1) *)
   apply A_A_1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: exd m (A m di0 y) *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
  unfold y in |- *.
(* Goal: exd m (A m di1 x) *)
(* Goal: @eq dart t (A m di1 x) *)
    apply succ_exd_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
   unfold succ in |- *.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intro.
(* Goal: False *)
(* Goal: exd m z *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
     rewrite H2 in H1.
(* Goal: False *)
(* Goal: exd m z *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
     assert (exd m nil).
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
    assert (A m di0 nil = nil).
(* Goal: @eq dart (A m di0 nil) nil *)
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
     apply A_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: exd m nil *)
(* Goal: False *)
(* Goal: exd m z *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
     rewrite <- H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: False *)
(* Goal: exd m z *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
    generalize H3.
(* Goal: forall _ : exd m nil, False *)
(* Goal: @eq dart t (A m di1 x) *)
      apply not_exd_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: exd m z *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
  unfold z in |- *.
(* Goal: exd m (A m di0 y) *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
    unfold y in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: @eq dart (A_1 m di1 t) x *)
 unfold y in H2.
   symmetry  in |- *.
(* Goal: @eq nat d1 (A_1 m di0 (A m di0 d1)) *)
(* Goal: expf m x (A m di0 d1) *)
   apply A_A_1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: exd m t *)
(* Goal: @eq dart t (A m di1 x) *)
  rewrite <- H2.
(* Goal: exd m (A m di1 x) *)
(* Goal: @eq dart t (A m di1 x) *)
    apply succ_exd_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
   unfold succ in |- *.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intro.
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
     rewrite H3 in H1.
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
     assert (A m di0 nil = nil).
(* Goal: @eq dart (A m di0 nil) nil *)
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
    apply A_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : not (succ (L m d d0 d1) di1 y)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
    rewrite H4 in H1.
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
      generalize H1.
(* Goal: forall _ : exd m nil, False *)
(* Goal: @eq dart t (A m di1 x) *)
      apply not_exd_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
  symmetry  in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
Qed.

(* Idem: *)

Lemma F_1_F : forall (m:fmap)(x:dart),
  inv_qhmap m -> exd m x -> exd m (F m x) ->
     F_1 m (F m x) = x.
Proof.
(* Goal: forall (m : fmap) (x : dart) (_ : inv_qhmap m) (_ : not (exd m x)), @eq dart (F_1 m x) nil *)
unfold F in |- *; unfold F_1 in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
set (y := A_1 m di0 x) in |- *.
set (z := A_1 m di1 y) in |- *.
set (t := A m di1 z) in |- *.
(* Goal: @eq dart (A_1 m di1 t) x *)
assert (y = t).
(* Goal: @eq dart y t *)
(* Goal: @eq dart (A_1 m di1 t) x *)
 unfold t in |- *.
(* Goal: @eq dart d0 (A m di1 (A_1 m di1 d0)) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   apply A_1_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: exd m z *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
 unfold z in |- *.
(* Goal: exd m (A_1 m di1 (A_1 m di0 x)) *)
   apply pred_exd_A_1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
 unfold pred in |- *.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
   fold y in H1.
(* Goal: False *)
(* Goal: exd m z *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
   rewrite H2 in H1.
(* Goal: False *)
(* Goal: @eq dart t (A m di1 x) *)
   generalize H1.
(* Goal: forall _ : exd m nil, False *)
(* Goal: @eq dart t (A m di1 x) *)
   apply not_exd_nil.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
 fold y in H1.
   assert (A_1 m di1 y <> nil).
   eapply exd_not_nil.
     apply H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
   apply pred_exd with di1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
 unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: exd m t *)
(* Goal: @eq dart t (A m di1 x) *)
  rewrite <- H2 in |- *.
(* Goal: exd m (A m di0 y) *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
  unfold y in |- *.
  symmetry  in |- *.
(* Goal: @eq dart d0 (A m di1 (A_1 m di1 d0)) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  apply A_1_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
fold y in |- *.
  fold y in H1.
  assert (A_1 m di1 y <> nil).
  eapply exd_not_nil.
    apply H.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
  apply pred_exd with di1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
Qed.

(* Idem: *)

Lemma inj_F_succf :
   forall m:fmap, inv_qhmap m ->
      inj_dart (succf m) (F m).
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: inj_dart (succf m) (F m) *)
unfold inj_dart in |- *.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (F m x) (F m x')), @eq dart x x' *)
unfold F in |- *.
(* Goal: forall (x x' : dart) (_ : succf m x) (_ : succf m x') (_ : @eq dart (A_1 m di1 (A_1 m di0 x)) (A_1 m di1 (A_1 m di0 x'))), @eq dart x x' *)
unfold succf in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: @eq dart x x' *)
 eapply (inj_A_1_qhmap m di0 H).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: @eq dart (A_1 m di0 x) (A_1 m di0 x') *)
apply (inj_A_1_qhmap m di1 H).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(*========================================================
             PATHS IN FACES OF QHMAPS
========================================================*)

(* Existence of a REFLEXIVE path from a dart to another 
in a direct hmap face: *)

Fixpoint expf(m:fmap)(x y:dart){struct m}:Prop:=
 match m with
     V => False
  |  I m0 x0 => expf m0 x y \/ x=x0 /\ y=x0
  |  L m0 di0 x0 y0 =>
       expf m0 x y
     \/ let x_1 := A_1 m0 di1 x0 in
        x_1<>nil /\ expf m0 x y0 /\ expf m0 x_1 y
  |  L m0 di1 x0 y0 =>
       expf m0 x y
     \/ let y1 := A m0 di0 y0 in
        y1<>nil /\ expf m0 x y1 /\ expf m0 x0 y
 end.

(* Decidability of expf: OK *)

Lemma expf_dec : forall (m:fmap)(x y:dart),
  {expf m x y} + {~expf m x y}.
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall x y : dart, sumbool (or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (not (or (expf m x y) (and (@eq dart x d) (@eq dart y d)))) *)
(* Goal: forall x y : dart, sumbool (expf (L m d d0 d1) x y) (not (expf (L m d d0 d1) x y)) *)
   intros x y.
(* Goal: sumbool (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y))))) *)
   elim (IHm x y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : not (expf m x y), sumbool (or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (not (or (expf m x y) (and (@eq dart x d) (@eq dart y d)))) *)
(* Goal: forall x y : dart, sumbool (expf (L m d d0 d1) x y) (not (expf (L m d d0 d1) x y)) *)
  elim (eq_dart_dec x d).
(* Goal: forall (_ : @eq nat x d) (_ : not (expf m x y)), sumbool (or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (not (or (expf m x y) (and (@eq dart x d) (@eq dart y d)))) *)
(* Goal: forall (_ : not (@eq nat x d)) (_ : not (expf m x y)), sumbool (or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (not (or (expf m x y) (and (@eq dart x d) (@eq dart y d)))) *)
(* Goal: forall x y : dart, sumbool (expf (L m d d0 d1) x y) (not (expf (L m d d0 d1) x y)) *)
   elim (eq_dart_dec y d).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
 elim d.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: sumbool (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y))))) *)
    elim (IHm x y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: sumbool (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) (not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y))))) *)
(* Goal: forall x y : dart, sumbool (expf (L m di1 d0 d1) x y) (not (expf (L m di1 d0 d1) x y)) *)
     elim (eq_dart_dec (A_1 m di1 d0) nil).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: sumbool (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) (not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y))))) *)
(* Goal: forall x y : dart, sumbool (expf (L m di1 d0 d1) x y) (not (expf (L m di1 d0 d1) x y)) *)
      elim (IHm x d1).
(* Goal: forall _ : expf m x d1, sumbool (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) (not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y))))) *)
(* Goal: forall _ : not (expf m x d1), sumbool (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) (not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y))))) *)
(* Goal: forall x y : dart, sumbool (expf (L m di1 d0 d1) x y) (not (expf (L m di1 d0 d1) x y)) *)
     elim (IHm (A_1 m di1 d0) y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: sumbool (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y))))) *)
    elim (IHm x y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: sumbool (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y))))) *)
     elim (eq_dart_dec (A m di0 d1) nil).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: sumbool (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y))))) *)
      elim (IHm x (A m di0 d1)).
(* Goal: forall _ : expf m x (A m di0 d1), sumbool (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y))))) *)
(* Goal: forall _ : not (expf m x (A m di0 d1)), sumbool (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y))))) *)
     elim (IHm d0 y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
Qed.

(* Reflexivity of expf:*)

Lemma refl_expf : forall(m:fmap)(x:dart),
   exd m x -> expf m x x.
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
 induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: and (exd m x) (exd m y) *)
   elim H.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: or (expf m x x) (and (@eq dart x d) (@eq dart x d)) *)
(* Goal: forall _ : exd m x, or (expf m x x) (and (@eq dart x d) (@eq dart x d)) *)
(* Goal: forall (x : dart) (_ : exd (L m d d0 d1) x), expf (L m d d0 d1) x x *)
    rewrite H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: or (expf m x x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 x))) *)
    left.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (x : dart) (_ : exd (L m d d0 d1) x), expf (L m d d0 d1) x x *)
 intro x.
(* Goal: forall (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   elim d.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: or (expf m x x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 x))) *)
    left.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: or (expf m x x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 x))) *)
    left.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
Qed.

(* Existence of two darts linked by expf: *)

Lemma expf_exd_exd : forall (m:fmap)(x y:dart),
  expf m x y -> (exd m x /\ exd m y).
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
   elim H; clear H.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: and (or (@eq dart x d) (exd m x)) (or (@eq dart y d) (exd m y)) *)
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), and (or (@eq dart x d) (exd m x)) (or (@eq dart y d) (exd m y)) *)
(* Goal: forall (x y : dart) (_ : expf (L m d d0 d1) x y), and (exd (L m d d0 d1) x) (exd (L m d d0 d1) y) *)
    generalize (IHm x y H).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   elim d.
(* Goal: forall (x y : dart) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))), and (exd m x) (exd m y) *)
  intros x y H.
(* Goal: and (exd m x) (exd m y) *)
    elim H.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
   apply IHm.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
   clear H.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intros.
(* Goal: and (exd m x) (exd m y) *)
(* Goal: forall (x y : dart) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))), and (exd m x) (exd m y) *)
     assert (exd m x /\ exd m d1).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: and (exd m x) (exd m y) *)
    split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: exd m y *)
(* Goal: forall (x y : dart) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))), and (exd m x) (exd m y) *)
     generalize (IHm (A_1 m di1 d0) y).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
(* Goal: exd m y *)
(* Goal: forall (x y : dart) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))), and (exd m x) (exd m y) *)
       assert (exd m (A_1 m di1 d0) /\ exd m y).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (x y : dart) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))), and (exd m x) (exd m y) *)
  intros x y H.
(* Goal: and (exd m x) (exd m y) *)
    elim H.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
   apply IHm.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
   clear H.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intros.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: exd m x *)
(* Goal: exd m y *)
    generalize (IHm x (A m di0 d1)).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intro.
(* Goal: exd m x *)
(* Goal: exd m y *)
      assert (exd m x /\ exd m (A m di0 d1)).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
     apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: exd m y *)
    generalize (IHm d0 y).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intro.
(* Goal: exd m y *)
      assert (exd m d0 /\ exd m y).
(* Goal: and (exd m d0) (exd m y) *)
(* Goal: exd m y *)
     apply H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
Qed.

(* Transitivity of expf: *)

Lemma trans_expf : forall(m:fmap)(x y z:dart),
  expf m x y -> expf m y z -> expf m x z.
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
   intros x y z Hxy Hyz.
   elim Hxy.
  clear Hxy.
    elim Hyz; clear Hyz.
(* Goal: or (expf m x x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 x))) *)
   left.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
     eapply IHm.
(* Goal: and (exd m d0) (exd m y) *)
(* Goal: exd m y *)
    apply H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
     decompose [and] H.
     rewrite H2.
     rewrite H1 in H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
  clear Hxy.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
    decompose [and] H.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
    clear H.
    elim Hyz; clear Hyz.
(* Goal: not (not (@eq dart (A m di0 (A m di1 d0)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
   rewrite H0; rewrite H1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: and (exd m x) (exd m y) *)
     elim H.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intros.
     rewrite H0; rewrite H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   intros x y z.
(* Goal: forall (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   elim d.
  intros Hxy Hyz.
    elim Hxy; clear Hxy.
   elim Hyz; clear Hyz.
(* Goal: or (expf m x x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 x))) *)
    left.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      eapply IHm.
(* Goal: and (exd m d0) (exd m y) *)
(* Goal: exd m y *)
     apply H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
      decompose [and] H; clear H.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      eapply IHm.
(* Goal: and (exd m d0) (exd m y) *)
(* Goal: exd m y *)
       apply H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
     elim Hyz; clear Hyz.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      eapply IHm.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       decompose [and] H.
         apply H4.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
  intros Hxy Hyz.
    elim Hxy; clear Hxy.
   elim Hyz; clear Hyz.
(* Goal: or (expf m x x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 x))) *)
    left.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      eapply IHm.
(* Goal: and (exd m d0) (exd m y) *)
(* Goal: exd m y *)
     apply H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
      decompose [and] H; clear H.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      eapply IHm.
(* Goal: and (exd m d0) (exd m y) *)
(* Goal: exd m y *)
       apply H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
     elim Hyz; clear Hyz.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
      eapply IHm.
(* Goal: and (@eq dart (A (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (if eq_dart_dec d1 (A (clos m) d d0) then clos m else l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
       decompose [and] H.
         apply H4.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
Qed.

(* Dead end 0: if dart x has no 0-pred,
then it has no face-successor different from itself:
*)

Lemma not_pred0_not_expf : forall(m:fmap)(x y:dart),
  inv_qhmap m -> ~pred m di0 x -> x<>y -> ~expf m x y.
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
 unfold pred in |- *.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   simpl in |- *.
(* Goal: forall (x y z : dart) (_ : and (inv_qhmap m) (prec_I m d)) (_ : or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (_ : or (expf m z y) (and (@eq dart z d) (@eq dart y d))), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   unfold prec_I in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
   elim H2.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
  apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
   unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    elim H3.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    clear H3.
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
    clear H2.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : not (succ (L m d d0 d1) di1 y)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
    rewrite H4 in H1.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : not (succ (L m d d0 d1) di1 y)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
    rewrite H5 in H1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
 unfold pred in |- *.
(* Goal: forall (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   elim d.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (x y : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di1 d0)) (not (pred m di1 d1)))))) (_ : not (not (@eq dart (A m di0 (if eq_dart_dec y d0 then d1 else A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
    intros x y Hinv.
(* Goal: forall (_ : not (not (@eq dart (A_1 m di1 (if eq_dart_dec x d1 then d0 else A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A_1 (L m di1 d0 d1) di1 (A_1 (L m di1 d0 d1) di0 x)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    elim (eq_dart_dec x d1).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intro.
     simpl in Hinv.
(* Goal: not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di1 y) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
     unfold prec_Lq in Hinv.
     elim (eq_dart_dec d0 nil).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
      rewrite a0 in Hinv.
(* Goal: False *)
(* Goal: exd m z *)
(* Goal: @eq dart z (A m di0 y) *)
(* Goal: @eq dart (A_1 m di1 t) x *)
      assert (exd m nil).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
     generalize not_exd_nil.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
       assert (~ exd m nil).
(* Goal: False *)
(* Goal: forall (_ : not (@eq nat (A_1 m di0 x) d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
      apply H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intro.
(* Goal: not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di1 y) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
     unfold prec_Lq in Hinv.
(* Goal: False *)
     elim H1.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
     unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
    clear H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intro.
      assert (~ expf m x d1).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
     apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
      unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (x y : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di1 d0)) (not (pred m di1 d1)))))) (_ : not (not (@eq dart (A m di0 (if eq_dart_dec y d0 then d1 else A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
    intros x y Hinv.
(* Goal: not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di1 y) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    unfold prec_Lq in Hinv.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: False *)
    elim H1.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
   apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
    unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
   clear H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intro.
     assert (~ expf m x (A m di0 d1)).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
     unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
     assert (A_1 m di0 (A m di0 d1) = d1).
      generalize (A_A_1 m di0 d1 (A m di0 d1)).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        intros.
        symmetry  in |- *.
        apply H2.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: exd m x *)
(* Goal: exd m y *)
       assert (exd m x /\ exd m (A m di0 d1)).
        apply expf_exd_exd.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
      elim (eq_dart_dec x (A m di0 d1)).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
         rewrite a in H.
         rewrite H2 in H.
         assert (d1 <> nil).
        eapply exd_not_nil.
         assert (inv_qhmap m).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
          assert (inv_qhmap m).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
           apply H4.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
Qed.

(* Dead end 1: idem *)

Lemma not_pred1_not_expf_aux : forall(m:fmap)(x y:dart),
  inv_qhmap m -> let x0 := A_1 m di0 x in
      ~pred m di1 x0 -> x <> y -> ~expf m x y.
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
unfold pred in |- *.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (x y z : dart) (_ : and (inv_qhmap m) (prec_I m d)) (_ : or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (_ : or (expf m z y) (and (@eq dart z d) (@eq dart y d))), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  unfold prec_I in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  elim H2.
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
 clear H2.
(* Goal: forall _ : expf m x y, False *)
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
   apply (IHm x y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
clear H2.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  elim H2.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  rewrite <- H4 in H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
unfold pred in |- *.
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : not (not (@eq dart (A (L m d d0 d1) di0 (A (L m d d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  induction d.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   unfold prec_Lq in |- *.
(* Goal: forall (x y : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di0 d0)) (not (pred m di0 d1)))))) (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   intros x y Inv.
(* Goal: forall (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   decompose [and] Inv.
(* Goal: forall (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   clear Inv.
(* Goal: forall (_ : not (not (@eq dart (A_1 m di1 (if eq_dart_dec x d1 then d0 else A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A_1 (L m di1 d0 d1) di1 (A_1 (L m di1 d0 d1) di0 x)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   elim (eq_dart_dec x d1).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    elim H6.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   clear H6.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
     apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
   unfold pred in |- *.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     rewrite a in |- *.
(* Goal: not (not (@eq dart (A_1 m di1 d1) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat (A_1 m di0 x) d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
     unfold pred in H4.
(* Goal: not (not (@eq dart (A_1 m di1 (A_1 m di0 d1)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (_ : not (@eq nat x d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A_1 (L m di1 d0 d1) di1 (A_1 (L m di1 d0 d1) di0 x)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
     assert (A_1 m di0 d1 = nil).
(* Goal: @eq dart (A_1 m di0 d1) nil *)
(* Goal: not (not (@eq dart (A_1 m di1 (A_1 m di0 d1)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (_ : not (@eq nat x d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A_1 (L m di1 d0 d1) di1 (A_1 (L m di1 d0 d1) di0 x)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    generalize (eq_dart_dec (A_1 m di0 d1) nil).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: not (not (@eq dart (A_1 m di1 (A_1 m di0 d1)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (_ : not (@eq nat x d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A_1 (L m di1 d0 d1) di1 (A_1 (L m di1 d0 d1) di0 x)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   rewrite H6 in |- *.
(* Goal: not (not (@eq dart (A_1 m di1 nil) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (_ : not (@eq nat x d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A_1 (L m di1 d0 d1) di1 (A_1 (L m di1 d0 d1) di0 x)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
     rewrite A_1_nil in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  clear H6.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   elim H6.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  clear H6.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
  unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
 clear H6.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A_1 (L m di1 d0 d1) di1 (A_1 (L m di1 d0 d1) di0 x)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    absurd (expf m x d1).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
  apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
  unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  unfold prec_Lq in |- *.
(* Goal: forall (x y : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di0 d0)) (not (pred m di0 d1)))))) (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  intros x y Inv.
(* Goal: forall (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  decompose [and] Inv.
(* Goal: forall (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  clear Inv.
(* Goal: forall (_ : not (not (@eq dart (if eq_dart_dec (A_1 m di0 x) d1 then d0 else A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
  elim (eq_dart_dec (A_1 m di0 x) d1).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   elim H6.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  clear H6.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
  unfold pred in |- *.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    rewrite a in |- *.
(* Goal: not (not (@eq dart (A_1 m di1 d1) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat (A_1 m di0 x) d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
    unfold pred in H4.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
 clear H6.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: False *)
(* Goal: forall (_ : not (@eq nat (A_1 m di0 x) d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
   apply H3.
(* Goal: not (@eq dart d1 nil) *)
(* Goal: forall (_ : not (@eq nat (A m di1 y) d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   apply exd_not_nil with m.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  elim H6.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
 apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
 unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
clear H6.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
   absurd (expf m x (A m di0 d1)).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
 apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
 unfold pred in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
(* Goal: False *)
(* Goal: expf m x (A m di0 d1) *)
   rewrite H7 in b.
(* Goal: False *)
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   apply b.
   symmetry  in |- *.
(* Goal: @eq nat d1 (A_1 m di0 (A m di0 d1)) *)
(* Goal: expf m x (A m di0 d1) *)
   apply A_A_1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: exd m (A m di0 d1) *)
(* Goal: @eq dart (A m di0 d1) (A m di0 d1) *)
(* Goal: expf m x (A m di0 d1) *)
 generalize (expf_exd_exd m x (A m di0 d1)).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(* Corallary: *)

Lemma not_pred1_not_expf : forall(m:fmap)(x x0 y:dart),
  inv_qhmap m -> x0 = A_1 m di0 x
      -> ~pred m di1 x0 -> x <> y -> ~expf m x y.
Proof.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: not (expf m x y) *)
apply not_pred1_not_expf_aux.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: not (pred m di1 (A_1 m di0 x)) *)
(* Goal: not (@eq dart x y) *)
unfold pred in |- *.
(* Goal: not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil)) *)
(* Goal: not (@eq dart x y) *)
  rewrite H0 in H1.
(* Goal: not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil)) *)
(* Goal: not (@eq dart x y) *)
  unfold pred in H1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(* SYMMETRICALLY:
No access by 1: Back dead end 1, for 1-succcessors: idem *)

Lemma not_succ1_not_expf : forall(m:fmap)(x y:dart),
  inv_qhmap m -> ~succ m di1 y -> x<>y -> ~expf m x y.
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
unfold succ in |- *.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (x y z : dart) (_ : and (inv_qhmap m) (prec_I m d)) (_ : or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (_ : or (expf m z y) (and (@eq dart z d) (@eq dart y d))), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  unfold prec_I in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  elim H2.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
 apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
 unfold succ in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  elim H3.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  clear H3.
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  clear H2.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : not (succ (L m d d0 d1) di1 y)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  rewrite H4 in H1.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : not (succ (L m d d0 d1) di1 y)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  rewrite H5 in H1.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
unfold succ in |- *.
(* Goal: forall (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  elim d.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall (x y : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di1 d0)) (not (pred m di1 d1)))))) (_ : not (not (@eq dart (A m di0 (if eq_dart_dec y d0 then d1 else A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
   intros x y Hinv.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di1 y) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   unfold prec_Lq in Hinv.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: False *)
   elim H1.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
  apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
  unfold succ in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
 clear H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   assert (~ expf m (A_1 m di1 d0) y).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
  apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
  unfold succ in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di1 y) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    assert (d0 = A m di1 y).
(* Goal: @eq dart d0 (A m di1 (A_1 m di1 d0)) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   apply A_1_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: exd m (A_1 m di1 d0) *)
(* Goal: exd m d0 *)
(* Goal: @eq dart (A_1 m di1 d0) (A_1 m di1 d0) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   generalize (expf_exd_exd m (A_1 m di1 d0) y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
   symmetry  in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: False *)
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di1 y) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  rewrite <- H3 in H.
(* Goal: False *)
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di1 y) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
     absurd (d0 <> nil).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (@eq dart d1 nil) *)
(* Goal: forall (_ : not (@eq nat (A m di1 y) d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  apply exd_not_nil with m.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  unfold prec_Lq in |- *.
(* Goal: forall (x y : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di1 d0)) (not (pred m di1 d1)))))) (_ : not (not (@eq dart (A m di0 (if eq_dart_dec y d0 then d1 else A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
  intros x y Hinv.
(* Goal: forall (_ : not (not (@eq dart (A m di0 (if eq_dart_dec y d0 then d1 else A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
  elim (eq_dart_dec y d0).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (_ : not (@eq nat (A m di1 y) d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    absurd (d1 <> nil).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (@eq dart d1 nil) *)
(* Goal: forall (_ : not (@eq nat (A m di1 y) d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
 apply exd_not_nil with m.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
  elim H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
 clear H1.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
   apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
 unfold succ in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
clear H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
 assert (~ expf m d0 y).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
 apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
 unfold succ in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
   symmetry  in H2.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(* No access by 0: Back dead end 0: idem *)

Lemma not_succ0_not_expf : forall(m:fmap)(x y:dart),
  inv_qhmap m -> let y1 := A m di1 y in
      ~succ m di0 y1 -> x <> y -> ~expf m x y.
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
unfold succ in |- *.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (x y z : dart) (_ : and (inv_qhmap m) (prec_I m d)) (_ : or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (_ : or (expf m z y) (and (@eq dart z d) (@eq dart y d))), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  unfold prec_I in |- *.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  elim H2.
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
 clear H2.
(* Goal: forall _ : expf m x y, False *)
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
   apply (IHm x y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
clear H2.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  elim H2.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)), let y1 := A (L m d d0 d1) di1 y in forall (_ : not (succ (L m d d0 d1) di0 y1)) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  rewrite <- H4 in H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
unfold succ in |- *.
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : not (not (@eq dart (A (L m d d0 d1) di0 (A (L m d d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m d d0 d1) x y) *)
  induction d.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   unfold prec_Lq in |- *.
(* Goal: forall (x y : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di0 d0)) (not (pred m di0 d1)))))) (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   intros x y Inv.
(* Goal: forall (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   decompose [and] Inv.
(* Goal: forall (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   clear Inv.
(* Goal: forall (_ : not (not (@eq dart (if eq_dart_dec (A m di1 y) d0 then d1 else A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   elim (eq_dart_dec (A m di1 y) d0).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (_ : not (@eq nat (A m di1 y) d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
     absurd (d1 <> nil).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (@eq dart d1 nil) *)
(* Goal: forall (_ : not (@eq nat (A m di1 y) d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)))) *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  apply exd_not_nil with m.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   elim H6.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
  clear H6.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
  unfold succ in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
 clear H6.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
   assert (~ expf m (A_1 m di1 d0) y).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
  apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
  unfold succ in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    rewrite <- H7 in b.
(* Goal: False *)
(* Goal: False *)
(* Goal: forall (x y : dart) (_ : inv_qhmap (L m di1 d0 d1)) (_ : not (not (@eq dart (A (L m di1 d0 d1) di0 (A (L m di1 d0 d1) di1 y)) nil))) (_ : not (@eq dart x y)), not (expf (L m di1 d0 d1) x y) *)
    apply b.
    symmetry  in |- *.
(* Goal: @eq dart d0 (A m di1 (A_1 m di1 d0)) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    apply A_1_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: exd m (A_1 m di1 d0) *)
(* Goal: exd m d0 *)
(* Goal: @eq dart (A_1 m di1 d0) (A_1 m di1 d0) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  generalize (expf_exd_exd m (A_1 m di1 d0) y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  unfold prec_Lq in |- *.
(* Goal: forall (x y : dart) (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di1 d0)) (not (pred m di1 d1)))))) (_ : not (not (@eq dart (A m di0 (if eq_dart_dec y d0 then d1 else A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
  intros x y Hinv.
(* Goal: forall (_ : not (not (@eq dart (A m di0 (if eq_dart_dec y d0 then d1 else A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
  elim (eq_dart_dec y d0).
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: False *)
   elim H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
  clear H1.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
    apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
  unfold succ in |- *.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    rewrite a in |- *.
(* Goal: not (not (@eq dart (A m di0 (A m di1 d0)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
    unfold succ in Hinv.
(* Goal: not (not (@eq dart (A m di0 (A m di1 d0)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
    assert (A m di1 d0 = nil).
(* Goal: @eq dart (A m di1 d0) nil *)
(* Goal: not (not (@eq dart (A m di0 (A m di1 d0)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
   generalize (eq_dart_dec (A m di1 d0) nil).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: not (not (@eq dart (A m di0 (A m di1 d0)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
  rewrite H1 in |- *.
(* Goal: not (not (@eq dart (A m di0 nil) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
    rewrite A_nil in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
 clear H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
  elim H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
 clear H1.
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
   apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
clear H1.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: False *)
  assert (~ expf m d0 y).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
 apply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: not (succ m di0 (A m di1 y)) *)
(* Goal: not (@eq dart d0 y) *)
(* Goal: False *)
 unfold succ in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
   symmetry  in H2.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
Qed.

(* Difference 1 in paths: OK : difficult proof with 2
lemmas above! Notice that it is wrong in a general fmap! *)

Lemma diff1_expf : forall(m:fmap)(x y z:dart),
  inv_qhmap m -> expf m x y -> expf m x z ->
    (expf m y z \/ expf m z y).
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
   intros x y z Hinv Hxy Hxz.
   elim Hxy; clear Hxy.
  elim Hxz; clear Hxz.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
     simpl in Hinv.
     elim Hinv.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intros.
     rename H1 into Hinv1.
     rename H2 into Hinv2.
     generalize (IHm x y z Hinv1 H0 H).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intro.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: and (exd m x) (exd m y) *)
     elim H.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
     intros; clear H.
     rewrite H2.
     rewrite H1 in H0.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), and (exd m x) (exd m y) *)
    decompose [and] H; clear H.
(* Goal: not (not (@eq dart (A m di0 (A m di1 d0)) nil)) *)
(* Goal: not (@eq dart x y) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), False *)
(* Goal: forall (_ : not (@eq nat y d0)) (_ : not (not (@eq dart (A m di0 (A m di1 y)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
    rewrite H1.
    rewrite H0 in Hxz.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
 intros x y z.
(* Goal: forall (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   elim d.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    unfold prec_Lq in |- *.
    intros Hinv Hxy Hxz.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    decompose [and] Hinv.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    clear Hinv.
    elim Hxy; clear Hxy.
   elim Hxz; clear Hxz.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      generalize (IHm x y z H H5 H3).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      decompose [and] H3; clear H3.
(* Goal: or (expf m x x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 x))) *)
      left.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
      elim (eq_dart_dec y d1).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         rewrite a.
(* Goal: expf m d0 d0 *)
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         apply refl_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
         assert (expf m y d1 \/ expf m d1 y).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
        eapply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
         apply H5.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        elim H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         intro.
           assert (~ expf m d1 y).
          apply not_pred0_not_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           intro.
             rewrite H10 in b.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
             tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
   elim Hxz; clear Hxz.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
      decompose [and] H5; clear H5.
      right.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
(* Goal: forall (_ : not (@eq nat z (cA_1 m k d1))) (_ : not (@eq nat z d0)) (_ : @eq dim k d) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (if eq_dart_dec z d1 then d0 else if eq_dart_dec z (cA m k d0) then cA_1 m k d1 else cA_1 m k z)) *)
(* Goal: forall (_ : not (@eq dim k d)) (_ : @eq nat d1 (A (clos m) d d0)), and (@eq dart (A (clos m) k z) (cA m k z)) (@eq dart (A_1 (clos m) k z) (cA_1 m k z)) *)
(* Goal: forall _ : not (@eq nat d1 (A (clos m) d d0)), and (@eq dart (A (l (clos m) d d0 d1) k z) (cA (L m d d0 d1) k z)) (@eq dart (A_1 (l (clos m) d d0 d1) k z) (cA_1 (L m d d0 d1) k z)) *)
      elim (eq_dart_dec z d1).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         rewrite a.
(* Goal: expf m d0 d0 *)
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         apply refl_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
         assert (expf m z d1 \/ expf m d1 z).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
        eapply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: False *)
(* Goal: forall (_ : not (@eq nat (A_1 m di0 x) d1)) (_ : not (not (@eq dart (A_1 m di1 (A_1 m di0 x)) nil))) (_ : not (@eq dart x y)), not (or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) *)
         apply H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
        assert (~ expf m d1 z).
         apply not_pred0_not_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          intro.
(* Goal: False *)
(* Goal: expf m x (A m di0 d1) *)
            rewrite H7 in b.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
            tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
      assert (expf m y z \/ expf m z y).
     apply (IHm (A_1 m di1 d0) y z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
  simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    unfold prec_Lq in |- *.
    intros Hinv Hxy Hxz.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    decompose [and] Hinv.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    clear Hinv.
    elim Hxy; clear Hxy.
   elim Hxz; clear Hxz.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      generalize (IHm x y z H H5 H3).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intros.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      decompose [and] H3; clear H3.
(* Goal: or (expf m x x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 x))) *)
      left.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
      elim (eq_dart_dec y (A m di0 d1)).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         rewrite a.
(* Goal: expf m d0 d0 *)
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         apply refl_expf.
(* Goal: exd m x *)
(* Goal: exd m y *)
         assert (exd m x /\ exd m (A m di0 d1)).
        apply expf_exd_exd.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       intro.
         assert (expf m y (A m di0 d1) \/
	 expf m (A m di0 d1) y).
        apply (IHm x y (A m di0 d1)).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        elim H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         intro.
           assert (~ expf m (A m di0 d1) y).
          eapply (not_pred1_not_expf m
	  (A m di0 d1) d1 y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
           apply (A_A_1 m di0 d1 (A m di0 d1)).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
            tauto.
(* Goal: exd m x *)
(* Goal: exd m y *)
            assert (exd m x /\ exd m (A m di0 d1)).
             apply expf_exd_exd.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
               tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
             tauto.
(* Goal: exd m x *)
(* Goal: exd m y *)
            assert (exd m x /\ exd m (A m di0 d1)).
             apply expf_exd_exd.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
               tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
             tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
            tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           intro.
             rewrite H10 in b.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
             tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
     decompose [and] H3.
     elim Hxz.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
      right.
      right.
(* Goal: and (exd m x) (exd m y) *)
      split.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: and (exd m x) (exd m y) *)
     split.
      assert (expf m z (A m di0 d1) \/
      expf m (A m di0 d1) z).
(* Goal: not (expf m d0 y) *)
(* Goal: False *)
       eapply IHm.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
        apply H6.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
       elim H9.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        intro.
          elim (eq_dart_dec z (A m di0 d1)).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           rewrite a.
(* Goal: expf m d0 d0 *)
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           apply refl_expf.
(* Goal: exd m x *)
(* Goal: exd m y *)
           assert (exd m x /\ exd m (A m di0 d1)).
          apply expf_exd_exd.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
            tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
         intro.
           assert (~ expf m (A m di0 d1) z).
          apply (not_pred1_not_expf m (A m di0 d1)
	  d1 z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
           apply (A_A_1 m di0 d1 (A m di0 d1)).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
            tauto.
(* Goal: exd m x *)
(* Goal: exd m y *)
            assert (exd m x /\ exd m (A m di0 d1)).
             apply expf_exd_exd.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
               tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
             tauto.
(* Goal: exd m x *)
(* Goal: exd m y *)
            assert (exd m x /\ exd m (A m di0 d1)).
             apply expf_exd_exd.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
               tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
             tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
            tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
           intro.
             rewrite H11 in b.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
             tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
          tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
      generalize (IHm d0 y z).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      intro.
      assert (expf m y z \/ expf m z y).
     apply H9.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
Qed.

(* SYMMETRICALLY: Difference 2 in paths: Idem: *)

Lemma diff2_expf : forall(m:fmap)(x y z:dart),
  inv_qhmap m -> expf m x y -> expf m z y ->
    (expf m x z \/ expf m z x).
Proof.
(* Goal: forall (m : fmap) (x y z : dart) (_ : inv_qhmap m) (_ : expf m x y) (_ : expf m z y), or (expf m x z) (expf m z x) *)
induction m.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
simpl in |- *.
(* Goal: forall (x y z : dart) (_ : and (inv_qhmap m) (prec_I m d)) (_ : or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (_ : or (expf m z y) (and (@eq dart z d) (@eq dart y d))), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  unfold prec_I in |- *.
(* Goal: forall (x y z : dart) (_ : and (inv_qhmap m) (and (not (@eq dart d nil)) (not (exd m d)))) (_ : or (expf m x y) (and (@eq dart x d) (@eq dart y d))) (_ : or (expf m z y) (and (@eq dart z d) (@eq dart y d))), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  intros x y z Hinv Hxy Hzy.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  decompose [and] Hinv.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  clear Hinv.
  elim Hxy; clear Hxy.
(* Goal: forall _ : expf m x y, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 elim Hzy; clear Hzy.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (_ : and (@eq dart z d) (@eq dart y d)) (_ : expf m x y), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
    generalize (IHm x y z H H3 H0).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (_ : and (@eq dart z d) (@eq dart y d)) (_ : and (@eq dart x d) (@eq dart y d)), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   assert (exd m y).
(* Goal: exd m y *)
(* Goal: or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  generalize (expf_exd_exd m x y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
 decompose [and] H0.
(* Goal: or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall _ : and (@eq dart x d) (@eq dart y d), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   rewrite H6 in H4.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
elim Hzy.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 clear Hzy.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   decompose [and] H3.
(* Goal: or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (_ : and (@eq dart z d) (@eq dart y d)) (_ : and (@eq dart x d) (@eq dart y d)), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
   assert (exd m y).
(* Goal: exd m y *)
(* Goal: or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (_ : and (@eq dart z d) (@eq dart y d)) (_ : and (@eq dart x d) (@eq dart y d)), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  generalize (expf_exd_exd m z y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (_ : and (@eq dart z d) (@eq dart y d)) (_ : and (@eq dart x d) (@eq dart y d)), or (or (expf m x z) (and (@eq dart x d) (@eq dart z d))) (or (expf m z x) (and (@eq dart z d) (@eq dart x d))) *)
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
 rewrite H5 in H6.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 tauto.
(* Goal: forall (x y z : dart) (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
intros x y z.
(* Goal: forall (_ : inv_qhmap (L m d d0 d1)) (_ : expf (L m d d0 d1) x y) (_ : expf (L m d d0 d1) z y), or (expf (L m d d0 d1) x z) (expf (L m d d0 d1) z x) *)
  elim d.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
 simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   unfold prec_Lq in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di1 d0)) (not (pred m di1 d1)))))) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros Hinv Hxy Hzy.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   decompose [and] Hinv.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   clear Hinv.
   elim Hxy; clear Hxy.
(* Goal: forall _ : expf m x y, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  elim Hzy; clear Hzy.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     generalize (IHm x y z H H5 H3).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    decompose [and] H3; clear H3.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    elim (eq_dart_dec (A_1 m di1 d0) x).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : not (@eq nat (A_1 m di1 d0) x), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
     rewrite <- a in |- *.
(* Goal: or (or (expf m x (A_1 m di1 d0)) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) (A_1 m di1 d0))))) (or (expf m (A_1 m di1 d0) x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m (A_1 m di1 d0) d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : not (@eq nat z (A_1 m di1 d0)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
     assert (expf m (A_1 m di1 d0) (A_1 m di1 d0)).
(* Goal: expf m d0 d0 *)
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    apply refl_expf.
(* Goal: exd m (A_1 m di1 d0) *)
(* Goal: exd m d0 *)
(* Goal: @eq dart (A_1 m di1 d0) (A_1 m di1 d0) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
      generalize (expf_exd_exd m (A_1 m di1 d0) y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    generalize (IHm x y (A_1 m di1 d0) H H5 H9).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    elim H3.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   clear H3.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : expf m (A_1 m di1 d0) x, or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
      absurd (expf m x (A_1 m di1 d0)).
(* Goal: not (expf m z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    apply not_succ0_not_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    assert (A m di1 (A_1 m di1 d0) = d0).
     symmetry  in |- *.
(* Goal: @eq dart d0 (A m di1 (A_1 m di1 d0)) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
       apply A_1_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: exd m (A_1 m di1 d0) *)
(* Goal: exd m d0 *)
(* Goal: @eq dart (A_1 m di1 d0) (A_1 m di1 d0) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
     generalize (expf_exd_exd m (A_1 m di1 d0) y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
        tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart x (A_1 m di1 d0)) *)
(* Goal: expf m x (A_1 m di1 d0) *)
(* Goal: forall _ : expf m (A_1 m di1 d0) x, or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    rewrite H7 in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
      symmetry  in H7.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   elim Hzy.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  clear Hzy.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    decompose [and] H3.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    clear H3.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    generalize (IHm (A_1 m di1 d0) y z H H9 H5).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    elim H3.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   clear H3.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    elim (eq_dart_dec z (A_1 m di1 d0)).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     rewrite a in |- *.
(* Goal: or (or (expf m x (A_1 m di1 d0)) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) (A_1 m di1 d0))))) (or (expf m (A_1 m di1 d0) x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m (A_1 m di1 d0) d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : not (@eq nat z (A_1 m di1 d0)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
     assert (expf m (A_1 m di1 d0) (A_1 m di1 d0)).
(* Goal: expf m d0 d0 *)
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    apply refl_expf.
(* Goal: exd m (A_1 m di1 d0) *)
(* Goal: or (or (expf m x (A_1 m di1 d0)) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) (A_1 m di1 d0))))) (or (expf m (A_1 m di1 d0) x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m (A_1 m di1 d0) d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : not (@eq nat z (A_1 m di1 d0)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
      generalize (expf_exd_exd m z (A_1 m di1 d0)).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
     absurd (expf m z (A_1 m di1 d0)).
(* Goal: not (expf m z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   apply not_succ0_not_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   assert (A m di1 (A_1 m di1 d0) = d0).
    symmetry  in |- *.
(* Goal: @eq dart d0 (A m di1 (A_1 m di1 d0)) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
      apply A_1_A.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: exd m (A_1 m di1 d0) *)
(* Goal: exd m d0 *)
(* Goal: @eq dart (A_1 m di1 d0) (A_1 m di1 d0) *)
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
    generalize (expf_exd_exd m (A_1 m di1 d0) y).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: not (succ m di0 (A m di1 (A_1 m di1 d0))) *)
(* Goal: not (@eq dart z (A_1 m di1 d0)) *)
(* Goal: expf m z (A_1 m di1 d0) *)
(* Goal: forall _ : and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) y)), or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   rewrite H10 in |- *.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
      tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intro.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   clear Hzy.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m x d1) (expf m (A_1 m di1 d0) z)))) (or (expf m z x) (and (not (@eq dart (A_1 m di1 d0) nil)) (and (expf m z d1) (expf m (A_1 m di1 d0) x)))) *)
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
   generalize (IHm x d1 z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall (_ : inv_qhmap (L m di1 d0 d1)) (_ : expf (L m di1 d0 d1) x y) (_ : expf (L m di1 d0 d1) z y), or (expf (L m di1 d0 d1) x z) (expf (L m di1 d0 d1) z x) *)
simpl in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (prec_Lq m di1 d0 d1)) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  unfold prec_Lq in |- *.
(* Goal: forall (_ : and (inv_qhmap m) (and (exd m d0) (and (exd m d1) (and (not (succ m di1 d0)) (not (pred m di1 d1)))))) (_ : or (expf m x y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)))) (_ : or (expf m z y) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)))), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros Hinv Hxy Hzy.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  decompose [and] Hinv.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  clear Hinv.
  elim Hxy; clear Hxy.
(* Goal: forall _ : expf m x y, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 elim Hzy; clear Hzy.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intros.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    generalize (IHm x y z H H5 H3).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall (_ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y))) (_ : expf m x y), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 intros.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   decompose [and] H3; clear H3.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   generalize (IHm x y d0 H H5 H9).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   elim H3.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  clear H3.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 x, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    elim (eq_dart_dec x d0).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     rewrite a in |- *.
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     assert (expf m d0 d0).
(* Goal: expf m d0 d0 *)
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    apply refl_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 x, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     absurd (expf m x d0).
(* Goal: not (expf m z d0) *)
(* Goal: expf m z d0 *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   apply not_succ1_not_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  elim Hzy.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
 clear Hzy.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   decompose [and] H3; clear H3.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   generalize (IHm z y d0 H H5 H9).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   elim H3.
(* Goal: forall _ : expf m z d0, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  clear H3.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    elim (eq_dart_dec z d0).
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     rewrite a in |- *.
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     assert (expf m d0 d0).
(* Goal: expf m d0 d0 *)
(* Goal: or (or (expf m x d0) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 d0)))) (or (expf m d0 x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m d0 (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : not (@eq nat z d0), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    apply refl_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
       tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     absurd (expf m z d0).
(* Goal: not (expf m z d0) *)
(* Goal: expf m z d0 *)
(* Goal: forall _ : expf m d0 z, or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   apply not_succ1_not_expf.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
     tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
    tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  tauto.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
clear Hzy.
(* Goal: forall _ : and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 y)), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  intro.
(* Goal: or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
  generalize (IHm x (A m di0 d1) z).
(* Goal: forall _ : forall (_ : inv_qhmap m) (_ : expf m x (A m di0 d1)) (_ : expf m z (A m di0 d1)), or (expf m x z) (expf m z x), or (or (expf m x z) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m x (A m di0 d1)) (expf m d0 z)))) (or (expf m z x) (and (not (@eq dart (A m di0 d1) nil)) (and (expf m z (A m di0 d1)) (expf m d0 x)))) *)
   tauto.
Qed.

(* =========================================================
===========================================================

                    END OF PART 2
==========================================================
=========================================================*)

