Fixpoint hlist_app ll lr (h : hlist ll) : hlist lr -> hlist (ll ++ lr) :=
match h in hlist ll return hlist lr -> hlist (ll ++ lr) with
| Hnil => fun x => x
| Hcons _ _ hd tl => fun r => Hcons hd (hlist_app tl r)
end.

Lemma hlist_app_nil_r
: forall ls (h : hlist ls),
hlist_app h Hnil =
match eq_sym (app_nil_r_trans ls) in _ = t return hlist t with
| eq_refl => h
end.