Local Open Scope nat.
Local Open Scope logic.

(* Specifications: *)
Lemma body_SHA256_Init: semax_body Vprog Gtot f_SHA256_Init SHA256_Init_spec.
Lemma Zlength_list_repeat:
forall {A} n (x:A), Zlength (list_repeat (Z.to_nat n) x) = Z.max 0 n.
Lemma splice_into_list_simplify0:
forall {A} n (src dst: list A),
Zlength src = n ->
Zlength dst = n ->
splice_into_list 0 n src dst = src.
Lemma splice_into_list_self:
forall {A} lo hi (l: list A),
(0 <= lo <= hi)%Z ->
(hi <= Zlength l)%Z ->
splice_into_list lo hi (sublist lo hi l) l = l.
(* Lemma splice_into_list_simplify1: forall lo hi src tgt, lo = Zlength tgt -> (hi-lo = Zlength src)%Z -> splice_into_list lo hi src tgt = tgt++src.  Lemma splice_into_list_simplify2: forall lo hi src tgt, lo = Zlength tgt -> (lo <= hi)%Z -> (hi-lo <= Zlength src)%Z -> splice_into_list lo hi hi src tgt = tgt++ sublist 0 (hi-lo) src. *)
Lemma JMeq_skipn:
forall ta tb n (la: list ta) (lb: list tb),
ta=tb ->
JMeq la lb ->
JMeq (skipn n la) (skipn n lb).
Lemma JMeq_firstn:
forall ta tb n (la: list ta) (lb: list tb),
ta=tb -> JMeq la lb -> JMeq (firstn n la) (firstn n lb).
Lemma JMeq_length:
forall ta tb (la: list ta) (lb: list tb),
ta=tb -> JMeq la lb -> length la = length lb.
Lemma JMeq_sublist:
forall ta tb lo hi (la: list ta) (lb: list tb),
ta=tb -> JMeq la lb -> JMeq (sublist lo hi la) (sublist lo hi lb).