Corollary sum_0: forall n, sum (repeat 0 n) = 0.Corollary sum_1: forall n, sum (repeat 1 n) = Z.of_nat n.

(* Specifications: *)
Lemma body_init_ctr: semax_body Vprog Gprog f_init_ctr init_ctr_spec.
Lemma body_dest_ctr: semax_body Vprog Gprog f_dest_ctr dest_ctr_spec.
Lemma sum_add: forall l n, fold_right Z.add n l = sum l + n.
Lemma upd_Znth_sum: forall l i n, 0 <= i < Zlength l -> sum (upd_Znth i l n) = sum l + n - Znth i l.
Lemma body_incr: semax_body Vprog Gprog f_incr incr_spec.
Lemma body_thread_func : semax_body Vprog Gprog f_thread_func thread_func_spec.