New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Reflexive,Symmetric,Transitive,Antisymmetric,Asymmetric instances for Rle,Rge,Rlt,Rgt #18059
Conversation
1d9eda7
to
4b9efc2
Compare
@coqbot bench |
Got more than one checkSuite. |
Looks similar to #16873 which was forgotten! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not expert enough about instances though to tell if the level 10 is good or not.
@herbelin Do you want to assign? Maybe someone in @coq/typeclasses-maintainers or @coq/stdlib-maintainers can weigh in on the instance priorities? Automatic priorities are assigned to be the number of typeclass assumptions, so 10 will trigger quite late. As far as existing priorities go, we have
Really the thing we want here is #14126, to declare that these instances should only trigger when the relation is not an evar, but until we have that, giving a priority of anything above 5 seems reasonable. |
Is itauto broken everywhere? |
… for Rle,Rge,Rlt,Rgt This allows using tactics like `transitivity` on real inequality goals. Priority 10 is chosen arbitrarily amongst positive numbers (importantly, not 0, so that we don't resolve these instances first when we don't know the relation).
4b9efc2
to
0a1fc9f
Compare
@coqbot bench |
🏁 Bench results:
🐢 Top 25 slow downs┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SLOW DOWNS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 63.3940 64.4470 1.0530 1.66% 139 coq-fiat-parsers/src/Parsers/Refinement/SharpenedJSON.v.html │ │ 142.2520 143.0450 0.7930 0.56% 1190 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 42.4650 43.2120 0.7470 1.76% 995 coq-perennial/src/program_proof/vrsm/replica/apply_proof.v.html │ │ 17.7580 18.2090 0.4510 2.54% 31 coq-engine-bench-lite/coq/PerformanceDemos/pattern.v.html │ │ 28.4440 28.8830 0.4390 1.54% 12 coq-fourcolor/theories/job517to530.v.html │ │ 31.6230 32.0540 0.4310 1.36% 12 coq-fourcolor/theories/job563to588.v.html │ │ 34.8370 35.2560 0.4190 1.20% 12 coq-fourcolor/theories/job254to270.v.html │ │ 26.3080 26.7070 0.3990 1.52% 2293 coq-perennial/src/goose_lang/logical_reln_fund.v.html │ │ 0.0760 0.4600 0.3840 505.26% 1726 coq-perennial/src/program_proof/vrsm/configservice/config_proof.v.html │ │ 39.7470 40.1230 0.3760 0.95% 85 coq-fiat-crypto-with-bedrock/src/Curves/Montgomery/AffineProofs.v.html │ │ 27.2850 27.6450 0.3600 1.32% 12 coq-fourcolor/theories/job503to506.v.html │ │ 25.1840 25.5120 0.3280 1.30% 373 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 29.1250 29.4530 0.3280 1.13% 912 coq-perennial/src/program_proof/vrsm/reconfig/proof.v.html │ │ 0.5890 0.9160 0.3270 55.52% 200 coq-stdlib/Numbers/HexadecimalNat.v.html │ │ 22.4530 22.7630 0.3100 1.38% 12 coq-fourcolor/theories/job546to549.v.html │ │ 18.9670 19.2560 0.2890 1.52% 875 coq-perennial/src/program_proof/simple/setattr.v.html │ │ 27.0290 27.3140 0.2850 1.05% 823 coq-perennial/src/program_proof/aof/proof.v.html │ │ 12.9480 13.2300 0.2820 2.18% 1385 coq-perennial/src/program_proof/txn/twophase_sub_logical_reln_defs.v.html │ │ 1.3480 1.6210 0.2730 20.25% 937 coq-vst/veric/binop_lemmas2.v.html │ │ 24.0150 24.2880 0.2730 1.14% 1449 coq-unimath/UniMath/CategoryTheory/EnrichedCats/Examples/KleisliEnriched.v.html │ │ 0.7350 1.0030 0.2680 36.46% 32 coq-fiat-crypto-with-bedrock/src/PushButtonSynthesis/Primitives.v.html │ │ 14.1060 14.3640 0.2580 1.83% 315 coq-fiat-crypto-with-bedrock/src/Bedrock/Group/ScalarMult/MontgomeryLadder.v.html │ │ 0.2510 0.5080 0.2570 102.39% 1363 coq-stdlib/FSets/FMapAVL.v.html │ │ 54.8930 55.1330 0.2400 0.44% 609 coq-bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html │ │ 18.0480 18.2840 0.2360 1.31% 32 coq-performance-tests-lite/src/pattern.v.html │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 🐇 Top 25 speed ups┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SPEED UPS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 137.5340 136.3630 -1.1710 -0.85% 968 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 137.3260 136.1650 -1.1610 -0.85% 999 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 3.5760 2.7470 -0.8290 -23.18% 487 coq-stdlib/Numbers/HexadecimalFacts.v.html │ │ 55.4420 54.6880 -0.7540 -1.36% 609 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html │ │ 7.8450 7.1140 -0.7310 -9.32% 288 coq-perennial/src/program_proof/vrsm/paxos/becomeleader_proof.v.html │ │ 113.6950 113.1000 -0.5950 -0.52% 48 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html │ │ 40.3620 39.8970 -0.4650 -1.15% 827 coq-vst/veric/binop_lemmas4.v.html │ │ 1.5210 1.1270 -0.3940 -25.90% 853 coq-stdlib/FSets/FMapAVL.v.html │ │ 39.8290 39.4550 -0.3740 -0.94% 835 coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html │ │ 9.5930 9.2320 -0.3610 -3.76% 87 coq-engine-bench-lite/coq/PerformanceDemos/quadratic_reduction.v.html │ │ 162.2940 161.9620 -0.3320 -0.20% 233 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/DecodeByExtension.v.html │ │ 68.3590 68.0360 -0.3230 -0.47% 103 coq-fiat-crypto-with-bedrock/src/Arithmetic/BarrettReduction.v.html │ │ 22.9860 22.6780 -0.3080 -1.34% 233 coq-fiat-crypto-with-bedrock/src/Curves/EdwardsMontgomery.v.html │ │ 61.1510 60.8470 -0.3040 -0.50% 27 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html │ │ 45.9020 45.6050 -0.2970 -0.65% 558 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/insertionsort.v.html │ │ 23.3860 23.0910 -0.2950 -1.26% 660 coq-perennial/src/program_proof/vrsm/replica/roapply_proof.v.html │ │ 53.0960 52.8010 -0.2950 -0.56% 50 coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html │ │ 10.4640 10.1710 -0.2930 -2.80% 603 coq-unimath/UniMath/Algebra/GroupAction.v.html │ │ 5.3610 5.0680 -0.2930 -5.47% 369 coq-fiat-crypto-with-bedrock/src/Arithmetic/BinaryExtendedGCD.v.html │ │ 43.3120 43.0200 -0.2920 -0.67% 236 coq-rewriter-perf-SuperFast/src/Rewriter/Rewriter/Examples/PerfTesting/LiftLetsMap.v.html │ │ 15.8780 15.5880 -0.2900 -1.83% 417 coq-verdi-raft/raft-proofs/LeaderLogsLogMatchingProof.v.html │ │ 22.9290 22.6400 -0.2890 -1.26% 6 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/DecodeEncodeI.v.html │ │ 19.2870 19.0090 -0.2780 -1.44% 40 coq-fiat-crypto-with-bedrock/src/PushButtonSynthesis/SolinasReductionReificationCache.v.html │ │ 19.9070 19.6430 -0.2640 -1.33% 413 coq-perennial/src/program_proof/vrsm/replica/setstate_proof.v.html │ │ 11.2600 11.0030 -0.2570 -2.28% 55 coq-category-theory/Construction/Comma/Natural/Transformation.v.html │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
@coqbot merge now |
This allows using tactics like
transitivity
on real inequality goals. Priority 10 is chosen arbitrarily amongst positive numbers (importantly, not 0, so that we don't resolve these instances first when we don't know the relation).