(* Inverse of A. CAUTION: it is not the true inverse
 in an fmap, but it is in a true hmap (or qhmap...)! *)

Fixpoint A_1 (m:fmap)(k:dim)(y:dart)
  {struct m}:dart:=
  match m with
      V => nil
    | I m0 x0 => A_1 m0 k y
    | L m0 k0 x0 y0 =>
          if (eq_dim_dec k k0)
          then if (eq_dart_dec y y0) then x0
              else A_1 m0 k y
          else A_1 m0 k y
  end.(* Idem: *)

Definition pred(m:fmap)(k:dim)(x:dart):=
  A_1 m k x <> nil.

(* Specifications: *)
Lemma pred_dec: forall (m:fmap)(k:dim)(x:dart), {pred m k x} + {~pred m k x}.