diff options
author | Jason Gross <jgross@mit.edu> | 2016-10-06 15:20:05 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2016-10-06 15:43:34 -0400 |
commit | 0804cc19609c11cbd21678efbe282724a2bc4fff (patch) | |
tree | dda278979a5c6136700c215d2fcb96c249613ae3 /src/Util/ZUtil.v | |
parent | 581843e7d22cc4386a6e971f8ec91212e814245e (diff) |
Use zutil_arith for side-conditions in testbit
After | File Name | Before || Change
----------------------------------------------------------------------------------
5m41.34s | Total | 5m28.96s || +0m12.37s
----------------------------------------------------------------------------------
0m34.92s | ModularArithmetic/Conversion | 0m27.15s || +0m07.77s
0m21.11s | ModularArithmetic/Pow2BaseProofs | 0m17.88s || +0m03.23s
1m34.77s | Test/Curve25519SpecTestVectors | 1m34.49s || +0m00.28s
0m27.17s | ModularArithmetic/ModularBaseSystemProofs | 0m27.52s || -0m00.34s
0m20.47s | BoundedArithmetic/DoubleBoundedProofs | 0m20.08s || +0m00.39s
0m19.56s | EdDSARepChange | 0m19.80s || -0m00.24s
0m14.35s | Specific/GF25519 | 0m14.58s || -0m00.23s
0m12.27s | Util/ZUtil | 0m12.18s || +0m00.08s
0m09.02s | Testbit | 0m08.96s || +0m00.05s
0m08.56s | BoundedArithmetic/ArchitectureToZLikeProofs | 0m08.26s || +0m00.30s
0m08.18s | ModularArithmetic/Montgomery/ZProofs | 0m08.12s || +0m00.06s
0m07.96s | Encoding/PointEncoding | 0m08.14s || -0m00.18s
0m07.42s | Specific/GF1305 | 0m07.54s || -0m00.12s
0m03.83s | BaseSystemProofs | 0m03.83s || +0m00.00s
0m03.50s | ModularArithmetic/BarrettReduction/ZHandbook | 0m03.60s || -0m00.10s
0m03.46s | ModularArithmetic/ModularBaseSystemListProofs | 0m02.88s || +0m00.58s
0m03.44s | ModularArithmetic/Tutorial | 0m03.33s || +0m00.10s
0m03.23s | BoundedArithmetic/InterfaceProofs | 0m03.24s || -0m00.01s
0m02.90s | ModularArithmetic/BarrettReduction/ZGeneralized | 0m02.86s || +0m00.04s
0m02.86s | Encoding/PointEncodingPre | 0m02.82s || +0m00.04s
0m02.58s | ModularArithmetic/ModularArithmeticTheorems | 0m02.55s || +0m00.03s
0m02.33s | ModularArithmetic/ModularBaseSystemOpt | 0m02.33s || +0m00.00s
0m02.31s | Specific/FancyMachine256/Montgomery | 0m02.08s || +0m00.23s
0m02.26s | ModularArithmetic/BarrettReduction/ZBounded | 0m02.16s || +0m00.09s
0m02.10s | Specific/FancyMachine256/Barrett | 0m02.12s || -0m00.02s
0m01.82s | ModularArithmetic/Montgomery/ZBounded | 0m01.88s || -0m00.05s
0m01.69s | Specific/FancyMachine256/Core | 0m01.68s || +0m00.01s
0m01.47s | ModularArithmetic/BarrettReduction/Z | 0m01.44s || +0m00.03s
0m01.27s | ModularArithmetic/PrimeFieldTheorems | 0m01.31s || -0m00.04s
0m01.25s | BaseSystem | 0m01.31s || -0m00.06s
0m01.12s | ModularArithmetic/ExtendedBaseVector | 0m01.10s || +0m00.02s
0m00.98s | ModularArithmetic/PseudoMersenneBaseParamProofs | 0m00.67s || +0m00.30s
0m00.94s | Experiments/EncodingLemmas | 0m00.88s || +0m00.05s
0m00.91s | Util/NumTheoryUtil | 0m00.80s || +0m00.10s
0m00.67s | Spec/EdDSA | 0m00.65s || +0m00.02s
0m00.64s | Encoding/ModularWordEncodingTheorems | 0m00.61s || +0m00.03s
0m00.62s | ModularArithmetic/ExtPow2BaseMulProofs | 0m00.60s || +0m00.02s
0m00.62s | ModularArithmetic/ModularBaseSystem | 0m00.62s || +0m00.00s
0m00.59s | Encoding/ModularWordEncodingPre | 0m00.59s || +0m00.00s
0m00.59s | ModularArithmetic/ModularBaseSystemList | 0m00.67s || -0m00.08s
0m00.56s | BoundedArithmetic/Interface | 0m00.61s || -0m00.04s
0m00.56s | Spec/Ed25519 | 0m00.48s || +0m00.08s
0m00.55s | Spec/ModularWordEncoding | 0m00.60s || -0m00.04s
0m00.50s | BoundedArithmetic/DoubleBounded | 0m00.49s || +0m00.01s
0m00.50s | ModularArithmetic/ZBounded | 0m00.49s || +0m00.01s
0m00.48s | ModularArithmetic/Pow2Base | 0m00.50s || -0m00.02s
0m00.47s | ModularArithmetic/Pre | 0m00.45s || +0m00.01s
0m00.47s | BoundedArithmetic/StripCF | 0m00.42s || +0m00.04s
0m00.44s | BoundedArithmetic/ArchitectureToZLike | 0m00.42s || +0m00.02s
0m00.36s | ModularArithmetic/PseudoMersenneBaseParams | 0m00.37s || -0m00.01s
0m00.36s | ModularArithmetic/Montgomery/Z | 0m00.46s || -0m00.10s
0m00.35s | Spec/ModularArithmetic | 0m00.36s || -0m00.01s
Diffstat (limited to 'src/Util/ZUtil.v')
-rw-r--r-- | src/Util/ZUtil.v | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Util/ZUtil.v b/src/Util/ZUtil.v index bd1ddc5d6..06696f08b 100644 --- a/src/Util/ZUtil.v +++ b/src/Util/ZUtil.v @@ -204,8 +204,8 @@ Ltac zify_nat_op ::= Create HintDb Ztestbit discriminated. Hint Rewrite Z.testbit_0_l : Ztestbit. -Hint Rewrite Z.land_spec Z.lor_spec Z.shiftl_spec Z.shiftr_spec using omega : Ztestbit. -Hint Rewrite Z.testbit_neg_r using omega : Ztestbit. +Hint Rewrite Z.land_spec Z.lor_spec Z.shiftl_spec Z.shiftr_spec using zutil_arith : Ztestbit. +Hint Rewrite Z.testbit_neg_r using zutil_arith : Ztestbit. Hint Rewrite Bool.andb_true_r Bool.andb_false_r Bool.orb_true_r Bool.orb_false_r Bool.andb_true_l Bool.andb_false_l Bool.orb_true_l Bool.orb_false_l : Ztestbit. @@ -245,7 +245,7 @@ Module Z. + apply Z.ones_spec_low. omega. + apply Z.ones_spec_high. omega. Qed. - Hint Rewrite ones_spec using omega : Ztestbit. + Hint Rewrite ones_spec using zutil_arith : Ztestbit. Lemma testbit_pow2_mod : forall a n i, 0 <= n -> Z.testbit (Z.pow2_mod a n) i = if Z_lt_dec i n then Z.testbit a i else false. @@ -259,7 +259,7 @@ Module Z. | |- _ => progress autorewrite with Ztestbit end. Qed. - Hint Rewrite testbit_pow2_mod using omega : Ztestbit. + Hint Rewrite testbit_pow2_mod using zutil_arith : Ztestbit. Lemma bits_above_pow2 a n : 0 <= a < 2^n -> Z.testbit a n = false. Proof. @@ -267,7 +267,7 @@ Module Z. destruct (Z_zerop a); subst; autorewrite with Ztestbit; trivial. apply Z.bits_above_log2; auto with zarith concl_log2. Qed. - Hint Rewrite bits_above_pow2 using omega : Ztestbit. + Hint Rewrite bits_above_pow2 using zutil_arith : Ztestbit. Lemma pow2_mod_0_r : forall a, Z.pow2_mod a 0 = 0. Proof. @@ -1850,7 +1850,7 @@ Module Z. omega. Qed. - Hint Rewrite Z.pow2_bits_eqb using omega : Ztestbit. + Hint Rewrite Z.pow2_bits_eqb using zutil_arith : Ztestbit. Lemma pow_2_shiftr : forall n, 0 <= n -> (2 ^ n) >> n = 1. Proof. intros; apply Z.bits_inj'; intros. |