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.

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.