Fixpoint fold_Ssequence lc :=
match lc with
| nil => Sskip
| c1 :: nil => c1
| c :: lc0 => Ssequence c (fold_Ssequence lc0)
end.
Definition non_Sseq c :=
match c with
| Ssequence _ _ => False
| _ => True
end.
Inductive unfold_Sseq_rel: statement -> list statement -> Prop :=
| singleton: forall c, non_Sseq c -> unfold_Sseq_rel c (c :: nil)
| tl_step: forall c1 c2 lc, non_Sseq c1 -> unfold_Sseq_rel c2 lc ->
unfold_Sseq_rel (Ssequence c1 c2) (c1 :: lc)
| hd_step: forall c1 c2 c3 lc, unfold_Sseq_rel (Ssequence c1 (Ssequence c2 c3)) lc ->
unfold_Sseq_rel (Ssequence (Ssequence c1 c2) c3) lc
.

Lemma semax_fun_id:
forall {CS: compspecs} {Espec: OracleKind},
forall id f Delta P Q c,
(var_types Delta) ! id = None ->
(glob_specs Delta) ! id = Some f ->
(glob_types Delta) ! id = Some (type_of_funspec f) ->
@semax CS Espec Delta (P && `(func_ptr f) (eval_var id (type_of_funspec f)))
c Q ->
@semax CS Espec Delta P c Q.