Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve generalized rewriting in Type and with univpoly #14137

Merged
merged 5 commits into from
Jan 13, 2022

Conversation

mattam82
Copy link
Member

@mattam82 mattam82 commented Apr 20, 2021

We were missing a few universe refreshings in the ML code resulting in unsatisfiable constraints. We add a test ensuring that indeed setoid_rewrite works with (monomorphic) relations in Type and in the universe polymorphic mode as well.
Certainly fixes a number of bugs, I'll gather them.

Kind: bug fix / feature

  • Added / updated test-suite

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jun 3, 2021

Hey, I have detected that there were CI failures at commit 4bd2ea0 without any failure in the test-suite.
I checked that the corresponding jobs for the base commit e8040a4 succeeded. You can ask me to try to extract a minimal test case from this so that it can be added to the test-suite.
If you tag me saying @coqbot ci minimize, I will minimize the following target: ci-metacoq.

@SkySkimmer
Copy link
Contributor

@coqbot ci minimize

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jun 14, 2021

I have initiated minimization at commit 4bd2ea0 for the suggested target ci-metacoq as requested.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jun 14, 2021

Error: Could not minimize file (from ci-metacoq) (full log on GitHub Actions)

build log (truncated to last 26KiB; full 1.7MiB file on GitHub Actions Artifacts under build.log)
oq.a  
  inflating: _build_ci/metacoq/template-coq/src/template_coq.cmi  
  inflating: _build_ci/metacoq/template-coq/src/template_coq.cmx  
  inflating: _build_ci/metacoq/template-coq/src/template_coq.cmxa  
  inflating: _build_ci/metacoq/template-coq/src/template_coq.cmxs  
  inflating: _build_ci/metacoq/template-coq/src/template_coq.mlpack  
  inflating: _build_ci/metacoq/template-coq/src/template_coq.mlpack.d  
  inflating: _build_ci/metacoq/template-coq/src/template_coq.o  
  inflating: _build_ci/metacoq/template-coq/src/template_monad.cmi  
  inflating: _build_ci/metacoq/template-coq/src/template_monad.cmx  
  inflating: _build_ci/metacoq/template-coq/src/template_monad.ml  
  inflating: _build_ci/metacoq/template-coq/src/template_monad.ml.d  
  inflating: _build_ci/metacoq/template-coq/src/template_monad.mli  
  inflating: _build_ci/metacoq/template-coq/src/template_monad.mli.d  
  inflating: _build_ci/metacoq/template-coq/src/template_monad.o  
  inflating: _build_ci/metacoq/template-coq/src/tm_util.cmi  
  inflating: _build_ci/metacoq/template-coq/src/tm_util.cmx  
  inflating: _build_ci/metacoq/template-coq/src/tm_util.ml  
  inflating: _build_ci/metacoq/template-coq/src/tm_util.ml.d  
  inflating: _build_ci/metacoq/template-coq/src/tm_util.o  
   creating: _build_ci/metacoq/template-coq/theories/
  inflating: _build_ci/metacoq/template-coq/theories/.All.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Ast.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.AstUtils.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.BasicAst.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Constants.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Environment.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.EnvironmentTyping.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.ExtractableLoader.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Extraction.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Induction.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Kernames.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.LiftSubst.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Loader.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Pretty.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Reflect.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.TemplateMonad.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Typing.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.TypingWf.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.UnivSubst.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.Universes.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.WfInv.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.config.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.gitignore  
  inflating: _build_ci/metacoq/template-coq/theories/.monad_utils.aux  
  inflating: _build_ci/metacoq/template-coq/theories/.utils.aux  
  inflating: _build_ci/metacoq/template-coq/theories/All.glob  
  inflating: _build_ci/metacoq/template-coq/theories/All.v  
  inflating: _build_ci/metacoq/template-coq/theories/All.vo  
  inflating: _build_ci/metacoq/template-coq/theories/All.vok  
  inflating: _build_ci/metacoq/template-coq/theories/All.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Ast.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Ast.v  
  inflating: _build_ci/metacoq/template-coq/theories/Ast.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Ast.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Ast.vos  
  inflating: _build_ci/metacoq/template-coq/theories/AstUtils.glob  
  inflating: _build_ci/metacoq/template-coq/theories/AstUtils.v  
  inflating: _build_ci/metacoq/template-coq/theories/AstUtils.vo  
  inflating: _build_ci/metacoq/template-coq/theories/AstUtils.vok  
  inflating: _build_ci/metacoq/template-coq/theories/AstUtils.vos  
  inflating: _build_ci/metacoq/template-coq/theories/BasicAst.glob  
  inflating: _build_ci/metacoq/template-coq/theories/BasicAst.v  
  inflating: _build_ci/metacoq/template-coq/theories/BasicAst.vo  
  inflating: _build_ci/metacoq/template-coq/theories/BasicAst.vok  
  inflating: _build_ci/metacoq/template-coq/theories/BasicAst.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Constants.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Constants.v  
  inflating: _build_ci/metacoq/template-coq/theories/Constants.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Constants.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Constants.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Environment.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Environment.v  
  inflating: _build_ci/metacoq/template-coq/theories/Environment.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Environment.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Environment.vos  
  inflating: _build_ci/metacoq/template-coq/theories/EnvironmentTyping.glob  
  inflating: _build_ci/metacoq/template-coq/theories/EnvironmentTyping.v  
  inflating: _build_ci/metacoq/template-coq/theories/EnvironmentTyping.vo  
  inflating: _build_ci/metacoq/template-coq/theories/EnvironmentTyping.vok  
  inflating: _build_ci/metacoq/template-coq/theories/EnvironmentTyping.vos  
  inflating: _build_ci/metacoq/template-coq/theories/ExtractableLoader.glob  
  inflating: _build_ci/metacoq/template-coq/theories/ExtractableLoader.v  
  inflating: _build_ci/metacoq/template-coq/theories/ExtractableLoader.vo  
  inflating: _build_ci/metacoq/template-coq/theories/ExtractableLoader.vok  
  inflating: _build_ci/metacoq/template-coq/theories/ExtractableLoader.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Extraction.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Extraction.v  
  inflating: _build_ci/metacoq/template-coq/theories/Extraction.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Extraction.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Extraction.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Induction.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Induction.v  
  inflating: _build_ci/metacoq/template-coq/theories/Induction.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Induction.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Induction.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Kernames.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Kernames.v  
  inflating: _build_ci/metacoq/template-coq/theories/Kernames.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Kernames.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Kernames.vos  
  inflating: _build_ci/metacoq/template-coq/theories/LiftSubst.glob  
  inflating: _build_ci/metacoq/template-coq/theories/LiftSubst.v  
  inflating: _build_ci/metacoq/template-coq/theories/LiftSubst.vo  
  inflating: _build_ci/metacoq/template-coq/theories/LiftSubst.vok  
  inflating: _build_ci/metacoq/template-coq/theories/LiftSubst.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Loader.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Loader.v  
  inflating: _build_ci/metacoq/template-coq/theories/Loader.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Loader.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Loader.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Pretty.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Pretty.v  
  inflating: _build_ci/metacoq/template-coq/theories/Pretty.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Pretty.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Pretty.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Reflect.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Reflect.v  
  inflating: _build_ci/metacoq/template-coq/theories/Reflect.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Reflect.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Reflect.vos  
   creating: _build_ci/metacoq/template-coq/theories/TemplateMonad/
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad.glob  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad.v  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad.vo  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad.vok  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad.vos  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/.Common.aux  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/.Core.aux  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/.Extractable.aux  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Common.glob  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Common.v  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Common.vo  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Common.vok  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Common.vos  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Core.glob  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Core.v  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Core.vo  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Core.vok  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Core.vos  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Extractable.glob  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Extractable.v  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Extractable.vo  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Extractable.vok  
  inflating: _build_ci/metacoq/template-coq/theories/TemplateMonad/Extractable.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Typing.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Typing.v  
  inflating: _build_ci/metacoq/template-coq/theories/Typing.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Typing.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Typing.vos  
  inflating: _build_ci/metacoq/template-coq/theories/TypingWf.glob  
  inflating: _build_ci/metacoq/template-coq/theories/TypingWf.v  
  inflating: _build_ci/metacoq/template-coq/theories/TypingWf.vo  
  inflating: _build_ci/metacoq/template-coq/theories/TypingWf.vok  
  inflating: _build_ci/metacoq/template-coq/theories/TypingWf.vos  
  inflating: _build_ci/metacoq/template-coq/theories/UnivSubst.glob  
  inflating: _build_ci/metacoq/template-coq/theories/UnivSubst.v  
  inflating: _build_ci/metacoq/template-coq/theories/UnivSubst.vo  
  inflating: _build_ci/metacoq/template-coq/theories/UnivSubst.vok  
  inflating: _build_ci/metacoq/template-coq/theories/UnivSubst.vos  
  inflating: _build_ci/metacoq/template-coq/theories/Universes.glob  
  inflating: _build_ci/metacoq/template-coq/theories/Universes.v  
  inflating: _build_ci/metacoq/template-coq/theories/Universes.vo  
  inflating: _build_ci/metacoq/template-coq/theories/Universes.vok  
  inflating: _build_ci/metacoq/template-coq/theories/Universes.vos  
  inflating: _build_ci/metacoq/template-coq/theories/WfInv.glob  
  inflating: _build_ci/metacoq/template-coq/theories/WfInv.v  
  inflating: _build_ci/metacoq/template-coq/theories/WfInv.vo  
  inflating: _build_ci/metacoq/template-coq/theories/WfInv.vok  
  inflating: _build_ci/metacoq/template-coq/theories/WfInv.vos  
   creating: _build_ci/metacoq/template-coq/theories/common/
  inflating: _build_ci/metacoq/template-coq/theories/common/.uGraph.aux  
  inflating: _build_ci/metacoq/template-coq/theories/common/uGraph.glob  
  inflating: _build_ci/metacoq/template-coq/theories/common/uGraph.v  
  inflating: _build_ci/metacoq/template-coq/theories/common/uGraph.vo  
  inflating: _build_ci/metacoq/template-coq/theories/common/uGraph.vok  
  inflating: _build_ci/metacoq/template-coq/theories/common/uGraph.vos  
  inflating: _build_ci/metacoq/template-coq/theories/config.glob  
  inflating: _build_ci/metacoq/template-coq/theories/config.v  
  inflating: _build_ci/metacoq/template-coq/theories/config.vo  
  inflating: _build_ci/metacoq/template-coq/theories/config.vok  
  inflating: _build_ci/metacoq/template-coq/theories/config.vos  
  inflating: _build_ci/metacoq/template-coq/theories/monad_utils.glob  
  inflating: _build_ci/metacoq/template-coq/theories/monad_utils.v  
  inflating: _build_ci/metacoq/template-coq/theories/monad_utils.vo  
  inflating: _build_ci/metacoq/template-coq/theories/monad_utils.vok  
  inflating: _build_ci/metacoq/template-coq/theories/monad_utils.vos  
   creating: _build_ci/metacoq/template-coq/theories/utils/
  inflating: _build_ci/metacoq/template-coq/theories/utils.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.All_Forall.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.LibHypsNaming.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCArith.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCCompare.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCEquality.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCList.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCOption.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCPrelude.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCProd.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCRelations.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCSquash.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCString.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.MCUtils.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/.wGraph.aux  
  inflating: _build_ci/metacoq/template-coq/theories/utils/All_Forall.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/All_Forall.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/All_Forall.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/All_Forall.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/All_Forall.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/LibHypsNaming.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/LibHypsNaming.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/LibHypsNaming.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/LibHypsNaming.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/LibHypsNaming.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCArith.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCArith.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCArith.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCArith.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCArith.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCCompare.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCCompare.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCCompare.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCCompare.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCCompare.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCEquality.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCEquality.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCEquality.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCEquality.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCEquality.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCList.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCList.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCList.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCList.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCList.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCOption.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCOption.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCOption.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCOption.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCOption.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCPrelude.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCPrelude.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCPrelude.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCPrelude.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCPrelude.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCProd.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCProd.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCProd.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCProd.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCProd.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCRelations.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCRelations.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCRelations.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCRelations.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCRelations.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCSquash.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCSquash.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCSquash.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCSquash.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCSquash.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCString.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCString.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCString.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCString.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCString.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCUtils.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCUtils.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCUtils.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCUtils.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/MCUtils.vos  
  inflating: _build_ci/metacoq/template-coq/theories/utils/wGraph.glob  
  inflating: _build_ci/metacoq/template-coq/theories/utils/wGraph.v  
  inflating: _build_ci/metacoq/template-coq/theories/utils/wGraph.vo  
  inflating: _build_ci/metacoq/template-coq/theories/utils/wGraph.vok  
  inflating: _build_ci/metacoq/template-coq/theories/utils/wGraph.vos  
  inflating: _build_ci/metacoq/template-coq/update_plugin.sh  
   creating: _build_ci/metacoq/test-suite/
  inflating: _build_ci/metacoq/test-suite/CheckerTest.v  
  inflating: _build_ci/metacoq/test-suite/Makefile  
  inflating: _build_ci/metacoq/test-suite/Makefile.coq.local  
  inflating: _build_ci/metacoq/test-suite/TypingTests.v  
  inflating: _build_ci/metacoq/test-suite/_CoqProject  
  inflating: _build_ci/metacoq/test-suite/bug1.v  
  inflating: _build_ci/metacoq/test-suite/bug2.v  
  inflating: _build_ci/metacoq/test-suite/bug5.v  
  inflating: _build_ci/metacoq/test-suite/bug6.v  
  inflating: _build_ci/metacoq/test-suite/bug7.v  
  inflating: _build_ci/metacoq/test-suite/bug8.v  
  inflating: _build_ci/metacoq/test-suite/bugkncst.v  
  inflating: _build_ci/metacoq/test-suite/case.v  
  inflating: _build_ci/metacoq/test-suite/castprop.v  
  inflating: _build_ci/metacoq/test-suite/cofix.v  
  inflating: _build_ci/metacoq/test-suite/erasure_live_test.v  
  inflating: _build_ci/metacoq/test-suite/erasure_test.v  
  inflating: _build_ci/metacoq/test-suite/evars.v  
  inflating: _build_ci/metacoq/test-suite/extractable.v  
  inflating: _build_ci/metacoq/test-suite/hnf_ctor.v  
  inflating: _build_ci/metacoq/test-suite/issue27.v  
  inflating: _build_ci/metacoq/test-suite/issue28.v  
  inflating: _build_ci/metacoq/test-suite/issue453.v  
  inflating: _build_ci/metacoq/test-suite/letin.v  
  inflating: _build_ci/metacoq/test-suite/modules_sections.v  
  inflating: _build_ci/metacoq/test-suite/mutind.v  
  inflating: _build_ci/metacoq/test-suite/opaque.v  
  inflating: _build_ci/metacoq/test-suite/order_rec.v  
   creating: _build_ci/metacoq/test-suite/plugin-demo/
  inflating: _build_ci/metacoq/test-suite/plugin-demo/.gitignore  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/Makefile  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/Makefile.plugin.local  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/README.md  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/_CoqProject  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/_PluginProject  
   creating: _build_ci/metacoq/test-suite/plugin-demo/gen-src/
  inflating: _build_ci/metacoq/test-suite/plugin-demo/gen-src/to-lower.sh  
   creating: _build_ci/metacoq/test-suite/plugin-demo/src/
  inflating: _build_ci/metacoq/test-suite/plugin-demo/src/demo_plugin.mlpack  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/src/g_demo_plugin.mlg  
   creating: _build_ci/metacoq/test-suite/plugin-demo/test/
  inflating: _build_ci/metacoq/test-suite/plugin-demo/test/test.v  
   creating: _build_ci/metacoq/test-suite/plugin-demo/theories/
  inflating: _build_ci/metacoq/test-suite/plugin-demo/theories/Extraction.v  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/theories/Lens.v  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/theories/Loader.v  
  inflating: _build_ci/metacoq/test-suite/plugin-demo/theories/MyPlugin.v  
  inflating: _build_ci/metacoq/test-suite/proj.v  
  inflating: _build_ci/metacoq/test-suite/run_in_tactic.v  
  inflating: _build_ci/metacoq/test-suite/safechecker_test.v  
  inflating: _build_ci/metacoq/test-suite/sprop_tests.v  
  inflating: _build_ci/metacoq/test-suite/test_term.v  
  inflating: _build_ci/metacoq/test-suite/tmExistingInstance.v  
  inflating: _build_ci/metacoq/test-suite/tmFreshName.v  
  inflating: _build_ci/metacoq/test-suite/tmInferInstance.v  
  inflating: _build_ci/metacoq/test-suite/tmVariable.v  
  inflating: _build_ci/metacoq/test-suite/unfold.v  
  inflating: _build_ci/metacoq/test-suite/univ.v  
  inflating: _build_ci/metacoq/test-suite/vs.v  
   creating: _build_ci/metacoq/translations/
  inflating: _build_ci/metacoq/translations/Makefile  
  inflating: _build_ci/metacoq/translations/Makefile.coq.local  
  inflating: _build_ci/metacoq/translations/MiniHoTT.v  
  inflating: _build_ci/metacoq/translations/MiniHoTT_paths.v  
  inflating: _build_ci/metacoq/translations/README.md  
  inflating: _build_ci/metacoq/translations/_CoqProject.in  
  inflating: _build_ci/metacoq/translations/metacoq-config  
  inflating: _build_ci/metacoq/translations/param_binary.v  
  inflating: _build_ci/metacoq/translations/param_cheap_packed.v  
  inflating: _build_ci/metacoq/translations/param_generous_packed.v  
  inflating: _build_ci/metacoq/translations/param_generous_unpacked.v  
  inflating: _build_ci/metacoq/translations/param_original.v  
  inflating: _build_ci/metacoq/translations/sigma.v  
  inflating: _build_ci/metacoq/translations/standard_model.v  
  inflating: _build_ci/metacoq/translations/times_bool_fun.v  
  inflating: _build_ci/metacoq/translations/times_bool_fun2.v  
  inflating: _build_ci/metacoq/translations/translation_utils.v  
++ popd
/github/workspace/builds/coq /github/workspace
++ echo ::endgroup::
::endgroup::
++ echo '::group::download passing artifacts @ e8040a4badf578528384f6852cb1986e4b2526a6 https://gitlab.com/coq/coq/-/jobs/1312838014/artifacts/download https://gitlab.com/coq/coq/-/jobs/1312838187/artifacts/download'
::group::download passing artifacts @ e8040a4badf578528384f6852cb1986e4b2526a6 https://gitlab.com/coq/coq/-/jobs/1312838014/artifacts/download https://gitlab.com/coq/coq/-/jobs/1312838187/artifacts/download
++ pushd coq-passing
/github/workspace/builds/coq/coq-passing /github/workspace/builds/coq /github/workspace
++ git checkout e8040a4badf578528384f6852cb1986e4b2526a6
Note: checking out 'e8040a4badf578528384f6852cb1986e4b2526a6'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at e8040a4bad Merge PR #14293: Moved lemmas from Reals/Cauchy/QExtra.v to a proper place in QArith
++ for i in ${PASSING_ARTIFACT_URLS}
+++ sha1sum
+++ cut '-d ' -f1
+++ echo https://gitlab.com/coq/coq/-/jobs/1312838014/artifacts/download
++ hash=d94f21eb0489b45b4d594eb3f9c461387395a473
++ wget https://gitlab.com/coq/coq/-/jobs/1312838014/artifacts/download -O artifact-d94f21eb0489b45b4d594eb3f9c461387395a473.zip
--2021-06-14 09:45:52--  https://gitlab.com/coq/coq/-/jobs/1312838014/artifacts/download
Resolving gitlab.com (gitlab.com)... 172.65.251.78, 2606:4700:90:0:f22e:fbec:5bed:a9b9
Connecting to gitlab.com (gitlab.com)|172.65.251.78|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-06-14 09:45:52 ERROR 404: Not Found.
minimizer log

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.

@JasonGross
Copy link
Member

Metacoq minimization now works!

Minimized File /github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v (from ci-metacoq) (full log on GitHub Actions)

Minimized Coq File (consider adding this file to the test-suite)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-deprecated-native-compiler-option" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/template-coq/theories" "MetaCoq.Template" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories" "MetaCoq.PCUIC" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Equations" "Equations" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2" "Ltac2" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/template-coq/build" "-top" "PCUICSigmaCalculus" "-native-compiler" "no") -*- *)
(* File reduced by coq-bug-finder from original input, then from 2424 lines to 30 lines, then from 134 lines to 2007 lines, then from 2006 lines to 201 lines, then from 291 lines to 459 lines, then from 463 lines to 248 lines, then from 337 lines to 449 lines, then from 453 lines to 257 lines, then from 337 lines to 784 lines, then from 783 lines to 277 lines, then from 356 lines to 2561 lines, then from 2544 lines to 293 lines, then from 366 lines to 779 lines, then from 781 lines to 348 lines, then from 419 lines to 458 lines, then from 462 lines to 353 lines, then from 422 lines to 626 lines, then from 628 lines to 364 lines, then from 419 lines to 502 lines, then from 504 lines to 385 lines, then from 439 lines to 1524 lines, then from 1521 lines to 421 lines, then from 470 lines to 673 lines, then from 673 lines to 437 lines, then from 481 lines to 561 lines, then from 565 lines to 456 lines, then from 460 lines to 456 lines *)
(* coqc version 8.15+alpha compiled with OCaml 4.05.0
   coqtop version 8.15+alpha *)
Axiom proof_admitted : False.
Tactic Notation "admit" := abstract case proof_admitted.
Require Coq.Lists.SetoidList.
Module Export MetaCoq_DOT_Template_DOT_utils_DOT_MCPrelude.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCPrelude.

Coercion is_true : bool >-> Sortclass.

Notation "'∑' x .. y , p" := (sigT (fun x => .. (sigT (fun y => p%type)) ..))
  (at level 200, x binder, right associativity,
   format "'[' '∑'  '/  ' x  ..  y ,  '/  ' p ']'")
  : type_scope.

End MCPrelude.

End utils.

End Template.

End MetaCoq.

End MetaCoq_DOT_Template_DOT_utils_DOT_MCPrelude.
Require Coq.ssr.ssreflect.
Require Coq.Floats.SpecFloat.
Module Export MetaCoq_DOT_Template_DOT_utils_DOT_MCRelations.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCRelations.
Import Coq.Classes.CRelationClasses.

Infix "<~>" := iffT (at level 90).

End MCRelations.

End utils.

End Template.

End MetaCoq.

End MetaCoq_DOT_Template_DOT_utils_DOT_MCRelations.
Module Export MetaCoq_DOT_Template_DOT_utils_DOT_MCList.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCList.
Import Coq.Lists.SetoidList.

Export ListNotations.

Notation "#| l |" := (List.length l) (at level 0, l at level 99, format "#| l |").

Definition rev {A} (l : list A) : list A :=
  let fix aux (l : list A) (acc : list A) : list A :=
      match l with
      | [] => acc
      | x :: l => aux l (x :: acc)
      end
  in aux l [].

Lemma nth_error_Some' {A} l n : (∑ x : A, nth_error l n = Some x) <~> n < length l.
admit.
Defined.

End MCList.

End utils.

End Template.

End MetaCoq.

End MetaCoq_DOT_Template_DOT_utils_DOT_MCList.
Module Export MetaCoq_DOT_Template_DOT_utils_DOT_MCProd.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCProd.

Notation "x × y" := (prod x y ) (at level 80, right associativity).

Definition on_snd {A B C} (f : B -> C) (p : A * B) :=
  (fst p, f (snd p)).

Definition test_snd {A B} (f : B -> bool) (p : A * B) :=
  f (snd p).

End MCProd.

End utils.

End Template.

End MetaCoq.

End MetaCoq_DOT_Template_DOT_utils_DOT_MCProd.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCUtils.
Export MetaCoq.Template.utils.MCList.

End MCUtils.
Export Coq.Bool.Bool.
Export Coq.ZArith.ZArith.
Export Coq.Strings.String.
Export Coq.Lists.List.
Export MetaCoq.Template.utils.MCUtils.
Notation "A * B" := (prod A B) : type_scope2.
Global Open Scope type_scope2.
Import Coq.Floats.SpecFloat.

Definition ident   := string.

Definition dirpath := list ident.

Inductive modpath :=
| MPfile  (dp : dirpath)
| MPbound (dp : dirpath) (id : ident) (i : nat)
| MPdot   (mp : modpath) (id : ident).

Definition kername := modpath × ident.

Inductive name : Set :=
| nAnon
| nNamed (_ : ident).

Inductive relevance : Set := Relevant | Irrelevant.

Record binder_annot (A : Type) := mkBindAnn { binder_name : A; binder_relevance : relevance }.

Definition aname := binder_annot name.

Record inductive : Set := mkInd { inductive_mind : kername ;
                                  inductive_ind : nat }.

Definition projection : Set := inductive * nat * nat .

Record def term := mkdef {
  dname : aname;
  dtype : term;
  dbody : term;
  rarg  : nat  }.

Arguments dname {term} _.
Arguments dtype {term} _.
Arguments dbody {term} _.
Arguments rarg {term} _.

Definition map_def {A B} (tyf bodyf : A -> B) (d : def A) :=
  {| dname := d.(dname); dtype := tyf d.(dtype); dbody := bodyf d.(dbody); rarg := d.(rarg) |}.

Definition mfixpoint term := list (def term).

Definition test_def {A} (tyf bodyf : A -> bool) (d : def A) :=
  tyf d.(dtype) && bodyf d.(dbody).

Definition uint_size := 63.
Definition uint_wB := (2 ^ (Z.of_nat uint_size))%Z.
Definition uint63_model := { z : Z | ((0 <=? z) && (z <? uint_wB))%Z }.

Definition prec := 53%Z.
Definition emax := 1024%Z.

Definition float64_model := sig (valid_binary prec emax).

Module Export Level.
  Inductive t_ : Set :=
  | lSet
  | Level (_ : string)
  | Var (_ : nat) .

  Definition t := t_.

Module Export Universe.

  Definition t := t_.

Module Export Instance.

  Definition t : Set := list Level.t.

Module Type Term.

  Parameter Inline term : Type.

  Parameter Inline tRel : nat -> term.

End Term.

Module Environment (T : Term).

  Import T.

  Record context_decl := mkdecl {
    decl_name : aname ;
    decl_body : option term ;
    decl_type : term
  }.

  Definition vass x A :=
    {| decl_name := x ; decl_body := None ; decl_type := A |}.

  Definition context := list context_decl.

  Fixpoint reln (l : list term) (p : nat) (Γ0 : list context_decl) {struct Γ0} : list term :=
    match Γ0 with
    | [] => l
    | {| decl_body := Some _ |} :: hyps => reln l (p + 1) hyps
    | {| decl_body := None |} :: hyps => reln (tRel p :: l) (p + 1) hyps
    end.

  Definition to_extended_list_k Γ k := reln [] k Γ.
  Definition to_extended_list Γ := to_extended_list_k Γ 0.
End Environment.

Variant prim_tag :=
  | primInt
  | primFloat.

Inductive prim_model (term : Type) : prim_tag -> Type :=
| primIntModel (i : uint63_model) : prim_model term primInt
| primFloatModel (f : float64_model) : prim_model term primFloat.

Definition prim_val term := ∑ t : prim_tag, prim_model term t.

Inductive term :=
| tRel (n : nat)
| tVar (i : ident)
| tEvar (n : nat) (l : list term)
| tSort (u : Universe.t)
| tProd (na : aname) (A B : term)
| tLambda (na : aname) (A t : term)
| tLetIn (na : aname) (b B t : term)
| tApp (u v : term)
| tConst (k : kername) (ui : Instance.t)
| tInd (ind : inductive) (ui : Instance.t)
| tConstruct (ind : inductive) (n : nat) (ui : Instance.t)
| tCase (indn : inductive * nat) (p c : term) (brs : list (nat * term))
| tProj (p : projection) (c : term)
| tFix (mfix : mfixpoint term) (idx : nat)
| tCoFix (mfix : mfixpoint term) (idx : nat)

| tPrim (prim : prim_val term).

Module PCUICTerm <: Term.

  Definition term := term.

  Definition tRel := tRel.

End PCUICTerm.

Module PCUICEnvironment := Environment PCUICTerm.
Include PCUICEnvironment.
Import Nat.

Definition shiftn k f :=
  fun n => if Nat.ltb n k then n else k + (f (n - k)).

Fixpoint rename f t : term :=
  match t with
  | tRel i => tRel (f i)
  | tEvar ev args => tEvar ev (List.map (rename f) args)
  | tLambda na T M => tLambda na (rename f T) (rename (shiftn 1 f) M)
  | tApp u v => tApp (rename f u) (rename f v)
  | tProd na A B => tProd na (rename f A) (rename (shiftn 1 f) B)
  | tLetIn na b t b' => tLetIn na (rename f b) (rename f t) (rename (shiftn 1 f) b')
  | tCase ind p c brs =>
    let brs' := List.map (on_snd (rename f)) brs in
    tCase ind (rename f p) (rename f c) brs'
  | tProj p c => tProj p (rename f c)
  | tFix mfix idx =>
    let mfix' := List.map (map_def (rename f) (rename (shiftn (List.length mfix) f))) mfix in
    tFix mfix' idx
  | tCoFix mfix idx =>
    let mfix' := List.map (map_def (rename f) (rename (shiftn (List.length mfix) f))) mfix in
    tCoFix mfix' idx
  | x => x
  end.

Fixpoint lift n k t : term :=
  match t with
  | tRel i => tRel (if Nat.leb k i then (n + i) else i)
  | tEvar ev args => tEvar ev (List.map (lift n k) args)
  | tLambda na T M => tLambda na (lift n k T) (lift n (S k) M)
  | tApp u v => tApp (lift n k u) (lift n k v)
  | tProd na A B => tProd na (lift n k A) (lift n (S k) B)
  | tLetIn na b t b' => tLetIn na (lift n k b) (lift n k t) (lift n (S k) b')
  | tCase ind p c brs =>
    let brs' := List.map (on_snd (lift n k)) brs in
    tCase ind (lift n k p) (lift n k c) brs'
  | tProj p c => tProj p (lift n k c)
  | tFix mfix idx =>
    let k' := List.length mfix + k in
    let mfix' := List.map (map_def (lift n k) (lift n k')) mfix in
    tFix mfix' idx
  | tCoFix mfix idx =>
    let k' := List.length mfix + k in
    let mfix' := List.map (map_def (lift n k) (lift n k')) mfix in
    tCoFix mfix' idx
  | x => x
  end.

Notation lift0 n := (lift n 0).

Fixpoint subst s k u :=
  match u with
  | tRel n =>
    if Nat.leb k n then
      match nth_error s (n - k) with
      | Some b => lift0 k b
      | None => tRel (n - List.length s)
      end
    else tRel n
  | tEvar ev args => tEvar ev (List.map (subst s k) args)
  | tLambda na T M => tLambda na (subst s k T) (subst s (S k) M)
  | tApp u v => tApp (subst s k u) (subst s k v)
  | tProd na A B => tProd na (subst s k A) (subst s (S k) B)
  | tLetIn na b ty b' => tLetIn na (subst s k b) (subst s k ty) (subst s (S k) b')
  | tCase ind p c brs =>
    let brs' := List.map (on_snd (subst s k)) brs in
    tCase ind (subst s k p) (subst s k c) brs'
  | tProj p c => tProj p (subst s k c)
  | tFix mfix idx =>
    let k' := List.length mfix + k in
    let mfix' := List.map (map_def (subst s k) (subst s k')) mfix in
    tFix mfix' idx
  | tCoFix mfix idx =>
    let k' := List.length mfix + k in
    let mfix' := List.map (map_def (subst s k) (subst s k')) mfix in
    tCoFix mfix' idx
  | x => x
  end.

Inductive assumption_context : context -> Prop :=
| assumption_context_nil : assumption_context []
| assumption_context_vass na t Γ : assumption_context Γ -> assumption_context (vass na t :: Γ).

Fixpoint closedn k (t : term) : bool :=
  match t with
  | tRel i => Nat.ltb i k
  | tEvar ev args => List.forallb (closedn k) args
  | tLambda _ T M | tProd _ T M => closedn k T && closedn (S k) M
  | tApp u v => closedn k u && closedn k v
  | tLetIn na b t b' => closedn k b && closedn k t && closedn (S k) b'
  | tCase ind p c brs =>
    let brs' := List.forallb (test_snd (closedn k)) brs in
    closedn k p && closedn k c && brs'
  | tProj p c => closedn k c
  | tFix mfix idx =>
    let k' := List.length mfix + k in
    List.forallb (test_def (closedn k) (closedn k')) mfix
  | tCoFix mfix idx =>
    let k' := List.length mfix + k in
    List.forallb (test_def (closedn k) (closedn k')) mfix
  | _ => true
  end.

Definition up k (s : nat -> term) :=
  fun i =>
    if k <=? i then rename (add k) (s (i - k))
    else tRel i.

Fixpoint inst s u :=
  match u with
  | tRel n => s n
  | tEvar ev args => tEvar ev (List.map (inst s) args)
  | tLambda na T M => tLambda na (inst s T) (inst (up 1 s) M)
  | tApp u v => tApp (inst s u) (inst s v)
  | tProd na A B => tProd na (inst s A) (inst (up 1 s) B)
  | tLetIn na b ty b' => tLetIn na (inst s b) (inst s ty) (inst (up 1 s) b')
  | tCase ind p c brs =>
    let brs' := List.map (on_snd (inst s)) brs in
    tCase ind (inst s p) (inst s c) brs'
  | tProj p c => tProj p (inst s c)
  | tFix mfix idx =>
    let mfix' := map (map_def (inst s) (inst (up (List.length mfix) s))) mfix in
    tFix mfix' idx
  | tCoFix mfix idx =>
    let mfix' := map (map_def (inst s) (inst (up (List.length mfix) s))) mfix in
    tCoFix mfix' idx
  | x => x
  end.

Declare Scope sigma_scope.
Local Open Scope sigma_scope.

Notation "t '.[' σ ]" := (inst σ t) (at level 6, format "t .[ σ ]") : sigma_scope.

Definition subst_compose (σ τ : nat -> term) :=
  fun i => (σ i).[τ].

Infix "∘s" := subst_compose (at level 40) : sigma_scope.

Definition ids (x : nat) := tRel x.

Lemma subst_ids t : t.[ids] = t.
admit.
Defined.

Definition shiftk (k : nat) (x : nat) := tRel (k + x).
Notation "↑^ k" := (shiftk k) (at level 30, k at level 2, format "↑^ k") : sigma_scope.

Definition subst_consn {A} (l : list A) (σ : nat -> A) :=
  fun i =>
    match List.nth_error l i with
    | None => σ (i - List.length l)
    | Some t => t
    end.

Notation " t ⋅n s " := (subst_consn t s) (at level 40) : sigma_scope.

Fixpoint idsn n : list term :=
  match n with
  | 0 => []
  | S n => idsn n ++ [tRel n]
  end.

Definition Upn n σ := idsn n ⋅n (σ ∘s ↑^n).
Notation "⇑^ n σ" := (Upn n σ) (at level 30, n at level 2, format "⇑^ n  σ") : sigma_scope.

Theorem subst_inst s k t : subst s k t = inst (⇑^k (subst_consn s ids)) t.
admit.
Defined.

Hint Rewrite @subst_inst : sigma.
Import Coq.ssr.ssreflect.

Lemma inst_ext_closed s s' k t :
  closedn k t ->
  (forall x, x < k -> s x = s' x) ->
  inst s t = inst s' t.
admit.
Defined.

Lemma subst_id s Γ t :
  closedn #|s| t ->
  assumption_context Γ ->
  s = List.rev (to_extended_list Γ) ->
  subst s 0 t = t.
Proof.
  intros cl ass eq.
  autorewrite with sigma.
  rewrite -{2}(subst_ids t).
  eapply inst_ext_closed; eauto.
  intros.
  unfold ids, subst_consn.
simpl.
  destruct (snd (nth_error_Some' s x) H).
Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted) (truncated to 8.0KiB; full 14KiB file on GitHub Actions Artifacts under cwd/tmp.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-deprecated-native-compiler-option" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/template-coq/theories" "MetaCoq.Template" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories" "MetaCoq.PCUIC" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Equations" "Equations" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2" "Ltac2" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/template-coq/build" "-top" "PCUICSigmaCalculus" "-native-compiler" "no") -*- *)
(* File reduced by coq-bug-finder from original input, then from 2424 lines to 30 lines, then from 134 lines to 2007 lines, then from 2006 lines to 201 lines, then from 291 lines to 459 lines, then from 463 lines to 248 lines, then from 337 lines to 449 lines, then from 453 lines to 257 lines, then from 337 lines to 784 lines, then from 783 lines to 277 lines, then from 356 lines to 2561 lines, then from 2544 lines to 293 lines, then from 366 lines to 779 lines, then from 781 lines to 348 lines, then from 419 lines to 458 lines, then from 462 lines to 353 lines, then from 422 lines to 626 lines, then from 628 lines to 364 lines, then from 419 lines to 502 lines, then from 504 lines to 385 lines, then from 439 lines to 1524 lines, then from 1521 lines to 421 lines, then from 470 lines to 673 lines, then from 673 lines to 437 lines, then from 481 lines to 561 lines, then from 565 lines to 456 lines, then from 460 lines to 452 lines *)
(* coqc version 8.15+alpha compiled with OCaml 4.05.0
   coqtop version 8.15+alpha *)
Axiom proof_admitted : False.
Tactic Notation "admit" := abstract case proof_admitted.
Require Coq.Lists.SetoidList.
Module Export MetaCoq_DOT_Template_DOT_utils_DOT_MCPrelude.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCPrelude.

Coercion is_true : bool >-> Sortclass.

Notation "'∑' x .. y , p" := (sigT (fun x => .. (sigT (fun y => p%type)) ..))
  (at level 200, x binder, right associativity,
   format "'[' '∑'  '/  ' x  ..  y ,  '/  ' p ']'")
  : type_scope.

End MCPrelude.

End utils.

End Template.

End MetaCoq.

End MetaCoq_DOT_Template_DOT_utils_DOT_MCPrelude.
Require Coq.ssr.ssreflect.
Require Coq.Floats.SpecFloat.
Module Export MetaCoq_DOT_Template_DOT_utils_DOT_MCRelations.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCRelations.
Import Coq.Classes.CRelationClasses.

Infix "<~>" := iffT (at level 90).

End MCRelations.

End utils.

End Template.

End MetaCoq.

End MetaCoq_DOT_Template_DOT_utils_DOT_MCRelations.
Module Export MetaCoq_DOT_Template_DOT_utils_DOT_MCList.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCList.
Import Coq.Lists.SetoidList.

Export ListNotations.

Notation "#| l |" := (List.length l) (at level 0, l at level 99, format "#| l |").

Definition rev {A} (l : list A) : list A :=
  let fix aux (l : list A) (acc : list A) : list A :=
      match l with
      | [] => acc
      | x :: l => aux l (x :: acc)
      end
  in aux l [].

Lemma nth_error_Some' {A} l n : (∑ x : A, nth_error l n = Some x) <~> n < length l.
admit.
Defined.

End MCList.

End utils.

End Template.

End MetaCoq.

End MetaCoq_DOT_Template_DOT_utils_DOT_MCList.
Module Export MetaCoq_DOT_Template_DOT_utils_DOT_MCProd.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCProd.

Notation "x × y" := (prod x y ) (at level 80, right associativity).

Definition on_snd {A B C} (f : B -> C) (p : A * B) :=
  (fst p, f (snd p)).

Definition test_snd {A B} (f : B -> bool) (p : A * B) :=
  f (snd p).

End MCProd.

End utils.

End Template.

End MetaCoq.

End MetaCoq_DOT_Template_DOT_utils_DOT_MCProd.
Module Export MetaCoq.
Module Export Template.
Module Export utils.
Module Export MCUtils.
Export MetaCoq.Template.utils.MCList.

End MCUtils.
Export Coq.Bool.Bool.
Export Coq.ZArith.ZArith.
Export Coq.Strings.String.
Export Coq.Lists.List.
Export MetaCoq.Template.utils.MCUtils.
Notation "A * B" := (prod A B) : type_scope2.
Global Open Scope type_scope2.
Import Coq.Floats.SpecFloat.

Definition ident   := string.

Definition dirpath := list ident.

Inductive modpath :=
| MPfile  (dp : dirpath)
| MPbound (dp : dirpath) (id : ident) (i : nat)
| MPdot   (mp : modpath) (id : ident).

Definition kername := modpath × ident.

Inductive name : Set :=
| nAnon
| nNamed (_ : ident).

Inductive relevance : Set := Relevant | Irrelevant.

Record binder_annot (A : Type) := mkBindAnn { binder_name : A; binder_relevance : relevance }.

Definition aname := binder_annot name.

Record inductive : Set := mkInd { inductive_mind : kername ;
                                  inductive_ind : nat }.

Definition projection : Set := inductive * nat * nat .

Record def term := mkdef {
  dname : aname;
  dtype : term;
  dbody : term;
  rarg  : nat  }.

Arguments dname {term} _.
Arguments dtype {term} _.
Arguments dbody {term} _.
Arguments rarg {term} _.

Definition map_def {A B} (tyf bodyf : A -> B) (d : def A) :=
  {| dname := d.(dname); dtype := tyf d.(dtype); dbody := bodyf d.(dbody); rarg := d.(rarg) |}.

Definition mfixpoint term := list (def term).

Definition test_def {A} (tyf bodyf : A -> bool) (d : def A) :=
  tyf d.(dtype) && bodyf d.(dbody).

Definition uint_size := 63.
Definition uint_wB := (2 ^ (Z.of_nat uint_size))%Z.
Definition uint63_model := { z : Z | ((0 <=? z) && (z <? uint_wB))%Z }.

Definition prec := 53%Z.
Definition emax := 1024%Z.

Definition float64_model := sig (valid_binary prec emax).

Module Export Level.
  Inductive t_ : Set :=
  | lSet
  | Level (_ : string)
  | Var (_ : nat) .

  Definition t := t_.

Module Export Universe.

  Definition t := t_.

Module Export Instance.

  Definition t : Set := list Level.t.

Module Type Term.

End Term.

Module Environment (T : Term).

  Import T.

  Record context_decl := mkdecl {
    decl_name : aname ;
    decl_body : option term ;
    decl_type : term
  }.

  Definition vass x A :=
    {| decl_name := x ; decl_body := None ; decl_type := A |}.

  Definition context := list context_decl.

  Fixpoint reln (l : list term) (p : nat) (Γ0 : list context_decl) {struct Γ0} : list term :=
    match Γ0 with
    | [] => l
    | {| decl_body := Some _ |} :: hyps => reln l (p + 1) hyps
    | {| decl_body := None |} :: hyps => reln (tRel p :: l) (p + 1) hyps
    end.

  Definition to_extended_list_k Γ k := reln [] k Γ.
  Definition to_extended_list Γ := to_extended_list_k Γ 0.
End Environment.

Variant prim_tag :=
  | primInt
  | primFloat.

Inductive prim_model (term : Type) : prim_tag -> Type :=
| primIntModel (i : uint63_model) : prim_model term primInt
| primFloatModel (f : float64_model) : prim_model term primFloat.

Definition prim_val term := ∑ t : prim_tag, prim_model term t.

Inductive term :=
| tRel (n : nat)
| tVar (i : ident)
| tEvar (n : nat) (l : list term)
| tSort (u : Universe.t)
| tProd (na : aname) (A B : term)
| tLambda (na : aname) (A t : term)
| tLetIn (na : aname) (b B t : term)
| tApp (u v : term)
| tConst (k : kername) (ui : Instance.t)
| tInd (ind : inductive) (ui : Instance.t)
| tConstruct (ind : inductive) (n : nat) (ui : Instance.t)
| tCase (indn : inductive * nat) (p c : term) (brs : list (nat * term))
| tProj (p : projection) (c : term)
| tFix (mfix : mfixpoint term) (idx : nat)
| tCoFix (mfix : mfixpoint term) (idx : nat)

| tPrim (prim : prim_val term).

Module PCUICTerm <: Term.

  Definition term := term.

  Definition tRel := tRel.

End PCUICTerm.

Module PCUICEnvironment := Environment PCUICTerm.
Include PCUICEnvironment.
Import Nat.

Definition shiftn k f :=
  fun n => if Nat.ltb n k then n else k + (f (n - k)).

Fixpoint rename f t : term :=
  match t with
  | tRel i => tRel (f i)
  | tEvar ev args => tEvar ev (List.map (rename f) args)
  | tLambda na T M => tLambda na (rename f T) (rename (shiftn 1 f) M)
  | tApp u v => tApp (rename f u) (rename f v)
  | tProd na A B => tProd na (rename f A) (rename (shiftn 1 f) B)
  | tLetIn na b t b' => tLetIn na (rename f b) (re
Build Log (truncated to last 8.0KiB; full 3.6MiB file on GitHub Actions Artifacts under build.log)
 rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 121, characters 0-41:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 134, characters 0-40:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 140, characters 0-39:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 151, characters 0-44:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 151, characters 0-44:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 153, characters 0-55:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 160, characters 0-33:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 185, characters 0-32:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 200, characters 0-43:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 218, characters 0-49:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 291, characters 0-4:
Warning: The default value for instance locality is currently "local" in a
section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding instances outside of sections without
specifying an explicit locality is therefore deprecated. It is recommended to
use "export" whenever possible.
[deprecated-instance-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 330, characters 0-34:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
File "/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic/theories/PCUICSigmaCalculus.v", line 405, characters 17-36:
Error:
In environment
s : list term
Γ : context
t : term
cl : closedn #|s| t
ass : assumption_context Γ
eq : s = List.rev (to_extended_list Γ)
x : nat
H : x < #|s|
The term "nth_error_Some' s x" has type
 "(∑ x0 : term, nth_error s x = Some x0) <~> x < #|s|"
while it is expected to have type "?A * ?B".

Command exited with non-zero status 1
theories/PCUICSigmaCalculus.vo (real: 5.50, user: 5.13, sys: 0.35, mem: 534564 ko)
Makefile.pcuic:762: recipe for target 'theories/PCUICSigmaCalculus.vo' failed
make[5]: *** [theories/PCUICSigmaCalculus.vo] Error 1
Makefile.pcuic:385: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic'
Makefile:21: recipe for target 'theory' failed
make[3]: *** [theory] Error 2
make[3]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/metacoq/pcuic'
Makefile:58: recipe for target 'pcuic' failed
make[2]: *** [pcuic] Error 2
make[2]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/metacoq'
Makefile:81: recipe for target 'ci-local-noclean' failed
make[1]: *** [ci-local-noclean] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/metacoq'
Makefile.ci:108: recipe for target 'ci-metacoq' failed
make: *** [ci-metacoq] Error 2
/github/workspace/builds/coq /github/workspace
::endgroup::
Minimization Log (truncated to last 8.0KiB; full 353KiB file on GitHub Actions Artifacts under bug.log)
ns', 'Equations'), ('/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2', 'Ltac2'))
getting bug_01.glob (/github/workspace/cwd/bug_01.glob)

Sanity check passed.

Now, I will attempt to strip repeated newlines and trailing spaces from this file...

No strippable newlines or spaces.

Now, I will attempt to strip the comments from this file...

Succeeded in stripping comments.

In order to efficiently manipulate the file, I have to break it into statements.  I will attempt to do this by matching on periods.

Splitting successful.

I will now attempt to remove any lines after the line which generates the error.

No lines to trim.

In order to efficiently manipulate the file, I have to break it into definitions.  I will now attempt to do this.
Sending statements to coqtop...
Done.  Splitting to definitions...

Splitting to definitions successful.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Non-fatal error: Failed to remove variables and preserve the error.  
Writing intermediate code to /github/workspace/cwd/tmp.v.
The new error was:
File "/tmp/tmpj1mmc67c.v", line 113, characters 0-45:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope type_scope2.". [undeclared-scope,deprecated]
File "/tmp/tmpj1mmc67c.v", line 197, characters 23-27:
Error: The reference term was not found in the current environment.



I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to replace Qed Obligation with Admit Obligations

Admitting Qed Obligations successful.
Failed to do everything at once; trying one at a time.
Admitting Qed Obligations unsuccessful.
No successful changes.

I will now attempt to replace Qeds with Admitteds

Admitting Qeds successful.
Failed to do everything at once; trying one at a time.
Admitting Qeds unsuccessful.
No successful changes.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Non-fatal error: Failed to remove variables and preserve the error.  
Writing intermediate code to /github/workspace/cwd/tmp.v.
The new error was:
File "/tmp/tmpj1mmc67c.v", line 113, characters 0-45:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope type_scope2.". [undeclared-scope,deprecated]
File "/tmp/tmpj1mmc67c.v", line 197, characters 23-27:
Error: The reference term was not found in the current environment.



I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to admit [abstract ...]s

Admitting [abstract ...] successful.

Admitting [abstract ...] successful.
Admitting [abstract ...] unsuccessful.
Admitting [abstract ...] unsuccessful.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Non-fatal error: Failed to remove variables and preserve the error.  
Writing intermediate code to /github/workspace/cwd/tmp.v.
The new error was:
File "/tmp/tmpj1mmc67c.v", line 113, characters 0-45:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope type_scope2.". [undeclared-scope,deprecated]
File "/tmp/tmpj1mmc67c.v", line 197, characters 23-27:
Error: The reference term was not found in the current environment.



I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to replace Obligation with Admit Obligations

Admitting Obligations successful.
Failed to do everything at once; trying one at a time.
Admitting Obligations unsuccessful.
No successful changes.

I will now attempt to admit lemmas

Non-fatal error: Failed to admit lemmas and preserve the error.  
Writing intermediate code to /github/workspace/cwd/tmp.v.
The new error was:
File "/tmp/tmpty_il5i0.v", line 113, characters 0-45:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope type_scope2.". [undeclared-scope,deprecated]
File "/tmp/tmpty_il5i0.v", line 431, characters 0-33:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
Error: The module Instance, module Universe, module Level, module utils,
module Template and module MetaCoq need to be closed.


Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions

Non-fatal error: Failed to admit definitions and preserve the error.  
Writing intermediate code to /github/workspace/cwd/tmp.v.
The new error was:
File "/tmp/tmpty_il5i0.v", line 113, characters 0-45:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope type_scope2.". [undeclared-scope,deprecated]
File "/tmp/tmpty_il5i0.v", line 431, characters 0-33:
Warning: The default value for rewriting hint locality is currently "local"
in a section and "global" otherwise, but is scheduled to change in a future
release. For the time being, adding rewriting hints outside of sections
without specifying an explicit locality is therefore deprecated. It is
recommended to use "export" whenever possible.
[deprecated-hint-rewrite-without-locality,deprecated]
Error: The module Instance, module Universe, module Level, module utils,
module Template and module MetaCoq need to be closed.


Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to export modules
Module exportation unsuccessful.

I will now attempt to split imports and exports
Import/Export splitting unsuccessful.

I will now attempt to split := definitions
One-line definition splitting unsuccessful.

I will now attempt to remove all lines, one at a time
Line removal unsuccessful.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Non-fatal error: Failed to remove variables and preserve the error.  
Writing intermediate code to /github/workspace/cwd/tmp.v.
The new error was:
File "/tmp/tmpj1mmc67c.v", line 113, characters 0-45:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope type_scope2.". [undeclared-scope,deprecated]
File "/tmp/tmpj1mmc67c.v", line 197, characters 23-27:
Error: The reference term was not found in the current environment.



I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to remove empty sections

No empty sections to remove.

Now, I will attempt to strip repeated newlines and trailing spaces from this file...

No strippable newlines or spaces.

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.

Originally posted by @coqbot-app[bot] in #14328 (comment)

@Alizter
Copy link
Contributor

Alizter commented Dec 1, 2021

Will these be fixed #4632 #15279?

@Alizter
Copy link
Contributor

Alizter commented Dec 17, 2021

I've rebased and added some bugs that are fixed to the test-suite.

@Alizter Alizter added part: rewriting tactics The rewrite, autorewrite, rewrite_strat, and setoid_rewrite tactics. kind: fix This fixes a bug or incorrect documentation. labels Dec 17, 2021
@Alizter
Copy link
Contributor

Alizter commented Dec 17, 2021

I don't think we need to update any documentation about this. AFAIK CMorphism ("computational" morphism btw) is not documented anywhere. It doesn't make sense to introduce it here either since this is a bug fix. Though it could also be argued that this is the "official" introduction of the polymorphic generalized rewriting in which case some documentation should be written.

I'm going to mark this as ready for review since I would like to see these bugs fixed soon.

@Alizter Alizter marked this pull request as ready for review December 17, 2021 10:44
@Alizter Alizter requested review from a team as code owners December 17, 2021 10:44
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Dec 17, 2021

Hey, I have detected that there were CI failures at commit a771fd3 without any failure in the test-suite.
I checked that the corresponding jobs for the base commit 965e635 succeeded. You can ask me to try to extract a minimal test case from this so that it can be added to the test-suite.
If you tag me saying @coqbot ci minimize, I will minimize the following targets: ci-category_theory, ci-metacoq.

1 similar comment
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Dec 17, 2021

Hey, I have detected that there were CI failures at commit a771fd3 without any failure in the test-suite.
I checked that the corresponding jobs for the base commit 965e635 succeeded. You can ask me to try to extract a minimal test case from this so that it can be added to the test-suite.
If you tag me saying @coqbot ci minimize, I will minimize the following targets: ci-category_theory, ci-metacoq.

@JasonGross

This comment has been minimized.

@coqbot-app

This comment has been minimized.

@coqbot-app

This comment has been minimized.

@Alizter
Copy link
Contributor

Alizter commented Dec 17, 2021

@JasonGross No need to minimize category_theory since it is just renaming a few things and getting rid of a Fail. I am currently preparing the overlay for that. I haven't yet worked out what metacoq is doing yet.

@Alizter Alizter added the needs: overlay This is breaking external developments we track in CI. label Dec 17, 2021
@Alizter

This comment has been minimized.

@JasonGross

This comment has been minimized.

@Alizter

This comment has been minimized.

@Alizter Alizter added kind: fix This fixes a bug or incorrect documentation. and removed kind: fix This fixes a bug or incorrect documentation. labels Jan 4, 2022
@SkySkimmer SkySkimmer self-assigned this Jan 5, 2022
@mattam82 mattam82 requested a review from a team as a code owner January 5, 2022 15:01
pretyping/evarsolve.mli Outdated Show resolved Hide resolved
mattam82 and others added 5 commits January 5, 2022 21:40
Author:    Matthieu Sozeau <mattam@mattam.org>
Date:      Tue Apr 20 11:40:50 2021 +0200

 Please enter the commit message for your changes. Lines starting
Author:    Matthieu Sozeau <mattam@mattam.org>
Date:      Tue Apr 20 11:40:50 2021 +0200
@SkySkimmer
Copy link
Contributor

ppedrot added a commit to MetaCoq/metacoq that referenced this pull request Jan 7, 2022
@Alizter
Copy link
Contributor

Alizter commented Jan 8, 2022

┌─────────────────────────────┬─────────────────────────┬───────────────────────────────────────┬───────────────────────────────────────┬─────────────────────────┬──────────────────┐
│                             │      user time [s]      │              CPU cycles               │           CPU instructions            │  max resident mem [KB]  │    mem faults    │
│                             │                         │                                       │                                       │                         │                  │
│                package_name │     NEW      OLD  PDIFF │            NEW             OLD  PDIFF │            NEW             OLD  PDIFF │     NEW      OLD  PDIFF │ NEW  OLD   PDIFF │
├─────────────────────────────┼─────────────────────────┼───────────────────────────────────────┼───────────────────────────────────────┼─────────────────────────┼──────────────────┤
│               coq-fourcolor │ 1463.50  1476.94  -0.91 │  6680660133915   6740857195484  -0.89 │ 12088958249443  12088800733467   0.00 │  725012   726148  -0.16 │   0    0     nan │
│                 coq-unimath │ 3606.77  3617.36  -0.29 │ 16500429607838  16548090442754  -0.29 │ 32894636051500  32896296688559  -0.01 │ 3862076  3864844  -0.07 │   0    0     nan │
│                coq-rewriter │  372.61   372.82  -0.06 │  1698407742044   1698629484271  -0.01 │  2771087800049   2770690003990   0.01 │ 1060012  1060008   0.00 │   0    0     nan │
│                coq-compcert │  290.76   290.81  -0.02 │  1319405519786   1320704266111  -0.10 │  1943483614059   1943549019001  -0.00 │ 1097980  1098360  -0.03 │   0    0     nan │
│ coq-rewriter-perf-SuperFast │  916.22   915.98   0.03 │  4181890781653   4180157959090   0.04 │  7203065741637   7195109383649   0.11 │ 1148360  1144612   0.33 │  15    5  200.00 │
│                    coq-core │   96.19    96.16   0.03 │   394365775206    389245740032   1.32 │   432966746013    432933807661   0.01 │  248700   249088  -0.16 │   0    0     nan │
│          coq-mathcomp-field │  114.32   114.20   0.11 │   523380591897    522878715261   0.10 │   853481964818    853486380105  -0.00 │  659732   661528  -0.27 │   0    0     nan │
│       coq-mathcomp-fingroup │   23.44    23.37   0.30 │   107110279052    106624019781   0.46 │   155425543261    155412875817   0.01 │  477984   477704   0.06 │   0    0     nan │
│                  coq-geocoq │  720.46   718.11   0.33 │  3286723927659   3274158244776   0.38 │  5155581291980   5155558335195   0.00 │ 1075772  1078344  -0.24 │   0    0     nan │
│                    coq-hott │  152.79   152.29   0.33 │   692182273638    689828262661   0.34 │  1076350395406   1076257164612   0.01 │  654804   655584  -0.12 │   0    0     nan │
│  coq-performance-tests-lite │  781.95   779.36   0.33 │  3551299957853   3537861727736   0.38 │  6004022845874   5985530368700   0.31 │ 2326068  1825768  27.40 │   0    0     nan │
│      coq-mathcomp-odd-order │  563.10   561.01   0.37 │  2580153240134   2570367852825   0.38 │  4328738560560   4328644524799   0.00 │  933840   933756   0.01 │   0    0     nan │
│                 coq-bignums │   28.41    28.30   0.39 │   129284404988    128787104602   0.39 │   175960268473    175978954302  -0.01 │  466488   468792  -0.49 │   0    0     nan │
│                     coq-vst │ 1146.46  1141.32   0.45 │  5231380439378   5209151256497   0.43 │  8416764592742   8416089762541   0.01 │ 1898156  1896124   0.11 │  17    5  240.00 │
│                  coq-flocq3 │   76.31    75.93   0.50 │   346714455580    346067580550   0.19 │   454932582560    454873817864   0.01 │  991232   987668   0.36 │   0    0     nan │
│                coq-bedrock2 │  187.92   186.97   0.51 │   858120773534    853272262088   0.57 │  1571982807391   1571728249546   0.02 │ 2057904  2053848   0.20 │   0    0     nan │
│               coq-perennial │ 4160.83  4133.95   0.65 │ 19003341231560  18881021566634   0.65 │ 30825380900694  30815484080689   0.03 │ 2512536  2612644  -3.83 │   0    0     nan │
│      coq-mathcomp-ssreflect │   25.95    25.76   0.74 │   118315367683    117323916731   0.85 │   147717658956    147714751014   0.00 │  533472   535576  -0.39 │   0    0     nan │
│      coq-mathcomp-character │   77.05    76.46   0.77 │   352741680206    349481110122   0.93 │   528726628036    528720841955   0.00 │  722752   726068  -0.46 │   0    0     nan │
│              coq-verdi-raft │  582.23   577.65   0.79 │  2659455833190   2638301702157   0.80 │  4047706226639   4047598044495   0.00 │ 1219688  1219924  -0.02 │   0    0     nan │
│           coq-iris-examples │  466.22   462.50   0.80 │  2125061880985   2107823324467   0.82 │  3144728116652   3143064959223   0.05 │ 1180960  1180856   0.01 │  12    5  140.00 │
│             coq-fiat-crypto │ 2943.56  2918.43   0.86 │ 13396093937646  13277890702214   0.89 │ 24371020471024  24369303871405   0.01 │ 3853360  3853272   0.00 │   1    0     nan │
│        coq-mathcomp-algebra │   63.92    63.35   0.90 │   292026913347    289775183019   0.78 │   399816368227    399758495915   0.01 │  559468   560372  -0.16 │   0    0     nan │
│                coq-coqprime │  179.58   177.78   1.01 │   821565162016    813352437034   1.01 │  1560225810146   1560058490083   0.01 │  826124   826144  -0.00 │   0    0     nan │
│                  coq-stdlib │  403.67   399.36   1.08 │  1677892541442   1662158724325   0.95 │  1445351539135   1444207280310   0.08 │  589864   590400  -0.09 │   0    0     nan │
│       coq-mathcomp-solvable │   88.16    87.21   1.09 │   403659721859    399010178047   1.17 │   613458012656    613417347335   0.01 │  668848   669064  -0.03 │   0    0     nan │
│                   coq-color │  264.80   261.78   1.15 │  1202646595227   1186675284124   1.35 │  1600211024657   1599626795082   0.04 │ 1140664  1140668  -0.00 │   0    0     nan │
│                   coq-verdi │   48.68    48.09   1.23 │   221171018637    217699870555   1.59 │   324491676580    324437524884   0.02 │  827804   828788  -0.12 │   0    0     nan │
│              coq-coquelicot │   34.85    34.38   1.37 │   156265627654    154509962825   1.14 │   202456404051    202544020510  -0.04 │  753316   748592   0.63 │   0    0     nan │
│       coq-engine-bench-lite │  177.75   175.33   1.38 │   770466790109    759785393130   1.41 │  1482483466505   1487933959614  -0.37 │ 1173596  1175704  -0.18 │   0    0     nan │
│                    coq-corn │  803.76   790.83   1.63 │  3667054379117   3606381684625   1.68 │  5590894702213   5588183438426   0.05 │  875836   874528   0.15 │   0    0     nan │
│                 coq-coqutil │   35.01    34.44   1.66 │   156276496749    155368640948   0.58 │   208104527133    208160825569  -0.03 │  602176   600420   0.29 │   0    0     nan │
│               coq-fiat-core │   53.91    52.96   1.79 │   236226824800    231734377054   1.94 │   324050610582    323762105207   0.09 │  473676   473804  -0.03 │   0    0     nan │
│            coq-math-classes │   95.00    93.32   1.80 │   431906670611    423363535854   2.02 │   592770093270    592484255393   0.05 │  495276   495144   0.03 │   0    0     nan │
│            coq-fiat-parsers │  335.72   326.69   2.76 │  1513870880881   1474774405928   2.65 │  2460779734141   2420920103001   1.65 │ 2788300  2789528  -0.04 │   0    0     nan │
└─────────────────────────────┴─────────────────────────┴───────────────────────────────────────┴───────────────────────────────────────┴─────────────────────────┴──────────────────┘

@Alizter
Copy link
Contributor

Alizter commented Jan 8, 2022

@SkySkimmer Would you say that is just noise?

@SkySkimmer
Copy link
Contributor

No, that's not noise.
It may be acceptable for fixing a bunch of bugs though.

@Alizter
Copy link
Contributor

Alizter commented Jan 10, 2022

@SkySkimmer Are we ready to merge?

@SkySkimmer
Copy link
Contributor

Waiting for the overlay

@Alizter
Copy link
Contributor

Alizter commented Jan 12, 2022

I checked corn and there doesn't appear to be any big slow downs, just a lot of smaller ones.

@Alizter
Copy link
Contributor

Alizter commented Jan 13, 2022

@SkySkimmer Overlays have been merged.

@SkySkimmer
Copy link
Contributor

@coqbot merge now

@coqbot-app coqbot-app bot merged commit 611468b into coq:master Jan 13, 2022
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jan 13, 2022

@SkySkimmer: Please take care of the following overlays:

  • 14137-alizter-setoid-rewrite-type.sh

SkySkimmer added a commit to SkySkimmer/coq that referenced this pull request Jan 13, 2022
… with univpoly"

This reverts commit 611468b, reversing
changes made to cc2efd8.

bedrock2 and test suite are broken, probably some parallel merge.
@SkySkimmer
Copy link
Contributor

Test suite and bedrock broke in master, not sure why so I made a revert PR #15476

@mattam82 mattam82 deleted the setoid-rewrite-type branch January 13, 2022 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment