Fixpoint varspecs_sub (al bl: varspecs) : bool :=
match al, bl with
| (a,v)::al', (b,w)::bl' =>
match Pos.compare a b
with Lt => false
| Eq => if eqb_type v w then varspecs_sub al' bl' else false
| Gt => varspecs_sub al' bl
end
| nil, _ => true
| _::_, _ => false
end.
Fixpoint funspecs_sub (al bl: funspecs) : Prop :=
match al, bl with
| (a,v)::al', (b,w)::bl' =>
match Pos.compare a b
with Lt => False
| Eq => v=w /\ funspecs_sub al' bl'
| Gt => funspecs_sub al' bl
end
| nil, _ => True
| _::_, _ => False
end.

Lemma semax_func_app:
forall V1 V2 V F1 F2 F G1 G2 G G1' G2' G' (Espec: OracleKind),
semax_func V1 G1 F1 G1' ->
semax_func V2 G2 F2 G2' ->
F = F1++F2 ->
G' = G1'++G2' ->
varspecs_sub V1 V = true ->
varspecs_sub V2 V = true ->
funspecs_sub G1 G ->
funspecs_sub G2 G ->
semax_func V G F G'.