Skip to content

Experiment: optimized representation for nat constants (a zarith Z.t values)#21729

Draft
SkySkimmer wants to merge 36 commits intorocq-prover:masterfrom
SkySkimmer:bignat
Draft

Experiment: optimized representation for nat constants (a zarith Z.t values)#21729
SkySkimmer wants to merge 36 commits intorocq-prover:masterfrom
SkySkimmer:bignat

Conversation

@SkySkimmer
Copy link
Contributor

The current state has some random TODOs and term matching (notation printing, ltac matching) is probably janky but is enough to have a look.

Prelude nat does not use the optimization (so CI should say nothing interesting), see new test file bignat for actual use of the optimization.

The optimization is similar to what agda https://agda.readthedocs.io/en/latest/language/built-ins.html#natural-numbers and lean https://lean-lang.org/doc/reference/latest/Basic-Types/Natural-Numbers/ have: closed nat values ("nat constants") can be represented by Nat of Z.t.

The cbv machine has optimized implementations for +/* on nat constants (the one for tail_mul is necessary to get large literals to work).

The VM produces values using the optimized representation but has no special handling for operators.

cclosure/lazy/cclosure-based conversion can handle inputs which contain the optimized representation but do not build larger values using it, ie 1 + 1 where 1 is optimized reduces to S 1 (which converts correctly to 2).
TBH I'm not sure how to do otherwise in a lazy/call by name setting, if we see 1 + e for some arbitrary expression e we should not reduce e (at least in weak head mode).

native_compute, cbn and reductionops do failwith "TODO" on optimized constants.
I think tacred treats optimized constants as opaque values but who knows what this code even is.

@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Mar 6, 2026
@ppedrot
Copy link
Member

ppedrot commented Mar 6, 2026

It's not because all your friends are jumping off a cliff that you should do it...

@SkySkimmer SkySkimmer force-pushed the bignat branch 3 times, most recently from 2cc50b3 to a76d28b Compare March 9, 2026 16:56
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Mar 9, 2026

🏁 Bench results:

┌──────────────┬───────────────────────┬─────────────────────────────────────┬───────────────────────┐
│              │     user time [s]     │          CPU instructions           │ max resident mem [KB] │
│              │                       │                                     │                       │
│ package_name │  NEW     OLD    PDIFF │      NEW            OLD       PDIFF │  NEW     OLD    PDIFF │
├──────────────┼───────────────────────┼─────────────────────────────────────┼───────────────────────┤
│ rocq-runtime │  75.22   75.09   0.17 │  546027531941   543871035719   0.40 │ 503636  502612   0.20 │
│    rocq-core │   6.66    6.61   0.76 │   40916498621    40932602505  -0.04 │ 449772  447256   0.56 │
│     coq-hott │ 158.39  157.03   0.87 │ 1062478940294  1061794961668   0.06 │ 455932  456860  -0.20 │
│     coq-core │   2.71    2.65   2.26 │   18340020235    18304472910   0.19 │  90840   89656   1.32 │
└──────────────┴───────────────────────┴─────────────────────────────────────┴───────────────────────┘

INFO: failed to install
rocq-stdlib (in NEW)
rocq-elpi (in NEW)

rocq-bignums (dependency rocq-stdlib failed)
coq-performance-tests-lite (dependency rocq-stdlib failed)
coq-engine-bench-lite (dependency rocq-stdlib failed)
rocq-mathcomp-boot (dependency rocq-elpi failed)
rocq-mathcomp-order (dependency rocq-elpi failed)
rocq-mathcomp-ssreflect (dependency rocq-elpi failed)
rocq-mathcomp-fingroup (dependency rocq-elpi failed)
rocq-mathcomp-algebra (dependency rocq-elpi failed)
rocq-mathcomp-solvable (dependency rocq-elpi failed)
rocq-mathcomp-field (dependency rocq-elpi failed)
rocq-mathcomp-character (dependency rocq-elpi failed)
coq-mathcomp-odd-order (dependency rocq-elpi failed)
coq-mathcomp-analysis (dependency rocq-elpi failed)
coq-math-classes (dependency rocq-stdlib failed)
coq-corn (dependency rocq-elpi failed)
coq-compcert (dependency rocq-stdlib failed)
rocq-equations (dependency rocq-stdlib failed)
rocq-metarocq-utils (dependency rocq-stdlib failed)
rocq-metarocq-common (dependency rocq-stdlib failed)
rocq-metarocq-template (dependency rocq-stdlib failed)
rocq-metarocq-pcuic (dependency rocq-stdlib failed)
rocq-metarocq-safechecker (dependency rocq-stdlib failed)
rocq-metarocq-erasure (dependency rocq-stdlib failed)
rocq-metarocq-translations (dependency rocq-stdlib failed)
coq-color (dependency rocq-stdlib failed)
coq-coqprime (dependency rocq-stdlib failed)
coq-coqutil (dependency rocq-stdlib failed)
coq-bedrock2 (dependency rocq-stdlib failed)
coq-rewriter (dependency rocq-stdlib failed)
coq-fiat-core (dependency rocq-stdlib failed)
coq-fiat-parsers (dependency rocq-stdlib failed)
coq-fiat-crypto-with-bedrock (dependency rocq-stdlib failed)
coq-unimath (dependency rocq-stdlib failed)
coq-coquelicot (dependency rocq-elpi failed)
coq-iris-examples (dependency rocq-stdlib failed)
coq-verdi (dependency rocq-stdlib failed)
coq-verdi-raft (dependency rocq-stdlib failed)
coq-fourcolor (dependency rocq-elpi failed)
coq-rewriter-perf-SuperFast (dependency rocq-stdlib failed)
coq-vst (dependency rocq-stdlib failed)
coq-category-theory (dependency rocq-stdlib failed)
coq-neural-net-interp-computed-lite (dependency rocq-stdlib failed)

🐢 Top 25 slow downs
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                            TOP 25 SLOW DOWNS                                            │
│                                                                                                         │
│   OLD      NEW     DIFF     %DIFF     Ln              FILE                                              │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  0.00824  0.0462  0.0380    460.97%   344  coq-hott/theories/Algebra/Rings/Localization.v.html          │
│  0.00436  0.0385  0.0341    782.10%    69  coq-hott/test/Algebra/Rings/Matrix.v.html                    │
│   0.0245  0.0578  0.0333    135.94%   185  coq-hott/theories/Algebra/AbSES/Pullback.v.html              │
│   0.0114  0.0446  0.0332    290.45%   382  coq-hott/theories/Algebra/AbSES/Pullback.v.html              │
│ 0.000116  0.0317  0.0316  27220.69%  1376  coq-hott/contrib/HoTTBookExercises.v.html                    │
│ 0.000642  0.0319  0.0312   4866.98%   418  coq-hott/theories/Algebra/AbGroups/TensorProduct.v.html      │
│   0.0319  0.0616  0.0297     92.99%   251  coq-hott/theories/Homotopy/HomotopyGroup.v.html              │
│   0.0567  0.0862  0.0295     52.08%   254  coq-hott/theories/Algebra/AbSES/PullbackFiberSequence.v.html │
│   0.0841   0.112  0.0274     32.62%   208  coq-hott/theories/Algebra/ooGroup.v.html                     │
│   0.0110  0.0375  0.0265    242.12%   240  coq-hott/theories/Algebra/Groups/GrpPullback.v.html          │
│   0.0260  0.0516  0.0256     98.56%   144  coq-hott/theories/Homotopy/HomotopyGroup.v.html              │
│ 0.000266  0.0224  0.0221   8307.14%   771  coq-hott/theories/Algebra/Groups/Group.v.html                │
│   0.0361  0.0554  0.0194     53.74%   807  coq-hott/theories/Algebra/AbGroups/TensorProduct.v.html      │
│  0.00172  0.0199  0.0182   1054.91%   171  coq-hott/theories/Homotopy/Join/Core.v.html                  │
│   0.0172  0.0353  0.0181    105.20%    85  coq-hott/theories/Homotopy/Bouquet.v.html                    │
│    0.590   0.608  0.0180      3.06%    82  coq-hott/theories/Categories/Adjoint/Pointwise.v.html        │
│   0.0273  0.0437  0.0164     60.31%   547  coq-hott/theories/WildCat/HomologicalAlgebra.v.html          │
│   0.0151  0.0311  0.0160    105.64%   414  coq-hott/theories/Homotopy/Wedge.v.html                      │
│   0.0823  0.0983  0.0160     19.49%    63  coq-hott/theories/Homotopy/PinSn.v.html                      │
│   0.0124  0.0282  0.0158    127.24%   537  coq-hott/theories/Algebra/Rings/Ring.v.html                  │
│    0.220   0.236  0.0156      7.08%   211  coq-hott/theories/Colimits/Colimit_Flattening.v.html         │
│  0.00935  0.0249  0.0156    166.83%   558  coq-hott/theories/WildCat/Products.v.html                    │
│   0.0275  0.0426  0.0151     54.71%   345  coq-hott/theories/Algebra/Groups/QuotientGroup.v.html        │
│ 0.000546  0.0150  0.0145   2656.23%   576  coq-hott/theories/Algebra/AbGroups/TensorProduct.v.html      │
│    0.595   0.609  0.0140      2.35%    34  coq-hott/theories/Homotopy/PinSn.v.html                      │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌───────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                         TOP 25 SPEED UPS                                          │
│                                                                                                   │
│  OLD      NEW      DIFF     %DIFF    Ln             FILE                                          │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│  0.553     0.351  -0.2020  -36.54%   296  coq-hott/theories/HIT/V.v.html                          │
│ 0.0423   0.00881  -0.0335  -79.17%   785  coq-hott/theories/Algebra/AbGroups/TensorProduct.v.html │
│ 0.0318  0.000076  -0.0317  -99.76%  1377  coq-hott/contrib/HoTTBookExercises.v.html               │
│ 0.0311  0.000427  -0.0306  -98.63%   304  coq-hott/theories/Algebra/AbGroups/TensorProduct.v.html │
│ 0.0285   0.00108  -0.0274  -96.20%   224  coq-hott/theories/Spaces/Spheres.v.html                 │
│ 0.0511    0.0238  -0.0273  -53.41%   519  coq-hott/theories/WildCat/HomologicalAlgebra.v.html     │
│ 0.0339   0.00711  -0.0268  -79.06%   421  coq-hott/theories/Algebra/Rings/Ring.v.html             │
│ 0.0321   0.00705  -0.0250  -78.02%   297  coq-hott/theories/WildCat/HomologicalAlgebra.v.html     │
│  0.129     0.104  -0.0245  -19.04%   312  coq-hott/theories/Algebra/Groups/QuotientGroup.v.html   │
│ 0.0495    0.0257  -0.0238  -48.05%   423  coq-hott/theories/Algebra/Rings/Localization.v.html     │
│ 0.0883    0.0646  -0.0237  -26.84%   137  coq-hott/theories/Algebra/AbGroups/AbPushout.v.html     │
│ 0.0693    0.0458  -0.0235  -33.91%   462  coq-hott/theories/Algebra/AbSES/Pullback.v.html         │
│ 0.0243   0.00156  -0.0227  -93.55%   225  coq-hott/theories/Homotopy/Join/JoinAssoc.v.html        │
│ 0.0272   0.00528  -0.0219  -80.57%   375  coq-hott/theories/Homotopy/Wedge.v.html                 │
│ 0.0294   0.00790  -0.0215  -73.09%   113  coq-hott/theories/WildCat/HomologicalAlgebra.v.html     │
│ 0.0264   0.00528  -0.0212  -80.03%   545  coq-hott/theories/Algebra/Groups/Group.v.html           │
│ 0.0249   0.00373  -0.0212  -85.03%   342  coq-hott/theories/Homotopy/Smash.v.html                 │
│ 0.0652    0.0446  -0.0206  -31.65%    89  coq-hott/test/Algebra/Rings/Matrix.v.html               │
│ 0.0210  0.000450  -0.0205  -97.85%   292  coq-hott/contrib/HoTTBookExercises.v.html               │
│ 0.0407    0.0203  -0.0204  -50.16%   233  coq-hott/theories/Algebra/AbSES/Pullback.v.html         │
│ 0.0891    0.0697  -0.0194  -21.74%   361  coq-hott/theories/Homotopy/Join/JoinAssoc.v.html        │
│ 0.0380    0.0209  -0.0171  -45.04%   310  coq-hott/theories/Homotopy/HomotopyGroup.v.html         │
│ 0.0264   0.00977  -0.0167  -63.02%   161  coq-hott/theories/Spaces/Spheres.v.html                 │
│ 0.0751    0.0595  -0.0156  -20.81%   949  coq-hott/theories/WildCat/Products.v.html               │
│ 0.0538    0.0390  -0.0148  -27.51%   149  coq-hott/theories/Homotopy/HomotopyGroup.v.html         │
└───────────────────────────────────────────────────────────────────────────────────────────────────┘

SkySkimmer added a commit to SkySkimmer/coq-elpi that referenced this pull request Mar 10, 2026
@SkySkimmer SkySkimmer added the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 10, 2026
@coqbot-app coqbot-app bot removed request: full CI Use this label when you want your next push to trigger a full CI. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. labels Mar 10, 2026
@rocq-prover rocq-prover deleted a comment from coqbot-app bot Mar 10, 2026
@SkySkimmer
Copy link
Contributor Author

@coqbot bench

@SkySkimmer SkySkimmer added the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 10, 2026
@coqbot-app coqbot-app bot removed the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 10, 2026
@SkySkimmer SkySkimmer added the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 10, 2026
@coqbot-app coqbot-app bot removed the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 10, 2026
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Mar 10, 2026

🏁 Bench results:

┌───────────────────────┬─────────────────────────┬───────────────────────────────────────┬─────────────────────────┐
│                       │      user time [s]      │           CPU instructions            │  max resident mem [KB]  │
│                       │                         │                                       │                         │
│     package_name      │   NEW      OLD    PDIFF │      NEW             OLD        PDIFF │   NEW      OLD    PDIFF │
├───────────────────────┼─────────────────────────┼───────────────────────────────────────┼─────────────────────────┤
│ coq-engine-bench-lite │  120.55   128.33  -6.06 │   878880768616    962018805172  -8.64 │ 1108868  1008144   9.99 │
│             rocq-elpi │   16.22    16.29  -0.43 │   114566110662    114369863509   0.17 │  580796   580908  -0.02 │
│         coq-fiat-core │   55.70    55.69   0.02 │   337217180999    338397552841  -0.35 │  482248   484416  -0.45 │
│             rocq-core │    6.83     6.82   0.15 │    40917305178     40924172406  -0.02 │  446944   447168  -0.05 │
│      coq-math-classes │   83.79    83.37   0.50 │   507360035422    507741740015  -0.08 │  514956   515792  -0.16 │
│           rocq-stdlib │  439.84   437.53   0.53 │  1563617480391   1568238688157  -0.29 │  680688   648620   4.94 │
│          rocq-runtime │   75.40    74.89   0.68 │   546023923557    543941109013   0.38 │  503984   503552   0.09 │
│          coq-coqprime │   54.07    53.54   0.99 │   368779951977    365000717045   1.04 │  828040   826032   0.24 │
│          rocq-bignums │   25.59    25.33   1.03 │   162639223344    162782838985  -0.09 │  461184   460108   0.23 │
│              coq-hott │  159.37   157.46   1.21 │  1068507545979   1067536254330   0.09 │  458512   467200  -1.86 │
│           coq-unimath │ 1842.87  1814.89   1.54 │ 15181875534153  15173718510347   0.05 │ 1060084  1060256  -0.02 │
│              coq-core │    2.81     2.59   8.49 │    18372117817     18306164399   0.36 │   91264    89880   1.54 │
└───────────────────────┴─────────────────────────┴───────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
coq-performance-tests-lite (in NEW)
rocq-mathcomp-boot (in NEW)
coq-corn (in NEW)
coq-compcert (in NEW)
rocq-equations (in NEW)
coq-color (in NEW)
coq-coqutil (in NEW)
coq-rewriter (in NEW)
coq-fiat-parsers (in NEW)
coq-iris-examples (dependency install failed in NEW)
coq-verdi (in NEW)
coq-neural-net-interp-computed-lite (in NEW)

rocq-mathcomp-order (dependency rocq-mathcomp-boot failed)
rocq-mathcomp-ssreflect (dependency rocq-mathcomp-boot failed)
rocq-mathcomp-fingroup (dependency rocq-mathcomp-boot failed)
rocq-mathcomp-algebra (dependency rocq-mathcomp-boot failed)
rocq-mathcomp-solvable (dependency rocq-mathcomp-boot failed)
rocq-mathcomp-field (dependency rocq-mathcomp-boot failed)
rocq-mathcomp-character (dependency rocq-mathcomp-boot failed)
coq-mathcomp-odd-order (dependency rocq-mathcomp-boot failed)
coq-mathcomp-analysis (dependency rocq-mathcomp-boot failed)
rocq-metarocq-utils (dependency rocq-equations failed)
rocq-metarocq-common (dependency rocq-equations failed)
rocq-metarocq-template (dependency rocq-equations failed)
rocq-metarocq-pcuic (dependency rocq-equations failed)
rocq-metarocq-safechecker (dependency rocq-equations failed)
rocq-metarocq-erasure (dependency rocq-equations failed)
rocq-metarocq-translations (dependency rocq-equations failed)
coq-bedrock2 (dependency coq-coqutil failed)
coq-fiat-crypto-with-bedrock (dependency coq-rewriter failed)
coq-coquelicot (dependency rocq-mathcomp-boot failed)
coq-verdi-raft (dependency coq-verdi failed)
coq-fourcolor (dependency rocq-mathcomp-boot failed)
coq-rewriter-perf-SuperFast (dependency coq-rewriter failed)
coq-vst (dependency coq-compcert failed)
coq-category-theory (dependency rocq-equations failed)

🐢 Top 25 slow downs
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                            TOP 25 SLOW DOWNS                                                            │
│                                                                                                                                         │
│  OLD     NEW    DIFF    %DIFF   Ln                     FILE                                                                             │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│   26.0   26.7  0.7291    2.80%  374  coq-unimath/UniMath/ModelCategories/Generated/LNWFSMonoidalStructure.v.html                        │
│   26.0   26.7  0.7227    2.78%  375  coq-unimath/UniMath/ModelCategories/Generated/LNWFSMonoidalStructure.v.html                        │
│   12.4   12.9  0.4713    3.79%  930  coq-unimath/UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/ExponentialEqs.v.html              │
│   1.08   1.48  0.4010   37.19%  572  rocq-stdlib/theories/MSets/MSetAVL.v.html                                                          │
│   7.27   7.60  0.3268    4.50%  602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│   8.68   9.00  0.3218    3.71%  950  coq-unimath/UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/ExponentialEqs.v.html              │
│   6.94   7.25  0.3126    4.51%  604  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│   8.38   8.70  0.3114    3.71%  648  coq-unimath/UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/ExponentialEqs.v.html              │
│ 0.0854  0.388  0.3025  354.46%  558  rocq-stdlib/theories/Numbers/HexadecimalFacts.v.html                                               │
│  0.272  0.572  0.3008  110.80%  586  rocq-stdlib/theories/Strings/Byte.v.html                                                           │
│  0.530  0.821  0.2904   54.78%  829  rocq-stdlib/theories/setoid_ring/Ring_polynom.v.html                                               │
│  0.329  0.613  0.2844   86.50%  141  rocq-stdlib/theories/Strings/Ascii.v.html                                                          │
│   7.26   7.53  0.2744    3.78%  663  coq-unimath/UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/ExponentialEqs.v.html              │
│ 0.0810  0.337  0.2564  316.43%  677  rocq-stdlib/theories/MSets/MSetRBT.v.html                                                          │
│ 0.0442  0.297  0.2525  571.74%  549  rocq-stdlib/theories/Numbers/HexadecimalFacts.v.html                                               │
│  0.255  0.499  0.2441   95.86%  719  rocq-stdlib/theories/MSets/MSetRBT.v.html                                                          │
│   48.9   49.1  0.2394    0.49%  376  coq-unimath/UniMath/ModelCategories/Generated/LNWFSMonoidalStructure.v.html                        │
│   4.71   4.95  0.2373    5.04%  260  coq-unimath/UniMath/CategoryTheory/Monoidal/RezkCompletion/LiftedMonoidal.v.html                   │
│ 0.0472  0.272  0.2246  475.83%  536  rocq-stdlib/theories/Numbers/HexadecimalFacts.v.html                                               │
│   6.65   6.87  0.2166    3.26%  831  coq-unimath/UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/ExponentialEqs.v.html              │
│  0.361  0.573  0.2121   58.69%  637  rocq-stdlib/theories/MSets/MSetRBT.v.html                                                          │
│  0.265  0.476  0.2114   79.91%  707  rocq-stdlib/theories/MSets/MSetList.v.html                                                         │
│  0.279  0.481  0.2016   72.19%   19  rocq-stdlib/theories/ZArith/Int.v.html                                                             │
│ 0.0846  0.285  0.2006  236.98%   20  rocq-stdlib/theories/Vectors/Bvector.v.html                                                        │
│   16.7   16.9  0.1999    1.19%  905  coq-unimath/UniMath/ModelCategories/Generated/LNWFSCocomplete.v.html                               │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                               TOP 25 SPEED UPS                                               │
│                                                                                                              │
│  OLD    NEW     DIFF     %DIFF    Ln                FILE                                                     │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  10.1    7.96  -2.1417  -21.19%   214  coq-engine-bench-lite/coq/PerformanceDemos/one_step_reduction.v.html  │
│  9.94    7.82  -2.1174  -21.30%   325  coq-engine-bench-lite/coq/PerformanceDemos/one_step_reduction.v.html  │
│  1.35  0.0993  -1.2522  -92.65%     8  coq-engine-bench-lite/coq/PerformanceDemos/repeated_conj.v.html       │
│  2.31    1.60  -0.7076  -30.67%     8  coq-engine-bench-lite/coq/PerformanceDemos/repeated_conj.v.html       │
│  3.35    2.70  -0.6466  -19.32%   109  coq-engine-bench-lite/coq/PerformanceDemos/one_step_reduction.v.html  │
│ 0.753   0.407  -0.3459  -45.96%  1604  rocq-stdlib/theories/micromega/Tauto.v.html                           │
│ 0.584   0.238  -0.3459  -59.21%    14  rocq-stdlib/theories/setoid_ring/Ring_polynom.v.html                  │
│  2.58    2.25  -0.3312  -12.81%   212  rocq-stdlib/theories/setoid_ring/Ncring_tac.v.html                    │
│  1.21   0.876  -0.3307  -27.42%   816  rocq-stdlib/theories/MSets/MSetRBT.v.html                             │
│ 0.357  0.0450  -0.3116  -87.39%     6  coq-engine-bench-lite/coq/PerformanceDemos/repeated_conj.v.html       │
│ 0.859   0.549  -0.3103  -36.13%   206  rocq-stdlib/theories/setoid_ring/Ncring_tac.v.html                    │
│  1.44    1.13  -0.3044  -21.15%   200  rocq-stdlib/theories/Numbers/HexadecimalNat.v.html                    │
│ 0.530   0.243  -0.2872  -54.17%    11  rocq-stdlib/theories/QArith/Qcanon.v.html                             │
│  21.9    21.7  -0.2607   -1.19%   651  rocq-stdlib/theories/Zmod/ZmodBase.v.html                             │
│ 0.484   0.228  -0.2564  -52.94%   283  rocq-stdlib/theories/Numbers/HexadecimalPos.v.html                    │
│ 0.615   0.371  -0.2446  -39.73%   596  rocq-stdlib/theories/Strings/Byte.v.html                              │
│  18.6    18.4  -0.2341   -1.26%    31  coq-engine-bench-lite/coq/PerformanceDemos/pattern.v.html             │
│ 0.631   0.413  -0.2178  -34.51%     6  coq-engine-bench-lite/coq/PerformanceDemos/repeated_conj.v.html       │
│ 0.347   0.135  -0.2120  -61.04%   141  rocq-stdlib/theories/Numbers/DecimalNat.v.html                        │
│ 0.866   0.667  -0.1987  -22.95%    41  rocq-stdlib/theories/ZArith/Zdiv_facts.v.html                         │
│ 0.392   0.194  -0.1985  -50.60%   170  coq-engine-bench-lite/coq/PerformanceDemos/quadratic_reduction.v.html │
│ 0.660   0.462  -0.1982  -30.02%    83  rocq-stdlib/theories/Numbers/Cyclic/Int63/Sint63.v.html               │
│ 0.574   0.378  -0.1955  -34.06%  1161  rocq-stdlib/theories/Strings/Byte.v.html                              │
│ 0.469   0.283  -0.1857  -39.61%   678  rocq-stdlib/theories/Numbers/HexadecimalFacts.v.html                  │
│ 0.336   0.155  -0.1817  -54.01%    35  rocq-stdlib/theories/MSets/MSetRBT.v.html                             │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@SkySkimmer
Copy link
Contributor Author

@coqbot ci minimize ci-mathcomp

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Mar 10, 2026

I am now running minimization at commit a7c9de2 on requested target ci-mathcomp. I'll come back to you with the results once it's done.

@SkySkimmer SkySkimmer added the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 10, 2026
SkySkimmer added a commit to SkySkimmer/Coq-Equations that referenced this pull request Mar 10, 2026
@coqbot-app coqbot-app bot removed the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 10, 2026
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Mar 10, 2026

Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/mathcomp/boot/ssrnat.v in 27m 31s (from ci-mathcomp) (full log on GitHub Actions - verbose log)

We are collecting data on the user experience of the Coq Bug Minimizer.
If you haven't already filled the survey for this PR, please fill out our short survey!

🌟 Minimized Coq File (consider adding this file to the test-suite)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "+duplicate-clear" "-w" "+non-primitive-record" "-w" "+undeclared-scope" "-w" "+deprecated-hint-without-locality" "-w" "+deprecated-hint-rewrite-without-locality" "-w" "-projection-no-head-constant" "-w" "-redundant-canonical-projection" "-w" "-notation-overridden" "-w" "-ambiguous-paths" "-w" "-elpi.add-const-for-axiom-or-sectionvar" "-w" "-mathcomp-subset-itv" "-w" "+level-tolerance" "-w" "-notation-for-abbreviation" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/mathcomp" "mathcomp" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/HB" "HB" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Ltac2" "Ltac2" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/elpi" "elpi" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/elpi_elpi" "elpi_elpi" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/elpi_examples" "elpi_examples" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/mathcomp" "-top" "mathcomp.boot.ssrnat") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 2161 lines to 47 lines, then from 61 lines to 1170 lines, then from 1177 lines to 75 lines, then from 89 lines to 147 lines, then from 154 lines to 80 lines *)
(* coqc version 9.3+alpha compiled with OCaml 4.14.2
   coqtop version 9.3+alpha
   Expected coqc runtime on this file: 0.308 sec
   Expected coqc peak memory usage on this file: 407356.0 kb *)
Require Corelib.ssr.ssrbool.
Require mathcomp.boot.ssrfun.
Require HB.structures.
Export Corelib.ssr.ssrbool.
Module Export mathcomp.
Module Export boot.
Module Export ssrbool.
End ssrbool.

Module mathcomp_DOT_boot_DOT_eqtype_WRAPPED.
Module Export eqtype.

Import HB.structures.
Import mathcomp.boot.ssrfun.

Set Implicit Arguments.

Definition eq_axiom T (e : rel T) := forall x y, reflect (x = y) (e x y).

HB.mixin Record hasDecEq T := { eq_op : rel T; eqP : eq_axiom eq_op }.

#[mathcomp(axiom="eq_axiom"), short(type="eqType")]
HB.structure Definition Equality := { T of hasDecEq T }.

Notation "x == y" := (eq_op x y) (no associativity) : bool_scope.

Module Type EqTypePredSig.
End EqTypePredSig.
Module MakeEqTypePred (eqmod : EqTypePredSig).
End MakeEqTypePred.

End eqtype.

End mathcomp_DOT_boot_DOT_eqtype_WRAPPED.
Include mathcomp_DOT_boot_DOT_eqtype_WRAPPED.eqtype.
Import HB.structures.
Import mathcomp.boot.ssreflect.
Import mathcomp.boot.ssrfun.
Import mathcomp.boot.ssrbool.

Notation succn := Datatypes.S.

Notation "n .+1" := (succn n) (left associativity, format "n .+1") : nat_scope.

Fixpoint eqn m n {struct m} :=
  match m, n with
  | 0, 0 => true
  | m'.+1, n'.+1 => eqn m' n'
  | _, _ => false
  end.

Lemma eqnP : Equality.axiom eqn.
Admitted.

HB.instance Definition _ := hasDecEq.Build nat eqnP.

Definition addn := plus.

Lemma addn0 : right_id 0 addn.
Admitted.

Definition leq m n := m - n == 0.

Notation "m <= n" := (leq m n) : nat_scope.
Notation "m >= n" := (n <= m) (only parsing) : nat_scope.

Section ExMinn.

Variable P : pred nat.
Hypothesis exP : exists n, P n.

Inductive acc_nat i : Prop := AccNat0 of P i | AccNatS of acc_nat i.+1.

Lemma find_ex_minn : {m | P m & forall n, P n -> n >= m}.
Proof.
have: forall n, P n -> n >= 0 by [].
have: acc_nat 0.
  case exP => n; rewrite -(addn0 n); elim: n 0 => [|n IHn] j; first by left.
🛠️ Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted)
🛠️ 📜 Intermediate Coq File log (useful for debugging if minimization did not go as far as you wanted)
📜 Build Log (contains the Coq error message) (truncated to last 8.0KiB; full 4.2MiB file on GitHub Actions Artifacts under build.log)
space/builds/coq /github/workspace
++ set +x
+ CI_NAME=mathcomp
+ CI_SCRIPT=scripts/ci-mathcomp.sh
+ log_file=_build_ci/mathcomp.log
+++ dirname dev/ci/ci-wrapper.sh
++ cd dev/ci
++ pwd
+ DIR=/github/workspace/builds/coq/coq-failing/dev/ci
+ cd /github/workspace/builds/coq/coq-failing/dev/ci/../..
+ mkdir -p _build_ci
+ export TIMED=1
+ TIMED=1
+ '[' '' ']'
+ '[' -t 1 ']'
+ '[' '' ']'
+ COQ_CI_COLOR=
+ export GIT_PAGER=
+ GIT_PAGER=
+ '[' '' = 1 ']'
+ '[' '' = 1 ']'
+ bash /github/workspace/builds/coq/coq-failing/dev/ci/scripts/ci-mathcomp.sh
+ tee _build_ci/mathcomp.log
++ set -e
++ : 2
++ export NJOBS
+++ dirname /github/workspace/builds/coq/coq-failing/dev/ci/scripts/ci-common.sh
++ . /github/workspace/builds/coq/coq-failing/dev/ci/scripts/../ci-env.sh
+++ which cygpath
+++ OCAMLFINDSEP=:
+++ '[' /github/workspace/builds/coq/coq-failing/dev/ci/scripts/../ci-env.sh ']'
++++ dirname /github/workspace/builds/coq/coq-failing/dev/ci/scripts/../ci-env.sh
+++ root=/github/workspace/builds/coq/coq-failing/dev/ci/scripts/../../..
++++ cd /github/workspace/builds/coq/coq-failing/dev/ci/scripts/../../..
++++ echo /builds/coq/coq
+++ root=/builds/coq/coq
+++ '[' -n 1 ']'
+++ export COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin
+++ COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin
+++ export OCAMLPATH=/github/workspace/builds/coq/coq-failing/_install_ci/lib:
+++ OCAMLPATH=/github/workspace/builds/coq/coq-failing/_install_ci/lib:
+++ export PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.14.2+flambda/bin:/github/workspace/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.14.2+flambda/bin:/github/workspace/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ CI_INSTALL_DIR=/github/workspace/builds/coq/coq-failing/_install_ci
+++ export CI_BRANCH=
+++ CI_BRANCH=
+++ [[ '' =~ ^[0-9]*$ ]]
+++ export CI_PULL_REQUEST=
+++ CI_PULL_REQUEST=
+++ export PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.14.2+flambda/bin:/github/workspace/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.14.2+flambda/bin:/github/workspace/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin/
+++ COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin/
++ CI_BUILD_DIR=/github/workspace/builds/coq/coq-failing/_build_ci
++ declare -A overlays
++ set +x
+ git_download mathcomp
+ local project=mathcomp
+ local dest=/github/workspace/builds/coq/coq-failing/_build_ci/mathcomp
+ local giturl_var=mathcomp_CI_GITURL
+ local giturl=https://github.com/math-comp/math-comp
+ local ref_var=mathcomp_CI_REF
+ local ref=master
+ local parent_project_var=mathcomp_CI_PARENT_PROJECT
+ local parent_project=
+ local submodule_folder_var=mathcomp_CI_SUBMODULE_FOLDER
+ local submodule_folder=
+ local ov_url=
+ local ov_ref=
++ dirname /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp
+ local dest_prefix=/github/workspace/builds/coq/coq-failing/_build_ci/
+ '[' '' = '' ']'
+ local parent_project_dest=/github/workspace/builds/coq/coq-failing/_build_ci/
+ local parent_project_relative_dest=
+ '[' -d /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp ']'
+ echo 'Warning: download and unpacking of mathcomp skipped because /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp already exists.'
Warning: download and unpacking of mathcomp skipped because /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp already exists.
+ '[' '' ']'
+ cd /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp
+ make
+ '[' -z x ']'
+ command make
"/github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq" makefile  -f Make -o Makefile.coq
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
         [deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
         use ROCQRUNTIMELIB instead.
         [deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
make -f Makefile.coq --no-print-directory
ROCQ compile boot/ssrnat.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: '' 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w +duplicate-clear -w +non-primitive-record -w +undeclared-scope -w +deprecated-hint-without-locality -w +deprecated-hint-rewrite-without-locality -w -projection-no-head-constant -w -redundant-canonical-projection -w -notation-overridden -w -ambiguous-paths -w -elpi.add-const-for-axiom-or-sectionvar -w -mathcomp-subset-itv -w +level-tolerance -w -notation-for-abbreviation -w -deprecated-native-compiler-option -native-compiler ondemand -I /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp -R /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp mathcomp boot/ssrnat.v 
MINIMIZER_DEBUG_EXTRA: coqpath: 
MINIMIZER_DEBUG_EXTRA: ocamlpath: /github/workspace/builds/coq/coq-failing/_install_ci/lib:
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/mathcomp
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w +duplicate-clear -w +non-primitive-record -w +undeclared-scope -w +deprecated-hint-without-locality -w +deprecated-hint-rewrite-without-locality -w -projection-no-head-constant -w -redundant-canonical-projection -w -notation-overridden -w -ambiguous-paths -w -elpi.add-const-for-axiom-or-sectionvar -w -mathcomp-subset-itv -w +level-tolerance -w -notation-for-abbreviation -w -deprecated-native-compiler-option -native-compiler ondemand -I /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp -R /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp mathcomp boot/ssrnat.v 
MINIMIZER_DEBUG_EXTRA: coqlib: Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.2zZLW4nrWO
MINIMIZER_DEBUG: files:  boot/ssrnat.v /github/workspace/builds/coq/coq-failing/_build_ci/mathcomp/boot/ssrnat.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./boot/ssrnat.v", line 988, characters 37-60:
Error: Conversion test raised an anomaly:
Anomaly
"File "kernel/cClosure.ml", line 2033, characters 4-10: Assertion failed."
Please report at http://rocq-prover.org/bugs/.

Command exited with non-zero status 1
boot/ssrnat.vo (real: 1.04, user: 0.62, sys: 0.09, mem: 428088 ko)
make[2]: *** [Makefile.coq:815: boot/ssrnat.vo] Error 1
make[2]: *** [boot/ssrnat.vo] Deleting file 'boot/ssrnat.glob'
make[1]: *** [Makefile.coq:411: all] Error 2
make: *** [Makefile.common:99: this-build] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' mathcomp 2
+ '[' mathcomp '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real _build_ci/mathcomp.log
    Time |  Peak Mem | File Name            
--------------------------------------------
0m01.04s | 428088 ko | Total Time / Peak Mem
--------------------------------------------
0m01.04s | 428088 ko | boot/ssrnat.vo       
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 5.1MiB file on GitHub Actions Artifacts under bug.log)
y coq-bug-minimizer from %(old_header)s, then from %(original_line_count)d lines to %(final_line_count)d lines *)', 'strip_trailing_space': True, 'timeout': -1, 'passing_timeout': -1, 'minimize_before_inlining': True, 'save_typeclasses': False, 'admit_opaque': True, 'admit_obligations': True, 'aggressive': True, 'admit_transparent': True, 'coqtop_args': ('-q', '-w', '+duplicate-clear', '-w', '+non-primitive-record', '-w', '+undeclared-scope', '-w', '+deprecated-hint-without-locality', '-w', '+deprecated-hint-rewrite-without-locality', '-w', '-projection-no-head-constant', '-w', '-redundant-canonical-projection', '-w', '-notation-overridden', '-w', '-ambiguous-paths', '-w', '-elpi.add-const-for-axiom-or-sectionvar', '-w', '-mathcomp-subset-itv', '-w', '+level-tolerance', '-w', '-notation-for-abbreviation', '-w', '-deprecated-native-compiler-option', '-native-compiler', 'ondemand', '-coqlib', '/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//', '-R', '/github/workspace/builds/coq/coq-failing/_build_ci/mathcomp', 'mathcomp', '-Q', '/github/workspace/cwd', 'Top', '-Q', '/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/HB', 'HB', '-Q', '/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Ltac2', 'Ltac2', '-Q', '/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/elpi', 'elpi', '-Q', '/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/elpi_elpi', 'elpi_elpi', '-Q', '/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/elpi_examples', 'elpi_examples', '-I', '/github/workspace/builds/coq/coq-failing/_build_ci/mathcomp', '-top', 'mathcomp.boot.ssrnat'), 'chk': False, 'coqchk': None, 'passing_coqchk': None, 'coqchk_args': (), 'passing_coqchk_args': (), 'passing_coqc_args': ('-q', '-w', '+duplicate-clear', '-w', '+non-primitive-record', '-w', '+undeclared-scope', '-w', '+deprecated-hint-without-locality', '-w', '+deprecated-hint-rewrite-without-locality', '-w', '-projection-no-head-constant', '-w', '-redundant-canonical-projection', '-w', '-notation-overridden', '-w', '-ambiguous-paths', '-w', '-elpi.add-const-for-axiom-or-sectionvar', '-w', '-mathcomp-subset-itv', '-w', '+level-tolerance', '-w', '-notation-for-abbreviation', '-w', '-deprecated-native-compiler-option', '-native-compiler', 'ondemand', '-coqlib', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq//', '-R', '/github/workspace/builds/coq/coq-passing/_build_ci/mathcomp', 'mathcomp', '-Q', '/github/workspace/cwd', 'Top', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/HB', 'HB', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/Ltac2', 'Ltac2', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi', 'elpi', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi_elpi', 'elpi_elpi', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi_examples', 'elpi_examples', '-I', '/github/workspace/builds/coq/coq-passing/_build_ci/mathcomp', '-top', 'mathcomp.boot.ssrnat'), 'passing_coqtop_args': ('-q', '-w', '+duplicate-clear', '-w', '+non-primitive-record', '-w', '+undeclared-scope', '-w', '+deprecated-hint-without-locality', '-w', '+deprecated-hint-rewrite-without-locality', '-w', '-projection-no-head-constant', '-w', '-redundant-canonical-projection', '-w', '-notation-overridden', '-w', '-ambiguous-paths', '-w', '-elpi.add-const-for-axiom-or-sectionvar', '-w', '-mathcomp-subset-itv', '-w', '+level-tolerance', '-w', '-notation-for-abbreviation', '-w', '-deprecated-native-compiler-option', '-native-compiler', 'ondemand', '-coqlib', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq//', '-R', '/github/workspace/builds/coq/coq-passing/_build_ci/mathcomp', 'mathcomp', '-Q', '/github/workspace/cwd', 'Top', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/HB', 'HB', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/Ltac2', 'Ltac2', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi', 'elpi', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi_elpi', 'elpi_elpi', '-Q', '/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi_examples', 'elpi_examples', '-I', '/github/workspace/builds/coq/coq-passing/_build_ci/mathcomp', '-top', 'mathcomp.boot.ssrnat'), 'passing_coqc': ('/github/workspace/builds/coq/coq-passing/_install_ci/bin/coqc.orig',), 'passing_coqtop': ('/github/workspace/builds/coq/coq-passing/_install_ci/bin/coqtop.orig',), 'nonpassing_ocamlpath': '/github/workspace/builds/coq/coq-failing/_install_ci/lib:', 'passing_ocamlpath': '/github/workspace/builds/coq/coq-passing/_install_ci/lib:', 'passing_base_dir': '/github/workspace/builds/coq/coq-failing/_build_ci/mathcomp', 'base_dir': '/github/workspace/builds/coq/coq-failing/_build_ci/mathcomp', 'strict_whitespace': False, 'temp_file_name': '/github/workspace/cwd/tmp.v', 'temp_file_log_name': '/github/workspace/cwd/tmp.log', 'min_inline_timeout': 3, 'default_timeout': 1, 'coqc_is_coqtop': False, 'passing_coqc_is_coqtop': False, 'passing_coqpath_paths': ['/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib'], 'yes': True, 'color_on': True, 'inline_failure_libnames': [], 'parse_with': 'prefer-passing', 'split_oneline_definitions': True, 'verbose_include_failure_warning': True, 'extra_verbose_prefix': '::warning::', 'extra_verbose_newline': '%0A', 'should_succeed': False, 'remove_useless_option_settings': False, 'remove_modules': True, 'remove_sections': True, 'remove_comments': True, 'normalize_requires': True, 'recursive_requires_explicit': True, 'lift_requires_and_custom_entry_declarations': True, 'insert_options_when_lifting_requires': True, 'split_requires': True, 'remove_hints': True, 'remove_empty_sections': True, 'remove_abort': True, 'remove_ltac': True, 'remove_section_variables': True, 'try_sort_requires_by_component': True, 'prefer_inline_via_include': True, 'export_modules': True, 'split_imports': True, 'add_proof_using': True, 'add_proof_using_before_admit': False, 'prefer_final_proof_using': False, 'remove_non_definitions': False, 'max_mem_rss': None, 'max_mem_as': None, 'max_mem_rss_multiplier': None, 'max_mem_as_multiplier': None, 'cgroup': None, 'mem_limit_method': 'prlimit', 'remove_temp_file': False, '_CoqProject': [], '_CoqProject_v_files': [], '_CoqProject_unknown': [], 'passing_libnames': [('/github/workspace/builds/coq/coq-passing/_build_ci/mathcomp', 'mathcomp')], 'passing_non_recursive_libnames': [('/github/workspace/cwd', 'Top'), ('/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/HB', 'HB'), ('/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/Ltac2', 'Ltac2'), ('/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi', 'elpi'), ('/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi_elpi', 'elpi_elpi'), ('/github/workspace/builds/coq/coq-passing/_install_ci/lib/coq///user-contrib/elpi_examples', 'elpi_examples')], 'passing_ocaml_dirnames': ['/github/workspace/builds/coq/coq-passing/_build_ci/mathcomp'], 'passing__CoqProject': [], 'passing__CoqProject_v_files': [], 'passing__CoqProject_unknown': [], 'inlined_requires': {'mathcomp.boot.eqtype', 'HB.structures', 'mathcomp.boot.ssrbool'}, 'error_reg_string': 'File "[^"]+", line ([0-9-]+), characters [0-9-]+:\n(Error:\\s+Conversion\\s+test\\s+raised\\s+an\\s+anomaly:\\sAnomaly\\s"File\\s+"kernel/cClosure\\.ml",\\s+line\\s+[\\d]+,\\s+characters\\s+[\\d]+\\-[\\d]+:\\s+Assertion\\s+failed\\."\\sPlease\\s+report\\s+at\\s+http://rocq\\-prover\\.org/bugs/\\.)'}
    libname = 'HB.structures'
    loc = 'HB.structures'
    ref = (3589, 3597, 'HB.structures', 'nomsg', 'def')
    start = 3589
    transform_base = <function get_file_as_bytes.<locals>.<lambda> at 0x7fcef7db6020>
    ty = 'def'
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbb in position 0: invalid start byte

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross).
If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

@Janno
Copy link
Contributor

Janno commented Mar 10, 2026

It's not because all your friends are jumping off a cliff that you should do it...

I think this saying does not apply to performance cliffs.

TBH I'm not sure how to do otherwise in a lazy/call by name setting, if we see 1 + e for some arbitrary expression e we should not reduce e (at least in weak head mode).

I was expecting changes in mkApp that would check if the head of the application is the successor of a #[primitive_nat] inductive. If so, mkApp checks the argument and if that is an optimized value of the same inductive, mkApp returns the argument incremented by one. (It might be cheaper to reverse the order of checks.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants