aboutsummaryrefslogtreecommitdiff
path: root/src/Util/NUtil.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-06-02 00:01:35 -0400
committerGravatar Jason Gross <jasongross9@gmail.com>2017-06-05 18:47:35 -0400
commit7488682db4cf259e0bb0c886e13301c32a2eeaa2 (patch)
tree9baf80699c9f00b01d3180504d58351b6ecc0f33 /src/Util/NUtil.v
parentc4a0d1fdde22dbd2faaa1753e973ee9602076ee8 (diff)
Don't rely on autogenerated names
This fixes all of the private-names warnings emitted by compiling fiat-crypto with https://github.com/coq/coq/pull/268 (minus the ones in coqprime, which I didn't touch).
Diffstat (limited to 'src/Util/NUtil.v')
-rw-r--r--src/Util/NUtil.v6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Util/NUtil.v b/src/Util/NUtil.v
index d76be63aa..9321f2b23 100644
--- a/src/Util/NUtil.v
+++ b/src/Util/NUtil.v
@@ -26,7 +26,7 @@ Module N.
Lemma size_nat_equiv : forall n, N.size_nat n = N.to_nat (N.size n).
Proof.
- destruct n; auto; simpl; induction p; simpl; auto; rewrite IHp, Pnat.Pos2Nat.inj_succ; reflexivity.
+ destruct n as [|p]; auto; simpl; induction p as [p IHp|p IHp|]; simpl; auto; rewrite IHp, Pnat.Pos2Nat.inj_succ; reflexivity.
Qed.
Lemma size_nat_le a b : (a <= b)%N -> (N.size_nat a <= N.size_nat b)%nat.
@@ -39,7 +39,7 @@ Module N.
Lemma shiftr_size : forall n bound, N.size_nat n <= bound ->
N.shiftr_nat n bound = 0%N.
Proof.
- intros.
+ intros n bound H.
rewrite <- (Nat2N.id bound).
rewrite Nshiftr_nat_equiv.
destruct (N.eq_dec n 0); subst; [apply N.shiftr_0_l|].
@@ -86,7 +86,7 @@ Module N.
then S (2 * N.to_nat (N.shiftr_nat n (S i)))
else (2 * N.to_nat (N.shiftr_nat n (S i))).
Proof.
- intros.
+ intros n i.
rewrite Nshiftr_nat_S.
case_eq (N.testbit_nat n i); intro testbit_i;
pose proof (Nshiftr_nat_spec n i 0) as shiftr_n_odd;