aboutsummaryrefslogtreecommitdiff
path: root/src/Specific/GF25519Reflective/Reified/Mul.v
blob: 0c298134d6e5accd004347a1f9d7d72d15f79be5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Require Import Crypto.Specific.GF25519Reflective.CommonBinOp.

Definition rmulZ_sig : rexpr_binop_sig mul. Proof. reify_sig. Defined.
Definition rmulW := Eval vm_compute in rword_of_Z rmulZ_sig.
Lemma rmulW_correct_and_bounded_gen : correct_and_bounded_genT rmulW rmulZ_sig.
Proof. rexpr_correct. Qed.
Definition rmul_output_bounds := Eval vm_compute in compute_bounds rmulW ExprBinOp_bounds.
Local Obligation Tactic := intros; vm_compute; constructor.
Program Definition rmulW_correct_and_bounded
  := ExprBinOp_correct_and_bounded
       rmulW mul rmulZ_sig rmulW_correct_and_bounded_gen
       _ _.

Local Open Scope string_scope.
Compute ("Mul", compute_bounds_for_display rmulW ExprBinOp_bounds).
(*Compute ("Mul overflows? ", sanity_check rmulW ExprBinOp_bounds).*)