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 funspecs_sub_refl: forall g, funspecs_sub g g.