Section SHIFT_AMOUNT.
Variable l: Z.
Hypothesis l_range: 0 <= l < 32.
Variable N: int.
Hypothesis N_eq: Int.unsigned N = two_p l.
Remark mk_amount_range:
forall n, Int.ltu (Int.zero_ext l n) N = true.
Remark mk_amount_eq:
forall n, Int.ltu n N = true -> Int.zero_ext l n = n.
End SHIFT_AMOUNT.
Program Definition mk_amount32 (n: int): amount32 :=
{| a32_amount := Int.zero_ext 5 n |}.
Next Obligation.
apply mk_amount_range. omega. reflexivity.
Qed.
Program Definition mk_amount64 (n: int): amount64 :=
{| a64_amount := Int.zero_ext 6 n |}.
Next Obligation.
apply mk_amount_range. omega. reflexivity.
Qed.

Lemma mk_amount64_eq: forall n,
Int.ltu n Int64.iwordsize' = true -> a64_amount (mk_amount64 n) = n.