Skip to content

Defunctionalize the proof term in Rewrite internals.#22046

Open
ppedrot wants to merge 2 commits into
rocq-prover:masterfrom
ppedrot:rewrite-defunctionalize-proof
Open

Defunctionalize the proof term in Rewrite internals.#22046
ppedrot wants to merge 2 commits into
rocq-prover:masterfrom
ppedrot:rewrite-defunctionalize-proof

Conversation

@ppedrot

@ppedrot ppedrot commented May 22, 2026

Copy link
Copy Markdown
Member

This is mostly about moving code around so as to obtain an explicit representation of the rewrite proof as an inductive type rather than through term generation spread around the setoid rewrite internals.

@ppedrot ppedrot added kind: cleanup Code removal, deprecation, refactorings, etc. request: full CI Use this label when you want your next push to trigger a full CI. labels May 22, 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 May 22, 2026
@ppedrot

ppedrot commented May 23, 2026

Copy link
Copy Markdown
Member Author

@coqbot ci minimize

@coqbot-app

coqbot-app Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

I have initiated minimization at commit 7e7198f for the suggested target ci-fiat_parsers as requested.

@coqbot-app

coqbot-app Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/List/ListMorphisms.v in 45m 57s (from ci-fiat_parsers) (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" "-require-import" "Coq.Compat.AdmitAxiom") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 565 lines to 36 lines, then from 50 lines to 635 lines, then from 642 lines to 48 lines, then from 62 lines to 2110 lines, then from 2112 lines to 57 lines, then from 71 lines to 1256 lines, then from 1255 lines to 68 lines, then from 82 lines to 4215 lines, then from 4195 lines to 129 lines, then from 143 lines to 157 lines, then from 164 lines to 141 lines, then from 155 lines to 169 lines, then from 176 lines to 152 lines, then from 166 lines to 180 lines, then from 187 lines to 163 lines, then from 178 lines to 165 lines, then from 180 lines to 69 lines, then from 84 lines to 69 lines, then from 0 lines to 69 lines *)
(* coqc version 9.3+alpha compiled with OCaml 4.14.0
   coqtop version runner-khfdxfugu-project-4504-concurrent-0:/builds/coq/coq/_build/default,(HEAD detached at f66fc0d0055) (f66fc0d005567e48f9eab103a6b8966fc39049cb)
   Expected coqc runtime on this file: 0.000 sec
   Expected coqc peak memory usage on this file: 0.0 kb *)
Require Corelib.Setoids.Setoid.
Export Corelib.Classes.Morphisms.
Export Corelib.Program.Basics.
Export Corelib.Setoids.Setoid.
Module Export List.

Set Implicit Arguments.

Section ListOps.

  Variable A : Type.
Fixpoint rev (l:list A) : list A.
Admitted.

End ListOps.

Section Fold_Left_Recursor.
  Variables (A : Type) (B : Type).
  Variable f : A -> B -> A.
Fixpoint fold_left (l:list B) (a0:A) : A.
Admitted.

End Fold_Left_Recursor.

Section Fold_Right_Recursor.
  Variables (A : Type) (B : Type).
  Variable f : B -> A -> A.
  Variable a0 : A.
Fixpoint fold_right (l:list B) : A.
Admitted.

End Fold_Right_Recursor.

  Lemma fold_left_rev_right : forall (A B:Type)(f:A->B->B) l i,
    fold_right f i (rev l) = fold_left (fun x y => f y x) l i.
Admitted.

End List.

Definition pointwise2_relation :=
  fun (A A': Type) {B : Type} (R : relation B) (f g : A -> A' -> B) =>
    forall a a', R (f a a') (g a a').

#[global]
Instance pointwise2_subrelation {A A' B} (R : relation B) :
  subrelation (pointwise2_relation A A' R) (pointwise_relation A (pointwise_relation A' R)).
Admitted.

#[global]
Instance pointwise2_forall_relation_inv {A A' B} (R : relation B) :
  subrelation (forall_relation (fun _ : A => forall_relation (fun _ : A' => R))) (pointwise2_relation A A' R).
Admitted.

Add Parametric Morphism {A B: Type} :
  (@List.fold_right A B)
    with signature (@pointwise2_relation B A _ eq ==> eq ==> eq ==> eq)
      as fold_right_pointwise2eq_eq_eq_morphism.
Admitted.

Add Parametric Morphism {A B: Type} :
  (@List.fold_left A B)
    with signature (pointwise2_relation A B eq ==> eq ==> eq ==> eq)
      as fold_left_pointwise2eq_eq_eq_morphism.
Proof.
  intros.
  rewrite <- !fold_left_rev_right.
  setoid_rewrite H; reflexivity.
🛠️ 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 5.7MiB file on GitHub Actions Artifacts under build.log)
ub/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 -compat 8.4 -require Coq.Compat.AdmitAxiom -require-import Coq.Compat.AdmitAxiom -w unsupported-attributes -w -deprecated-native-compiler-option -native-compiler no -w -deprecated-appcontext\ -notation-overridden -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src Fiat -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock Bedrock src/Parsers/ContextFreeGrammar/Properties.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/fiat_parsers
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -compat 8.4 -require Coq.Compat.AdmitAxiom -require-import Coq.Compat.AdmitAxiom -w unsupported-attributes -w -deprecated-native-compiler-option -native-compiler no -w -deprecated-appcontext\ -notation-overridden -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src Fiat -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock Bedrock src/Parsers/ContextFreeGrammar/Properties.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.bQQgfSTdEW
MINIMIZER_DEBUG: files:  src/Parsers/ContextFreeGrammar/Properties.v /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Parsers/ContextFreeGrammar/Properties.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]
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
While loading initial state:
Warning: "From Coq" has been replaced by "From Stdlib".
[deprecated-from-Coq,deprecated-since-9.0,deprecated,default]
While loading initial state:
Warning: "From Coq" has been replaced by "From Stdlib".
[deprecated-from-Coq,deprecated-since-9.0,deprecated,default]
ROCQ compile src/Common/List/ListMorphisms.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 -compat 8.4 -require Coq.Compat.AdmitAxiom -require-import Coq.Compat.AdmitAxiom -w unsupported-attributes -w -deprecated-native-compiler-option -native-compiler no -w -deprecated-appcontext\ -notation-overridden -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src Fiat -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock Bedrock src/Common/List/ListMorphisms.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/fiat_parsers
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -compat 8.4 -require Coq.Compat.AdmitAxiom -require-import Coq.Compat.AdmitAxiom -w unsupported-attributes -w -deprecated-native-compiler-option -native-compiler no -w -deprecated-appcontext\ -notation-overridden -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src Fiat -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock Bedrock src/Common/List/ListMorphisms.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.QWM76apFwu
MINIMIZER_DEBUG: files:  src/Common/List/ListMorphisms.v /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/List/ListMorphisms.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]
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
While loading initial state:
Warning: "From Coq" has been replaced by "From Stdlib".
[deprecated-from-Coq,deprecated-since-9.0,deprecated,default]
While loading initial state:
Warning: "From Coq" has been replaced by "From Stdlib".
[deprecated-from-Coq,deprecated-since-9.0,deprecated,default]
File "./src/Common/List/ListMorphisms.v", line 259, characters 2-18:
Error: setoid rewrite failed: UNDEFINED EVARS:
 ?X786==[A B x y H y0 y1 y2 x0 |- relation A] (internal placeholder) {?r}
 ?X788==[A B x y H y0 y1 |- relation A] (internal placeholder) {?r0}
 ?X789==[A B x y H y0 y1 |- relation (list B)] (internal placeholder) {?r1}
 ?X790==[A B x y H y0 y1 |- relation A] (internal placeholder) {?r2}
 ?X791==[A B x y H y0 y1 (do_subrelation:=do_subrelation) |-
          Proper ((forallR (y2 : B) (x0 : A), ?r) ==> ?r2 ==> ?r1 ==> ?r0)
            (fold_right (B:=B))]
          (internal placeholder) {?p}
 ?X795==[A B x y H y0 y1 |- relation A] (internal placeholder) {?r3}
 ?X796==[A B x y H y0 y1 (do_subrelation:=do_subrelation) |-
          Proper (?r0 ==> ?r3 ==> flip impl) eq] (internal placeholder) {?p0}
 ?X797==[A B x y H y0 y1 y2 x0 |-
          subrelation (pointwise2_relation A B eq)
            (pointwise_relation A (pointwise_relation B ?r))]
          (internal placeholder) {?s}
 ?X798==[A B x y H y0 y1 |- ProperProxy ?r2 y1] (internal placeholder) {?p1}
 ?X799==[A B x y H y0 y1 |- ProperProxy ?r1 (rev y0)] (internal placeholder) {?p2}
 ?X800==[A B x y H y0 y1 |-
          ProperProxy ?r3
            (fold_right (fun (y0 : B) (x : A) => y x y0) y1 (rev y0))]
          (internal placeholder) {?p3}
TYPECLASSES:?X786 ?X788 ?X789 ?X790 ?X791 ?X795 ?X796 ?X797 ?X798 ?X799
?X800
SHELF:||
FUTURE GOALS STACK:?X800 ?X799 ?X798 ?X797 ?X796 ?X795 ?X791 ?X790 ?X789
?X788 ?X786||


make: *** [Makefile.coq:815: src/Common/List/ListMorphisms.vo] Error 1
make: *** [src/Common/List/ListMorphisms.vo] Deleting file 'src/Common/List/ListMorphisms.glob'
+ code=2
+ printf '\n%s exit code: %s\n' fiat_parsers 2
+ '[' fiat_parsers '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real _build_ci/fiat_parsers.log
No timing data
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 3.5MiB file on GitHub Actions Artifacts under bug.log)
fiat_parsers/src" "Fiat" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock" "Bedrock" "-Q" "/github/workspace/cwd" "Top" "-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/Stdlib" "Stdlib" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmpm6qth20e" "" "/tmp/tmpm6qth20e/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-w" "-deprecated-appcontext -notation-overridden" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src" "Fiat" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock" "Bedrock" "-Q" "/github/workspace/cwd" "Top" "-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/Stdlib" "Stdlib" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmp0n5o_qe8" "" "/tmp/tmp0n5o_qe8/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src" "Fiat" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock" "Bedrock" "-Q" "/github/workspace/cwd" "Top" "-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/Stdlib" "Stdlib" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmp47agyzma" "" "/tmp/tmp47agyzma/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src" "Fiat" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock" "Bedrock" "-Q" "/github/workspace/cwd" "Top" "-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/Stdlib" "Stdlib" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmpa9osi5gy" "" "/tmp/tmpa9osi5gy/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock" "Bedrock" "-Q" "/github/workspace/cwd" "Top" "-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/Stdlib" "Stdlib" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmpevv1tkga" "" "/tmp/tmpevv1tkga/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-Q" "/github/workspace/cwd" "Top" "-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/Stdlib" "Stdlib" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmpqwnvs49y" "" "/tmp/tmpqwnvs49y/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-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/Stdlib" "Stdlib" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmpjct_k44l" "" "/tmp/tmpjct_k44l/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Stdlib" "Stdlib" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmpforf64_6" "" "/tmp/tmpforf64_6/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmp709q0nx3" "" "/tmp/tmp709q0nx3/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmpdejpz26p" "" "/tmp/tmpdejpz26p/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-top" "Fiat.Common.List.ListMorphisms" "-require-import" "Coq.Compat.AdmitAxiom" "-Q" "/tmp/tmpc3c6cewk" "" "/tmp/tmpc3c6cewk/Fiat/Common/List/ListMorphisms.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-require-import" "Coq.Compat.AdmitAxiom" "/tmp/tmpe8s60xvx.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "Coq.Compat.AdmitAxiom" "/tmp/tmphryt_0t3.v" "-q"

Running command (in: /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers): "/github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig" "-require-import" "/tmp/tmp3izgy2bg.v" "-q"
Updated output file with minimized arguments

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.

@ppedrot

ppedrot commented May 23, 2026

Copy link
Copy Markdown
Member Author

Turns out that the order of constraint evar generation matters...

@ppedrot

ppedrot commented May 24, 2026

Copy link
Copy Markdown
Member Author

Smaller example:

Require Corelib.Setoids.Setoid.
Export Corelib.Classes.Morphisms.
Export Corelib.Setoids.Setoid.

Axiom fold_right : forall [A B : Type], (B -> A -> A) -> A.

Axiom pointwise2_relation :
forall (A A' : Type) {B : Type}, relation B -> (A -> A' -> B) -> (A -> A' -> B) -> Prop.

Declare Instance pointwise2_subrelation {A A' B} (R : relation B) :
  subrelation (pointwise2_relation A A' R) (pointwise_relation A (pointwise_relation A' R)).
Declare Instance pointwise2_forall_relation_inv {A A' B} (R : relation B) :
  subrelation (forall_relation (fun _ : A => forall_relation (fun _ : A' => R))) (pointwise2_relation A A' R).

Declare Instance fold_right_pointwise2eq_eq_eq_morphism : forall {A B : Type},
Proper (@pointwise2_relation B A _ eq ==> eq) (@fold_right A B).

Goal forall A B : Type,
forall f g : A -> B -> A,
pointwise2_relation A B eq f g ->
fold_right (fun (y : B) (x : A) => f x y) =
fold_right (fun (y : B) (x : A) => g x y)
.
Proof.
intros.
Set Typeclasses Debug.
setoid_rewrite H.

@ppedrot ppedrot added the request: full CI Use this label when you want your next push to trigger a full CI. label May 24, 2026
ppedrot added a commit to ppedrot/coq that referenced this pull request May 24, 2026
@ppedrot ppedrot force-pushed the rewrite-defunctionalize-proof branch from 7e7198f to 517ea73 Compare May 24, 2026 12:53
@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 May 24, 2026
@ppedrot

ppedrot commented May 24, 2026

Copy link
Copy Markdown
Member Author

@coqbot bench

@coqbot-app

coqbot-app Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

🏁 Bench results:

┌─────────────────────────────────────┬─────────────────────────┬───────────────────────────────────────┬─────────────────────────┐
│                                     │      user time [s]      │           CPU instructions            │  max resident mem [KB]  │
│                                     │                         │                                       │                         │
│            package_name             │   NEW      OLD    PDIFF │      NEW             OLD        PDIFF │   NEW      OLD    PDIFF │
├─────────────────────────────────────┼─────────────────────────┼───────────────────────────────────────┼─────────────────────────┤
│                      rocq-equations │    8.41     8.64  -2.66 │    58795409588     58794590921   0.00 │  399500   402664  -0.79 │
│                        rocq-runtime │   75.68    76.16  -0.63 │   550919372877    550932045520  -0.00 │  495296   493496   0.36 │
│                 rocq-mathcomp-field │  192.70   193.76  -0.55 │  1451399563767   1451610017587  -0.01 │ 2288472  2286084   0.10 │
│                         coq-unimath │ 1818.68  1828.61  -0.54 │ 15179513272558  15179592865886  -0.00 │ 1085380  1088920  -0.33 │
│                           coq-verdi │   43.14    43.32  -0.42 │   288150323974    288147268336   0.00 │  521812   524800  -0.57 │
│                 rocq-mathcomp-order │   81.04    81.33  -0.36 │   600804416390    600832152801  -0.00 │ 1606624  1606588   0.00 │
│               coq-mathcomp-analysis │ 1153.37  1157.20  -0.33 │  8440824844351   8440608145800   0.00 │ 1968612  1965820   0.14 │
│                  rocq-mathcomp-boot │   39.42    39.55  -0.33 │   232453218812    232442797594   0.00 │  655452   654260   0.18 │
│           rocq-metarocq-safechecker │  317.81   318.85  -0.33 │  2380447425933   2380115946374   0.01 │ 1728368  1726344   0.12 │
│               coq-engine-bench-lite │  127.78   128.15  -0.29 │   947763184954    949499773321  -0.18 │ 1103228  1103212   0.00 │
│ coq-neural-net-interp-computed-lite │  235.78   236.26  -0.20 │  2264506255585   2264518669791  -0.00 │  883020   880340   0.30 │
│                            coq-hott │  157.40   157.59  -0.12 │  1058524321415   1058731756259  -0.02 │  477104   479268  -0.45 │
│                      coq-verdi-raft │  490.88   491.40  -0.11 │  3392066511244   3392304297380  -0.01 │  814892   813896   0.12 │
│                         rocq-stdlib │  421.44   421.84  -0.09 │  1509103714462   1508359055684   0.05 │  630300   628456   0.29 │
│                      coq-coquelicot │   39.05    39.08  -0.08 │   235060084495    235130314041  -0.03 │  830992   830196   0.10 │
│          rocq-mathcomp-finite-group │   26.51    26.53  -0.08 │   172605774304    172589054525   0.01 │  570232   570444  -0.04 │
│                    coq-math-classes │   82.50    82.55  -0.06 │   499853061684    499854609746  -0.00 │  513588   514036  -0.09 │
│              rocq-mathcomp-solvable │   98.69    98.72  -0.03 │   666855308397    666794633895   0.01 │ 1096888  1098364  -0.13 │
│               rocq-mathcomp-algebra │  330.61   330.70  -0.03 │  2433900143078   2433882339292   0.00 │ 1359952  1361024  -0.08 │
│             rocq-mathcomp-ssreflect │    1.15     1.15   0.00 │     7667840479      7667295556   0.01 │  593308   591724   0.27 │
│                    coq-fiat-parsers │  273.05   272.95   0.04 │  2091082802180   2090330703780   0.04 │ 2033740  2033024   0.04 │
│                 coq-category-theory │  639.29   639.01   0.04 │  4768178375042   4780776520284  -0.26 │ 6647496  6749288  -1.51 │
│                 rocq-metarocq-utils │   24.55    24.53   0.08 │   159101455980    159078275763   0.01 │  588940   590924  -0.34 │
│  rocq-mathcomp-group-representation │  104.14   104.04   0.10 │   729748029235    729770977703  -0.00 │ 1706696  1703360   0.20 │
│          coq-performance-tests-lite │  885.69   884.75   0.11 │  7091410284450   7087806127752   0.05 │ 1294860  1297772  -0.22 │
│                        coq-coqprime │   56.52    56.46   0.11 │   390865033790    390855463934   0.00 │  822164   823752  -0.19 │
│                        coq-rewriter │  330.52   330.15   0.11 │  2454532505179   2454349987498   0.01 │ 1432172  1434668  -0.17 │
│                 rocq-metarocq-pcuic │  603.84   603.12   0.12 │  3882318872279   3882849996133  -0.01 │ 1692988  1693272  -0.02 │
│                            coq-corn │  639.66   638.73   0.15 │  4326397424465   4326634046806  -0.01 │  619580   617532   0.33 │
│                       coq-fourcolor │ 1354.20  1352.07   0.16 │ 12429753426969  12429670946209   0.00 │ 1017924  1018000  -0.01 │
│              coq-mathcomp-odd-order │  600.79   599.68   0.19 │  4275015162909   4274821752513   0.00 │ 2653424  2656284  -0.11 │
│                           coq-color │  230.77   230.20   0.25 │  1456406281654   1456335939446   0.00 │ 1155888  1151600   0.37 │
│         coq-rewriter-perf-SuperFast │  466.94   465.77   0.25 │  3652807660660   3653278553030  -0.01 │ 1276984  1258068   1.50 │
│                rocq-metarocq-common │   41.53    41.42   0.27 │   267915572673    267942513348  -0.01 │  900424   902424  -0.22 │
│               rocq-metarocq-erasure │  441.06   439.10   0.45 │  2998458520679   2998249232526   0.01 │ 1812060  1811972   0.00 │
│                   coq-iris-examples │  366.12   364.34   0.49 │  2387809921389   2387804590690   0.00 │ 1070000  1069848   0.01 │
│                         coq-coqutil │   47.28    47.05   0.49 │   290987807081    291006464158  -0.01 │  566060   568116  -0.36 │
│          rocq-metarocq-translations │   15.43    15.35   0.52 │   108781154630    108804255542  -0.02 │  781096   784388  -0.42 │
│                           rocq-elpi │   16.40    16.31   0.55 │   116464208233    116481095279  -0.01 │  450452   450544  -0.02 │
│                        rocq-bignums │   25.05    24.89   0.64 │   158447593751    158007493737   0.28 │  458584   458912  -0.07 │
│              rocq-metarocq-template │   82.22    81.58   0.78 │   560173226451    560101520524   0.01 │ 1084200  1084848  -0.06 │
│                       coq-fiat-core │   55.48    55.02   0.84 │   336177899324    336185356894  -0.00 │  482356   484360  -0.41 │
│                        coq-bedrock2 │  360.78   357.20   1.00 │  2968034727725   2968351521027  -0.01 │  808712   807648   0.13 │
│                           rocq-core │    6.96     6.89   1.02 │    41338676885     41333618902   0.01 │  445908   441600   0.98 │
│                            coq-core │    2.76     2.72   1.47 │    18575555125     18567591113   0.04 │   90964    91288  -0.35 │
│        coq-fiat-crypto-with-bedrock │ 7451.20  7208.61   3.37 │ 61153687449137  59432738526076   2.90 │ 2848236  2851096  -0.10 │
└─────────────────────────────────────┴─────────────────────────┴───────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
coq-compcert (dependency install failed in NEW)
coq-vst (dependency install failed in NEW)

🐢 Top 25 slow downs
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                            TOP 25 SLOW DOWNS                                                            │
│                                                                                                                                         │
│  OLD    NEW     DIFF      %DIFF     Ln                     FILE                                                                         │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0.0706   253  253.2901  358859.41%  286  coq-fiat-crypto-with-bedrock/src/Curves/Edwards/AffineProofs.v.html                            │
│   63.7  67.5    3.7913       5.95%  608  coq-bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html                                    │
│    236   237    1.1106       0.47%  141  coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html                     │
│   42.2  43.2    1.0034       2.38%    2  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/fiat_crypto.v.html                        │
│   44.2  45.2    0.9410       2.13%    3  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/WithBedrock/fiat_crypto.v.html            │
│   26.8  27.6    0.8438       3.15%   34  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/MontgomeryLadderRISCV.v.html           │
│   45.8  46.6    0.7989       1.75%  115  coq-bedrock2/bedrock2/src/bedrock2Examples/full_mul.v.html                                     │
│  0.690  1.37    0.6801      98.51%  816  rocq-stdlib/theories/MSets/MSetRBT.v.html                                                      │
│   44.2  44.9    0.6691       1.51%    3  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/bedrock2_fiat_crypto.v.html               │
│   45.9  46.5    0.6562       1.43%  115  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/full_mul.v.html   │
│    133   134    0.5789       0.43%  155  coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html                     │
│   29.0  29.5    0.5766       1.99%   31  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/MontgomeryLadderRISCV.v.html           │
│   55.1  55.6    0.5242       0.95%   27  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html                       │
│   10.8  11.3    0.4601       4.26%  159  coq-fiat-crypto-with-bedrock/src/Bedrock/P256.v.html                                           │
│   20.5  21.0    0.4571       2.22%  708  coq-fiat-crypto-with-bedrock/src/Rewriter/RulesProofs.v.html                                   │
│   9.04  9.49    0.4512       4.99%  435  coq-mathcomp-odd-order/theories/PFsection12.v.html                                             │
│   21.3  21.7    0.4242       1.99%  651  rocq-stdlib/theories/Zmod/ZmodBase.v.html                                                      │
│   27.9  28.4    0.4164       1.49%   13  coq-fourcolor/theories/proof/job107to164.v.html                                                │
│   29.7  30.1    0.3892       1.31%   13  coq-fourcolor/theories/proof/job001to106.v.html                                                │
│   79.9  80.3    0.3731       0.47%   48  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html                        │
│   35.2  35.5    0.3487       0.99%  835  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                         │
│   21.4  21.7    0.3302       1.55%   13  coq-fourcolor/theories/proof/job511to516.v.html                                                │
│   9.88  10.2    0.3299       3.34%  326  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                       │
│   24.1  24.4    0.3229       1.34%  345  coq-fiat-crypto-with-bedrock/src/Curves/Montgomery/XZProofs.v.html                             │
│   7.22  7.53    0.3098       4.29%  602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                            TOP 25 SPEED UPS                                                             │
│                                                                                                                                         │
│ OLD    NEW    DIFF     %DIFF    Ln                     FILE                                                                             │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 67.6   62.8  -4.8187   -7.13%   608  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html      │
│ 89.8   88.8  -1.0051   -1.12%   999  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                    │
│ 31.3   30.3  -0.9262   -2.96%   198  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 31.4   30.5  -0.8855   -2.82%   180  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 46.7   45.8  -0.8417   -1.80%   277  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                      │
│ 31.5   30.6  -0.8364   -2.66%   214  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 41.6   40.8  -0.8261   -1.98%   235  coq-category-theory/Construction/DecoratedCospan/Category.v.html                                   │
│ 43.6   42.8  -0.7225   -1.66%   578  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/MMIO.v.html                   │
│ 90.5   89.8  -0.7184   -0.79%   968  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                    │
│ 39.4   38.7  -0.7160   -1.82%  1423  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html   │
│  201    200  -0.6879   -0.34%     8  coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html      │
│ 34.1   33.5  -0.6438   -1.89%   898  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                               │
│ 31.3   30.7  -0.6302   -2.01%   139  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 31.5   30.9  -0.6078   -1.93%   148  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│  107    106  -0.5571   -0.52%    22  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                             │
│ 29.1   28.6  -0.5376   -1.85%   305  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html                                 │
│ 35.2   34.7  -0.5361   -1.52%   194  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                      │
│ 1.02  0.500  -0.5169  -50.84%   484  rocq-stdlib/theories/Numbers/HexadecimalFacts.v.html                                               │
│ 48.8   48.3  -0.5112   -1.05%   376  coq-unimath/UniMath/ModelCategories/Generated/LNWFSMonoidalStructure.v.html                        │
│ 23.6   23.1  -0.5010   -2.13%   129  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/Projective.v.html                              │
│ 31.2   30.7  -0.4727   -1.52%   166  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 2.71   2.24  -0.4704  -17.37%    45  coq-engine-bench-lite/coq/PerformanceDemos/rewrite_strat_repeated_app.v.html                       │
│ 37.1   36.6  -0.4351   -1.17%   139  coq-fiat-parsers/src/Parsers/Refinement/SharpenedJSON.v.html                                       │
│ 50.0   49.6  -0.4201   -0.84%   567  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                         │
│ 27.5   27.1  -0.3846   -1.40%    68  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/VerifyDecode.v.html │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@SkySkimmer

Copy link
Copy Markdown
Contributor

the whole slowdown is 1 line in fiat crypto

@ppedrot

ppedrot commented May 26, 2026

Copy link
Copy Markdown
Member Author

Yes, the very same line timeouts the CI on fcl. I have to investigate where the difference comes from...

@rocq-prover rocq-prover deleted a comment from coqbot-app Bot May 28, 2026
@rocq-prover rocq-prover deleted a comment from coqbot-app Bot May 28, 2026
@ppedrot

ppedrot commented May 28, 2026

Copy link
Copy Markdown
Member Author

OK, it looks like it comes from the order of evars generated by transitivity. I'm investigating.

@ppedrot ppedrot added the request: full CI Use this label when you want your next push to trigger a full CI. label May 28, 2026
ppedrot added a commit to ppedrot/coq that referenced this pull request May 28, 2026
@ppedrot ppedrot force-pushed the rewrite-defunctionalize-proof branch from 517ea73 to 5f84705 Compare May 28, 2026 15:47
@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 May 28, 2026
@ppedrot

ppedrot commented May 28, 2026

Copy link
Copy Markdown
Member Author

Should be fixed now.

@ppedrot ppedrot marked this pull request as ready for review May 28, 2026 20:15
@ppedrot ppedrot requested a review from a team as a code owner May 28, 2026 20:15
@ppedrot ppedrot added this to the 9.3+rc1 milestone May 28, 2026
@ppedrot

ppedrot commented May 28, 2026

Copy link
Copy Markdown
Member Author

This looks ready.

@mattam82 mattam82 self-assigned this Jun 1, 2026
@mattam82

mattam82 commented Jun 1, 2026

Copy link
Copy Markdown
Member

Let's get a last bench

@mattam82

mattam82 commented Jun 1, 2026

Copy link
Copy Markdown
Member

@coqbot bench

@github-actions github-actions Bot added the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Jun 1, 2026
@coqbot-app

coqbot-app Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🏁 Bench results:

┌─────────────────────────────────────┬─────────────────────────┬───────────────────────────────────────┬─────────────────────────┐
│                                     │      user time [s]      │           CPU instructions            │  max resident mem [KB]  │
│                                     │                         │                                       │                         │
│            package_name             │   NEW      OLD    PDIFF │      NEW             OLD        PDIFF │   NEW      OLD    PDIFF │
├─────────────────────────────────────┼─────────────────────────┼───────────────────────────────────────┼─────────────────────────┤
│                      rocq-equations │    8.46     8.66  -2.31 │    58003599289     57999446104   0.01 │  399964   402740  -0.69 │
│                         coq-coqutil │   46.55    47.02  -1.00 │   290541021401    290575965623  -0.01 │  567288   570280  -0.52 │
│          rocq-metarocq-translations │   15.15    15.30  -0.98 │   108475297839    108484381611  -0.01 │  781424   781368   0.01 │
│                           coq-verdi │   43.09    43.50  -0.94 │   287358885733    287358576536   0.00 │  520724   522884  -0.41 │
│                        rocq-bignums │   25.11    25.34  -0.91 │   160011674871    160009532036   0.00 │  463020   460480   0.55 │
│                           rocq-core │    6.64     6.70  -0.90 │    41353861233     41351783586   0.01 │  443148   445232  -0.47 │
│                    coq-fiat-parsers │  270.00   272.16  -0.79 │  2087313897475   2087350981767  -0.00 │ 2036824  2033904   0.14 │
│           rocq-metarocq-safechecker │  316.82   319.16  -0.73 │  2380001954971   2380012039126  -0.00 │ 1734268  1735788  -0.09 │
│          coq-performance-tests-lite │  881.30   886.95  -0.64 │  7115749243897   7120964717273  -0.07 │ 1574236  1521432   3.47 │
│                rocq-metarocq-common │   41.29    41.55  -0.63 │   268108640059    268157497288  -0.02 │  898448   900592  -0.24 │
│                        coq-rewriter │  328.21   329.92  -0.52 │  2452979471292   2453194593104  -0.01 │ 1432100  1432144  -0.00 │
│              rocq-metarocq-template │   81.17    81.59  -0.51 │   560077785830    560059400959   0.00 │ 1080596  1078156   0.23 │
│                        coq-coqprime │   56.21    56.50  -0.51 │   391757896571    391738199459   0.01 │  821604   821936  -0.04 │
│                           coq-color │  228.34   229.39  -0.46 │  1454850316990   1454986314281  -0.01 │ 1151252  1153956  -0.23 │
│               coq-engine-bench-lite │  128.13   128.61  -0.37 │   952928566488    951522407022   0.15 │ 1103228  1103688  -0.04 │
│                        rocq-runtime │   75.94    76.21  -0.35 │   550863813704    550905655030  -0.01 │  494736   493660   0.22 │
│                    coq-math-classes │   82.00    82.28  -0.34 │   499011949560    499083333518  -0.01 │  513772   513868  -0.02 │
│        coq-fiat-crypto-with-bedrock │ 7198.23  7221.74  -0.33 │ 59570354960665  59578338841410  -0.01 │ 2845084  2848544  -0.12 │
│                       coq-fiat-core │   54.98    55.15  -0.31 │   334129747613    334109047318   0.01 │  480568   482912  -0.49 │
│                         coq-unimath │ 1879.55  1885.25  -0.30 │ 15726135989401  15726202322455  -0.00 │ 1668064  1669300  -0.07 │
│               rocq-metarocq-erasure │  438.52   439.60  -0.25 │  3000472417863   3000623435004  -0.01 │ 1840252  1806060   1.89 │
│                   coq-iris-examples │  365.07   365.90  -0.23 │  2386632821332   2386756811692  -0.01 │ 1073640  1074040  -0.04 │
│                 coq-category-theory │  635.64   637.03  -0.22 │  4778507262748   4777488001470   0.02 │ 6746888  6746536   0.01 │
│                      coq-verdi-raft │  488.81   489.63  -0.17 │  3396435382333   3396381686395   0.00 │  814484   814528  -0.01 │
│                 rocq-metarocq-pcuic │  601.67   602.57  -0.15 │  3887006906724   3887186668369  -0.00 │ 1694264  1692460   0.11 │
│         coq-rewriter-perf-SuperFast │  465.39   465.84  -0.10 │  3648405499480   3652760846201  -0.12 │ 1246088  1245524   0.05 │
│                            coq-hott │  157.11   157.24  -0.08 │  1058686053443   1058813006160  -0.01 │  479048   477408   0.34 │
│ coq-neural-net-interp-computed-lite │  235.45   235.51  -0.03 │  2263851425051   2263836414341   0.00 │  881000   883076  -0.24 │
│                        coq-bedrock2 │  360.81   360.24   0.16 │  2976238016106   2976618450577  -0.01 │  868828   868284   0.06 │
│                         rocq-stdlib │  422.87   422.05   0.19 │  1517047906639   1517087937056  -0.00 │  758852   759624  -0.10 │
│                 rocq-metarocq-utils │   24.51    24.26   1.03 │   158673990021    158696454100  -0.01 │  589236   590952  -0.29 │
│                            coq-core │    2.73     2.70   1.11 │    18571023818     18580795369  -0.05 │   90592    91024  -0.47 │
└─────────────────────────────────────┴─────────────────────────┴───────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
rocq-elpi (dependency install failed in NEW)
coq-compcert (dependency install failed in NEW)

rocq-mathcomp-boot (dependency rocq-elpi failed)
rocq-mathcomp-order (dependency rocq-elpi failed)
rocq-mathcomp-ssreflect (dependency rocq-elpi failed)
rocq-mathcomp-finite-group (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-group-representation (dependency rocq-elpi failed)
coq-mathcomp-odd-order (dependency rocq-elpi failed)
coq-mathcomp-analysis (dependency rocq-elpi failed)
coq-corn (dependency rocq-elpi failed)
coq-coquelicot (dependency rocq-elpi failed)
coq-fourcolor (dependency rocq-elpi failed)
coq-vst (dependency coq-compcert failed)

🐢 Top 25 slow downs
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                            TOP 25 SLOW DOWNS                                                             │
│                                                                                                                                          │
│  OLD    NEW    DIFF    %DIFF    Ln                      FILE                                                                             │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  63.3   67.2  3.9200    6.20%   608  coq-bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html                                         │
│  25.1   25.6  0.5199    2.07%   788  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                                │
│  35.0   35.4  0.3655    1.04%   194  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                       │
│  3.17   3.53  0.3561   11.23%   130  coq-category-theory/Functor/Strong/Product.v.html                                                   │
│  33.5   33.8  0.3211    0.96%   898  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                                │
│ 0.287  0.592  0.3048  106.14%    11  rocq-stdlib/theories/omega/OmegaLemmas.v.html                                                       │
│  28.5   28.8  0.2899    1.02%   305  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html                                  │
│ 0.379  0.662  0.2832   74.74%    14  rocq-stdlib/theories/MSets/MSetToFiniteSet.v.html                                                   │
│ 0.323  0.606  0.2829   87.55%    11  rocq-stdlib/theories/ZArith/Zquot.v.html                                                            │
│  4.47   4.74  0.2670    5.97%   441  coq-fiat-crypto-with-bedrock/src/AbstractInterpretation/Wf.v.html                                   │
│ 0.279  0.542  0.2630   94.11%   596  rocq-stdlib/theories/Strings/Byte.v.html                                                            │
│ 0.322  0.582  0.2605   80.99%    11  rocq-stdlib/theories/ZArith/Zdiv_facts.v.html                                                       │
│  35.1   35.4  0.2605    0.74%   835  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                              │
│ 0.724  0.979  0.2554   35.29%    41  rocq-stdlib/theories/ZArith/Zdiv_facts.v.html                                                       │
│  20.3   20.5  0.2497    1.23%     6  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/DecodeEncodeI.v.html │
│  15.2   15.5  0.2440    1.60%   898  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                                │
│ 0.234  0.472  0.2384  101.87%     1  rocq-stdlib/theories/ZArith/Zcong.v.html                                                            │
│ 0.219  0.453  0.2340  106.73%  1166  rocq-stdlib/theories/Strings/Byte.v.html                                                            │
│ 0.643  0.873  0.2299   35.76%   829  rocq-stdlib/theories/setoid_ring/Ring_polynom.v.html                                                │
│  48.3   48.5  0.2280    0.47%   376  coq-unimath/UniMath/ModelCategories/Generated/LNWFSMonoidalStructure.v.html                         │
│ 0.998   1.22  0.2241   22.45%   702  rocq-stdlib/theories/Numbers/HexadecimalFacts.v.html                                                │
│  16.6   16.8  0.2234    1.35%   669  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                               │
│   200    200  0.2193    0.11%     8  coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html       │
│  38.8   39.0  0.2122    0.55%  1423  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html    │
│  22.5   22.7  0.2065    0.92%   776  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                                │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                            TOP 25 SPEED UPS                                                             │
│                                                                                                                                         │
│  OLD    NEW    DIFF     %DIFF   Ln                     FILE                                                                             │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  49.6   46.9  -2.7322   -5.51%  115  coq-bedrock2/bedrock2/src/bedrock2Examples/full_mul.v.html                                         │
│  45.6   44.4  -1.1748   -2.58%    3  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/WithBedrock/fiat_crypto.v.html                │
│  64.5   63.5  -0.9512   -1.48%  608  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html      │
│  80.6   79.8  -0.8286   -1.03%   48  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html                            │
│  43.4   42.7  -0.7517   -1.73%    2  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/fiat_crypto.v.html                            │
│   237    236  -0.7227   -0.31%  141  coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html                         │
│  45.3   44.5  -0.7124   -1.57%    3  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/bedrock2_fiat_crypto.v.html                   │
│  21.9   21.4  -0.5169   -2.36%  651  rocq-stdlib/theories/Zmod/ZmodBase.v.html                                                          │
│  55.3   54.9  -0.4785   -0.86%   27  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html                           │
│   107    106  -0.4778   -0.45%   22  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                             │
│   134    133  -0.4567   -0.34%  155  coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html                         │
│  7.38   6.94  -0.4489   -6.08%  604  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  88.7   88.3  -0.4462   -0.50%  999  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                    │
│ 0.661  0.263  -0.3986  -60.29%  398  coq-fiat-crypto-with-bedrock/src/Curves/Montgomery/XZProofs.v.html                                 │
│  27.2   26.9  -0.3625   -1.33%   68  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/VerifyDecode.v.html │
│  7.54   7.20  -0.3344   -4.44%  602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│  30.7   30.4  -0.3265   -1.06%  596  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                              │
│ 0.982  0.658  -0.3239  -32.99%  816  rocq-stdlib/theories/MSets/MSetRBT.v.html                                                          │
│  17.9   17.6  -0.3166   -1.77%   32  coq-performance-tests-lite/src/pattern.v.html                                                      │
│  21.6   21.3  -0.3053   -1.41%  242  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html                                       │
│  21.5   21.2  -0.3045   -1.41%  516  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                         │
│  10.2   9.91  -0.2929   -2.87%  326  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│  1.55   1.26  -0.2873  -18.59%  813  rocq-stdlib/theories/MSets/MSetRBT.v.html                                                          │
│  13.0   12.7  -0.2826   -2.17%  571  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                         │
│  23.5   23.2  -0.2811   -1.20%  129  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/Projective.v.html                              │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@ppedrot ppedrot added the request: full CI Use this label when you want your next push to trigger a full CI. label Jun 1, 2026
ppedrot added a commit to ppedrot/coq that referenced this pull request Jun 1, 2026
@ppedrot ppedrot force-pushed the rewrite-defunctionalize-proof branch from 5f84705 to 0091433 Compare June 1, 2026 19:37
@coqbot-app coqbot-app Bot removed request: full CI Use this label when you want your next push to trigger a full CI. needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. labels Jun 1, 2026
@ppedrot

ppedrot commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

@coqbot run full ci

@ppedrot

ppedrot commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

VST failure is unrelated, @mattam82 this is ready to go.

@ppedrot ppedrot added the request: full CI Use this label when you want your next push to trigger a full CI. label Jun 17, 2026
ppedrot added 2 commits June 17, 2026 08:49
This is mostly about moving code around so as to obtain an explicit
representation of the rewrite proof as an inductive type rather than
through term generation spread around the setoid rewrite internals.
@ppedrot ppedrot force-pushed the rewrite-defunctionalize-proof branch from 0091433 to 521024c Compare June 17, 2026 06:49
@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 Jun 17, 2026
@ppedrot

ppedrot commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

ping @mattam82

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

Labels

kind: cleanup Code removal, deprecation, refactorings, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants