(* THIS FILE CONTAINS Lemmas that DO NOT depend on CompCert or Verifiable C, and that are used in the proof of the C program but are not used in the proof of functional_prog.v. *)
Require Export sha.common_lemmas.
Require Psatz.
Global Opaque CBLOCKz LBLOCKz.
Hint Rewrite Zlength_intlist_to_bytelist : sublist.
Hint Rewrite Zlength_intlist_to_bytelist : Zlength.
Local Open Scope nat.
Definition LBLOCK : nat := Z.to_nat LBLOCKz.
Definition CBLOCK : nat := Z.to_nat CBLOCKz.
Opaque LBLOCK CBLOCK.

Theorem Zmod_mod_mult :
forall n a b, (0 < a)%Z -> (0 <= b)%Z ->
Zmod (Zmod n (a * b)) b = Zmod n b.