File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ Require Import Crypto.Util.ZUtil.Tactics.ZeroBounds.
18
18
19
19
Section Representation.
20
20
Context {p : Types.parameters} {field_parameters : FieldParameters}
21
- {p_ok : Types.ok}
22
- (width_ge_32 : 32 <= Semantics.width).
21
+ {p_ok : Types.ok}.
23
22
Context (n : nat) (weight : nat -> Z)
24
23
(loose_bounds tight_bounds : list (option zrange))
25
24
(relax_bounds :
@@ -74,7 +73,7 @@ Section Representation.
74
73
{ match goal with
75
74
| H : Array.array _ _ _ _ _ |- _ =>
76
75
eapply Bignum_of_bytes with (n0:=n) in H;
77
- [ destruct H | nia.. ]
76
+ [ destruct H | (idtac + destruct Semantics.width_cases); nia.. ]
78
77
end.
79
78
eexists; eauto. }
80
79
{
Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ Section Bignum.
30
30
sep (emp (length x = n_bytes)) (array ptsto (word.of_Z 1) px x).
31
31
32
32
Section Proofs.
33
- Context {ok : Types.ok}
34
- (width_ge_32 : 32 <= Semantics.width).
33
+ Context {ok : Types.ok}.
35
34
Existing Instance semantics_ok.
36
35
37
36
(* TODO: factor this proof into a more general form that says if subarrays
@@ -51,7 +50,11 @@ Section Bignum.
51
50
cbn [array length] in *. sepsimpl; eauto. }
52
51
{ rewrite <-(firstn_skipn (Z.to_nat word_size_in_bytes) bs).
53
52
rewrite array_append.
54
- rewrite Scalars.scalar_of_bytes with (l:=List.firstn _ _); try assumption.
53
+ rewrite Scalars.scalar_of_bytes with (l:=List.firstn _ _);
54
+ lazymatch goal with
55
+ | [ |- _ <= Semantics.width ] => destruct Semantics.width_cases; lia
56
+ | _ => idtac
57
+ end.
55
58
2:{
56
59
rewrite word_size_in_bytes_eq in *.
57
60
etransitivity;
You can’t perform that action at this time.
0 commit comments