aboutsummaryrefslogtreecommitdiff
path: root/src/Util/ZUtil.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-03-21 17:44:58 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-03-21 18:15:19 -0400
commit55ce79cba62fef753f55f3bacb7f77645cb9c508 (patch)
tree9e0732453917f29949bc46f794c4213aed05b2cc /src/Util/ZUtil.v
parent26fe9893e44f2869f88b03c7a70db5e8b0a94ef1 (diff)
Split off extra power of ltb_to_lt, split_andb
This should make the build faster. After | File Name | Before || Change ----------------------------------------------------------------------------------------------------------- 12m23.36s | Total | 19m19.28s || -6m55.91s ----------------------------------------------------------------------------------------------------------- 0m30.37s | Specific/GF25519Bounded | 4m13.77s || -3m43.40s 0m05.10s | Specific/GF25519Reflective/CommonBinOp | 1m03.15s || -0m58.04s 0m04.12s | Specific/GF25519Reflective/CommonUnOp | 0m41.26s || -0m37.14s 0m03.87s | Specific/GF25519Reflective/CommonUnOpWireToFE | 0m36.38s || -0m32.51s 0m02.84s | Specific/GF25519Reflective/CommonUnOpFEToWire | 0m28.09s || -0m25.25s 0m07.65s | BoundedArithmetic/Double/Proofs/ShiftRightDoubleWordImmediate | 0m17.70s || -0m10.04s 0m22.28s | Reflection/Z/Interpretations128/Relations | 0m31.68s || -0m09.39s 0m18.82s | Reflection/Z/Interpretations64/Relations | 0m27.99s || -0m09.16s 0m02.55s | BoundedArithmetic/Double/Proofs/ShiftLeft | 0m06.03s || -0m03.48s 0m06.86s | Reflection/Z/InterpretationsGen | 0m08.87s || -0m02.00s 0m02.55s | BoundedArithmetic/Double/Proofs/ShiftRight | 0m04.69s || -0m02.14s 0m30.47s | ModularArithmetic/ModularBaseSystemProofs | 0m31.67s || -0m01.20s 0m08.77s | Specific/GF25519BoundedCommon | 0m10.43s || -0m01.66s 0m03.07s | ModularArithmetic/ZBoundedZ | 0m04.16s || -0m01.09s 1m29.26s | Test/Curve25519SpecTestVectors | 1m29.49s || -0m00.22s 0m47.87s | Specific/GF25519Reflective/Reified/LadderStep | 0m47.14s || +0m00.72s 0m38.92s | ModularArithmetic/Conversion | 0m39.24s || -0m00.32s 0m36.94s | Spec/Ed25519 | 0m36.07s || +0m00.86s 0m34.26s | Specific/GF25519Reflective/Reified/AddCoordinates | 0m34.09s || +0m00.16s 0m21.21s | ModularArithmetic/Pow2BaseProofs | 0m21.29s || -0m00.07s 0m19.58s | Specific/GF25519 | 0m19.52s || +0m00.05s 0m18.22s | EdDSARepChange | 0m18.44s || -0m00.22s 0m14.71s | Util/ZUtil | 0m14.78s || -0m00.06s 0m14.22s | Reflection/Named/MapCastWf | 0m14.17s || +0m00.05s 0m11.62s | Specific/NewBaseSystemTest | 0m11.50s || +0m00.11s 0m11.13s | Specific/GF25519Reflective/Reified/Mul | 0m11.02s || +0m00.11s 0m11.07s | Experiments/Ed25519 | 0m10.75s || +0m00.32s 0m09.92s | Testbit | 0m09.85s || +0m00.07s 0m08.73s | Reflection/Named/MapCastInterp | 0m08.68s || +0m00.05s 0m08.70s | Assembly/GF25519 | 0m08.70s || +0m00.00s 0m08.67s | ModularArithmetic/Montgomery/ZProofs | 0m09.23s || -0m00.56s 0m08.38s | BoundedArithmetic/ArchitectureToZLikeProofs | 0m08.50s || -0m00.11s 0m08.18s | BoundedArithmetic/Double/Proofs/Multiply | 0m08.24s || -0m00.06s 0m06.64s | BoundedArithmetic/Double/Proofs/SpreadLeftImmediate | 0m06.82s || -0m00.18s 0m06.34s | Specific/GF1305 | 0m06.34s || +0m00.00s 0m06.08s | NewBaseSystem | 0m06.13s || -0m00.04s 0m05.96s | Util/FixedWordSizesEquality | 0m05.87s || +0m00.08s 0m05.72s | Specific/GF25519Reflective/Reified/PreFreeze | 0m05.73s || -0m00.01s 0m05.47s | BoundedArithmetic/Double/Proofs/RippleCarryAddSub | 0m05.42s || +0m00.04s 0m05.22s | Specific/GF25519Reflective/Reified/CarrySub | 0m05.42s || -0m00.20s 0m04.94s | Specific/GF25519Reflective/Reified/CarryAdd | 0m04.90s || +0m00.04s 0m04.91s | Specific/SC25519 | 0m04.95s || -0m00.04s 0m04.88s | ModularArithmetic/ModularBaseSystemListProofs | 0m04.95s || -0m00.07s 0m04.20s | Specific/GF25519Reflective/Common9_4Op | 0m04.10s || +0m00.10s 0m03.89s | ModularArithmetic/BarrettReduction/ZHandbook | 0m03.97s || -0m00.08s 0m03.79s | BaseSystemProofs | 0m03.81s || -0m00.02s 0m03.73s | Specific/GF25519Reflective/Reified/CarryOpp | 0m03.80s || -0m00.06s 0m03.51s | Specific/GF25519Reflective/Reified/Sub | 0m03.56s || -0m00.05s 0m03.39s | BoundedArithmetic/InterfaceProofs | 0m03.53s || -0m00.13s 0m03.12s | ModularArithmetic/BarrettReduction/ZGeneralized | 0m03.19s || -0m00.06s 0m02.97s | Specific/GF25519Reflective/Reified/Add | 0m03.16s || -0m00.18s 0m02.94s | ModularArithmetic/ModularArithmeticTheorems | 0m02.86s || +0m00.08s 0m02.78s | Specific/FancyMachine256/Barrett | 0m02.72s || +0m00.05s 0m02.77s | Specific/GF25519ReflectiveAddCoordinates | 0m02.80s || -0m00.02s 0m02.77s | Specific/FancyMachine256/Montgomery | 0m02.86s || -0m00.08s 0m02.75s | Specific/GF25519Reflective/Reified/Pack | 0m02.67s || +0m00.08s 0m02.67s | BoundedArithmetic/Double/Proofs/Decode | 0m02.66s || +0m00.00s 0m02.54s | Specific/GF25519Reflective/Reified/Unpack | 0m02.44s || +0m00.10s 0m02.38s | Specific/GF25519Reflective/Reified/Opp | 0m02.36s || +0m00.02s 0m02.38s | ModularArithmetic/ModularBaseSystemOpt | 0m02.18s || +0m00.19s 0m02.27s | ModularArithmetic/BarrettReduction/ZBounded | 0m02.35s || -0m00.08s 0m02.20s | Reflection/TestCase | 0m02.33s || -0m00.12s 0m02.15s | Specific/GF25519Reflective/Reified/GeModulus | 0m02.05s || +0m00.10s 0m01.98s | Util/WordUtil | 0m02.02s || -0m00.04s 0m01.96s | Assembly/Evaluables | 0m01.96s || +0m00.00s 0m01.88s | Specific/FancyMachine256/Core | 0m01.88s || +0m00.00s 0m01.77s | ModularArithmetic/Montgomery/ZBounded | 0m01.83s || -0m00.06s 0m01.58s | Specific/GF25519Reflective | 0m01.45s || +0m00.13s 0m01.54s | Specific/GF25519Reflective/Common | 0m01.50s || +0m00.04s 0m01.51s | ModularArithmetic/PrimeFieldTheorems | 0m01.44s || +0m00.07s 0m01.50s | Assembly/Compile | 0m01.50s || +0m00.00s 0m01.45s | ModularArithmetic/BarrettReduction/Z | 0m01.48s || -0m00.03s 0m01.28s | Reflection/Z/Syntax/Equality | 0m01.28s || +0m00.00s 0m01.26s | Experiments/Ed25519Extraction | 0m01.28s || -0m00.02s 0m01.24s | Assembly/Conversions | 0m01.12s || +0m00.11s 0m01.22s | Reflection/Z/Interpretations64/RelationsCombinations | 0m01.20s || +0m00.02s 0m01.21s | ModularArithmetic/ExtendedBaseVector | 0m01.15s || +0m00.06s 0m01.21s | Reflection/Z/Interpretations128/RelationsCombinations | 0m01.32s || -0m00.11s 0m01.20s | BaseSystem | 0m01.27s || -0m00.07s 0m01.12s | BoundedArithmetic/Double/Repeated/Proofs/Decode | 0m01.03s || +0m00.09s 0m01.10s | Specific/GF25519Reflective/CommonUnOpFEToZ | 0m01.11s || -0m00.01s 0m00.99s | Util/NumTheoryUtil | 0m01.03s || -0m00.04s 0m00.98s | Assembly/HL | 0m00.94s || +0m00.04s 0m00.96s | Assembly/LL | 0m01.00s || -0m00.04s 0m00.94s | Assembly/Pipeline | 0m00.90s || +0m00.03s 0m00.92s | BoundedArithmetic/Double/Proofs/LoadImmediate | 0m00.92s || +0m00.00s 0m00.88s | Specific/GF25519Reflective/Reified | 0m00.72s || +0m00.16s 0m00.83s | Karatsuba | 0m00.94s || -0m00.10s 0m00.82s | Util/IterAssocOp | 0m00.84s || -0m00.02s 0m00.82s | BoundedArithmetic/Double/Proofs/BitwiseOr | 0m00.99s || -0m00.17s 0m00.80s | BoundedArithmetic/X86ToZLikeProofs | 0m00.83s || -0m00.02s 0m00.79s | Assembly/PhoasCommon | 0m00.93s || -0m00.14s 0m00.76s | Specific/GF25519BoundedAddCoordinates | 0m00.79s || -0m00.03s 0m00.75s | ModularArithmetic/ModularBaseSystemList | 0m00.64s || +0m00.10s 0m00.72s | Encoding/ModularWordEncodingTheorems | 0m00.67s || +0m00.04s 0m00.72s | ModularArithmetic/PseudoMersenneBaseParamProofs | 0m00.67s || +0m00.04s 0m00.70s | Reflection/MapCastByDeBruijnInterp | 0m00.64s || +0m00.05s 0m00.68s | ModularArithmetic/ModularBaseSystem | 0m00.67s || +0m00.01s 0m00.67s | BoundedArithmetic/Interface | 0m00.64s || +0m00.03s 0m00.67s | Spec/EdDSA | 0m00.68s || -0m00.01s 0m00.65s | BoundedArithmetic/X86ToZLike | 0m00.55s || +0m00.09s 0m00.63s | ModularArithmetic/ExtPow2BaseMulProofs | 0m00.70s || -0m00.06s 0m00.61s | Encoding/ModularWordEncodingPre | 0m00.74s || -0m00.13s 0m00.61s | BoundedArithmetic/Double/Proofs/SelectConditional | 0m00.60s || +0m00.01s 0m00.60s | BoundedArithmetic/Double/Repeated/Proofs/Multiply | 0m00.68s || -0m00.08s 0m00.59s | Spec/ModularWordEncoding | 0m00.58s || +0m00.01s 0m00.56s | Util/NUtil | 0m00.58s || -0m00.01s 0m00.56s | BoundedArithmetic/Double/Repeated/Proofs/ShiftLeftRight | 0m00.48s || +0m00.08s 0m00.54s | BoundedArithmetic/Double/Repeated/Proofs/BitwiseOr | 0m00.45s || +0m00.09s 0m00.53s | BoundedArithmetic/Double/Repeated/Proofs/SelectConditional | 0m00.46s || +0m00.07s 0m00.53s | Reflection/MapCastByDeBruijnWf | 0m00.53s || +0m00.00s 0m00.50s | BoundedArithmetic/ArchitectureToZLike | 0m00.41s || +0m00.09s 0m00.50s | BoundedArithmetic/Double/Repeated/Core | 0m00.47s || +0m00.03s 0m00.50s | BoundedArithmetic/Eta | 0m00.44s || +0m00.06s 0m00.49s | BoundedArithmetic/Double/Repeated/Proofs/ShiftRightDoubleWordImmediate | 0m00.52s || -0m00.03s 0m00.49s | BoundedArithmetic/Double/Repeated/Proofs/RippleCarryAddSub | 0m00.56s || -0m00.07s 0m00.48s | BoundedArithmetic/Double/Core | 0m00.49s || -0m00.01s 0m00.48s | Reflection/Z/Interpretations128 | 0m00.45s || +0m00.02s 0m00.47s | BoundedArithmetic/Double/Repeated/Proofs/LoadImmediate | 0m00.50s || -0m00.03s 0m00.47s | ModularArithmetic/ModularBaseSystemListZOperationsProofs | 0m00.37s || +0m00.09s 0m00.46s | ModularArithmetic/PseudoMersenneBaseParams | 0m00.38s || +0m00.08s 0m00.46s | BoundedArithmetic/StripCF | 0m00.44s || +0m00.02s 0m00.46s | ModularArithmetic/Pre | 0m00.47s || -0m00.00s 0m00.46s | ModularArithmetic/ZBounded | 0m00.55s || -0m00.09s 0m00.45s | Reflection/Z/Reify | 0m00.48s || -0m00.02s 0m00.44s | ModularArithmetic/Montgomery/Z | 0m00.38s || +0m00.06s 0m00.42s | Reflection/Z/Interpretations64 | 0m00.42s || +0m00.00s 0m00.40s | ModularArithmetic/Pow2Base | 0m00.40s || +0m00.00s 0m00.40s | BoundedArithmetic/Double/Proofs/ShiftLeftRightTactic | 0m00.44s || -0m00.03s 0m00.39s | Reflection/Z/Syntax/Util | 0m00.38s || +0m00.01s 0m00.33s | Spec/ModularArithmetic | 0m00.43s || -0m00.09s 0m00.18s | Reflection/CommonSubexpressionElimination | 0m00.15s || +0m00.03s 0m00.05s | Util/Bool | 0m00.04s || +0m00.01s
Diffstat (limited to 'src/Util/ZUtil.v')
-rw-r--r--src/Util/ZUtil.v16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Util/ZUtil.v b/src/Util/ZUtil.v
index a9dcde3d9..07e9af549 100644
--- a/src/Util/ZUtil.v
+++ b/src/Util/ZUtil.v
@@ -1170,7 +1170,7 @@ Module Z.
refine (proj1 (@reflect_iff_gen _ _ lem b') _);
cbv beta iota.
- Ltac ltb_to_lt'_hyps_step :=
+ Ltac ltb_to_lt_hyps_step :=
match goal with
| [ H : (?x <? ?y) = ?b |- _ ]
=> ltb_to_lt_with_hyp H (Zlt_cases x y)
@@ -1183,7 +1183,7 @@ Module Z.
| [ H : (?x =? ?y) = ?b |- _ ]
=> ltb_to_lt_with_hyp H (eqb_cases x y)
end.
- Ltac ltb_to_lt'_goal_step :=
+ Ltac ltb_to_lt_goal_step :=
match goal with
| [ |- (?x <? ?y) = ?b ]
=> ltb_to_lt_in_goal b (Z.ltb_spec0 x y)
@@ -1196,13 +1196,13 @@ Module Z.
| [ |- (?x =? ?y) = ?b ]
=> ltb_to_lt_in_goal b (Z.eqb_spec x y)
end.
- Ltac ltb_to_lt'_step :=
- first [ ltb_to_lt'_hyps_step
- | ltb_to_lt'_goal_step ].
- Ltac ltb_to_lt' := repeat ltb_to_lt'_step.
+ Ltac ltb_to_lt_step :=
+ first [ ltb_to_lt_hyps_step
+ | ltb_to_lt_goal_step ].
+ Ltac ltb_to_lt := repeat ltb_to_lt_step.
Section R_Rb.
- Local Ltac t := intros ? ? []; split; intro; ltb_to_lt'; omega.
+ Local Ltac t := intros ? ? []; split; intro; ltb_to_lt; omega.
Local Notation R_Rb Rb R nR := (forall x y b, Rb x y = b <-> if b then R x y else nR x y).
Lemma ltb_lt_iff : R_Rb Z.ltb Z.lt Z.ge. Proof. t. Qed.
Lemma leb_le_iff : R_Rb Z.leb Z.le Z.gt. Proof. t. Qed.
@@ -1211,7 +1211,7 @@ Module Z.
Lemma eqb_eq_iff : R_Rb Z.eqb (@Logic.eq Z) (fun x y => x <> y). Proof. t. Qed.
End R_Rb.
Hint Rewrite ltb_lt_iff leb_le_iff gtb_gt_iff geb_ge_iff eqb_eq_iff : ltb_to_lt.
- Ltac ltb_to_lt :=
+ Ltac ltb_to_lt_in_context :=
repeat autorewrite with ltb_to_lt in *;
cbv beta iota in *.