Fixpoint prog_funct' {F V} (l: list (ident * globdef F V)) : list (ident * F) :=
 match l with nil => nil | (i,Gfun f)::r => (i,f):: prog_funct' r | _::r => prog_funct' r
 end.Definition prog_funct {F} (p: program F) := prog_funct' (prog_defs p).

Lemma nth_error_app1: forall {T} (al bl : list T) (j: nat), (j < length al)%nat -> nth_error (al++bl) j = nth_error al j.