Local Open Scope logic.
Opaque HMAC256.
Opaque hmac256drbgabs_generate.
Opaque HMAC256_DRBG_generate_function.
Opaque mbedtls_HMAC256_DRBG_generate_function.

Lemma while_loop_post_incremental_fst:
forall key0 V0 n out_len,
0 <= (n * 32)%Z <= out_len ->
(n * 32)%Z <> out_len ->
fst (HMAC_DRBG_generate_helper_Z HMAC256 key0 V0
((n * 32)%Z + Z.min 32 (out_len - (n * 32)%Z))) =
HMAC256 (fst (HMAC_DRBG_generate_helper_Z HMAC256 key0 V0 (n * 32)%Z)) key0.