Fixpoint hlist_map (ls : list A) (hl : hlist F ls) {struct hl} : hlist G ls :=
    match hl in @hlist _ _ ls return hlist G ls with
      | Hnil => Hnil
      | Hcons _ _ hd tl =>
        Hcons (ff hd) (hlist_map tl)
    end.

(* Specifications: *)
Theorem hlist_app_hlist_map : forall ls ls' (a : hlist F ls) (b : hlist F ls'), hlist_map (hlist_app a b) = hlist_app (hlist_map a) (hlist_map b).
Theorem hlist_map_hlist_map : forall ls (hl : hlist F ls), hlist_map gg (hlist_map ff hl) = hlist_map (fun _ x => gg (ff x)) hl.
Theorem hlist_get_hlist_map : forall ls t (hl : hlist F ls) (m : member t ls), hlist_get m (hlist_map ff hl) = ff (hlist_get m hl).
Lemma hlist_map_ext : forall (ff gg : forall x, F x -> G x), (forall x t, ff x t = gg x t) -> forall ls (hl : hlist F ls), hlist_map ff hl = hlist_map gg hl.
Lemma equiv_hlist_map : forall T U (F : T -> Type) (R : forall t, F t -> F t -> Prop) (R' : forall t, U t -> U t -> Prop) (f g : forall t, F t -> U t), (forall t (x y : F t), R t x y -> R' t (f t x) (g t y)) -> forall ls (a b : hlist F ls), equiv_hlist R a b -> equiv_hlist R' (hlist_map f a) (hlist_map g b).