Skip to content

Conversation

@Tragicus
Copy link
Contributor

@Tragicus Tragicus commented Oct 9, 2025

The unification algorithm sometimes fails on problems of the form ?a = t because variables that are not in the scope of ?a appear in t. This PR solves the case where the variable appears in an argument of an evar, e.g. ?b x, by instantiating the evar (?b) to forget the argument.
For instance, unifying forall x : ?T, f (?a x) and forall _ : ?T, ?b reduces to unifying f (?a x) and ?b, which fails because x is not available when instantiating ?b.

Fixes / closes #????

  • Added / updated test-suite.
  • Added changelog.
  • Added / updated documentation.
    • Documented any new / changed user messages.
    • Updated documented syntax by running make doc_gram_rsts.
  • Opened overlay pull requests.

Overlays (to be merged before this)

@Tragicus Tragicus requested a review from a team as a code owner October 9, 2025 09:19
@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 9, 2025
@Tragicus
Copy link
Contributor Author

Tragicus commented Oct 9, 2025

I am not sure what to do about bug_3209.v. It seems the problem it describes disappears with this PR. I expect we would not want to get rid of the file, do we keep only the first check, with a small rewriting of the above comment to explain what happens and get rid of everything below?

@ppedrot
Copy link
Member

ppedrot commented Oct 9, 2025

@coqbot run full ci

@coqbot-app coqbot-app bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 9, 2025
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

🔴 CI failures at commit 903d928 without any failure in the test-suite

✔️ Corresponding jobs for the base commit 3853feb succeeded

❔ Ask me to try to extract minimal test cases that can be added to the test-suite

🏃 @coqbot ci minimize will minimize the following targets: ci-argosy, ci-elpi_test, ci-hott, ci-iris
  • You can also pass me a specific list of targets to minimize as arguments.

…new variable when instantiating old shelved variable with the new one in `evarsolve/instantiate_evar`
@Tragicus
Copy link
Contributor Author

Tragicus commented Oct 9, 2025

I fail to reproduce the argosy issue (even after rebasing).

@ppedrot
Copy link
Member

ppedrot commented Oct 9, 2025

@coqbot ci minimize

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

I have initiated minimization at commit 903d928 for the suggested targets ci-argosy, ci-elpi_test, ci-hott, ci-iris as requested.

@SkySkimmer
Copy link
Contributor

It reproduces on my machine

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

Error: Could not minimize file in 3m 26s (from ci-argosy) (full log on GitHub Actions, cc @JasonGross)

build log (truncated to last 26KiB; full 3.1MiB file on GitHub Actions Artifacts under build.log)
coq-native/NStdlib_setoid_ring_BinList.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_BinList.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_BinList.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_BinList.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Cring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Cring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Cring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Cring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_theory.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_theory.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_theory.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_theory.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_InitialRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_InitialRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_InitialRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_InitialRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Integral_domain.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Integral_domain.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Integral_domain.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Integral_domain.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_NArithRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_NArithRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_NArithRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_NArithRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_initial.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_initial.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_initial.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_initial.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_polynom.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_polynom.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_polynom.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_polynom.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_RealField.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_RealField.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_RealField.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_RealField.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_base.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_base.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_base.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_base.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_polynom.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_polynom.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_polynom.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_polynom.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_theory.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_theory.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_theory.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_theory.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Q.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Q.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Q.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Q.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_R.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_R.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_R.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_R.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Z.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Z.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Z.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Z.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_ZArithRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_ZArithRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_ZArithRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_ZArithRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Algebra_syntax.v -> ../../../../../../../default/theories/setoid_ring/Algebra_syntax.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Algebra_syntax.vo -> ../../../../../../../default/theories/setoid_ring/Algebra_syntax.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ArithRing.v -> ../../../../../../../default/theories/setoid_ring/ArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ArithRing.vo -> ../../../../../../../default/theories/setoid_ring/ArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/BinList.v -> ../../../../../../../default/theories/setoid_ring/BinList.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/BinList.vo -> ../../../../../../../default/theories/setoid_ring/BinList.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Cring.v -> ../../../../../../../default/theories/setoid_ring/Cring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Cring.vo -> ../../../../../../../default/theories/setoid_ring/Cring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field.v -> ../../../../../../../default/theories/setoid_ring/Field.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field.vo -> ../../../../../../../default/theories/setoid_ring/Field.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_tac.v -> ../../../../../../../default/theories/setoid_ring/Field_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_tac.vo -> ../../../../../../../default/theories/setoid_ring/Field_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_theory.v -> ../../../../../../../default/theories/setoid_ring/Field_theory.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_theory.vo -> ../../../../../../../default/theories/setoid_ring/Field_theory.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/InitialRing.v -> ../../../../../../../default/theories/setoid_ring/InitialRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/InitialRing.vo -> ../../../../../../../default/theories/setoid_ring/InitialRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Integral_domain.v -> ../../../../../../../default/theories/setoid_ring/Integral_domain.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Integral_domain.vo -> ../../../../../../../default/theories/setoid_ring/Integral_domain.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/NArithRing.v -> ../../../../../../../default/theories/setoid_ring/NArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/NArithRing.vo -> ../../../../../../../default/theories/setoid_ring/NArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring.v -> ../../../../../../../default/theories/setoid_ring/Ncring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring.vo -> ../../../../../../../default/theories/setoid_ring/Ncring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_initial.v -> ../../../../../../../default/theories/setoid_ring/Ncring_initial.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_initial.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_initial.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_polynom.v -> ../../../../../../../default/theories/setoid_ring/Ncring_polynom.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_polynom.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_polynom.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_tac.v -> ../../../../../../../default/theories/setoid_ring/Ncring_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_tac.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/RealField.v -> ../../../../../../../default/theories/setoid_ring/RealField.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/RealField.vo -> ../../../../../../../default/theories/setoid_ring/RealField.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring.v -> ../../../../../../../default/theories/setoid_ring/Ring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring.vo -> ../../../../../../../default/theories/setoid_ring/Ring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_base.v -> ../../../../../../../default/theories/setoid_ring/Ring_base.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_base.vo -> ../../../../../../../default/theories/setoid_ring/Ring_base.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_polynom.v -> ../../../../../../../default/theories/setoid_ring/Ring_polynom.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_polynom.vo -> ../../../../../../../default/theories/setoid_ring/Ring_polynom.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_tac.v -> ../../../../../../../default/theories/setoid_ring/Ring_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_tac.vo -> ../../../../../../../default/theories/setoid_ring/Ring_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_theory.v -> ../../../../../../../default/theories/setoid_ring/Ring_theory.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_theory.vo -> ../../../../../../../default/theories/setoid_ring/Ring_theory.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Q.v -> ../../../../../../../default/theories/setoid_ring/Rings_Q.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Q.vo -> ../../../../../../../default/theories/setoid_ring/Rings_Q.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_R.v -> ../../../../../../../default/theories/setoid_ring/Rings_R.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_R.vo -> ../../../../../../../default/theories/setoid_ring/Rings_R.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Z.v -> ../../../../../../../default/theories/setoid_ring/Rings_Z.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Z.vo -> ../../../../../../../default/theories/setoid_ring/Rings_Z.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ZArithRing.v -> ../../../../../../../default/theories/setoid_ring/ZArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ZArithRing.vo -> ../../../../../../../default/theories/setoid_ring/ZArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrbool.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrbool.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrbool.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrbool.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrclasses.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrclasses.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrclasses.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrclasses.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssreflect.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssreflect.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssreflect.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssreflect.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrfun.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrfun.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrfun.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrfun.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrsetoid.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrsetoid.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrsetoid.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrsetoid.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrunder.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrunder.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrunder.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrunder.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrbool.v -> ../../../../../../../default/theories/ssr/ssrbool.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrbool.vo -> ../../../../../../../default/theories/ssr/ssrbool.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrclasses.v -> ../../../../../../../default/theories/ssr/ssrclasses.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrclasses.vo -> ../../../../../../../default/theories/ssr/ssrclasses.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssreflect.v -> ../../../../../../../default/theories/ssr/ssreflect.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssreflect.vo -> ../../../../../../../default/theories/ssr/ssreflect.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrfun.v -> ../../../../../../../default/theories/ssr/ssrfun.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrfun.vo -> ../../../../../../../default/theories/ssr/ssrfun.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrsetoid.v -> ../../../../../../../default/theories/ssr/ssrsetoid.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrsetoid.vo -> ../../../../../../../default/theories/ssr/ssrsetoid.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrunder.v -> ../../../../../../../default/theories/ssr/ssrunder.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrunder.vo -> ../../../../../../../default/theories/ssr/ssrunder.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/.coq-native/NStdlib_ssrmatching_ssrmatching.cmi -> ../../../../../../../../default/theories/ssrmatching/NStdlib_ssrmatching_ssrmatching.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/.coq-native/NStdlib_ssrmatching_ssrmatching.cmxs -> ../../../../../../../../default/theories/ssrmatching/NStdlib_ssrmatching_ssrmatching.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/ssrmatching.v -> ../../../../../../../default/theories/ssrmatching/ssrmatching.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/ssrmatching.vo -> ../../../../../../../default/theories/ssrmatching/ssrmatching.vo
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/META -> ../../../../default/META.rocq-stdlib
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/dune-package -> ../../../../default/rocq-stdlib.dune-package
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/opam -> ../../../../default/rocq-stdlib.opam
++ popd
/github/workspace/builds/coq /github/workspace
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::df -h\n'
::group::df -h
++ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          72G   56G   16G  78% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/root        72G   56G   16G  78% /usr/sbin/docker-init
tmpfs           7.9G     0  7.9G   0% /proc/acpi
tmpfs           7.9G     0  7.9G   0% /proc/scsi
tmpfs           7.9G     0  7.9G   0% /sys/firmware
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download'
::group::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download
++ printf '::warning::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download'
::warning::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download
++ pushd coq-passing
/github/workspace/builds/coq/coq-passing /github/workspace/builds/coq /github/workspace
++ mkdir -p _build_ci
++ ln -s _build_ci saved_build_ci
++ git checkout 3853febccfbc655239396d2d204fd431e2002232
Note: switching to '3853febccfbc655239396d2d204fd431e2002232'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3853febccf Merge PR #20947: Remove references to opam packages not in this repo.
++ for i in ${PASSING_ARTIFACT_URLS}
+++ printf %s https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download
+++ sha1sum
+++ cut '-d ' -f1
++ hash=bc8c03af4516326327e9010a010f8cdb9dc333f3
++ wget https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download -O artifact-bc8c03af4516326327e9010a010f8cdb9dc333f3.zip
--2025-10-09 12:43:09--  https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download
Resolving gitlab.inria.fr (gitlab.inria.fr)... 128.93.193.23
Connecting to gitlab.inria.fr (gitlab.inria.fr)|128.93.193.23|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-10-09 12:43:10 ERROR 404: Not Found.
minimizer log (truncated to last 26KiB; full 3.1MiB file on GitHub Actions Artifacts under bug.log)
coq-native/NStdlib_setoid_ring_BinList.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_BinList.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_BinList.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_BinList.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Cring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Cring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Cring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Cring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_theory.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_theory.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_theory.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_theory.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_InitialRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_InitialRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_InitialRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_InitialRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Integral_domain.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Integral_domain.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Integral_domain.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Integral_domain.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_NArithRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_NArithRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_NArithRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_NArithRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_initial.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_initial.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_initial.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_initial.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_polynom.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_polynom.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_polynom.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_polynom.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_RealField.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_RealField.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_RealField.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_RealField.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_base.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_base.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_base.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_base.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_polynom.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_polynom.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_polynom.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_polynom.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_theory.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_theory.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_theory.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_theory.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Q.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Q.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Q.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Q.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_R.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_R.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_R.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_R.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Z.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Z.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Z.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Z.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_ZArithRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_ZArithRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_ZArithRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_ZArithRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Algebra_syntax.v -> ../../../../../../../default/theories/setoid_ring/Algebra_syntax.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Algebra_syntax.vo -> ../../../../../../../default/theories/setoid_ring/Algebra_syntax.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ArithRing.v -> ../../../../../../../default/theories/setoid_ring/ArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ArithRing.vo -> ../../../../../../../default/theories/setoid_ring/ArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/BinList.v -> ../../../../../../../default/theories/setoid_ring/BinList.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/BinList.vo -> ../../../../../../../default/theories/setoid_ring/BinList.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Cring.v -> ../../../../../../../default/theories/setoid_ring/Cring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Cring.vo -> ../../../../../../../default/theories/setoid_ring/Cring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field.v -> ../../../../../../../default/theories/setoid_ring/Field.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field.vo -> ../../../../../../../default/theories/setoid_ring/Field.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_tac.v -> ../../../../../../../default/theories/setoid_ring/Field_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_tac.vo -> ../../../../../../../default/theories/setoid_ring/Field_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_theory.v -> ../../../../../../../default/theories/setoid_ring/Field_theory.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_theory.vo -> ../../../../../../../default/theories/setoid_ring/Field_theory.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/InitialRing.v -> ../../../../../../../default/theories/setoid_ring/InitialRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/InitialRing.vo -> ../../../../../../../default/theories/setoid_ring/InitialRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Integral_domain.v -> ../../../../../../../default/theories/setoid_ring/Integral_domain.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Integral_domain.vo -> ../../../../../../../default/theories/setoid_ring/Integral_domain.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/NArithRing.v -> ../../../../../../../default/theories/setoid_ring/NArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/NArithRing.vo -> ../../../../../../../default/theories/setoid_ring/NArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring.v -> ../../../../../../../default/theories/setoid_ring/Ncring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring.vo -> ../../../../../../../default/theories/setoid_ring/Ncring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_initial.v -> ../../../../../../../default/theories/setoid_ring/Ncring_initial.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_initial.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_initial.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_polynom.v -> ../../../../../../../default/theories/setoid_ring/Ncring_polynom.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_polynom.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_polynom.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_tac.v -> ../../../../../../../default/theories/setoid_ring/Ncring_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_tac.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/RealField.v -> ../../../../../../../default/theories/setoid_ring/RealField.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/RealField.vo -> ../../../../../../../default/theories/setoid_ring/RealField.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring.v -> ../../../../../../../default/theories/setoid_ring/Ring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring.vo -> ../../../../../../../default/theories/setoid_ring/Ring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_base.v -> ../../../../../../../default/theories/setoid_ring/Ring_base.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_base.vo -> ../../../../../../../default/theories/setoid_ring/Ring_base.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_polynom.v -> ../../../../../../../default/theories/setoid_ring/Ring_polynom.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_polynom.vo -> ../../../../../../../default/theories/setoid_ring/Ring_polynom.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_tac.v -> ../../../../../../../default/theories/setoid_ring/Ring_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_tac.vo -> ../../../../../../../default/theories/setoid_ring/Ring_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_theory.v -> ../../../../../../../default/theories/setoid_ring/Ring_theory.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_theory.vo -> ../../../../../../../default/theories/setoid_ring/Ring_theory.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Q.v -> ../../../../../../../default/theories/setoid_ring/Rings_Q.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Q.vo -> ../../../../../../../default/theories/setoid_ring/Rings_Q.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_R.v -> ../../../../../../../default/theories/setoid_ring/Rings_R.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_R.vo -> ../../../../../../../default/theories/setoid_ring/Rings_R.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Z.v -> ../../../../../../../default/theories/setoid_ring/Rings_Z.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Z.vo -> ../../../../../../../default/theories/setoid_ring/Rings_Z.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ZArithRing.v -> ../../../../../../../default/theories/setoid_ring/ZArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ZArithRing.vo -> ../../../../../../../default/theories/setoid_ring/ZArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrbool.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrbool.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrbool.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrbool.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrclasses.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrclasses.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrclasses.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrclasses.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssreflect.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssreflect.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssreflect.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssreflect.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrfun.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrfun.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrfun.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrfun.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrsetoid.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrsetoid.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrsetoid.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrsetoid.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrunder.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrunder.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrunder.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrunder.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrbool.v -> ../../../../../../../default/theories/ssr/ssrbool.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrbool.vo -> ../../../../../../../default/theories/ssr/ssrbool.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrclasses.v -> ../../../../../../../default/theories/ssr/ssrclasses.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrclasses.vo -> ../../../../../../../default/theories/ssr/ssrclasses.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssreflect.v -> ../../../../../../../default/theories/ssr/ssreflect.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssreflect.vo -> ../../../../../../../default/theories/ssr/ssreflect.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrfun.v -> ../../../../../../../default/theories/ssr/ssrfun.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrfun.vo -> ../../../../../../../default/theories/ssr/ssrfun.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrsetoid.v -> ../../../../../../../default/theories/ssr/ssrsetoid.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrsetoid.vo -> ../../../../../../../default/theories/ssr/ssrsetoid.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrunder.v -> ../../../../../../../default/theories/ssr/ssrunder.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrunder.vo -> ../../../../../../../default/theories/ssr/ssrunder.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/.coq-native/NStdlib_ssrmatching_ssrmatching.cmi -> ../../../../../../../../default/theories/ssrmatching/NStdlib_ssrmatching_ssrmatching.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/.coq-native/NStdlib_ssrmatching_ssrmatching.cmxs -> ../../../../../../../../default/theories/ssrmatching/NStdlib_ssrmatching_ssrmatching.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/ssrmatching.v -> ../../../../../../../default/theories/ssrmatching/ssrmatching.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/ssrmatching.vo -> ../../../../../../../default/theories/ssrmatching/ssrmatching.vo
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/META -> ../../../../default/META.rocq-stdlib
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/dune-package -> ../../../../default/rocq-stdlib.dune-package
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/opam -> ../../../../default/rocq-stdlib.opam
++ popd
/github/workspace/builds/coq /github/workspace
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::df -h\n'
::group::df -h
++ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          72G   56G   16G  78% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/root        72G   56G   16G  78% /usr/sbin/docker-init
tmpfs           7.9G     0  7.9G   0% /proc/acpi
tmpfs           7.9G     0  7.9G   0% /proc/scsi
tmpfs           7.9G     0  7.9G   0% /sys/firmware
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download'
::group::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download
++ printf '::warning::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download'
::warning::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download
++ pushd coq-passing
/github/workspace/builds/coq/coq-passing /github/workspace/builds/coq /github/workspace
++ mkdir -p _build_ci
++ ln -s _build_ci saved_build_ci
++ git checkout 3853febccfbc655239396d2d204fd431e2002232
Note: switching to '3853febccfbc655239396d2d204fd431e2002232'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3853febccf Merge PR #20947: Remove references to opam packages not in this repo.
++ for i in ${PASSING_ARTIFACT_URLS}
+++ printf %s https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download
+++ sha1sum
+++ cut '-d ' -f1
++ hash=bc8c03af4516326327e9010a010f8cdb9dc333f3
++ wget https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download -O artifact-bc8c03af4516326327e9010a010f8cdb9dc333f3.zip
--2025-10-09 12:43:09--  https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download
Resolving gitlab.inria.fr (gitlab.inria.fr)... 128.93.193.23
Connecting to gitlab.inria.fr (gitlab.inria.fr)|128.93.193.23|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-10-09 12:43:10 ERROR 404: Not Found.

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.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

Error: Could not minimize file in 8m 27s (from ci-elpi_test) (full log on GitHub Actions, cc @JasonGross)

build log (truncated to last 26KiB; full 4.0MiB file on GitHub Actions Artifacts under build.log)
hook.cmi -> ../../../../../default/apps/coercion/src/.elpi_coercion_plugin.objs/byte/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/coercion/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmt -> ../../../../../default/apps/coercion/src/.elpi_coercion_plugin.objs/byte/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/coercion/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmx -> ../../../../../default/apps/coercion/src/.elpi_coercion_plugin.objs/native/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/coercion/rocq_elpi_coercion_hook.ml -> ../../../../../default/apps/coercion/src/rocq_elpi_coercion_hook.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.a -> ../../../../../default/apps/cs/src/elpi_cs_plugin.a
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cma -> ../../../../../default/apps/cs/src/elpi_cs_plugin.cma
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmi -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/byte/elpi_cs_plugin.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmt -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/byte/elpi_cs_plugin.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmx -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/native/elpi_cs_plugin.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmxa -> ../../../../../default/apps/cs/src/elpi_cs_plugin.cmxa
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmxs -> ../../../../../default/apps/cs/src/elpi_cs_plugin.cmxs
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.ml -> ../../../../../default/apps/cs/src/elpi_cs_plugin.ml-gen
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin__Rocq_elpi_cs_hook.cmi -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/byte/elpi_cs_plugin__Rocq_elpi_cs_hook.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin__Rocq_elpi_cs_hook.cmt -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/byte/elpi_cs_plugin__Rocq_elpi_cs_hook.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin__Rocq_elpi_cs_hook.cmx -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/native/elpi_cs_plugin__Rocq_elpi_cs_hook.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/rocq_elpi_cs_hook.ml -> ../../../../../default/apps/cs/src/rocq_elpi_cs_hook.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/dune-package -> ../../../../default/rocq-elpi.dune-package
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.a -> ../../../../../default/src/elpi_plugin.a
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cma -> ../../../../../default/src/elpi_plugin.cma
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmxa -> ../../../../../default/src/elpi_plugin.cmxa
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmxs -> ../../../../../default/src/elpi_plugin.cmxs
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.ml -> ../../../../../default/src/elpi_plugin.ml-gen
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_HOAS.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_HOAS.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_HOAS.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_HOAS.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_HOAS.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_HOAS.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_HOAS.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_HOAS.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_HOAS.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_HOAS.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_HOAS.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_HOAS.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_HOAS.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_HOAS.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_HOAS.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_arg_HOAS.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_syntax.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_syntax.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_syntax.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_syntax.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_syntax.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_arg_syntax.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_builtins.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_HOAS.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_HOAS.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_HOAS.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_HOAS.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_HOAS.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_builtins_HOAS.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_synterp.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_synterp.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_synterp.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_synterp.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_synterp.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_synterp.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_synterp.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_builtins_synterp.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_config.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_config.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_config.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_config.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_config.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_config.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_glob_quotation.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_glob_quotation.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_glob_quotation.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_glob_quotation.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_glob_quotation.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_glob_quotation.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_glob_quotation.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_glob_quotation.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_graph.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_graph.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_graph.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_graph.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_graph.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_graph.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_graph.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_graph.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_name_quotation.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_name_quotation.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_name_quotation.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_name_quotation.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_name_quotation.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_name_quotation.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_programs.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_programs.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_programs.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_programs.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_programs.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_programs.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_programs.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_programs.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_utils.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_utils.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_utils.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_utils.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_utils.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_utils.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_utils.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_utils.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_vernacular.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular_syntax.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular_syntax.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular_syntax.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular_syntax.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular_syntax.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_vernacular_syntax.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_HOAS.ml -> ../../../../../default/src/rocq_elpi_HOAS.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_HOAS.mli -> ../../../../../default/src/rocq_elpi_HOAS.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_arg_HOAS.ml -> ../../../../../default/src/rocq_elpi_arg_HOAS.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_arg_HOAS.mli -> ../../../../../default/src/rocq_elpi_arg_HOAS.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_arg_syntax.ml -> ../../../../../default/src/rocq_elpi_arg_syntax.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins.ml -> ../../../../../default/src/rocq_elpi_builtins.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins.mli -> ../../../../../default/src/rocq_elpi_builtins.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins_HOAS.ml -> ../../../../../default/src/rocq_elpi_builtins_HOAS.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins_arg_HOAS.ml -> ../../../../../default/src/rocq_elpi_builtins_arg_HOAS.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins_synterp.ml -> ../../../../../default/src/rocq_elpi_builtins_synterp.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins_synterp.mli -> ../../../../../default/src/rocq_elpi_builtins_synterp.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_config.ml -> ../../../../../default/src/rocq_elpi_config.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_glob_quotation.ml -> ../../../../../default/src/rocq_elpi_glob_quotation.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_glob_quotation.mli -> ../../../../../default/src/rocq_elpi_glob_quotation.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_graph.ml -> ../../../../../default/src/rocq_elpi_graph.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_graph.mli -> ../../../../../default/src/rocq_elpi_graph.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_name_quotation.ml -> ../../../../../default/src/rocq_elpi_name_quotation.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_programs.ml -> ../../../../../default/src/rocq_elpi_programs.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_programs.mli -> ../../../../../default/src/rocq_elpi_programs.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_utils.ml -> ../../../../../default/src/rocq_elpi_utils.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_utils.mli -> ../../../../../default/src/rocq_elpi_utils.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_vernacular.ml -> ../../../../../default/src/rocq_elpi_vernacular.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_vernacular.mli -> ../../../../../default/src/rocq_elpi_vernacular.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_vernacular_syntax.ml -> ../../../../../default/src/rocq_elpi_vernacular_syntax.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/opam -> ../../../../default/rocq-elpi.opam
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.a -> ../../../../../default/apps/tc/src/elpi_tc_plugin.a
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cma -> ../../../../../default/apps/tc/src/elpi_tc_plugin.cma
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmxa -> ../../../../../default/apps/tc/src/elpi_tc_plugin.cmxa
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmxs -> ../../../../../default/apps/tc/src/elpi_tc_plugin.cmxs
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.ml -> ../../../../../default/apps/tc/src/elpi_tc_plugin.ml-gen
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmti -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_hook.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_hook.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_hook.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_hook.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_hook.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin__Rocq_elpi_tc_hook.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_register.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_register.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_register.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_register.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_register.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin__Rocq_elpi_tc_register.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_time.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_time.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_time.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_time.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_time.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin__Rocq_elpi_tc_time.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_class_tactics_takeover.ml -> ../../../../../default/apps/tc/src/rocq_elpi_class_tactics_takeover.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_class_tactics_takeover.mli -> ../../../../../default/apps/tc/src/rocq_elpi_class_tactics_takeover.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_tc_hook.ml -> ../../../../../default/apps/tc/src/rocq_elpi_tc_hook.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_tc_register.ml -> ../../../../../default/apps/tc/src/rocq_elpi_tc_register.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_tc_time.ml -> ../../../../../default/apps/tc/src/rocq_elpi_tc_time.ml
++ popd
/github/workspace/builds/coq /github/workspace
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::df -h\n'
::group::df -h
++ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          72G   59G   13G  83% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/root        72G   59G   13G  83% /usr/sbin/docker-init
tmpfs           7.9G     0  7.9G   0% /proc/acpi
tmpfs           7.9G     0  7.9G   0% /proc/scsi
tmpfs           7.9G     0  7.9G   0% /sys/firmware
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326424/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326458/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326470/artifacts/download'
::group::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326424/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326458/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326470/artifacts/download
++ printf '::warning::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326424/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326458/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326470/artifacts/download'
::warning::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326424/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326458/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326470/artifacts/download
++ pushd coq-passing
/github/workspace/builds/coq/coq-passing /github/workspace/builds/coq /github/workspace
++ mkdir -p _build_ci
++ ln -s _build_ci saved_build_ci
++ git checkout 3853febccfbc655239396d2d204fd431e2002232
Note: switching to '3853febccfbc655239396d2d204fd431e2002232'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3853febccf Merge PR #20947: Remove references to opam packages not in this repo.
++ for i in ${PASSING_ARTIFACT_URLS}
+++ printf %s https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download
+++ sha1sum
+++ cut '-d ' -f1
++ hash=ae8c8b0d5fdf0fad3e2e2724c9de9040ded48c8c
++ wget https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download -O artifact-ae8c8b0d5fdf0fad3e2e2724c9de9040ded48c8c.zip
--2025-10-09 12:47:39--  https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download
Resolving gitlab.inria.fr (gitlab.inria.fr)... 128.93.193.23
Connecting to gitlab.inria.fr (gitlab.inria.fr)|128.93.193.23|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-10-09 12:47:39 ERROR 404: Not Found.
minimizer log (truncated to last 26KiB; full 4.0MiB file on GitHub Actions Artifacts under bug.log)
hook.cmi -> ../../../../../default/apps/coercion/src/.elpi_coercion_plugin.objs/byte/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/coercion/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmt -> ../../../../../default/apps/coercion/src/.elpi_coercion_plugin.objs/byte/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/coercion/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmx -> ../../../../../default/apps/coercion/src/.elpi_coercion_plugin.objs/native/elpi_coercion_plugin__Rocq_elpi_coercion_hook.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/coercion/rocq_elpi_coercion_hook.ml -> ../../../../../default/apps/coercion/src/rocq_elpi_coercion_hook.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.a -> ../../../../../default/apps/cs/src/elpi_cs_plugin.a
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cma -> ../../../../../default/apps/cs/src/elpi_cs_plugin.cma
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmi -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/byte/elpi_cs_plugin.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmt -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/byte/elpi_cs_plugin.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmx -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/native/elpi_cs_plugin.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmxa -> ../../../../../default/apps/cs/src/elpi_cs_plugin.cmxa
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.cmxs -> ../../../../../default/apps/cs/src/elpi_cs_plugin.cmxs
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin.ml -> ../../../../../default/apps/cs/src/elpi_cs_plugin.ml-gen
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin__Rocq_elpi_cs_hook.cmi -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/byte/elpi_cs_plugin__Rocq_elpi_cs_hook.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin__Rocq_elpi_cs_hook.cmt -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/byte/elpi_cs_plugin__Rocq_elpi_cs_hook.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/elpi_cs_plugin__Rocq_elpi_cs_hook.cmx -> ../../../../../default/apps/cs/src/.elpi_cs_plugin.objs/native/elpi_cs_plugin__Rocq_elpi_cs_hook.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/cs/rocq_elpi_cs_hook.ml -> ../../../../../default/apps/cs/src/rocq_elpi_cs_hook.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/dune-package -> ../../../../default/rocq-elpi.dune-package
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.a -> ../../../../../default/src/elpi_plugin.a
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cma -> ../../../../../default/src/elpi_plugin.cma
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmxa -> ../../../../../default/src/elpi_plugin.cmxa
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.cmxs -> ../../../../../default/src/elpi_plugin.cmxs
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin.ml -> ../../../../../default/src/elpi_plugin.ml-gen
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_HOAS.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_HOAS.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_HOAS.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_HOAS.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_HOAS.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_HOAS.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_HOAS.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_HOAS.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_HOAS.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_HOAS.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_HOAS.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_HOAS.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_HOAS.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_HOAS.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_HOAS.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_arg_HOAS.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_syntax.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_syntax.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_syntax.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_arg_syntax.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_arg_syntax.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_arg_syntax.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_builtins.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_HOAS.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_HOAS.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_HOAS.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_HOAS.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_HOAS.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_builtins_HOAS.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_builtins_arg_HOAS.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_synterp.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_synterp.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_synterp.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_synterp.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_synterp.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_builtins_synterp.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_builtins_synterp.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_builtins_synterp.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_config.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_config.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_config.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_config.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_config.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_config.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_glob_quotation.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_glob_quotation.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_glob_quotation.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_glob_quotation.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_glob_quotation.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_glob_quotation.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_glob_quotation.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_glob_quotation.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_graph.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_graph.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_graph.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_graph.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_graph.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_graph.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_graph.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_graph.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_name_quotation.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_name_quotation.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_name_quotation.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_name_quotation.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_name_quotation.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_name_quotation.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_programs.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_programs.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_programs.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_programs.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_programs.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_programs.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_programs.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_programs.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_utils.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_utils.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_utils.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_utils.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_utils.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_utils.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_utils.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_utils.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular.cmti -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_vernacular.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular_syntax.cmi -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular_syntax.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular_syntax.cmt -> ../../../../../default/src/.elpi_plugin.objs/byte/elpi_plugin__Rocq_elpi_vernacular_syntax.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/elpi_plugin__Rocq_elpi_vernacular_syntax.cmx -> ../../../../../default/src/.elpi_plugin.objs/native/elpi_plugin__Rocq_elpi_vernacular_syntax.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_HOAS.ml -> ../../../../../default/src/rocq_elpi_HOAS.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_HOAS.mli -> ../../../../../default/src/rocq_elpi_HOAS.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_arg_HOAS.ml -> ../../../../../default/src/rocq_elpi_arg_HOAS.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_arg_HOAS.mli -> ../../../../../default/src/rocq_elpi_arg_HOAS.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_arg_syntax.ml -> ../../../../../default/src/rocq_elpi_arg_syntax.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins.ml -> ../../../../../default/src/rocq_elpi_builtins.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins.mli -> ../../../../../default/src/rocq_elpi_builtins.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins_HOAS.ml -> ../../../../../default/src/rocq_elpi_builtins_HOAS.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins_arg_HOAS.ml -> ../../../../../default/src/rocq_elpi_builtins_arg_HOAS.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins_synterp.ml -> ../../../../../default/src/rocq_elpi_builtins_synterp.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_builtins_synterp.mli -> ../../../../../default/src/rocq_elpi_builtins_synterp.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_config.ml -> ../../../../../default/src/rocq_elpi_config.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_glob_quotation.ml -> ../../../../../default/src/rocq_elpi_glob_quotation.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_glob_quotation.mli -> ../../../../../default/src/rocq_elpi_glob_quotation.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_graph.ml -> ../../../../../default/src/rocq_elpi_graph.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_graph.mli -> ../../../../../default/src/rocq_elpi_graph.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_name_quotation.ml -> ../../../../../default/src/rocq_elpi_name_quotation.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_programs.ml -> ../../../../../default/src/rocq_elpi_programs.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_programs.mli -> ../../../../../default/src/rocq_elpi_programs.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_utils.ml -> ../../../../../default/src/rocq_elpi_utils.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_utils.mli -> ../../../../../default/src/rocq_elpi_utils.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_vernacular.ml -> ../../../../../default/src/rocq_elpi_vernacular.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_vernacular.mli -> ../../../../../default/src/rocq_elpi_vernacular.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/elpi/rocq_elpi_vernacular_syntax.ml -> ../../../../../default/src/rocq_elpi_vernacular_syntax.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/opam -> ../../../../default/rocq-elpi.opam
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.a -> ../../../../../default/apps/tc/src/elpi_tc_plugin.a
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cma -> ../../../../../default/apps/tc/src/elpi_tc_plugin.cma
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmxa -> ../../../../../default/apps/tc/src/elpi_tc_plugin.cmxa
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.cmxs -> ../../../../../default/apps/tc/src/elpi_tc_plugin.cmxs
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin.ml -> ../../../../../default/apps/tc/src/elpi_tc_plugin.ml-gen
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmti -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmti
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin__Rocq_elpi_class_tactics_takeover.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_hook.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_hook.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_hook.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_hook.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_hook.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin__Rocq_elpi_tc_hook.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_register.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_register.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_register.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_register.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_register.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin__Rocq_elpi_tc_register.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_time.cmi -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_time.cmi
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_time.cmt -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/byte/elpi_tc_plugin__Rocq_elpi_tc_time.cmt
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/elpi_tc_plugin__Rocq_elpi_tc_time.cmx -> ../../../../../default/apps/tc/src/.elpi_tc_plugin.objs/native/elpi_tc_plugin__Rocq_elpi_tc_time.cmx
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_class_tactics_takeover.ml -> ../../../../../default/apps/tc/src/rocq_elpi_class_tactics_takeover.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_class_tactics_takeover.mli -> ../../../../../default/apps/tc/src/rocq_elpi_class_tactics_takeover.mli
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_tc_hook.ml -> ../../../../../default/apps/tc/src/rocq_elpi_tc_hook.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_tc_register.ml -> ../../../../../default/apps/tc/src/rocq_elpi_tc_register.ml
  saved_build_ci/elpi/_build/install/default/lib/rocq-elpi/tc/rocq_elpi_tc_time.ml -> ../../../../../default/apps/tc/src/rocq_elpi_tc_time.ml
++ popd
/github/workspace/builds/coq /github/workspace
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::df -h\n'
::group::df -h
++ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          72G   59G   13G  83% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/root        72G   59G   13G  83% /usr/sbin/docker-init
tmpfs           7.9G     0  7.9G   0% /proc/acpi
tmpfs           7.9G     0  7.9G   0% /proc/scsi
tmpfs           7.9G     0  7.9G   0% /sys/firmware
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326424/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326458/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326470/artifacts/download'
::group::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326424/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326458/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326470/artifacts/download
++ printf '::warning::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326424/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326458/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326470/artifacts/download'
::warning::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326424/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326458/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326470/artifacts/download
++ pushd coq-passing
/github/workspace/builds/coq/coq-passing /github/workspace/builds/coq /github/workspace
++ mkdir -p _build_ci
++ ln -s _build_ci saved_build_ci
++ git checkout 3853febccfbc655239396d2d204fd431e2002232
Note: switching to '3853febccfbc655239396d2d204fd431e2002232'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3853febccf Merge PR #20947: Remove references to opam packages not in this repo.
++ for i in ${PASSING_ARTIFACT_URLS}
+++ printf %s https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download
+++ sha1sum
+++ cut '-d ' -f1
++ hash=ae8c8b0d5fdf0fad3e2e2724c9de9040ded48c8c
++ wget https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download -O artifact-ae8c8b0d5fdf0fad3e2e2724c9de9040ded48c8c.zip
--2025-10-09 12:47:39--  https://gitlab.inria.fr/coq/coq/-/jobs/6326502/artifacts/download
Resolving gitlab.inria.fr (gitlab.inria.fr)... 128.93.193.23
Connecting to gitlab.inria.fr (gitlab.inria.fr)|128.93.193.23|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-10-09 12:47:39 ERROR 404: Not Found.

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.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/hott/theories/Algebra/Groups/Group.v in 25m 7s (from ci-hott) (full log on GitHub Actions - verbose log)

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

🌟 Minimized Coq File (consider adding this file to the test-suite)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-noinit" "-indices-matter" "-w" "-deprecated-native-compiler-option" "-native-compiler" "no" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/hott/theories" "HoTT" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/hott/contrib" "HoTT.Contrib" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/hott/test" "HoTT.Tests" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Ltac2" "Ltac2" "-top" "HoTT.Algebra.Groups.Group") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 1283 lines to 36 lines, then from 49 lines to 593 lines, then from 599 lines to 49 lines, then from 62 lines to 654 lines, then from 659 lines to 82 lines, then from 95 lines to 136 lines, then from 142 lines to 83 lines, then from 96 lines to 809 lines, then from 812 lines to 137 lines, then from 150 lines to 964 lines, then from 969 lines to 183 lines, then from 196 lines to 286 lines, then from 292 lines to 192 lines, then from 205 lines to 521 lines, then from 523 lines to 216 lines, then from 230 lines to 215 lines, then from 229 lines to 180 lines, then from 194 lines to 180 lines *)
(* coqc version 9.2+alpha compiled with OCaml 4.14.2
   coqtop version 9.2+alpha
   Expected coqc runtime on this file: 0.124 sec *)
Declare Scope type_scope.

Reserved Notation "x -> y" (at level 99, right associativity, y at level 200).

Reserved Notation "x = y  :>  T"
(at level 70, y at next level, no associativity).
Reserved Notation "x * y" (at level 40, left associativity).

Reserved Notation "p ^" (at level 1, format "p '^'").
Delimit Scope trunc_scope with trunc.

Global Open Scope trunc_scope.
Global Open Scope type_scope.

Declare ML Module "ltac_plugin:coq-core.plugins.ltac".

Global Set Default Proof Mode "Classic".

Global Set Universe Polymorphism.

Global Unset Strict Universe Declaration.
Create HintDb typeclass_instances discriminated.

Notation "A -> B" := (forall (_ : A), B) : type_scope.

Record prod (A B : Type) := pair { fst : A ; snd : B }.

Notation "x * y" := (prod x y) : type_scope.

Notation Type0 := Set.
Definition flip A B `{P : A -> B -> Type}
  : (forall a b, P a b) -> (forall b a, P a b).
Admitted.

Arguments flip {A B P} f b a /.

Inductive paths {A : Type} (a : A) : A -> Type :=
  idpath : paths a a.

Notation "x = y :> A" := (@paths A x y) : type_scope.
Notation "x = y" := (x = y :>_) : type_scope.

Inductive trunc_index : Type0 :=
| minus_two : trunc_index
| trunc_S : trunc_index -> trunc_index.

Notation "n .+1" := (trunc_S n) : trunc_scope.
Notation "n .+2" := (n.+1.+1)%trunc : trunc_scope.

Inductive IsTrunc_internal (A : Type@{u}) : trunc_index -> Type@{u} :=
| Build_Contr : forall (center : A) (contr : forall y, center = y), IsTrunc_internal A minus_two
| istrunc_S : forall {n:trunc_index}, (forall x y:A, IsTrunc_internal (x = y) n) -> IsTrunc_internal A (trunc_S n).

Notation IsTrunc n A := (IsTrunc_internal A n).
Notation IsHSet A := (IsTrunc minus_two.+2 A).

Tactic Notation "do_with_holes" tactic3(x) uconstr(p) :=
  x uconstr:(p) ||
  x uconstr:(p _) ||
  x uconstr:(p _ _) ||
  x uconstr:(p _ _ _) ||
  x uconstr:(p _ _ _ _) ||
  x uconstr:(p _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  x uconstr:(p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _).
Class IsGlobalAxiom (A : Type) : Type0 := {}.

Ltac is_global_axiom A := let _ := constr:(_ : IsGlobalAxiom A) in idtac.

Ltac global_axiom := try match goal with
    | |- ?G  => is_global_axiom G; exact _
end.

Tactic Notation "snrefine" uconstr(term) := simple notypeclasses refine term; global_axiom.

Tactic Notation "snapply" uconstr(term)
  := do_with_holes ltac:(fun x => snrefine x) term.

Class SgOp A := sg_op: A -> A -> A.
Class MonUnit A := mon_unit: A.
Class Plus A := plus: A -> A -> A.
Class Mult A := mult: A -> A -> A.
Class One A := one: A.
Class Zero A := zero: A.
Class Negate A := negate: A -> A.
Class Inverse A := inv: A -> A.
#[global] Typeclasses Transparent SgOp MonUnit Plus Mult Zero One Negate.
  Notation "(.*.)" := sg_op (only parsing) : mc_mult_scope.

  Notation "x ^" := (inv x) : mc_mult_scope.
  Notation "(^)" := inv (only parsing) : mc_mult_scope.

Class LeftIdentity {A B} (op : A -> B -> B) (x : A): Type
  := left_identity: forall y, op x y = y.

Class RightIdentity {A B} (op : A -> B -> A) (y : B): Type
  := right_identity: forall x, op x y = x.

Class LeftInverse {A} {B} {C} (op : A -> B -> C) (inv : B -> A) (unit : C)
  := left_inverse: forall x, op (inv x) x = unit.

Class RightInverse {A} {B} {C} (op : A -> B -> C) (inv : A -> B) (unit : C)
  := right_inverse: forall x, op x (inv x) = unit.

Class HeteroAssociative {A B C AB BC ABC}
  (fA_BC: A -> BC -> ABC) (fBC: B -> C -> BC)
  (fAB_C: AB -> C -> ABC) (fAB : A -> B -> AB): Type
  := associativity : forall x y z, fA_BC x (fBC y z) = fAB_C (fAB x y) z.
Class Associative {A} (f : A -> A -> A)
  := simple_associativity :: HeteroAssociative f f f f.

Section upper_classes.
  Context (A : Type@{i}).

  Local Open Scope mc_mult_scope.

  Class IsSemiGroup {Aop: SgOp A} :=
    { sg_set :: IsHSet A
    ; sg_ass :: Associative (.*.) }.

  Class IsMonoid {Aop : SgOp A} {Aunit : MonUnit A} :=
    { monoid_semigroup :: IsSemiGroup
    ; monoid_left_id :: LeftIdentity (.*.) mon_unit
    ; monoid_right_id :: RightIdentity (.*.) mon_unit }.

  Class IsGroup {Aop : SgOp A} {Aunit : MonUnit A} {Ainv : Inverse A} :=
    { group_monoid :: @IsMonoid (.*.) mon_unit
    ; inverse_l :: LeftInverse (.*.) (^) mon_unit
    ; inverse_r :: RightInverse (.*.) (^) mon_unit
    }.

End upper_classes.

Local Open Scope mc_mult_scope.

Record Group := Build_Group_internal {
  group_type :> Type;
  group_sgop :: SgOp group_type;
  group_unit :: MonUnit group_type;
  group_inverse :: Inverse group_type;
  group_isgroup :: IsGroup group_type;

  group_assoc_opp : Associative (flip group_sgop);
}.

Definition Build_Group (G : Type)
  `(op : SgOp G, unit : MonUnit G, inv : Inverse G, grp : !IsGroup G)
  : Group.
Admitted.

Definition grp_prod : Group -> Group -> Group.
Proof.
  intros G H.
  snapply (Build_Group (G * H)).
  4: repeat split.
🛠️ 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 2.6MiB file on GitHub Actions Artifacts under build.log)
ted 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!
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/hott
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Algebra/Groups/Group.v.timing -q -noinit -indices-matter -w -deprecated-native-compiler-option -native-compiler no -Q /github/workspace/builds/coq/coq-failing/_build_ci/hott/contrib HoTT.Contrib -Q /github/workspace/builds/coq/coq-failing/_build_ci/hott/test HoTT.Tests -R /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories HoTT theories/Algebra/Groups/Group.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.cigk5CLYxv
MINIMIZER_DEBUG: files:  theories/Algebra/Groups/Group.v /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Algebra/Groups/Group.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]
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]
theories/Truncations.vo (real: 0.13, user: 0.06, sys: 0.07, mem: 120744 ko)
ROCQ compile theories/Homotopy/Join/TriJoin.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: compile -time-file theories/Homotopy/Join/TriJoin.v.timing -q -noinit -indices-matter -w -deprecated-native-compiler-option -native-compiler no -Q contrib HoTT.Contrib -Q test HoTT.Tests -R theories HoTT theories/Homotopy/Join/TriJoin.v 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Homotopy/Join/TriJoin.v.timing -q -noinit -indices-matter -w -deprecated-native-compiler-option -native-compiler no -Q /github/workspace/builds/coq/coq-failing/_build_ci/hott/contrib HoTT.Contrib -Q /github/workspace/builds/coq/coq-failing/_build_ci/hott/test HoTT.Tests -R /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories HoTT theories/Homotopy/Join/TriJoin.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/hott
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Homotopy/Join/TriJoin.v.timing -q -noinit -indices-matter -w -deprecated-native-compiler-option -native-compiler no -Q /github/workspace/builds/coq/coq-failing/_build_ci/hott/contrib HoTT.Contrib -Q /github/workspace/builds/coq/coq-failing/_build_ci/hott/test HoTT.Tests -R /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories HoTT theories/Homotopy/Join/TriJoin.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.gdYqWkX46U
MINIMIZER_DEBUG: files:  theories/Homotopy/Join/TriJoin.v /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Homotopy/Join/TriJoin.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./theories/Algebra/Groups/Group.v", line 663, characters 2-19:
Warning: Found unregistered eliminator Int_rect for Int by name.
Use "Register Scheme" with it instead
("as rect_dep" if dependent or "as rect_nodep" if non dependent).
[deprecated-lookup-elim-by-name,deprecated-since-9.1,deprecated,default]
File "./theories/Algebra/Groups/Group.v", line 702, characters 2-14:
Warning: Found unregistered eliminator Int_rect for Int by name.
Use "Register Scheme" with it instead
("as rect_dep" if dependent or "as rect_nodep" if non dependent).
[deprecated-lookup-elim-by-name,deprecated-since-9.1,deprecated,default]
File "./theories/Algebra/Groups/Group.v", line 721, characters 2-14:
Warning: Found unregistered eliminator Int_rect for Int by name.
Use "Register Scheme" with it instead
("as rect_dep" if dependent or "as rect_nodep" if non dependent).
[deprecated-lookup-elim-by-name,deprecated-since-9.1,deprecated,default]
File "./theories/Algebra/Groups/Group.v", line 743, characters 2-14:
Warning: Found unregistered eliminator Int_rect for Int by name.
Use "Register Scheme" with it instead
("as rect_dep" if dependent or "as rect_nodep" if non dependent).
[deprecated-lookup-elim-by-name,deprecated-since-9.1,deprecated,default]
File "./theories/Algebra/Groups/Group.v", line 782, characters 6-14:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "./theories/Algebra/Groups/Group.v", line 972, characters 2-18:
Error: In environment
G : Group
H : Group
x : G * H
Unable to unify "?p0" with "?p@{x0:=x^}" (cannot satisfy constraint
"?p0" == "?p@{x0:=x^}").
(while solving unification constraints,
 see flag "Solve Unification Constraints")

Command exited with non-zero status 1
theories/Algebra/Groups/Group.vo (real: 0.82, user: 0.71, sys: 0.10, mem: 396668 ko)
make[2]: *** [Makefile.coq:813: theories/Algebra/Groups/Group.vo] Error 1
make[2]: *** [theories/Algebra/Groups/Group.vo] Deleting file 'theories/Algebra/Groups/Group.glob'
make[2]: *** Waiting for unfinished jobs....
theories/Homotopy/Join/TriJoin.vo (real: 1.85, user: 1.76, sys: 0.09, mem: 411256 ko)
make[1]: *** [Makefile.coq:411: all] Error 2
make: *** [Makefile:21: invoke-coqmakefile] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' hott 2
+ '[' hott '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real hott.log
    Time |  Peak Mem | File Name                       
-------------------------------------------------------
0m06.31s | 411256 ko | Total Time / Peak Mem           
-------------------------------------------------------
0m01.85s | 411256 ko | Homotopy/Join/TriJoin.vo        
0m00.98s | 403000 ko | Pointed/Loops.vo                
0m00.94s | 396868 ko | Homotopy/Join/Core.vo           
0m00.82s | 396668 ko | Algebra/Groups/Group.vo         
0m00.50s | 379944 ko | Classes/orders/orders.vo        
0m00.45s | 376952 ko | Classes/theory/rings.vo         
0m00.21s | 286648 ko | Categories/Functor/Attributes.vo
0m00.15s | 165996 ko | Classes/interfaces/naturals.vo  
0m00.15s | 171056 ko | Classes/interfaces/rationals.vo 
0m00.13s | 117932 ko | Categories/Adjoint.vo           
0m00.13s | 120744 ko | Truncations.vo                  
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 983KiB file on GitHub Actions Artifacts under bug.log)
 Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpoavkq8h4/HoTT/Algebra/Groups/Group.v", line 111, characters 2-59:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope mc_mult_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpoavkq8h4/HoTT/Algebra/Groups/Group.v", line 140, characters 2-98:
Warning:
Ignored instance declaration for “sg_set”: “forall Aop : SgOp A,
                                            IsSemiGroup -> IsHSet A” is not a class
[not-a-class,default]

�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to admit lemmas with admit. Defined with Proof using
�[92m
Admitting lemmas successful.�[0m
Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions with admit. Defined with Proof using

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 10, characters 0-37:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope trunc_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 15, characters 0-54:
Warning:
Legacy loading plugin method has been removed from Rocq, and the `:` syntax is deprecated, and its first argument ignored; please remove "ltac_plugin:" from your Declare ML
[legacy-loading-removed,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 15, characters 0-54:
Warning: "coq-core" has been renamed to "rocq-runtime".
[coq-core-plugin,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 30, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 54, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 55, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 111, characters 2-59:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope mc_mult_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 140, characters 2-98:
Warning:
Ignored instance declaration for “sg_set”: “forall Aop : SgOp A,
                                            IsSemiGroup -> IsHSet A” is not a class
[not-a-class,default]
File "/tmp/tmpdk4z8jrm/HoTT/Algebra/Groups/Group.v", line 176, characters 0-8:
Error:  (in proof grp_prod): Attempt to save an incomplete proof
(the proof term is not complete because of given up (admitted) goals).
If this is really what you want to do, use Admitted in place of Qed.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to add Proof using lines
�[92m
Adding Proof using lines successful.�[0m
Failed to do everything at once; trying one at a time.
Adding Proof using lines 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 lift Requires to the top of the file while inserting option settings

I will now attempt to lift Requires to the top of the file while inserting option settings

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.]
�[92m
Aborted removal successful.�[0m

I will now attempt to remove unused Ltacs
�[92m
Ltac removal successful.�[0m

I will now attempt to remove unused definitions
�[92m
Definition removal successful.�[0m

I will now attempt to remove unused non-instance, non-canonical structure definitions
�[92m
Non-instance definition removal successful.�[0m

I will now attempt to remove unused variables
�[92m
Variable removal successful.�[0m

I will now attempt to remove unused contexts
�[92m
Context removal successful.�[0m

I will now attempt to remove modules
�[92m
Module removal successful.�[0m
Failed to do everything at once; trying one at a time.
Module removal unsuccessful.
No successful changes.

I will now attempt to remove sections

Non-fatal error: Failed to remove Sections and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmp95rejhjv/HoTT/Algebra/Groups/Group.v", line 10, characters 0-37:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope trunc_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp95rejhjv/HoTT/Algebra/Groups/Group.v", line 15, characters 0-54:
Warning:
Legacy loading plugin method has been removed from Rocq, and the `:` syntax is deprecated, and its first argument ignored; please remove "ltac_plugin:" from your Declare ML
[legacy-loading-removed,deprecated-since-9.0,deprecated,default]
File "/tmp/tmp95rejhjv/HoTT/Algebra/Groups/Group.v", line 15, characters 0-54:
Warning: "coq-core" has been renamed to "rocq-runtime".
[coq-core-plugin,deprecated-since-9.0,deprecated,default]
File "/tmp/tmp95rejhjv/HoTT/Algebra/Groups/Group.v", line 30, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp95rejhjv/HoTT/Algebra/Groups/Group.v", line 54, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp95rejhjv/HoTT/Algebra/Groups/Group.v", line 55, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp95rejhjv/HoTT/Algebra/Groups/Group.v", line 111, characters 2-59:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope mc_mult_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp95rejhjv/HoTT/Algebra/Groups/Group.v", line 134, characters 2-25:
Error: Use of "Context" outside sections behaves as "#[local] Parameter" or
"#[local] Axiom" followed by "Existing Instance" for typeclasses.
[context-outside-section,vernacular,default]


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Section removal unsuccessful.
No successful changes.

I will now attempt to remove empty sections

No empty sections to remove.

I will now attempt to remove the admit tactic header

No admit tactic header to remove

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

No strippable newlines or spaces.

Completed second minimization pass.

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
Copy link
Member

ppedrot commented Oct 9, 2025

@coqbot ci minimize ci-argosy

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

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

@SkySkimmer
Copy link
Contributor

It's not going to work, the passing job doesn't make install so doesn't upload artifacts

@ppedrot
Copy link
Member

ppedrot commented Oct 9, 2025

Ah, given the error message I thought it was the connection going wonky...

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

Error: Could not minimize file in 3m 15s (from ci-argosy) (full log on GitHub Actions, cc @JasonGross)

build log (truncated to last 26KiB; full 3.1MiB file on GitHub Actions Artifacts under build.log)
coq-native/NStdlib_setoid_ring_BinList.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_BinList.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_BinList.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_BinList.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Cring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Cring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Cring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Cring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_theory.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_theory.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_theory.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_theory.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_InitialRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_InitialRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_InitialRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_InitialRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Integral_domain.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Integral_domain.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Integral_domain.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Integral_domain.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_NArithRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_NArithRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_NArithRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_NArithRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_initial.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_initial.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_initial.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_initial.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_polynom.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_polynom.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_polynom.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_polynom.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_RealField.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_RealField.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_RealField.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_RealField.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_base.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_base.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_base.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_base.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_polynom.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_polynom.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_polynom.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_polynom.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_theory.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_theory.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_theory.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_theory.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Q.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Q.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Q.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Q.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_R.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_R.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_R.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_R.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Z.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Z.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Z.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Z.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_ZArithRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_ZArithRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_ZArithRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_ZArithRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Algebra_syntax.v -> ../../../../../../../default/theories/setoid_ring/Algebra_syntax.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Algebra_syntax.vo -> ../../../../../../../default/theories/setoid_ring/Algebra_syntax.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ArithRing.v -> ../../../../../../../default/theories/setoid_ring/ArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ArithRing.vo -> ../../../../../../../default/theories/setoid_ring/ArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/BinList.v -> ../../../../../../../default/theories/setoid_ring/BinList.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/BinList.vo -> ../../../../../../../default/theories/setoid_ring/BinList.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Cring.v -> ../../../../../../../default/theories/setoid_ring/Cring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Cring.vo -> ../../../../../../../default/theories/setoid_ring/Cring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field.v -> ../../../../../../../default/theories/setoid_ring/Field.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field.vo -> ../../../../../../../default/theories/setoid_ring/Field.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_tac.v -> ../../../../../../../default/theories/setoid_ring/Field_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_tac.vo -> ../../../../../../../default/theories/setoid_ring/Field_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_theory.v -> ../../../../../../../default/theories/setoid_ring/Field_theory.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_theory.vo -> ../../../../../../../default/theories/setoid_ring/Field_theory.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/InitialRing.v -> ../../../../../../../default/theories/setoid_ring/InitialRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/InitialRing.vo -> ../../../../../../../default/theories/setoid_ring/InitialRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Integral_domain.v -> ../../../../../../../default/theories/setoid_ring/Integral_domain.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Integral_domain.vo -> ../../../../../../../default/theories/setoid_ring/Integral_domain.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/NArithRing.v -> ../../../../../../../default/theories/setoid_ring/NArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/NArithRing.vo -> ../../../../../../../default/theories/setoid_ring/NArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring.v -> ../../../../../../../default/theories/setoid_ring/Ncring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring.vo -> ../../../../../../../default/theories/setoid_ring/Ncring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_initial.v -> ../../../../../../../default/theories/setoid_ring/Ncring_initial.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_initial.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_initial.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_polynom.v -> ../../../../../../../default/theories/setoid_ring/Ncring_polynom.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_polynom.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_polynom.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_tac.v -> ../../../../../../../default/theories/setoid_ring/Ncring_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_tac.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/RealField.v -> ../../../../../../../default/theories/setoid_ring/RealField.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/RealField.vo -> ../../../../../../../default/theories/setoid_ring/RealField.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring.v -> ../../../../../../../default/theories/setoid_ring/Ring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring.vo -> ../../../../../../../default/theories/setoid_ring/Ring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_base.v -> ../../../../../../../default/theories/setoid_ring/Ring_base.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_base.vo -> ../../../../../../../default/theories/setoid_ring/Ring_base.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_polynom.v -> ../../../../../../../default/theories/setoid_ring/Ring_polynom.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_polynom.vo -> ../../../../../../../default/theories/setoid_ring/Ring_polynom.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_tac.v -> ../../../../../../../default/theories/setoid_ring/Ring_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_tac.vo -> ../../../../../../../default/theories/setoid_ring/Ring_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_theory.v -> ../../../../../../../default/theories/setoid_ring/Ring_theory.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_theory.vo -> ../../../../../../../default/theories/setoid_ring/Ring_theory.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Q.v -> ../../../../../../../default/theories/setoid_ring/Rings_Q.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Q.vo -> ../../../../../../../default/theories/setoid_ring/Rings_Q.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_R.v -> ../../../../../../../default/theories/setoid_ring/Rings_R.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_R.vo -> ../../../../../../../default/theories/setoid_ring/Rings_R.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Z.v -> ../../../../../../../default/theories/setoid_ring/Rings_Z.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Z.vo -> ../../../../../../../default/theories/setoid_ring/Rings_Z.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ZArithRing.v -> ../../../../../../../default/theories/setoid_ring/ZArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ZArithRing.vo -> ../../../../../../../default/theories/setoid_ring/ZArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrbool.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrbool.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrbool.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrbool.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrclasses.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrclasses.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrclasses.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrclasses.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssreflect.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssreflect.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssreflect.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssreflect.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrfun.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrfun.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrfun.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrfun.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrsetoid.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrsetoid.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrsetoid.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrsetoid.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrunder.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrunder.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrunder.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrunder.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrbool.v -> ../../../../../../../default/theories/ssr/ssrbool.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrbool.vo -> ../../../../../../../default/theories/ssr/ssrbool.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrclasses.v -> ../../../../../../../default/theories/ssr/ssrclasses.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrclasses.vo -> ../../../../../../../default/theories/ssr/ssrclasses.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssreflect.v -> ../../../../../../../default/theories/ssr/ssreflect.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssreflect.vo -> ../../../../../../../default/theories/ssr/ssreflect.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrfun.v -> ../../../../../../../default/theories/ssr/ssrfun.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrfun.vo -> ../../../../../../../default/theories/ssr/ssrfun.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrsetoid.v -> ../../../../../../../default/theories/ssr/ssrsetoid.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrsetoid.vo -> ../../../../../../../default/theories/ssr/ssrsetoid.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrunder.v -> ../../../../../../../default/theories/ssr/ssrunder.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrunder.vo -> ../../../../../../../default/theories/ssr/ssrunder.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/.coq-native/NStdlib_ssrmatching_ssrmatching.cmi -> ../../../../../../../../default/theories/ssrmatching/NStdlib_ssrmatching_ssrmatching.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/.coq-native/NStdlib_ssrmatching_ssrmatching.cmxs -> ../../../../../../../../default/theories/ssrmatching/NStdlib_ssrmatching_ssrmatching.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/ssrmatching.v -> ../../../../../../../default/theories/ssrmatching/ssrmatching.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/ssrmatching.vo -> ../../../../../../../default/theories/ssrmatching/ssrmatching.vo
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/META -> ../../../../default/META.rocq-stdlib
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/dune-package -> ../../../../default/rocq-stdlib.dune-package
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/opam -> ../../../../default/rocq-stdlib.opam
++ popd
/github/workspace/builds/coq /github/workspace
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::df -h\n'
::group::df -h
++ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          72G   56G   16G  78% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/root        72G   56G   16G  78% /usr/sbin/docker-init
tmpfs           7.9G     0  7.9G   0% /proc/acpi
tmpfs           7.9G     0  7.9G   0% /proc/scsi
tmpfs           7.9G     0  7.9G   0% /sys/firmware
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download'
::group::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download
++ printf '::warning::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download'
::warning::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download
++ pushd coq-passing
/github/workspace/builds/coq/coq-passing /github/workspace/builds/coq /github/workspace
++ mkdir -p _build_ci
++ ln -s _build_ci saved_build_ci
++ git checkout 3853febccfbc655239396d2d204fd431e2002232
Note: switching to '3853febccfbc655239396d2d204fd431e2002232'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3853febccf Merge PR #20947: Remove references to opam packages not in this repo.
++ for i in ${PASSING_ARTIFACT_URLS}
+++ printf %s https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download
+++ sha1sum
+++ cut '-d ' -f1
++ hash=bc8c03af4516326327e9010a010f8cdb9dc333f3
++ wget https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download -O artifact-bc8c03af4516326327e9010a010f8cdb9dc333f3.zip
--2025-10-09 14:01:51--  https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download
Resolving gitlab.inria.fr (gitlab.inria.fr)... 128.93.193.23
Connecting to gitlab.inria.fr (gitlab.inria.fr)|128.93.193.23|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-10-09 14:01:52 ERROR 404: Not Found.
minimizer log (truncated to last 26KiB; full 3.1MiB file on GitHub Actions Artifacts under bug.log)
coq-native/NStdlib_setoid_ring_BinList.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_BinList.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_BinList.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_BinList.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Cring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Cring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Cring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Cring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_theory.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_theory.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Field_theory.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Field_theory.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_InitialRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_InitialRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_InitialRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_InitialRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Integral_domain.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Integral_domain.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Integral_domain.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Integral_domain.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_NArithRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_NArithRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_NArithRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_NArithRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_initial.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_initial.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_initial.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_initial.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_polynom.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_polynom.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_polynom.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_polynom.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ncring_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ncring_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_RealField.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_RealField.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_RealField.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_RealField.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_base.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_base.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_base.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_base.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_polynom.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_polynom.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_polynom.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_polynom.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_tac.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_tac.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_tac.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_tac.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_theory.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_theory.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Ring_theory.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Ring_theory.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Q.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Q.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Q.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Q.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_R.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_R.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_R.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_R.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Z.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Z.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_Rings_Z.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_Rings_Z.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_ZArithRing.cmi -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_ZArithRing.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/.coq-native/NStdlib_setoid_ring_ZArithRing.cmxs -> ../../../../../../../../default/theories/setoid_ring/NStdlib_setoid_ring_ZArithRing.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Algebra_syntax.v -> ../../../../../../../default/theories/setoid_ring/Algebra_syntax.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Algebra_syntax.vo -> ../../../../../../../default/theories/setoid_ring/Algebra_syntax.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ArithRing.v -> ../../../../../../../default/theories/setoid_ring/ArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ArithRing.vo -> ../../../../../../../default/theories/setoid_ring/ArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/BinList.v -> ../../../../../../../default/theories/setoid_ring/BinList.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/BinList.vo -> ../../../../../../../default/theories/setoid_ring/BinList.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Cring.v -> ../../../../../../../default/theories/setoid_ring/Cring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Cring.vo -> ../../../../../../../default/theories/setoid_ring/Cring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field.v -> ../../../../../../../default/theories/setoid_ring/Field.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field.vo -> ../../../../../../../default/theories/setoid_ring/Field.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_tac.v -> ../../../../../../../default/theories/setoid_ring/Field_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_tac.vo -> ../../../../../../../default/theories/setoid_ring/Field_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_theory.v -> ../../../../../../../default/theories/setoid_ring/Field_theory.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Field_theory.vo -> ../../../../../../../default/theories/setoid_ring/Field_theory.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/InitialRing.v -> ../../../../../../../default/theories/setoid_ring/InitialRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/InitialRing.vo -> ../../../../../../../default/theories/setoid_ring/InitialRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Integral_domain.v -> ../../../../../../../default/theories/setoid_ring/Integral_domain.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Integral_domain.vo -> ../../../../../../../default/theories/setoid_ring/Integral_domain.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/NArithRing.v -> ../../../../../../../default/theories/setoid_ring/NArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/NArithRing.vo -> ../../../../../../../default/theories/setoid_ring/NArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring.v -> ../../../../../../../default/theories/setoid_ring/Ncring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring.vo -> ../../../../../../../default/theories/setoid_ring/Ncring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_initial.v -> ../../../../../../../default/theories/setoid_ring/Ncring_initial.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_initial.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_initial.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_polynom.v -> ../../../../../../../default/theories/setoid_ring/Ncring_polynom.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_polynom.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_polynom.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_tac.v -> ../../../../../../../default/theories/setoid_ring/Ncring_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ncring_tac.vo -> ../../../../../../../default/theories/setoid_ring/Ncring_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/RealField.v -> ../../../../../../../default/theories/setoid_ring/RealField.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/RealField.vo -> ../../../../../../../default/theories/setoid_ring/RealField.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring.v -> ../../../../../../../default/theories/setoid_ring/Ring.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring.vo -> ../../../../../../../default/theories/setoid_ring/Ring.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_base.v -> ../../../../../../../default/theories/setoid_ring/Ring_base.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_base.vo -> ../../../../../../../default/theories/setoid_ring/Ring_base.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_polynom.v -> ../../../../../../../default/theories/setoid_ring/Ring_polynom.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_polynom.vo -> ../../../../../../../default/theories/setoid_ring/Ring_polynom.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_tac.v -> ../../../../../../../default/theories/setoid_ring/Ring_tac.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_tac.vo -> ../../../../../../../default/theories/setoid_ring/Ring_tac.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_theory.v -> ../../../../../../../default/theories/setoid_ring/Ring_theory.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Ring_theory.vo -> ../../../../../../../default/theories/setoid_ring/Ring_theory.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Q.v -> ../../../../../../../default/theories/setoid_ring/Rings_Q.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Q.vo -> ../../../../../../../default/theories/setoid_ring/Rings_Q.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_R.v -> ../../../../../../../default/theories/setoid_ring/Rings_R.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_R.vo -> ../../../../../../../default/theories/setoid_ring/Rings_R.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Z.v -> ../../../../../../../default/theories/setoid_ring/Rings_Z.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/Rings_Z.vo -> ../../../../../../../default/theories/setoid_ring/Rings_Z.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ZArithRing.v -> ../../../../../../../default/theories/setoid_ring/ZArithRing.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/setoid_ring/ZArithRing.vo -> ../../../../../../../default/theories/setoid_ring/ZArithRing.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrbool.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrbool.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrbool.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrbool.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrclasses.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrclasses.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrclasses.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrclasses.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssreflect.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssreflect.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssreflect.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssreflect.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrfun.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrfun.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrfun.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrfun.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrsetoid.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrsetoid.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrsetoid.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrsetoid.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrunder.cmi -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrunder.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/.coq-native/NStdlib_ssr_ssrunder.cmxs -> ../../../../../../../../default/theories/ssr/NStdlib_ssr_ssrunder.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrbool.v -> ../../../../../../../default/theories/ssr/ssrbool.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrbool.vo -> ../../../../../../../default/theories/ssr/ssrbool.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrclasses.v -> ../../../../../../../default/theories/ssr/ssrclasses.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrclasses.vo -> ../../../../../../../default/theories/ssr/ssrclasses.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssreflect.v -> ../../../../../../../default/theories/ssr/ssreflect.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssreflect.vo -> ../../../../../../../default/theories/ssr/ssreflect.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrfun.v -> ../../../../../../../default/theories/ssr/ssrfun.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrfun.vo -> ../../../../../../../default/theories/ssr/ssrfun.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrsetoid.v -> ../../../../../../../default/theories/ssr/ssrsetoid.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrsetoid.vo -> ../../../../../../../default/theories/ssr/ssrsetoid.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrunder.v -> ../../../../../../../default/theories/ssr/ssrunder.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssr/ssrunder.vo -> ../../../../../../../default/theories/ssr/ssrunder.vo
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/.coq-native/NStdlib_ssrmatching_ssrmatching.cmi -> ../../../../../../../../default/theories/ssrmatching/NStdlib_ssrmatching_ssrmatching.cmi
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/.coq-native/NStdlib_ssrmatching_ssrmatching.cmxs -> ../../../../../../../../default/theories/ssrmatching/NStdlib_ssrmatching_ssrmatching.cmxs
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/ssrmatching.v -> ../../../../../../../default/theories/ssrmatching/ssrmatching.v
  saved_build_ci/stdlib/_build/install/default/lib/coq/user-contrib/Stdlib/ssrmatching/ssrmatching.vo -> ../../../../../../../default/theories/ssrmatching/ssrmatching.vo
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/META -> ../../../../default/META.rocq-stdlib
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/dune-package -> ../../../../default/rocq-stdlib.dune-package
  saved_build_ci/stdlib/_build/install/default/lib/rocq-stdlib/opam -> ../../../../default/rocq-stdlib.opam
++ popd
/github/workspace/builds/coq /github/workspace
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::df -h\n'
::group::df -h
++ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          72G   56G   16G  78% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/root        72G   56G   16G  78% /usr/sbin/docker-init
tmpfs           7.9G     0  7.9G   0% /proc/acpi
tmpfs           7.9G     0  7.9G   0% /proc/scsi
tmpfs           7.9G     0  7.9G   0% /sys/firmware
++ printf '::endgroup::\n'
::endgroup::
++ printf '::group::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download'
::group::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download
++ printf '::warning::download passing artifacts @ %s %s\n' 3853febccfbc655239396d2d204fd431e2002232 'https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download'
::warning::download passing artifacts @ 3853febccfbc655239396d2d204fd431e2002232 https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326422/artifacts/download https://gitlab.inria.fr/coq/coq/-/jobs/6326457/artifacts/download
++ pushd coq-passing
/github/workspace/builds/coq/coq-passing /github/workspace/builds/coq /github/workspace
++ mkdir -p _build_ci
++ ln -s _build_ci saved_build_ci
++ git checkout 3853febccfbc655239396d2d204fd431e2002232
Note: switching to '3853febccfbc655239396d2d204fd431e2002232'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3853febccf Merge PR #20947: Remove references to opam packages not in this repo.
++ for i in ${PASSING_ARTIFACT_URLS}
+++ printf %s https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download
+++ sha1sum
+++ cut '-d ' -f1
++ hash=bc8c03af4516326327e9010a010f8cdb9dc333f3
++ wget https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download -O artifact-bc8c03af4516326327e9010a010f8cdb9dc333f3.zip
--2025-10-09 14:01:51--  https://gitlab.inria.fr/coq/coq/-/jobs/6326441/artifacts/download
Resolving gitlab.inria.fr (gitlab.inria.fr)... 128.93.193.23
Connecting to gitlab.inria.fr (gitlab.inria.fr)|128.93.193.23|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-10-09 14:01:52 ERROR 404: Not Found.

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
Copy link
Member

ppedrot commented Oct 9, 2025

Can't we just fix argosy to make install?

@SkySkimmer
Copy link
Contributor

It has some weird build system with no install target

@ppedrot
Copy link
Member

ppedrot commented Oct 9, 2025

Here is a reproducible example hand-extracted from argosy:

Definition relation := fun A B T : Type => A -> B -> T -> Prop.

Axiom addr : Type.
Axiom block : Type.
Axiom D_State : Type.
Axiom State : Type.
Axiom Op : Type -> Type.
Axiom proc : (Type -> Type) -> Type -> Type.

Axiom read : addr -> proc Op block.
Axiom Recover : proc Op unit.
Axiom rd_abstraction : D_State -> State -> unit -> Prop.

Axiom Specification : Type -> Type -> Type -> Type.

Axiom refine_spec :
forall [AState CState : Type],
relation AState CState unit ->
forall [T R : Type], Specification T R AState -> AState -> Specification T R CState.

Axiom proc_hspec :
forall {Op : Type -> Type} {State : Type},
forall [T : Type], proc Op T -> Specification T unit State -> Prop.

Axiom proc_rspec :
forall {Op : Type -> Type} {State : Type},
forall [T R : Type], proc Op T -> proc Op R -> Specification T R State -> Prop.

Axiom proc_hspec_to_rspec :
forall {Op : Type -> Type} {State : Type} [A' T R : Type]
[rec_hspec : A' -> Specification R unit State] (p_rspec : Specification T R State) 
[p : proc Op T] [rec : proc Op R],
(forall a : A', @proc_hspec Op State R rec (rec_hspec a)) ->
@proc_rspec Op State T R p rec p_rspec.

Axiom read_spec : addr -> Specification block unit D_State.

Theorem read_rec_ok : forall (a : addr) (d : D_State),
  @proc_rspec Op State block unit (read a) Recover
    (@refine_spec D_State State rd_abstraction block unit (read_spec a) d).
Proof.
intros a d.
eapply proc_hspec_to_rspec.
solve[eauto]. (* works on master, fails on this PR *)

We can probably simplify it further.

@ppedrot
Copy link
Member

ppedrot commented Oct 9, 2025

Even shorter:

Axiom Specification : Type.

Axiom proc_hspec : Specification -> Prop.

Axiom proc_rspec : Prop.

Axiom proc_hspec_to_rspec : forall [A' : Type] [rec_hspec : A' -> Specification],
  (forall a : A', @proc_hspec (rec_hspec a)) -> proc_rspec.

Theorem read_rec_ok : proc_rspec.
Proof.
eapply proc_hspec_to_rspec.
solve[eauto].

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

Minimization interrupted by timeout, being automatically continued. Partially Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v in 5h 15m 8s (from ci-iris) (interrupted by timeout, being automatically continued) (full log on GitHub Actions - verbose log)
⭐ ⏱️ Partially Minimized Coq File (timeout)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "iris.base_logic.lib.cancelable_invariants") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines *)
(* coqc version 9.2+alpha compiled with OCaml 4.14.2
   coqtop version 9.2+alpha
   Expected coqc runtime on this file: 0.922 sec *)










Require iris.base_logic.bi.
Require iris.bi.lib.cmra.
Require iris.proofmode.proofmode.
Require iris.proofmode.class_instances_updates.
Require iris.proofmode.class_instances.
Require iris.proofmode.ltac_tactics.
Require iris.proofmode.notation.
Require iris.proofmode.coq_tactics.
Require iris.proofmode.class_instances_later.
Require iris.proofmode.class_instances_frame.
Require iris.proofmode.class_instances_internal_eq.
Require iris.proofmode.class_instances_plainly.
Require iris.proofmode.class_instances_embedding.
Require iris.proofmode.modality_instances.
Require iris.proofmode.reduction.
Require iris.proofmode.classes.
Require iris.proofmode.environments.
Require iris.proofmode.intro_patterns.
Require iris.proofmode.spec_patterns.
Require iris.proofmode.sel_patterns.
Require iris.proofmode.tokens.
Require iris.proofmode.modalities.
Require iris.proofmode.class_instances_make.
Require iris.bi.telescopes.
Require iris.proofmode.classes_make.
Require iris.proofmode.base.
Require iris.bi.bi.
Require iris.bi.embedding.
Require iris.bi.updates.
Require iris.bi.plainly.
Require iris.bi.internal_eq.
Require iris.bi.big_op.
Require iris.algebra.gmap.
Require iris.algebra.gset.
Require iris.algebra.list.
Require iris.algebra.big_op.
Require stdpp.gmultiset.
Require iris.bi.derived_laws_later.
Require iris.bi.derived_laws.
Require iris.bi.extensions.
Require iris.bi.derived_connectives.
Require iris.base_logic.upred.
Require stdpp.namespaces.
Require iris.bi.interface.
Require iris.algebra.csum.
Require stdpp.coPset.
Require stdpp.gmap.
Require iris.algebra.updates.
Require iris.algebra.stepindex_finite.
Require iris.algebra.proofmode_classes.
Require iris.algebra.local_updates.
Require iris.algebra.excl.
Require iris.algebra.agree.
Require iris.algebra.cmra.
Require iris.algebra.monoid.
Require iris.algebra.ofe.
Require iris.algebra.stepindex.
Require iris.prelude.prelude.
Require stdpp.infinite.
Require stdpp.ssreflect.
Require stdpp.pretty.
Require stdpp.pmap.
Require stdpp.prelude.
Require stdpp.mapset.
Require stdpp.fin_map_dom.
Require stdpp.fin_maps.
Require stdpp.fin_sets.
Require stdpp.relations.
Require stdpp.listset.
Require stdpp.sets.
Require stdpp.strings.
Require stdpp.finite.
Require stdpp.vector.
Require stdpp.countable.
Require stdpp.list.
Require stdpp.list_numbers.
Require stdpp.list_tactics.
Require stdpp.list_misc.
Require stdpp.list_monad.
Require stdpp.list_relations.
Require stdpp.nat_cancel.
Require stdpp.list_basics.
Require stdpp.lexico.
Require stdpp.numbers.
Require Stdlib.ZArith.ZArith.
Require stdpp.fin.
Require stdpp.telescopes.
Require stdpp.orders.
Require stdpp.option.
Require stdpp.hlist.
Require stdpp.functions.
Require stdpp.tactics.
Require iris.proofmode.string_ident.
Require Stdlib.ZArith.Znumtheory.
Require Stdlib.ZArith.ZNsatz.
Require Stdlib.ZArith.Zbitwise.
Require Stdlib.btauto.Btauto.
Require Stdlib.micromega.ZArith_hints.
Require Stdlib.btauto.Reflect.
Require Stdlib.btauto.Algebra.
Require Stdlib.ZArith.Zcong.
Require Stdlib.ZArith.ZModOffset.
Require Stdlib.ZArith.Zdivisibility.
Require Stdlib.ZArith.Zdiv_facts.
Require Stdlib.micromega.Lia.
Require Stdlib.QArith.QArith.
Require Stdlib.micromega.ZMicromega.
Require Stdlib.QArith.QNsatz.
Require Stdlib.ZArith.Zdiv.
Require Stdlib.ZArith.Zpower.
Require Stdlib.ZArith.Zcomplements.
Require Stdlib.QArith.Qring.
Require Stdlib.QArith.Qfield.
Require Stdlib.QArith.Qcanon.
Require Stdlib.omega.PreOmega.
Require Stdlib.QArith.Qreduction.
Require Stdlib.micromega.Zify.
Require Stdlib.Strings.String.
Require Stdlib.QArith.QArith_base.
Require Stdlib.micromega.ZifyInst.
Require Stdlib.ZArith.ZArith_base.
Require Stdlib.Arith.Arith.
Require Stdlib.micromega.ZCoeff.
Require Stdlib.ZArith.Zhints.
Require Stdlib.NArith.NArith.
Require Stdlib.nsatz.NsatzTactic.
Require Stdlib.micromega.RingMicromega.
Require Stdlib.ZArith.Zabs.
Require Stdlib.setoid_ring.Integral_domain.
Require Stdlib.setoid_ring.Field.
Require Stdlib.ZArith.Zbool.
Require Stdlib.setoid_ring.ZArithRing.
Require Stdlib.setoid_ring.Field_tac.
Require Stdlib.setoid_ring.Cring.
Require Stdlib.setoid_ring.ArithRing.
Require Stdlib.ZArith.Wf_Z.
Require Stdlib.setoid_ring.NArithRing.
Require Stdlib.setoid_ring.Field_theory.
Require Stdlib.micromega.OrderedRing.
Require Stdlib.ZArith.ZArith_dec.
Require Stdlib.setoid_ring.Ring.
Require Stdlib.setoid_ring.Ncring_tac.
Require Stdlib.setoid_ring.Ring_base.
Require Stdlib.setoid_ring.Ncring_initial.
Require Stdlib.omega.OmegaLemmas.
Require Stdlib.ZArith.auxiliary.
Require Stdlib.ZArith.Zmisc.
Require Stdlib.ZArith.Zminmax.
Require Stdlib.ZArith.Zmin.
Require Stdlib.ZArith.Zmax.
Require Stdlib.setoid_ring.Ring_tac.
Require Stdlib.setoid_ring.Ncring_polynom.
Require Stdlib.ZArith.Zorder.
Require Stdlib.ZArith.Znat.
Require Stdlib.setoid_ring.InitialRing.
Require Stdlib.setoid_ring.Ring_polynom.
Require Stdlib.micromega.EnvRing.
Require Stdlib.micromega.VarMap.
Require Stdlib.micromega.Env.
Require Stdlib.setoid_ring.Ncring.
Require Stdlib.ZArith.Zpow_def.
Require Stdlib.ZArith.Zeven.
Require Stdlib.ZArith.Zcompare.
Require Stdlib.ZArith.BinInt.
Require Stdlib.micromega.DeclConstantZ.
Require Stdlib.Strings.Ascii.
Require stdpp.decidable.
Require iris.proofmode.ident_name.
Require Stdlib.Strings.Byte.
Require Stdlib.NArith.NArith_base.
Require stdpp.well_founded.
Require stdpp.proof_irrel.
Require Stdlib.Vectors.Vector.
Require stdpp.base.
Require Stdlib.Vectors.VectorEq.
Require Stdlib.ZArith.BinIntDef.
Require Stdlib.Vectors.VectorSpec.
Require Stdlib.NArith.Nnat.
Require Stdlib.setoid_ring.Ring_theory.
Require Stdlib.NArith.Nsqrt_def.
Require Stdlib.NArith.Ngcd_def.
Require Stdlib.NArith.Ndiv_def.
Require Stdlib.setoid_ring.BinList.
Require Stdlib.NArith.BinNat.
Require Stdlib.Vectors.VectorDef.
Require Stdlib.PArith.PArith.
Require Stdlib.NArith.BinNatDef.
Require Stdlib.Vectors.Fin.
Require Stdlib.PArith.Pnat.
Require Stdlib.PArith.POrderedType.
Require Stdlib.Arith.Arith_base.
Require Stdlib.PArith.BinPos.
Require Stdlib.Sorting.Permutation.
Require Stdlib.Lists.ListTactics.
Require Stdlib.micromega.Tauto.
Require Stdlib.Lists.Finite.
Require Stdlib.micromega.Refl.
Require Stdlib.Lists.ListDec.
Require Stdlib.Lists.List.
Require Stdlib.Arith.Peano_dec.
Require Stdlib.Arith.Wf_nat.
Require Stdlib.Arith.Factorial.
Require Stdlib.Arith.EqNat.
Require Stdlib.Arith.Compare_dec.
Require Stdlib.Arith.Between.
Require Stdlib.Arith.PeanoNat.
Require Stdlib.Numbers.Natural.Abstract.NProperties.
Require Stdlib.Numbers.Integer.Abstract.ZProperties.
Require Stdlib.Numbers.Natural.Abstract.NLcm0.
Require Stdlib.Numbers.Natural.Abstract.NBits.
Require Stdlib.Numbers.Integer.Abstract.ZLcm.
Require Stdlib.Numbers.Integer.Abstract.ZBits.
Require Stdlib.Numbers.Natural.Abstract.NLog.
Require Stdlib.Numbers.Natural.Abstract.NLcm.
Require Stdlib.Numbers.Integer.Abstract.ZPow.
Require Stdlib.Numbers.Natural.Abstract.NPow.
Require Stdlib.Numbers.Natural.Abstract.NDiv0.
Require Stdlib.Numbers.Integer.Abstract.ZGcd.
Require Stdlib.Numbers.Integer.Abstract.ZDivTrunc.
Require Stdlib.Numbers.Integer.Abstract.ZDivFloor.
Require Stdlib.Numbers.Natural.Abstract.NSqrt.
Require Stdlib.Numbers.Natural.Abstract.NParity.
Require Stdlib.Numbers.Natural.Abstract.NMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NGcd.
Require Stdlib.Numbers.Natural.Abstract.NDiv.
Require Stdlib.Numbers.Integer.Abstract.ZSgnAbs.
Require Stdlib.Numbers.Integer.Abstract.ZParity.
Require Stdlib.Numbers.Integer.Abstract.ZMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NSub.
Require Stdlib.Numbers.Integer.Abstract.ZMulOrder.
Require Stdlib.Numbers.Natural.Abstract.NMulOrder.
Require Stdlib.Numbers.Integer.Abstract.ZAddOrder.
Require Stdlib.Numbers.Natural.Abstract.NAddOrder.
Require Stdlib.Numbers.Integer.Abstract.ZLt.
Require Stdlib.Numbers.Natural.Abstract.NOrder.
Require Stdlib.Numbers.Integer.Abstract.ZMul.
Require Stdlib.Numbers.Natural.Abstract.NAdd.
Require Stdlib.Numbers.Integer.Abstract.ZAdd.
Require Stdlib.Numbers.Natural.Abstract.NBase.
Require Stdlib.Numbers.Integer.Abstract.ZBase.
Require Stdlib.Numbers.Natural.Abstract.NAxioms.
Require Stdlib.Numbers.Integer.Abstract.ZAxioms.
Require Stdlib.Numbers.NatInt.NZBits.
Require Ltac2.Ltac2.
Require Stdlib.Numbers.NatInt.NZLog.
Module Export frac.

Export iris.algebra.cmra.


Notation frac := Qp (only parsing).
  Canonical Structure fracO := leibnizO frac.
Local Instance frac_valid_instance : Valid frac. exact (λ x, (x ≤ 1)%Qp). Defined.
Local Instance frac_pcore_instance : PCore frac. exact (λ _, None). Defined.
Local Instance frac_op_instance : Op frac. exact (λ x y, (x + y)%Qp). Defined.

  Definition frac_ra_mixin : RAMixin frac.
Admitted.
  Canonical Structure fracR := discreteR frac frac_ra_mixin.
End frac.
Module Export iris_DOT_algebra_DOT_frac.
Module Export iris.
Module Export algebra.
Module Export frac.
End frac.

End algebra.

End iris.

End iris_DOT_algebra_DOT_frac.
Export iris.base_logic.bi.
Module Export iris_DOT_base_logic_DOT_derived.
Module Export iris.
Module Export base_logic.
Module Export derived.
End derived.

End base_logic.

End iris.

End iris_DOT_base_logic_DOT_derived.
Export iris.algebra.frac.
Export iris.algebra.agree.
Module Export iris_DOT_algebra_DOT_view.
Module Export iris.
Module Export algebra.
Module Export view.
End view.

End algebra.

End iris.

End iris_DOT_algebra_DOT_view.
Export iris.algebra.gmap.
Definition gmap_viewR {SI : sidx} (K : Type) `{Countable K} (V : cmra) : cmra.
Admitted.
Module Export iris_DOT_algebra_DOT_lib_DOT_gmap_view.
Module Export iris.
Module Export algebra.
Module Export lib.
Module Export gmap_view.
End gmap_view.

End lib.

End algebra.

End iris.

End iris_DOT_algebra_DOT_lib_DOT_gmap_view.
Export iris.algebra.view.
Definition authR {SI : sidx} (A : ucmra) : cmra.
Admitted.
Module Export iris_DOT_algebra_DOT_auth.
Module Export iris.
Module Export algebra.
Module Export auth.
End auth.

End algebra.

End iris.

End iris_DOT_algebra_DOT_auth.
Module Export iris_DOT_algebra_DOT_lib_DOT_excl_auth.
Module Export excl_auth.
End excl_auth.

End iris_DOT_algebra_DOT_lib_DOT_excl_auth.
Module Export algebra.
End algebra.
Export iris.base_logic.derived.
Module Export base_logic.
End base_logic.

Structure gFunctor := GFunctor {
  gFunctor_F :> rFunctor;
  gFunctor_map_contractive : rFunctorContractive gFunctor_F;
}.

Record gFunctors := GFunctors {
  gFunctors_len : nat;
  gFunctors_lookup : fin gFunctors_len → gFunctor
}.

Definition gid (Σ : gFunctors) := fin (gFunctors_len Σ).

Definition gname := positive.
Definition iResUR (Σ : gFunctors) : ucmra.
Admitted.
  Notation iProp Σ := (uPred (iResUR Σ)).
  Notation iPropO Σ := (uPredO (iResUR Σ)).
Module Export iprop.
End iprop.

Class inG (Σ : gFunctors) (A : cmra) := InG {
  inG_id : gid Σ;
  inG_apply := rFunctor_apply (gFunctors_lookup Σ inG_id);
  inG_prf : A = inG_apply (iPropO Σ) _;
}.
Local Definition own_def `{!inG Σ A} (γ : gname) (a : A) : iProp Σ.
Admitted.
Local Definition own_aux : seal (@own_def).
Admitted.
Definition own := own_aux.(unseal).
Global Arguments own {Σ A _} γ a.
Module Export iris_DOT_base_logic_DOT_lib_DOT_own.
Module Export iris.
Module Export base_logic.
Module Export lib.
Module Export own.
End own.

End lib.

End base_logic.

End iris.

End iris_DOT_base_logic_DOT_lib_DOT_own.
Export iris.algebra.cmra.
Local Instance nat_valid_instance : Valid nat.
Admitted.
Local Instance nat_pcore_instance : PCore nat.
Admitted.
Local Instance nat_op_instance : Op nat.
Admitted.
  Lemma nat_ra_mixin : RAMixin nat.
Admitted.
Canonical Structure natR : cmra.
exact (discreteR nat nat_ra_mixin).
Defined.
Local Instance nat_unit_instance : Unit nat.
Admitted.
  Lemma nat_ucmra_mixin : UcmraMixin nat.
Admitted.
Canonical Structure natUR : ucmra.
exact (Ucmra nat nat_ucmra_mixin).
Defined.
Module Export numbers.
End numbers.
Export iris.algebra.auth.
Import iris.base_logic.lib.own.

Class lcGS (Σ : gFunctors) := LcGS {
  #[local] lcGS_inG :: inG Σ (authR natUR);
  lcGS_name : gname;
}.

Module Export le_upd_if.
  End le_upd_if.
Module Export iris_DOT_base_logic_DOT_lib_DOT_later_credits.
Module Export iris.
Module Export base_logic.
Module Export lib.
Module Export later_credits.
End later_credits.

End lib.

End base_logic.

End iris.

End iris_DOT_base_logic_DOT_lib_DOT_later_credits.
Export stdpp.coPset.

Inductive coPset_disj :=
  | CoPset : coPset → coPset_disj
  | CoPsetInvalid : coPset_disj.
  Canonical Structure coPset_disjO := leibnizO coPset_disj.
Local Instance coPset_disj_valid_instance : Valid coPset_disj.
Admitted.
Local Instance coPset_disj_op_instance : Op coPset_disj.
Admitted.
Local Instance coPset_disj_pcore_instance : PCore coPset_disj.
Admitted.

  Lemma coPset_disj_ra_mixin : RAMixin coPset_disj.
Admitted.
  Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin.
Module Export iris_DOT_algebra_DOT_coPset.
Module Export iris.
Module Export algebra.
Module Export coPset.
End coPset.

End algebra.

End iris.

End iris_DOT_algebra_DOT_coPset.
Import iris.algebra.lib.gmap_view.
Import iris.algebra.gset.
Import iris.algebra.coPset.
Export iris.base_logic.lib.own.
  Class wsatGpreS (Σ : gFunctors) : Set := WsatGpreS {
    wsatGpreS_inv : inG Σ (gmap_viewR positive (agreeR $ laterO (iPropO Σ)));
    wsatGpreS_enabled : inG Σ coPset_disjR;
    wsatGpreS_disabled : inG Σ (gset_disjR positive);
  }.

  Class wsatGS (Σ : gFunctors) : Set := WsatG {
    wsat_inG : wsatGpreS Σ;
    invariant_name : gname;
    enabled_name : gname;
    disabled_name : gname;
  }.
Module Export iris_DOT_base_logic_DOT_lib_DOT_wsat.
Module Export wsat.
End wsat.

End iris_DOT_base_logic_DOT_lib_DOT_wsat.
Export iris.base_logic.lib.later_credits.

Inductive has_lc := HasLc | HasNoLc.

Class invGS_gen (hlc : has_lc) (Σ : gFunctors) : Set := InvG {
  #[global] invGS_wsat :: wsatGS Σ;
  #[global] invGS_lc :: lcGS Σ;
}.
Global Instance uPred_bi_fupd `{!invGS_gen hlc Σ} : BiFUpd (uPredI (iResUR Σ)).
Admitted.

Global Instance uPred_bi_bupd_fupd `{!invGS_gen hlc Σ} : BiBUpdFUpd (uPredI (iResUR Σ)).
Admitted.
Module Export iris.
Module Export base_logic.
Module Export lib.
Module Export fancy_updates.
End fancy_updates.

End lib.

End base_logic.

End iris.
Export stdpp.namespaces.
Export iris.base_logic.lib.fancy_updates.
Export iris.algebra.excl.
Import iris.proofmode.proofmode.

Class cinvG Σ := {
  #[local] cinv_inG :: inG Σ (prodR (optionR (exclR unitO)) (optionR fracR)) ;
}.

Section defs.
  Context `{!invGS_gen hlc Σ, !cinvG Σ}.
Definition cinv_own (γ : gname) (p : frac) : iProp Σ.
Admitted.
  Definition cinv_excl γ : iProp Σ := own γ (Some (Excl ()), None).
Definition cinv (N : namespace) (γ : gname) (P : iProp Σ) : iProp Σ.
Admitted.

  Lemma cinv_own_excl_alloc P :
    pred_infinite P → ⊢ |==> ∃ γ, ⌜P γ⌝ ∗ cinv_excl γ ∗ cinv_own γ 1.
Admitted.

  Lemma cinv_alloc_strong (I : gname → Prop) E N :
    pred_infinite I →
    ⊢ |={E}=> ∃ γ, ⌜ I γ ⌝ ∗ cinv_own γ 1 ∗ ∀ P, ▷ P ={E}=∗ cinv N γ P.
  Proof.
    iIntros (?).
iMod cinv_own_excl_alloc as (γ) "[$ [Hexcl $]]"; first done.
🛠️ 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 6.4MiB file on GitHub Actions Artifacts under build.log)
LIB 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]
iris/program_logic/lifting.vo (real: 2.83, user: 2.70, sys: 0.12, mem: 597748 ko)
COQNATIVE iris/program_logic/lifting.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/program_logic/total_weakestpre.v", line 106, characters 68-80:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/lifting.vo.native (real: 0.48, user: 0.37, sys: 0.11, mem: 157084 ko)
COQTEST [ref ignored] tests/algebra.v (ref: tests/algebra.ref)
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]
tests/algebra.vo (real: 1.22, user: 1.10, sys: 0.12, mem: 590468 ko)
ROCQ compile iris/base_logic/lib/cancelable_invariants.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q iris iris -Q iris_heap_lang iris.heap_lang -Q iris_unstable iris.unstable -Q iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.v 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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/iris
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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.03B72gzebL
MINIMIZER_DEBUG: files:  iris/base_logic/lib/cancelable_invariants.v /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/base_logic/lib/cancelable_invariants.v", line 90, characters 17-65:
Error: Tactic failure: iFrame: cannot frame ⌜?Goal γ⌝%I.

Command exited with non-zero status 1
iris/base_logic/lib/cancelable_invariants.vo (real: 1.44, user: 1.30, sys: 0.14, mem: 583660 ko)
make[2]: *** [Makefile.coq:813: iris/base_logic/lib/cancelable_invariants.vo] Error 1
make[2]: *** [iris/base_logic/lib/cancelable_invariants.vo] Deleting file 'iris/base_logic/lib/cancelable_invariants.glob'
make[2]: *** Waiting for unfinished jobs....
File "./iris/program_logic/total_weakestpre.v", line 274, characters 78-90:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/total_weakestpre.vo (real: 5.93, user: 5.79, sys: 0.14, mem: 635904 ko)
COQNATIVE iris/program_logic/total_weakestpre.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
iris/program_logic/total_weakestpre.vo.native (real: 0.57, user: 0.46, sys: 0.11, mem: 151584 ko)
make[1]: *** [Makefile.coq:411: all] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/iris'
make: *** [Makefile:3: all] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' iris 2
+ '[' iris '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real iris.log
    Time |  Peak Mem | File Name                                    
--------------------------------------------------------------------
0m19.16s | 635904 ko | Total Time / Peak Mem                        
--------------------------------------------------------------------
0m05.93s | 635904 ko | iris/program_logic/total_weakestpre.vo       
0m03.67s | 607536 ko | iris/program_logic/adequacy.vo               
0m02.83s | 597748 ko | iris/program_logic/lifting.vo                
0m01.92s | 598616 ko | iris/program_logic/atomic.vo                 
0m01.44s | 583660 ko | iris/base_logic/lib/cancelable_invariants.vo 
0m01.22s | 590468 ko | tests/algebra.vo                             
0m00.57s | 157604 ko | iris/program_logic/atomic.vo.native          
0m00.57s | 151584 ko | iris/program_logic/total_weakestpre.vo.native
0m00.53s | 165552 ko | iris/program_logic/adequacy.vo.native        
0m00.48s | 157084 ko | iris/program_logic/lifting.vo.native         
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 4.4MiB file on GitHub Actions Artifacts under bug.log)
eprecated-since-9.2,deprecated,default]
File "/tmp/tmpisda6e5b/iris/base_logic/lib/cancelable_invariants.v", line 515, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpisda6e5b/iris/base_logic/lib/cancelable_invariants.v", line 516, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpisda6e5b/iris/base_logic/lib/cancelable_invariants.v", line 555, characters 0-9:
Error: Could not declare a canonical structure natR.
Could not find its value in the global environment.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to admit lemmas with admit. Defined with Proof using

Non-fatal error: Failed to admit lemmas and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 131, characters 0-34:
Warning: Library File Stdlib.ZArith.ZArith_base is deprecated since 9.0.
use ZArith instead
[deprecated-library-file-since-9.0,deprecated-since-9.0,deprecated-library-file,deprecated,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 183, characters 0-30:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 185, characters 0-32:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 187, characters 0-34:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 195, characters 0-33:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 198, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 376, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 515, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpz5jh63c8/iris/base_logic/lib/cancelable_invariants.v", line 516, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
Error: The section defs needs to be closed.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions with admit. Defined with Proof using

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 131, characters 0-34:
Warning: Library File Stdlib.ZArith.ZArith_base is deprecated since 9.0.
use ZArith instead
[deprecated-library-file-since-9.0,deprecated-since-9.0,deprecated-library-file,deprecated,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 183, characters 0-30:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 185, characters 0-32:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 187, characters 0-34:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 195, characters 0-33:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 198, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 376, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 515, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 516, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpnfm2t7ru/iris/base_logic/lib/cancelable_invariants.v", line 556, characters 0-8:
Error: Could not declare a canonical structure natR.
Expected a record or structure constructor applied to arguments.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to add Proof using lines
�[92m
Adding Proof using lines successful.�[0m
Failed to do everything at once; trying one at a time.
Adding Proof using lines unsuccessful.
No successful changes.

I will now attempt to export modules
Module exportation successful

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

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

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to remove all lines, one at a time

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

Can't we just fix argosy to make install?

What about adding something like

printf '\nMakefile.coq: _CoqProject\n\tcoq_makefile -f _CoqProject -o $@ $(ALL_VFILES)\n' >> Makefile
make Makefile.coq
make -f Makefile.coq install

to Coq's CI?

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 9, 2025

Minimization interrupted by timeout, being automatically continued. Partially Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v in 5h 15m 7s (from ci-iris) (interrupted by timeout, being automatically continued) (full log on GitHub Actions - verbose log)
⭐ ⏱️ Partially Minimized Coq File (timeout) (truncated to first and last 32KiB; full 64KiB file on GitHub Actions Artifacts under bug.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines *)
(* coqc version 9.2+alpha compiled with OCaml 4.14.2
   coqtop version 9.2+alpha
   Expected coqc runtime on this file: 1.420 sec *)










Require iris.proofmode.notation.
Require iris.proofmode.coq_tactics.
Require iris.proofmode.modality_instances.
Require iris.proofmode.reduction.
Require iris.proofmode.classes.
Require iris.proofmode.environments.
Require iris.proofmode.intro_patterns.
Require iris.proofmode.sel_patterns.
Require iris.proofmode.tokens.
Require iris.proofmode.modalities.
Require iris.bi.telescopes.
Require iris.proofmode.classes_make.
Require iris.proofmode.base.
Require iris.bi.bi.
Require iris.bi.embedding.
Require iris.bi.updates.
Require iris.bi.plainly.
Require iris.bi.internal_eq.
Require iris.bi.big_op.
Require iris.algebra.gmap.
Require iris.algebra.gset.
Require iris.algebra.list.
Require iris.algebra.big_op.
Require stdpp.gmultiset.
Require iris.bi.derived_laws_later.
Require iris.bi.derived_laws.
Require iris.bi.extensions.
Require iris.bi.derived_connectives.
Require stdpp.namespaces.
Require iris.bi.interface.
Require iris.algebra.csum.
Require stdpp.coPset.
Require stdpp.gmap.
Require iris.algebra.updates.
Require iris.algebra.stepindex_finite.
Require iris.algebra.proofmode_classes.
Require iris.algebra.local_updates.
Require iris.algebra.excl.
Require iris.algebra.cmra.
Require iris.algebra.monoid.
Require iris.algebra.ofe.
Require iris.algebra.stepindex.
Require iris.prelude.prelude.
Require stdpp.infinite.
Require stdpp.ssreflect.
Require stdpp.pretty.
Require stdpp.pmap.
Require stdpp.prelude.
Require stdpp.mapset.
Require stdpp.fin_map_dom.
Require stdpp.fin_maps.
Require stdpp.fin_sets.
Require stdpp.relations.
Require stdpp.listset.
Require stdpp.sets.
Require stdpp.strings.
Require stdpp.finite.
Require stdpp.vector.
Require stdpp.countable.
Require stdpp.list.
Require stdpp.list_numbers.
Require stdpp.list_tactics.
Require stdpp.list_misc.
Require stdpp.list_monad.
Require stdpp.list_relations.
Require stdpp.list_basics.
Require stdpp.lexico.
Require stdpp.numbers.
Require Stdlib.ZArith.ZArith.
Require stdpp.fin.
Require stdpp.telescopes.
Require stdpp.orders.
Require stdpp.option.
Require stdpp.functions.
Require stdpp.tactics.
Require Stdlib.ZArith.Znumtheory.
Require Stdlib.ZArith.ZNsatz.
Require Stdlib.ZArith.Zbitwise.
Require Stdlib.btauto.Btauto.
Require Stdlib.micromega.ZArith_hints.
Require Stdlib.btauto.Reflect.
Require Stdlib.btauto.Algebra.
Require Stdlib.ZArith.Zcong.
Require Stdlib.ZArith.ZModOffset.
Require Stdlib.ZArith.Zdivisibility.
Require Stdlib.ZArith.Zdiv_facts.
Require Stdlib.micromega.Lia.
Require Stdlib.QArith.QArith.
Require Stdlib.micromega.ZMicromega.
Require Stdlib.QArith.QNsatz.
Require Stdlib.ZArith.Zdiv.
Require Stdlib.ZArith.Zpower.
Require Stdlib.ZArith.Zcomplements.
Require Stdlib.QArith.Qring.
Require Stdlib.QArith.Qfield.
Require Stdlib.QArith.Qcanon.
Import iris.proofmode.base.
Import iris.proofmode.tokens.

Inductive goal_kind := GSpatial | GModal | GIntuitionistic.

Record spec_goal := SpecGoal {
  spec_goal_kind : goal_kind;
  spec_goal_negate : bool;
  spec_goal_frame : list ident;
  spec_goal_hyps : list ident;
  spec_goal_done : bool
}.

Inductive spec_pat :=
  | SIdent : ident → list spec_pat → spec_pat
  | SPureGoal (perform_done : bool) : spec_pat
  | SGoal : spec_goal → spec_pat
  | SAutoFrame : goal_kind → spec_pat.

Module Export spec_pat.
Inductive stack_item :=
  | StPat : spec_pat → stack_item
  | StIdent : string → stack_item.
Notation stack := (list stack_item).
Fixpoint close (k : stack) (ps : list spec_pat) : option (list spec_pat). exact (match k with
  | [] => Some ps
  | StPat p :: k => close k (p :: ps)
  | StIdent _ :: _ => None
  end). Defined.
Fixpoint close_ident (k : stack) (ps : list spec_pat) : option stack. exact (match k with
  | [] => None
  | StPat p :: k => close_ident k (p :: ps)
  | StIdent s :: k => Some (StPat (SIdent s ps) :: k)
  end). Defined.

Fixpoint parse_go (ts : list token) (k : stack) : option (list spec_pat) :=
  match ts with
  | [] => close k []
  | TParenL :: TName s :: ts => parse_go ts (StIdent s :: k)
  | TParenR :: ts => k ← close_ident k []; parse_go ts k
  | TName s :: ts => parse_go ts (StPat (SIdent s []) :: k)
  | TBracketL :: TIntuitionistic :: TFrame :: TBracketR :: ts =>
     parse_go ts (StPat (SAutoFrame GIntuitionistic) :: k)
  | TBracketL :: TFrame :: TBracketR :: ts =>
     parse_go ts (StPat (SAutoFrame GSpatial) :: k)
  | TBracketL :: TModal :: TFrame :: TBracketR :: ts =>
     parse_go ts (StPat (SAutoFrame GModal) :: k)
  | TBracketL :: TPure None :: TBracketR :: ts =>
     parse_go ts (StPat (SPureGoal false) :: k)
  | TBracketL :: TPure None :: TDone :: TBracketR :: ts =>
     parse_go ts (StPat (SPureGoal true) :: k)
  | TBracketL :: TIntuitionistic :: ts => parse_goal ts GIntuitionistic false [] [] k
  | TBracketL :: TModal :: ts => parse_goal ts GModal false [] [] k
  | TBracketL :: ts => parse_goal ts GSpatial false [] [] k
  | _ => None
  end
with parse_goal (ts : list token)
    (ki : goal_kind) (neg : bool) (frame hyps : list ident)
    (k : stack) : option (list spec_pat) :=
  match ts with
  | TMinus :: ts =>
     guard (¬neg ∧ frame = [] ∧ hyps = []);;
     parse_goal ts ki true frame hyps k
  | TName s :: ts => parse_goal ts ki neg frame (INamed s :: hyps) k
  | TFrame :: TName s :: ts => parse_goal ts ki neg (INamed s :: frame) hyps k
  | TDone :: TBracketR :: ts =>
     parse_go ts (StPat (SGoal (SpecGoal ki neg (reverse frame) (reverse hyps) true)) :: k)
  | TBracketR :: ts =>
     parse_go ts (StPat (SGoal (SpecGoal ki neg (reverse frame) (reverse hyps) false)) :: k)
  | _ => None
  end.
Definition parse (s : string) : option (list spec_pat). exact (parse_go (tokenize s) []). Defined.

Ltac parse s :=
  lazymatch type of s with
  | list spec_pat => s
  | spec_pat => constr:([s])
  | string =>
     lazymatch eval vm_compute in (parse s) with
     | Some ?pats => pats
     | _ => fail "spec_pat.parse: cannot parse" s "as a specialization pattern"
     end
  | ident => constr:([SIdent s []])
  | ?X => fail "spec_pat.parse: the term" s
     "is expected to be a specialization pattern"
     "(usually a string),"
     "but has unexpected type" X
  end.
Module Export iris.
Module Export proofmode.
Module Export spec_patterns.
End spec_patterns.

Inductive tlist := tnil : tlist | tcons : Type → tlist → tlist.

Inductive hlist : tlist → Type :=
  | hnil : hlist tnil
  | hcons {A As} : A → hlist As → hlist (tcons A As).
Module Export stdpp.
Module Export hlist.
End hlist.
Import Stdlib.Strings.String.
Import Stdlib.Init.Byte.
Local Open Scope list.

Module Export StringToIdent.
  Import Ltac2.Ltac2.

  Ltac2 Type exn ::= [ NotStringLiteral(constr) | InvalidIdent(string) ].

  Ltac2 coq_byte_to_int (b : constr) : int :=
    match! b with

    | x00 => 0 | x01 => 1 | x02 => 2 | x03 => 3 | x04 => 4 | x05 => 5 | x06 => 6 | x07 => 7 | x08 => 8 | x09 => 9 | x0a => 10 | x0b => 11 | x0c => 12 | x0d => 13 | x0e => 14 | x0f => 15 | x10 => 16 | x11 => 17 | x12 => 18 | x13 => 19 | x14 => 20 | x15 => 21 | x16 => 22 | x17 => 23 | x18 => 24 | x19 => 25 | x1a => 26 | x1b => 27 | x1c => 28 | x1d => 29 | x1e => 30 | x1f => 31 | x20 => 32 | x21 => 33 | x22 => 34 | x23 => 35 | x24 => 36 | x25 => 37 | x26 => 38 | x27 => 39 | x28 => 40 | x29 => 41 | x2a => 42 | x2b => 43 | x2c => 44 | x2d => 45 | x2e => 46 | x2f => 47 | x30 => 48 | x31 => 49 | x32 => 50 | x33 => 51 | x34 => 52 | x35 => 53 | x36 => 54 | x37 => 55 | x38 => 56 | x39 => 57 | x3a => 58 | x3b => 59 | x3c => 60 | x3d => 61 | x3e => 62 | x3f => 63 | x40 => 64 | x41 => 65 | x42 => 66 | x43 => 67 | x44 => 68 | x45 => 69 | x46 => 70 | x47 => 71 | x48 => 72 | x49 => 73 | x4a => 74 | x4b => 75 | x4c => 76 | x4d => 77 | x4e => 78 | x4f => 79 | x50 => 80 | x51 => 81 | x52 => 82 | x53 => 83 | x54 => 84 | x55 => 85 | x56 => 86 | x57 => 87 | x58 => 88 | x59 => 89 | x5a => 90 | x5b => 91 | x5c => 92 | x5d => 93 | x5e => 94 | x5f => 95 | x60 => 96 | x61 => 97 | x62 => 98 | x63 => 99 | x64 => 100 | x65 => 101 | x66 => 102 | x67 => 103 | x68 => 104 | x69 => 105 | x6a => 106 | x6b => 107 | x6c => 108 | x6d => 109 | x6e => 110 | x6f => 111 | x70 => 112 | x71 => 113 | x72 => 114 | x73 => 115 | x74 => 116 | x75 => 117 | x76 => 118 | x77 => 119 | x78 => 120 | x79 => 121 | x7a => 122 | x7b => 123 | x7c => 124 | x7d => 125 | x7e => 126 | x7f => 127 | x80 => 128 | x81 => 129 | x82 => 130 | x83 => 131 | x84 => 132 | x85 => 133 | x86 => 134 | x87 => 135 | x88 => 136 | x89 => 137 | x8a => 138 | x8b => 139 | x8c => 140 | x8d => 141 | x8e => 142 | x8f => 143 | x90 => 144 | x91 => 145 | x92 => 146 | x93 => 147 | x94 => 148 | x95 => 149 | x96 => 150 | x97 => 151 | x98 => 152 | x99 => 153 | x9a => 154 | x9b => 155 | x9c => 156 | x9d => 157 | x9e => 158 | x9f => 159 | xa0 => 160 | xa1 => 161 | xa2 => 162 | xa3 => 163 | xa4 => 164 | xa5 => 165 | xa6 => 166 | xa7 => 167 | xa8 => 168 | xa9 => 169 | xaa => 170 | xab => 171 | xac => 172 | xad => 173 | xae => 174 | xaf => 175 | xb0 => 176 | xb1 => 177 | xb2 => 178 | xb3 => 179 | xb4 => 180 | xb5 => 181 | xb6 => 182 | xb7 => 183 | xb8 => 184 | xb9 => 185 | xba => 186 | xbb => 187 | xbc => 188 | xbd => 189 | xbe => 190 | xbf => 191 | xc0 => 192 | xc1 => 193 | xc2 => 194 | xc3 => 195 | xc4 => 196 | xc5 => 197 | xc6 => 198 | xc7 => 199 | xc8 => 200 | xc9 => 201 | xca => 202 | xcb => 203 | xcc => 204 | xcd => 205 | xce => 206 | xcf => 207 | xd0 => 208 | xd1 => 209 | xd2 => 210 | xd3 => 211 | xd4 => 212 | xd5 => 213 | xd6 => 214 | xd7 => 215 | xd8 => 216 | xd9 => 217 | xda => 218 | xdb => 219 | xdc => 220 | xdd => 221 | xde => 222 | xdf => 223 | xe0 => 224 | xe1 => 225 | xe2 => 226 | xe3 => 227 | xe4 => 228 | xe5 => 229 | xe6 => 230 | xe7 => 231 | xe8 => 232 | xe9 => 233 | xea => 234 | xeb => 235 | xec => 236 | xed => 237 | xee => 238 | xef => 239 | xf0 => 240 | xf1 => 241 | xf2 => 242 | xf3 => 243 | xf4 => 244 | xf5 => 245 | xf6 => 246 | xf7 => 247 | xf8 => 248 | xf9 => 249 | xfa => 250 | xfb => 251 | xfc => 252 | xfd => 253 | xfe => 254 | xff => 255
    end.

  Ltac2 coq_byte_to_char (b : constr) : char :=
    Char.of_int (coq_byte_to_int b).
Fixpoint coq_string_to_list_byte (s : string) : list byte.
Admitted.

  Ltac2 rec coq_byte_list_blit_list (pos : int) (ls : constr) (str : string) : unit :=
    match! ls with
    | nil => ()
    | ?c :: ?ls =>
      let b := coq_byte_to_char c in
      String.set str pos b; coq_byte_list_blit_list (Int.add pos 1) ls str
    end.

  Ltac2 rec coq_string_length (s : constr) : int :=
    match! s with
    | EmptyString => 0
    | String _ ?s' => Int.add 1 (coq_string_length s')
    | _ => Control.throw (NotStringLiteral s)
    end.

  Ltac2 compute (c : constr) : constr :=
    Std.eval_vm None c.

  Ltac2 coq_string_to_string (s : constr) : string :=
    let l := coq_string_length s in
    let str := String.make l (Char.of_int 0) in
    let bytes := compute constr:(coq_string_to_list_byte $s) in
    let _ := coq_byte_list_blit_list 0 bytes str in
    str.

  Ltac2 string_to_ident (s : string) : ident :=
    match Ident.of_string s with
    | Some id => id
    | None => Control.throw (InvalidIdent s)
    end.

  Ltac2 coq_string_to_ident (s : constr) : ident :=
    string_to_ident (coq_string_to_string s).

  Ltac string_to_ident_cps :=
    ltac2:(s1 r |- let s := Option.get (Ltac1.to_constr s1) in
                   let ident := coq_string_to_ident s in
                   Ltac1.apply r [Ltac1.of_ident ident] Ltac1.run).
End StringToIdent.

Ltac rename_by_string id s :=
  StringToIdent.string_to_ident_cps s ltac:(fun x => rename id into x).
Module Export string_ident.
End string_ident.
Import stdpp.namespaces.
Import stdpp.hlist.
Import iris.proofmode.intro_patterns.
Import iris.proofmode.spec_patterns.
Import iris.proofmode.sel_patterns.
Import iris.proofmode.coq_tactics.
Import iris.proofmode.reduction.

Ltac iSolveSideCondition :=
  lazymatch goal with
  | |- pm_error ?err => fail "" err
  | _ => split_and?; try solve [ fast_done | solve_ndisj | tc_solve ]
  end.

Ltac pretty_ident H :=
  lazymatch H with
  | INamed ?H => H
  | ?H => H
  end.

Ltac iGetCtx :=
  lazymatch goal with
  | |- envs_entails ?Δ _ => Δ
  | |- context[ envs_split _ _ ?Δ ] => Δ
  end.

Ltac iMissingHypsCore Δ Hs :=
  let Hhyps := pm_eval (envs_dom Δ) in
  eval vm_compute in (list_difference Hs Hhyps).

Ltac iTypeOf H :=
  let Δ := match goal with |- envs_entails ?Δ _ => Δ end in
  pm_eval (envs_lookup H Δ).

Ltac iBiOfGoal :=
  match goal with |- @envs_entails ?PROP _ _ => PROP end.

Tactic Notation "iStartProof" :=
  lazymatch goal with
  | |- (let _ := _ in _) => fail "iStartProof: goal is a `let`, use `simpl`,"
                                 "`intros x`, `iIntros (x)`, or `iIntros ""%x"""
  | |- envs_entails _ _ => idtac
  | |- ?φ => notypeclasses refine (as_emp_valid_2 φ _ _);
               [tc_solve || fail "iStartProof: not a BI assertion:" φ
               |notypeclasses refine (tac_start _ _)]
  end.

Ltac iFresh :=

  let start :=
    lazymatch goal with
    | _ => iStartProof
    end in
  let c :=
    lazymatch goal with
    | |- envs_entails (Envs _ _ ?c) _ => c
    end in
  let inc :=
    lazymatch goal with
    | |- envs_entails (Envs ?Δp ?Δs _) ?Q =>
      let c' := eval vm_compute in (Pos.succ c) in
      change_no_check (envs_entails (Envs Δp Δs c') Q)
    end in
  constr:(IAnon c).

Tactic Notation "iRename" constr(H1) "into" constr(H2) :=
  eapply tac_rename with H1 H2 _ _;
    [pm_reflexivity ||
     let H1 := pretty_ident H1 in
     fail "iRename:" H1 "not found"
    |pm_reduce;
     lazymatch goal with
       | |- False =>
         let H2 := pretty_ident H2 in
         fail "iRename:" H2 "not fresh"
       | _ => idtac
     end].

Inductive esel_pat :=
  | ESelPure
  | ESelIdent :  bool → ident → esel_pat.

Local Ltac iElaborateSelPat_go pat Δ Hs :=
  lazymatch pat with
  | [] => eval cbv in Hs
  | SelPure :: ?pat =>  iElaborateSelPat_go pat Δ (ESelPure :: Hs)
  | SelIntuitionistic :: ?pat =>
    let Hs' := pm_eval (env_dom (env_intuitionistic Δ)) in
    let Δ' := pm_eval (envs_clear_intuitionistic Δ) in
    iElaborateSelPat_go pat Δ' ((ESelIdent true <$> Hs') ++ Hs)
  | SelSpatial :: ?pat =>
    let Hs' := pm_eval (env_dom (env_spatial Δ)) in
    let Δ' := pm_eval (envs_clear_spatial Δ) in
    iElaborateSelPat_go pat Δ' ((ESelIdent false <$> Hs') ++ Hs)
  | SelIdent ?H :: ?pat =>
    lazymatch pm_eval (envs_lookup_delete false H Δ) with
    | Some (?p,_,?Δ') =>  iElaborateSelPat_go pat Δ' (ESelIdent p H :: Hs)
    | None =>
      let H := pretty_ident H in
      fail "iElaborateSelPat:" H "not found"
    end
  end.

Ltac iElaborateSelPat pat :=
  lazymatch goal with
  | |- envs_entails ?Δ _ =>
    let pat := sel_pat.parse pat in iElaborateSelPat_go pat Δ (@nil esel_pat)
  end.

Ltac _iClearHyp H :=
  eapply tac_clear with H _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iClear:" H "not found"
    |pm_reduce; tc_solve ||
     let H := pretty_ident H in
     let P := match goal with |- TCOr (Affine ?P) _ => P end in
     fail "iClear:" H ":" P "not affine and the goal not absorbing"
    |pm_reduce].

Local Ltac iClear_go Hs :=
  lazymatch Hs with
  | [] => idtac
  | ESelPure :: ?Hs => clear; iClear_go Hs
  | ESelIdent _ ?H :: ?Hs => _iClearHyp H; iClear_go Hs
  end.
Tactic Notation "iClear" constr(Hs) :=
  iStartProof; let Hs := iElaborateSelPat Hs in iClear_go Hs.

Tactic Notation "iExact" constr(H) :=
  eapply tac_assumption with H _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iExact:" H "not found"
    |tc_solve ||
     let H := pretty_ident H in
     let P := match goal with |- FromAssumption _ ?P _ => P end in
     fail "iExact:" H ":" P "does not match goal"
    |pm_reduce; tc_solve ||
     let H := pretty_ident H in
     fail "iExact: remaining hypotheses not affine and the goal not absorbing"].

Tactic Notation "iExFalso" :=
  iStartProof;
  apply tac_ex_falso.

Ltac _iIntuitionistic H H' :=
  eapply tac_intuitionistic with H H' _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iIntuitionistic:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoPersistent _ ?P _ => P end in
     fail "iIntuitionistic:" P "not persistent"
    |pm_reduce; tc_solve ||
     let P := match goal with |- TCOr (Affine ?P) _ => P end in
     fail "iIntuitionistic:" P "not affine and the goal not absorbing"
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iIntuitionistic:" H' "not fresh"
     | _ => idtac
     end].

Ltac _iSpatial H H' :=
  eapply tac_spatial with H H' _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iSpatial:" H "not found"
    |pm_reduce; tc_solve
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iSpatial:" H' "not fresh"
     | _ => idtac
     end].

Tactic Notation "iPure" constr(H) "as" simple_intropattern(pat) :=
  eapply tac_pure with H _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iPure:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoPure ?P _ => P end in
     fail "iPure:" P "not pure"
    |pm_reduce; tc_solve ||
     let P := match goal with |- TCOr (Affine ?P) _ => P end in
     fail "iPure:" P "not affine and the goal not absorbing"
    |pm_reduce; intros pat].

Tactic Notation "iEmpIntro" :=
  iStartProof;
  eapply tac_emp_intro;
    [pm_reduce; tc_solve ||
     fail "iEmpIntro: spatial context contains non-affine hypotheses"].

Tactic Notation "iPureIntro" :=
  iStartProof;
  eapply tac_pure_intro;
    [tc_solve ||
     let P := match goal with |- FromPure _ ?P _ => P end in
     fail "iPureIntro:" P "not pure"
    |pm_reduce; tc_solve ||
     fail "iPureIntro: spatial context contains non-affine hypotheses"
    |].

Ltac _iFrameFinish :=
  pm_prettify;
  try match goal with
  | |- envs_entails _ True => by iPureIntro
  | |- envs_entails _ emp => iEmpIntro
  end.

Ltac _iFramePure t :=
  iStartProof;
  let φ := type of t in
  eapply (tac_frame_pure _ _ _ _ t);
    [tc_solve || fail "iFrame: cannot frame" φ
    |].

Ltac _iFrameHyp H :=
  iStartProof;
  eapply tac_frame with H _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iFrame:" H "not found"
    |tc_solve ||
     let R := match goal with |- Frame _ ?R _ _ => R end in
     fail "iFrame: cannot frame" R
    |pm_reduce].

Ltac _iFrameAnyPure :=
  repeat match goal with H : _ |- _ => _iFramePure H end.

Ltac _iFrameAnyIntuitionistic :=
  iStartProof;
  let rec go Hs :=
    match Hs with [] => idtac | ?H :: ?Hs => repeat _iFrameHyp H; go Hs end in
  match goal with
  | |- envs_entails ?Δ _ =>

     let Hs := eval lazy in (env_dom (env_intuitionistic Δ)) in go Hs
  end.

Ltac _iFrameAnySpatial :=
  iStartProof;
  let rec go Hs :=
    match Hs with [] => idtac | ?H :: ?Hs => try _iFrameHyp H; go Hs end in
  match goal with
  | |- envs_entails ?Δ _ =>

     let Hs := eval lazy in (env_dom (env_spatial Δ)) in go Hs
  end.

Ltac _iFrame_go Hs :=
  lazymatch Hs with
  | [] => idtac
  | SelPure :: ?Hs => _iFrameAnyPure; _iFrame_go Hs
  | SelIntuitionistic :: ?Hs => _iFrameAnyIntuitionistic; _iFrame_go Hs
  | SelSpatial :: ?Hs => _iFrameAnySpatial; _iFrame_go Hs
  | SelIdent ?H :: ?Hs => _iFrameHyp H; _iFrame_go Hs
  end.

Ltac _iFrame0 Hs :=
  let Hs := sel_pat.parse Hs in

  lazymatch Hs with
  | [] => idtac
  | _ => _iFrame_go Hs; _iFrameFinish
  end.
Tactic Notation "iFrame" constr(Hs) := _iFrame0 Hs.

Tactic Notation "_iIntro" "(" simple_intropattern(x) ")" :=

  (

    intros x
  ) || (

    iStartProof;
    lazymatch goal with
    | |- envs_entails _ _ =>
      eapply tac_forall_intro;
        [tc_solve ||
         let P := match goal with |- FromForall ?P _ _ => P end in
         fail "iIntro: cannot turn" P "into a universal quantifier"
        |let name := lazymatch goal with
                     | |- let _ := (λ name, _) in _ => name
                     end in
         pm_prettify;
         let y := fresh name in
         intros y; revert y; intros x
         ]
    end).

Ltac _iIntroSpatial H :=
  iStartProof;
  first
  [
    eapply tac_impl_intro with H _ _ _;
      [tc_solve
      |pm_reduce; tc_solve ||
       let P := lazymatch goal with |- Persistent ?P => P end in
       let H := pretty_ident H in
       fail 1 "iIntro: introducing non-persistent" H ":" P
              "into non-empty spatial context"
      |tc_solve
      |pm_reduce;
       let H := pretty_ident H in
        lazymatch goal with
        | |- False =>
          let H := pretty_ident H in
          fail 1 "iIntro:" H "not fresh"
        | _ => idtac
        end]
  |
    eapply tac_wand_intro with H _ _;
      [tc_solve
      | pm_reduce;
        lazymatch goal with
        | |- False =>
          let H := pretty_ident H in
          fail 1 "iIntro:" H "not fresh"
        | _ => idtac
        end]
  | let H := pretty_ident H in
    fail 1 "iIntro: could not introduce" H ", goal is not a wand or implication" ].

Ltac _iIntroPersistent H :=
  iStartProof;
  first
  [
   eapply tac_impl_intro_intuitionistic with H _ _ _;
     [tc_solve
     |tc_solve ||
      let P := match goal with |- IntoPersistent _ ?P _ => P end in
      fail 1 "iIntro:" P "not persistent"
     |pm_reduce;
      lazymatch goal with
      | |- False =>
        let H := pretty_ident H in
        fail 1 "iIntro:" H "not fresh"
      | _ => idtac
      end]
  |
   eapply tac_wand_intro_intuitionistic with H _ _ _;
     [tc_solve
     |tc_solve ||
      let P := match goal with |- IntoPersistent _ ?P _ => P end in
      fail 1 "iIntro:" P "not intuitionistic"
     |tc_solve ||
      let P := match goal with |- TCOr (Affine ?P) _ => P end in
      fail 1 "iIntro:" P "not affine and the goal not absorbing"
     |pm_reduce;
      lazymatch goal with
      | |- False =>
        let H := pretty_ident H in
        fail 1 "iIntro:" H "not fresh"
      | _ => idtac
      end]
  |fail 1 "iIntro: nothing to introduce"].

Ltac _iIntroMaybePersistent H p :=
  lazymatch p with
  | true => _iIntroPersistent H
  | _ =>  _iIntroSpatial H
  end.

Ltac _iIntroDrop :=
  iStartProof;
  first
  [
   eapply tac_impl_intro_drop;
     [tc_solve
     |]
  |
   eapply tac_wand_intro_drop;
     [tc_solve
     |tc_solve ||
      let P := match goal with |- TCOr (Affine ?P) _ => P end in
      fail 1 "iIntro:" P "not affine and the goal not absorbing"
     |]
  |
   _iIntro (_)

  |fail 1 "iIntro: nothing to introduce"].

Ltac _iIntroForall :=
  lazymatch goal with
  | |- ∀ _, ?P => fail
  | |- ∀ _, _ => intro
  | |- let _ := _ in _ => intro
  | |- _ =>
    iStartProof;
    lazymatch goal with
    | |- envs_entails _ (∀ x : _, _) => let x' := fresh x in _iIntro (x')
    end
  end.
Ltac _iIntro :=
  lazymatch goal with
  | |- _ → ?P => intro
  | |- _ =>
    iStartProof;
    lazymatch goal with
    | |- envs_entails _ (_ -∗ _) => _iIntro (?) ||
        let H := iFresh in
        _iIntroPersistent H ||
        _iIntroSpatial H
    | |- envs_entails _ (_ → _) => _iIntro (?) ||
         let H := iFresh in
         _iIntroSpatial H ||
         _iIntroSpatial H
    end
  end.

Tactic Notation "iRevertHyp" constr(H) "with" tactic1(tac) :=
  eapply tac_revert with H;
    [lazymatch goal with
     | |- match envs_lookup_delete true ?i ?Δ with _ => _ end =>
        lazymatch eval pm_eval in (envs_lookup_delete true i Δ) with
        | Some (?p,_,_) => pm_reduce; tac p
        | None =>
           let H := pretty_ident H in
           fail "iRevert:" H "not found"
        end
     end].

Record iTrm {X As S} :=
  ITrm { itrm : X ; itrm_vars : hlist As ; itrm_hyps : S }.

Tactic Notation "iPoseProofCoreHyp" constr(H) "as" constr(Hnew) :=
  let Δ := iGetCtx in
  notypeclasses refine (tac_pose_proof_hyp _ H Hnew _ _);
    pm_reduce;
    lazymatch goal with
    | |- False =>
      let lookup := pm_eval (envs_lookup_delete false H Δ) in
      lazymatch lookup with
      | None =>
        let H := pretty_ident H in
        fail "iPoseProof:" H "not found"
      | _ =>
        let Hnew := pretty_ident Hnew in
        fail "iPoseProof:" Hnew "not fresh"
      end
    | _ => idtac
    end.

Ltac iIntoEmpValid_go :=
  lazymatch goal with
  | |- IntoEmpValid (let _ := _ in _) _ =>

    lazy zeta; iIntoEmpValid_go
  | |- IntoEmpValid (?φ → ?ψ) _ =>

    notypeclasses refine (into_emp_valid_impl _ _ _ _ _);
      [|iIntoEmpValid_go]
  | |- IntoEmpValid (∀ _, _) _ =>

    notypeclasses refine (into_emp_valid_forall _ _ _ _); iIntoEmpValid_go
  | |- IntoEmpValid (∀.. _, _) _ =>

    notypeclasses refine (into_emp_valid_tforall _ _ _ _); iIntoEmpValid_go
  | |- _ =>
    first
      [
       notypeclasses refine (into_emp_valid_impl _ _ _ _ _);
         [|iIntoEmpValid_go]
      |
       notypeclasses refine (into_emp_valid_forall _ _ _ _); iIntoEmpValid_go
      |
       notypeclasses refine (into_emp_valid_tforall _ _ _ _); iIntoEmpValid_go
      |
       notypeclasses refine (into_emp_valid_here _ _ _) ]
  end.

Ltac iIntoEmpValid :=

  iIntoEmpValid_go;
    [..
    |tc_solve ||
     let φ := lazymatch goal with |- AsEmpValid _ ?φ _ => φ end in
     fail "iPoseProof:" φ "not a BI assertion"].

Tactic Notation "iPoseProofCoreLem" open_constr(lem) "as" tactic3(tac) :=
  let Hnew := iFresh in
  notypeclasses refine (tac_pose_proof _ Hnew _ _ (into_emp_valid_proj _ _ _ lem) _);
    [iIntoEmpValid
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let Hnew := pretty_ident Hnew in
       fail "iPoseProof:" Hnew "not fresh"
     | _ => tac Hnew
     end];

  try tc_solve.

Local Ltac iSpecializeArgs_go H xs :=
  lazymatch xs with
  | hnil => idtac
  | hcons ?x ?xs =>
     notypeclasses refine (tac_forall_specialize _ H _ _ _ _ _ _ _);
       [pm_reflexivity ||
        let H := pretty_ident H in
        fail "iSpecialize:" H "not found"
       |tc_solve ||
        let P := match goal with |- IntoForall ?P _ => P end in
        fail "iSpecialize: cannot instantiate" P "with" x
       |lazymatch goal with
        | |- ∃ _ : ?A, _ =>
          notypeclasses refine (@ex_intro A _ x _)
        end; [shelve..|pm_reduce; iSpecializeArgs_go H xs]]
  end.
Local Tactic Notation "iSpecializeArgs" constr(H) open_constr(xs) :=
  iSpecializeArgs_go H xs.

Ltac iSpecializePat_go H1 pats :=
  let solve_to_wand H1 :=
    tc_solve ||
    let P := match goal with |- IntoWand _ _ ?P _ _ => P end in
    fail "iSpecialize:" P "not an implication/wand" in
  let solve_done d :=
    lazymatch d with
    | true =>
       first [ done
             | let Q := match goal with |- envs_entails _ ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done"
             | let Q := match goal with |- ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done" ]
    | false => idtac
    end in
  let Δ := iGetCtx in
  lazymatch pats with
    | [] => idtac
    | SIdent ?H2 [] :: ?pats =>

       notypeclasses refine (tac_specialize false _ H2 _ H1 _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H2 := pretty_ident H2 in
          fail "iSpecialize:" H2 "not found"
         |pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |tc_solve ||
          let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
          let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
          fail "iSpecialize: cannot instantiate" P "with" Q
         |pm_reduce; iSpecializePat_go H1 pats]
    | SIdent ?H2 ?pats1 :: ?pats =>

       let H2tmp := iFresh in
       iPoseProofCoreHyp H2 as H2tmp;

       iRevertHyp H1 with (fun p =>
         iSpecializePat_go H2tmp pats1;
           [..
           |_iIntroMaybePersistent H1 p]);

         [..
         |
          notypeclasses refine (tac_specialize true _ H2tmp _ H1 _ _ _ _ _ _ _ _ _);
            [pm_reflexivity ||
             let H2tmp := pretty_ident H2tmp in
             fail "iSpecialize:" H2tmp "not found"
            |pm_reflexivity ||
             let H1 := pretty_ident H1 in
             fail "iSpecialize:" H1 "not found"
            |tc_solve ||
             let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
             let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
             fail "iSpecialize: cannot instantiate" P "with" Q
            |pm_reduce; iSpecializePat_go H1 pats]]
    | SPureGoal ?d :: ?pats =>
       notypeclasses refine (tac_specialize_assert_pure _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- FromPure _ ?Q _ => Q end in
          fail "iSpecialize:" Q "not pure"
         |solve_done d
         |pm_reduce;
          iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic false ?Hs_frame [] ?d) :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpeci

[...]

]]
    | SPureGoal ?d :: ?pats =>
       notypeclasses refine (tac_specialize_assert_pure _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- FromPure _ ?Q _ => Q end in
          fail "iSpecialize:" Q "not pure"
         |solve_done d
         |pm_reduce;
          iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic false ?Hs_frame [] ?d) :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve
         |pm_reduce; iFrame Hs_frame; solve_done d
         |pm_reduce; iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: ?pats =>
       fail "iSpecialize: cannot select hypotheses for intuitionistic premise"
    | SGoal (SpecGoal ?m ?lr ?Hs_frame ?Hs ?d) :: ?pats =>
       let Hs' := eval cbv in (if lr then Hs else Hs_frame ++ Hs) in
       notypeclasses refine (tac_specialize_assert _ H1 _
           (if m is GModal then true else false) lr Hs' _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          lazymatch goal with
          | |- False =>
            let Hs' := iMissingHypsCore Δ Hs' in
            fail "iSpecialize: hypotheses" Hs' "not found"
          | _ =>
            notypeclasses refine (conj _ _);
              [iFrame Hs_frame; solve_done d
              |iSpecializePat_go H1 pats]
          end]
    | SAutoFrame GIntuitionistic :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve ||
          fail "iSpecialize: Cannot find IntoAbsorbingly;"
               "this should not happen, please report a bug"
         |pm_reduce; solve [iFrame "∗ #"]
         |pm_reduce; iSpecializePat_go H1 pats]
    | SAutoFrame ?m :: ?pats =>
       notypeclasses refine (tac_specialize_frame _ H1 _
           (if m is GModal then true else false) _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          first
            [notypeclasses refine (tac_unlock_emp _ _ _)
            |notypeclasses refine (tac_unlock_True _ _ _)
            |iFrame "∗ #"; notypeclasses refine (tac_unlock _ _ _)
            |let P :=
               match goal with |- envs_entails _ (?P ∗ locked _)%I => P end in
             fail 1 "iSpecialize: premise" P "cannot be solved by framing"]
         |exact eq_refl]; _iIntroSpatial H1; iSpecializePat_go H1 pats
    end.

Local Tactic Notation "iSpecializePat" open_constr(H) constr(pat) :=
  let pats := spec_pat.parse pat in iSpecializePat_go H pats.

Fixpoint use_tac_specialize_intuitionistic_helper {M}
    (Δ : envs M) (pats : list spec_pat) : bool :=
  match pats with
  | [] => false
  | SPureGoal _ :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SAutoFrame _ :: _ => true
  | SIdent H _ :: pats =>
     match envs_lookup_delete false H Δ with
     | Some (false, _, Δ) => true
     | Some (true, _, Δ) => use_tac_specialize_intuitionistic_helper Δ pats
     | None => false
     end
  | SGoal (SpecGoal GModal _ _ _ _) :: _ => false
  | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SGoal (SpecGoal GSpatial neg Hs_frame Hs _) :: pats =>
     match envs_split (if neg is true then Right else Left)
                      (if neg then Hs else pm_app Hs_frame Hs) Δ with
     | Some (Δ1,Δ2) => if env_spatial_is_nil Δ1
                       then use_tac_specialize_intuitionistic_helper Δ2 pats
                       else true
     | None => false
     end
  end.

Tactic Notation "iSpecializeCore" open_constr(H)
    "with" open_constr(xs) open_constr(pat) "as" constr(p) :=
  let p := intro_pat_intuitionistic p in
  let pat := spec_pat.parse pat in
  let H :=
    lazymatch type of H with
    | string => constr:(INamed H)
    | _ => H
    end in
  iSpecializeArgs H xs; [..|
    lazymatch type of H with
    | ident =>
       let pat := spec_pat.parse pat in
       let Δ := iGetCtx in

       let b := eval lazy [use_tac_specialize_intuitionistic_helper] in
         (if p then use_tac_specialize_intuitionistic_helper Δ pat else false) in
       lazymatch eval pm_eval in b with
       | true =>

          lazymatch iTypeOf H with
          | Some (?q, _) =>
             let PROP := iBiOfGoal in

             lazymatch eval lazy in (q || tc_to_bool (BiAffine PROP)) with
             | true =>
                notypeclasses refine (tac_specialize_intuitionistic_helper _ H _ _ _ _ _ _ _ _ _ _);
                  [pm_reflexivity

                  |pm_reduce; tc_solve

                  |iSpecializePat H pat;
                    [..
                    |notypeclasses refine (tac_specialize_intuitionistic_helper_done _ H _ _ _);
                     pm_reflexivity]
                  |tc_solve ||
                   let Q := match goal with |- IntoPersistent _ ?Q _ => Q end in
                   fail "iSpecialize:" Q "not persistent"
                  |pm_reduce ]
             | false => iSpecializePat H pat
             end
          | None =>
             let H := pretty_ident H in
             fail "iSpecialize:" H "not found"
          end
       | false => iSpecializePat H pat
       end
    | _ => fail "iSpecialize:" H "should be a hypothesis, use iPoseProof instead"
    end].

Tactic Notation "iSpecializeCore" open_constr(t) "as" constr(p) :=
  lazymatch type of t with
  | string => iSpecializeCore t with hnil "" as p
  | ident => iSpecializeCore t with hnil "" as p
  | _ =>
    lazymatch t with
    | ITrm ?H ?xs ?pat => iSpecializeCore H with xs pat as p
    | _ => fail "iSpecialize:" t "should be a proof mode term"
    end
  end.

Tactic Notation "iPoseProofCore" open_constr(lem)
    "as" constr(p) tactic3(tac) :=
  iStartProof;
  let t := lazymatch lem with ITrm ?t ?xs ?pat => t | _ => lem end in
  let t := lazymatch type of t with string => constr:(INamed t) | _ => t end in
  let spec_tac Htmp :=
    lazymatch lem with
    | ITrm _ ?xs ?pat => iSpecializeCore (ITrm Htmp xs pat) as p
    | _ => idtac
    end in
  lazymatch type of t with
  | ident =>
     let Htmp := iFresh in
     iPoseProofCoreHyp t as Htmp; spec_tac Htmp; [..|tac Htmp]
  | _ => iPoseProofCoreLem t as (fun Htmp => spec_tac Htmp; [..|tac Htmp])
  end.

Tactic Notation "iOrDestruct" constr(H) "as" constr(H1) constr(H2) :=
  eapply tac_or_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iOrDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoOr ?P _ _ => P end in
     fail "iOrDestruct: cannot destruct" P
    | pm_reduce;
      lazymatch goal with
      | |- False =>
        let H1 := pretty_ident H1 in
        let H2 := pretty_ident H2 in
        fail "iOrDestruct:" H1 "or" H2 "not fresh"
      |  _ => split
      end].

Ltac _iAndDestruct H H1 H2 :=
  eapply tac_and_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iAndDestruct:" H "not found"
    |pm_reduce; tc_solve ||
     let P :=
       lazymatch goal with
       | |- IntoSep ?P _ _ => P
       | |- IntoAnd _ ?P _ _ => P
       end in
     fail "iAndDestruct: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
       | |- False =>
         let H1 := pretty_ident H1 in
         let H2 := pretty_ident H2 in
         fail "iAndDestruct:" H1 "or" H2 "not fresh"
       | _ => idtac
     end].

Ltac _iAndDestructChoice H d H' :=
  eapply tac_and_destruct_choice with H _ d H' _ _ _;
    [pm_reflexivity || fail "iAndDestructChoice:" H "not found"
    |pm_reduce; tc_solve ||
     let P := match goal with |- TCOr (IntoAnd _ ?P _ _) _ => P end in
     fail "iAndDestructChoice: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iAndDestructChoice:" H' "not fresh"
     | _ => idtac
     end].

Tactic Notation "_iExistDestruct" constr(H)
    "as" simple_intropattern(x) constr(Hx) :=
  eapply tac_exist_destruct with H _ Hx _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iExistDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoExist ?P _ _ => P end in
     fail "iExistDestruct: cannot destruct" P|];
    let name := lazymatch goal with
                | |- let _ := (λ name, _) in _ => name
                end in
    intros _;
    let y := fresh name in
    intros y; pm_reduce;
    lazymatch goal with
    | |- False =>
      let Hx := pretty_ident Hx in
      fail "iExistDestruct:" Hx "not fresh"
    | _ => revert y; intros x
    end.

Tactic Notation "iModIntro" uconstr(sel) :=
  iStartProof;
  notypeclasses refine (tac_modal_intro _ _ sel _ _ _ _ _ _ _ _ _ _ _ _ _ _);
    [tc_solve ||
     fail "iModIntro: the goal is not a modality"
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalIntuitionisticEnv _ _ _ ?s => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: intuitionistic context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: intuitionistic context is non-empty"
     end
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalSpatialEnv _ _ _ ?s _ => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: spatial context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: spatial context is non-empty"
     end
    |pm_reduce; tc_solve ||
     fail "iModIntro: cannot filter spatial context when goal is not absorbing"
    |iSolveSideCondition
    |pm_prettify
      ].
Tactic Notation "iModIntro" := iModIntro _.

Tactic Notation "iModCore" constr(H) "as" constr(H') :=
  eapply tac_modal_elim with H H' _ _ _ _ _ _;
    [pm_reflexivity || fail "iMod:" H "not found"
    |tc_solve ||
     let P := match goal with |- ElimModal _ _ _ ?P _ _ _ => P end in
     let Q := match goal with |- ElimModal _ _ _ _ _ ?Q _ => Q end in
     fail "iMod: cannot eliminate modality" P "in" Q
    |iSolveSideCondition
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iMod:" H' "not fresh"
     | _ => pm_prettify
     end].

Ltac _ident_for_pat pat :=
  lazymatch pat with
  | IIdent ?x => x
  | _ => let x := iFresh in x
  end.

Ltac _ident_for_pat_default pat default :=
  lazymatch pat with
  | IIdent ?x => x
  | _ =>
    lazymatch default with
    | IAnon _ => default
    | _ => let x := iFresh in x
    end
  end.

Ltac _iDestructHypGo Hz pat0 pat :=
  lazymatch pat with
  | IFresh =>
     lazymatch Hz with
     | IAnon _ => idtac
     | INamed ?Hz => let Hz' := iFresh in iRename Hz into Hz'
     end
  | IDrop => _iClearHyp Hz
  | IFrame => iFrame Hz
  | IIdent Hz => idtac
  | IIdent ?y => iRename Hz into y
  | IList [[]] => iExFalso; iExact Hz

  | IList [[?pat1; IDrop]] =>
     let x := _ident_for_pat_default pat1 Hz in
     _iAndDestructChoice Hz Left x;
     _iDestructHypGo x pat0 pat1
  | IList [[IDrop; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iAndDestructChoice Hz Right x;
     _iDestructHypGo x pat0 pat2

  | IList [[IPure IGallinaAnon; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as ? x; _iDestructHypGo x pat0 pat2
  | IList [[IPure (IGallinaNamed ?s); ?pat2]] =>
     let x := fresh in
     let y := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as x y;
     rename_by_string x s;
     _iDestructHypGo y pat0 pat2
  | IList [[?pat1; ?pat2]] =>

     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat pat2 in
     _iAndDestruct Hz x1 x2;
     _iDestructHypGo x1 pat0 pat1; _iDestructHypGo x2 pat0 pat2
  | IList [_ :: _ :: _] => fail "iDestruct:" pat0 "has too many conjuncts"
  | IList [[_]] => fail "iDestruct:" pat0 "has just a single conjunct"

  | IList [[?pat1];[?pat2]] =>
     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat_default pat2 Hz in
     iOrDestruct Hz as x1 x2;
     [_iDestructHypGo x1 pat0 pat1|_iDestructHypGo x2 pat0 pat2]

  | IList (_ :: _ :: _ :: _) => fail "iDestruct:" pat0 "has too many disjuncts"

  | IList [_;_] => fail "iDestruct: in" pat0 "a disjunct has multiple patterns"

  | IPure IGallinaAnon => iPure Hz as ?
  | IPure (IGallinaNamed ?s) =>
     let x := fresh in
     iPure Hz as x;
     rename_by_string x s
  | IRewrite Right => iPure Hz as ->
  | IRewrite Left => iPure Hz as <-
  | IIntuitionistic ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iIntuitionistic Hz x; _iDestructHypGo x pat0 pat
  | ISpatial ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iSpatial Hz x; _iDestructHypGo x pat0 pat
  | IModalElim ?pat =>
    let x := _ident_for_pat_default pat Hz in
    iModCore Hz as x; _iDestructHypGo x pat0 pat
  | _ => fail "iDestruct:" pat0 "is not supported due to" pat
  end.
Ltac _iDestructHypFindPat Hgo pat found pats :=
  lazymatch pats with
  | [] =>
    lazymatch found with
    | true => pm_prettify
    | false => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
    end
  | ISimpl :: ?pats => simpl; _iDestructHypFindPat Hgo pat found pats
  | IClear ?H :: ?pats => iClear H; _iDestructHypFindPat Hgo pat found pats
  | IClearFrame ?H :: ?pats => iFrame H; _iDestructHypFindPat Hgo pat found pats
  | ?pat1 :: ?pats =>
     lazymatch found with
     | false => _iDestructHypGo Hgo pat pat1; _iDestructHypFindPat Hgo pat true pats
     | true => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
     end
  end.

Ltac _iDestructHyp0 H pat :=
  let pats := intro_pat.parse pat in
  _iDestructHypFindPat H pat false pats.
Ltac _iDestructHyp H xs pat :=
  ltac1_list_iter ltac:(fun x => _iExistDestruct H as x H) xs;
  _iDestructHyp0 H pat.

Tactic Notation "iDestructHyp" constr(H) "as" constr(pat) :=
  _iDestructHyp0 H pat.

Ltac _iIntros_go pats startproof :=
  lazymatch pats with
  | [] =>
    lazymatch startproof with
    | true => iStartProof
    | false => idtac
    end

  | IPure (IGallinaNamed ?s) :: ?pats =>
     let i := fresh in
     _iIntro (i);
     rename_by_string i s;
     _iIntros_go pats startproof
  | IPure IGallinaAnon :: ?pats => _iIntro (?); _iIntros_go pats startproof
  | IIntuitionistic (IIdent ?H) :: ?pats => _iIntroPersistent H; _iIntros_go pats false
  | IDrop :: ?pats => _iIntroDrop; _iIntros_go pats startproof
  | IIdent ?H :: ?pats => _iIntroSpatial H; _iIntros_go pats startproof

  | IPureIntro :: ?pats => iPureIntro; _iIntros_go pats false
  | IModalIntro :: ?pats => iModIntro; _iIntros_go pats false
  | IForall :: ?pats => repeat _iIntroForall; _iIntros_go pats startproof
  | IAll :: ?pats => repeat (_iIntroForall || _iIntro); _iIntros_go pats startproof

  | ISimpl :: ?pats => simpl; _iIntros_go pats startproof
  | IClear ?H :: ?pats => iClear H; _iIntros_go pats false
  | IClearFrame ?H :: ?pats => iFrame H; _iIntros_go pats false
  | IDone :: ?pats => try done; _iIntros_go pats startproof

  | IIntuitionistic ?pat :: ?pats =>
     let H := iFresh in _iIntroPersistent H; iDestructHyp H as pat; _iIntros_go pats false
  | ?pat :: ?pats =>
     let H := iFresh in _iIntroSpatial H; iDestructHyp H as pat; _iIntros_go pats false
  end.

Ltac _iIntros0 pat :=
  let pats := intro_pat.parse pat in

  lazymatch pats with
  | [] => idtac
  | _ => _iIntros_go pats true
  end.
Ltac _iIntros xs pat :=
  ltac1_list_iter ltac:(fun x => _iIntro (x)) xs;
  _iIntros0 pat.
Tactic Notation "iIntros" "(" ne_simple_intropattern_list(xs) ")" :=
  _iIntros xs "".

Tactic Notation "iDestructCore" open_constr(lem) "as" constr(p) tactic3(tac) :=
  let intro_destruct n :=
    let rec go n' :=
      lazymatch n' with
      | 0 => fail "iDestruct: cannot introduce" n "hypotheses"
      | 1 => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; tac H
      | S ?n' => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; go n'
      end in
    intros; go n in
  lazymatch type of lem with
  | nat => intro_destruct lem
  | Z =>

     let n := eval cbv in (Z.to_nat lem) in intro_destruct n
  | ident => tac lem
  | string => tac constr:(INamed lem)
  | _ => iPoseProofCore lem as p tac
  end.
Tactic Notation "iMod" open_constr(lem) "as" "(" ne_simple_intropattern_list(xs) ")"
    constr(pat) :=
  iDestructCore lem as false (fun H => iModCore H as H; last _iDestructHyp H xs pat).
Module Export iris_DOT_proofmode_DOT_ltac_tactics.
Module Export iris.
Module Export proofmode.
Module Export ltac_tactics.
End ltac_tactics.

End proofmode.

End iris.

End iris_DOT_proofmode_DOT_ltac_tactics.

Section class_instances.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance as_emp_valid_emp_valid d P : AsEmpValid0 d (⊢ P) P | 0.
Admitted.

Global Instance into_sep_sep P Q : IntoSep (P ∗ Q) P Q.
Admitted.

Global Instance into_exist_exist {A} (Φ : A → PROP) name :
  AsIdentName Φ name → IntoExist (bi_exist Φ) Φ name.
Admitted.
End class_instances.
Module Export class_instances.
End class_instances.
Import iris.proofmode.modality_instances.

Section class_instances_updates.
Context {PROP : bi}.
Implicit Types P Q R : PROP.
Global Instance elim_modal_bupd_fupd
    `{!BiBUpd PROP, !BiFUpd PROP, !BiBUpdFUpd PROP} p E1 E2 P Q :
  ElimModal True p false (|==> P) P (|={E1,E2}=> Q) (|={E1,E2}=> Q) | 10.
Admitted.
End class_instances_updates.
Module Export class_instances_updates.
End class_instances_updates.
Import iris.bi.telescopes.
Import iris.proofmode.classes.
Import iris.proofmode.classes_make.

Section class_instances_frame.
Context {PROP : bi}.
Implicit Types P Q R : PROP.
Global Instance frame_here p R : Frame p R R emp | 1.
Admitted.
Global Instance frame_sep_l R P1 P2 Q Q' :
  Frame false R P1 Q → MakeSep Q P2 Q' → Frame false R (P1 ∗ P2) Q' | 9.
Admitted.

Inductive GatherEvarsEq {A} (x : A) : A → Prop :=
  GatherEvarsEq_refl : GatherEvarsEq x x.

#[projections(primitive)] Class FrameExistRequirements
    (p : bool) (R : PROP) {A} (Φ : A → PROP) (a' : A) (G' : PROP) := {
  frame_exist_witness : A;
  frame_exist_resource : PROP;
  frame_exist_proof : Frame p R (Φ frame_exist_witness) frame_exist_resource;
  frame_exist_witness_eq : GatherEvarsEq frame_exist_witness a';
  frame_exist_resource_eq : TCEq frame_exist_resource G'
}.
Global Existing Instance Build_FrameExistRequirements.

Inductive TCCbnTele {A} (x : A) : A → Prop :=
  TCCbnTele_refl : TCCbnTele x x.

Global Instance frame_exist {A} p R (Φ : A → PROP)
    (TT : tele) (g : TT → A) (Ψ : TT → PROP) Q :
  FrameInstantiateExistEnabled →
  (∀ c, FrameExistRequirements p R Φ (g c) (Ψ c)) →
  TCCbnTele (∃.. c, Ψ c)%I Q →
  Frame p R (∃ a, Φ a) Q.
Admitted.
Global Instance frame_fupd `{!BiFUpd PROP} p E1 E2 R P Q :
  Frame p R P Q → Frame p R (|={E1,E2}=> P) (|={E1,E2}=> Q) | 2.
Admitted.
End class_instances_frame.

Ltac solve_gather_evars_eq :=
  lazymatch goal with
  | |- GatherEvarsEq ?a (?g ?c) =>
    let rec retcon_tele T arg :=

      match a with
      | context [?term] =>
        is_evar term;
        let X := type of term in
        lazymatch X with
        | tele => fail
        | _ => idtac
        end;
        let T' := open_constr:(_) in
        unify T (TeleS (λ _ : X, T'));

        unify term (tele_arg_head (λ _ : X, T') arg);

        retcon_tele T' (tele_arg_tail (λ _ : X, T') arg)

      | _ =>

        unify T TeleO
      end
    in
    let T' := lazymatch (type of c) with tele_arg ?T => T end in
    retcon_tele T' c;
    exact (GatherEvarsEq_refl _)
  end.

Global Hint Extern 0 (GatherEvarsEq _ _) =>
  solve_gather_evars_eq : typeclass_instances.

Global Hint Extern 0 (TCCbnTele _ _) =>
  cbn [bi_texist tele_fold tele_bind tele_arg_head tele_arg_tail];
  exact (TCCbnTele_refl _) : typeclass_instances.
Module Export class_instances_frame.
End class_instances_frame.

Export iris.proofmode.classes_make.

Section class_instances_make.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance make_sep_emp_l P : KnownLMakeSep emp P P.
Admitted.
End class_instances_make.
Module Export class_instances_make.
End class_instances_make.

Export iris.proofmode.ltac_tactics.
Module Export iris_DOT_proofmode_DOT_proofmode.
Module Export iris.
Module Export proofmode.
Module Export proofmode.
End proofmode.

End proofmode.

End iris.

End iris_DOT_proofmode_DOT_proofmode.
Export iris.algebra.cmra.

Record agree (A : Type) : Type := {
  agree_car : list A;
  agree_not_nil : bool_decide (agree_car = []) = false
}.
Global Arguments agree_car {_} _.

Section agree.
Context {SI : sidx} {A : ofe}.
Local Instance agree_dist : Dist (agree A).
Admitted.
Local Instance agree_equiv : Equiv (agree A).
Admitted.

Definition agree_ofe_mixin : OfeMixin (agree A).
Admitted.
Canonical Structure agreeO := Ofe (agree A) agree_ofe_mixin.
Local Instance agree_validN_instance : ValidN (agree A).
Admitted.
Local Instance agree_valid_instance : Valid (agree A).
Admitted.

Local Program Instance agree_op_instance : Op (agree A) := λ x y,
  {| agree_car := agree_car x ++ agree_car y |}.
Admit Obligations.
Local Instance agree_pcore_instance : PCore (agree A).
Admitted.

Definition agree_cmra_mixin : CmraMixin (agree A).
Admitted.
Canonical Structure agreeR : cmra.
exact (Cmra (agree A) agree_cmra_mixin).
Defined.

End agree.
Global Arguments agreeR {_} _.

Section agree_map.
End agree_map.
Admit Obligations.
Module Export iris_DOT_algebra_DOT_agree.
Module Export iris.
Module Export algebra.
Module Export agree.
End agree.

End algebra.

End iris.

End iris_DOT_algebra_DOT_agree.
Module Export cmra.
End cmra.
Export iris.algebra.cmra.
Export iris.algebra.stepindex_finite.

Record uPred (M : ucmra) : Type := UPred {
  uPred_holds : nat → M → Prop;

  uPred_mono n1 n2 x1 x2 :
    uPred_holds n1 x1 → x1 ≼{n2} x2 → n2 ≤ n1 → uPred_holds n2 x2
}.

Local Coercion uPred_holds : uPred >-> Funclass.

Section cofe.
  Context {M : ucmra}.
Local Instance uPred_equiv : Equiv (uPred M).
Admitted.
Local Instance uPred_dist : Dist (uPred M).
Admitted.
  Definition uPred_ofe_mixin : OfeMixin (uPred M).
Admitted.
Canonical Structure uPredO : ofe.
exact (Ofe (uPred M) uPred_ofe_mixin).
Defined.

  Program Definition uPred_compl : Compl uPredO := λ c,
    {| uPred_holds n x := ∀ n', n' ≤ n → ✓{n'} x → c n' n' x |}.
Admit Obligations.
  Global Program Instance uPred_cofe : Cofe uPredO := cofe_finite uPred_compl _.
Admit Obligations.
End cofe.
Global Arguments uPredO : clear implicits.

Inductive uPred_entails {M} (P Q : uPred M) : Prop :=
  { uPred_in_entails : ∀ n x, ✓{n} x → P n x → Q n x }.
Global Hint Resolve uPred_mono : uPred_def.

Local Program Definition uPred_pure_def {M} (φ : Prop) : uPred M :=
  {| uPred_holds n x := φ |}.
Solve Obligations with done.
Local Definition uPred_pure_aux : seal (@uPred_pure_def).
Admitted.
Definition uPred_pure := uPred_pure_aux.(unseal).
Global Arguments uPred_pure {M}.

Local Program Definition uPred_and_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∧ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_and_aux : seal (@uPred_and_def).
Admitted.
Definition uPred_and := uPred_and_aux.(unseal).
Global Arguments uPred_and {M}.

Local Program Definition uPred_or_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∨ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_or_aux : seal (@uPred_or_def).
Admitted.
Definition uPred_or := uPred_or_aux.(unseal).
Global Arguments uPred_or {M}.

Local Program Definition uPred_impl_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       x ≼ x' → n' ≤ n → ✓{n'} x' → P n' x' → Q n' x' |}.
Admit Obligations.
Local Definition uPred_impl_aux : seal (@uPred_impl_def).
Admitted.
Definition uPred_impl := uPred_impl_aux.(unseal).
Global Arguments uPred_impl {M}.

Local Program Definition uPred_forall_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∀ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_forall_aux : seal (@uPred_forall_def).
Admitted.
Definition uPred_forall := uPred_forall_aux.(unseal).

Local Program Definition uPred_exist_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∃ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_exist_aux : seal (@uPred_exist_def).
Admitted.
Definition uPred_exist := uPred_exist_aux.(unseal).

Local Program Definition uPred_sep_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∃ x1 x2, x ≡{n}≡ x1 ⋅ x2 ∧ P n x1 ∧ Q n x2 |}.
Admit Obligations.
Local Definition uPred_sep_aux : seal (@uPred_sep_def).
Admitted.
Definition uPred_sep := uPred_sep_aux.(unseal).
Global Arguments uPred_sep {M}.

Local Program Definition uPred_wand_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       n' ≤ n → ✓{n'} (x ⋅ x') → P n' x' → Q n' (x ⋅ x') |}.
Admit Obligations.
Local Definition uPred_wand_aux : seal (@uPred_wand_def).
Admitted.
Definition uPred_wand := uPred_wand_aux.(unseal).
Global Arguments uPred_wand {M}.

Local Program Definition uPred_plainly_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n ε |}.
Solve Obligations with naive_solver eauto using uPred_mono, ucmra_unit_validN.

Local Program Definition uPred_persistently_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n (core x) |}.
Solve Obligations with naive_solver eauto using uPred_mono, cmra_core_monoN.
Local Definition uPred_persistently_aux : seal (@uPred_persistently_def).
Admitted.
Definition uPred_persistently := uPred_persistently_aux.(unseal).
Global Arguments uPred_persistently {M}.

Local Program Definition uPred_later_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := match n return _ with 0 => True | S n' => P n' x end |}.
Admit Obligations.
Local Definition uPred_later_aux : seal (@uPred_later_def).
Admitted.
Definition uPred_later := uPred_later_aux.(unseal).
Global Arguments uPred_later {M}.

Section primitive.
End primitive.
Module Export iris_DOT_base_logic_DOT_upred.
Module Export iris.
Module Export base_logic.
Module Export upred.
End upred.

End base_logic.

End iris.

End iris_DOT_base_logic_DOT_upred.
Export iris.bi.derived_connectives.
Export iris.bi.updates.
Export iris.base_logic.upred.
Definition uPred_emp {M} : uPred M.
Admitted.

Lemma uPred_bi_mixin (M : ucmra) :
  BiMixin
    uPred_entails uPred_emp uPred_pure uPred_and uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_wand.
Admitted.

Lemma uPred_bi_persistently_mixin (M : ucmra) :
  BiPersistentlyMixin
    uPred_entails uPred_emp uPred_and
    (@uPred_exist M) uPred_sep uPred_persistently.
Admitted.

Lemma uPred_bi_later_mixin (M : ucmra) :
  BiLaterMixin
    uPred_entails uPred_pure uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_persistently uPred_later.
Admitted.
Canonical Structure uPredI (M : ucmra) : bi.
exact ({| bi_ofe_mixin := ofe_mixin_of (uPred M);
     bi_bi_mixin := uPred_bi_mixin M;
     bi_bi_later_mixin := uPred_bi_later_mixin M;
     bi_bi_persistently_mixin := uPred_bi_persistently_mixin M |}).
Defined.
Global Instance uPred_bi_bupd M : BiBUpd (uPredI M).
Admitted.
Module Export iris.
Module Export base_logic.
Module Export bi.
End bi.

End base_logic.

End iris.

Export iris.algebra.cmra.

Notation frac := Qp (only parsing).
  Canonical Structure fracO := leibnizO frac.
Local Instance frac_valid_instance : Valid frac.
Admitted.
Local Instance frac_pcore_instance : PCore frac.
Admitted.
Local Instance frac_op_instance : Op frac.
Admitted.

  Definition frac_ra_mixin : RAMixin frac.
Admitted.
  Canonical Structure fracR := discreteR frac frac_ra_mixin.
Export iris.base_logic.bi.
Export iris.algebra.agree.
Export iris.algebra.gmap.
Definition gmap_viewR {SI : sidx} (K : Type) `{Countable K} (V : cmra) : cmra.
Admitted.
Definition authR {SI : sidx} (A : ucmra) : cmra.
Admitted.

Structure gFunctor := GFunctor {
  gFunctor_F :> rFunctor;
  gFunctor_map_contractive : rFunctorContractive gFunctor_F;
}.

Record gFunctors := GFunctors {
  gFunctors_len : nat;
  gFunctors_lookup : fin gFunctors_len → gFunctor
}.

Definition gid (Σ : gFunctors) := fin (gFunctors_len Σ).

Definition gname := positive.
Definition iResUR (Σ : gFunctors) : ucmra.
Admitted.
  Notation iProp Σ := (uPred (iResUR Σ)).
  Notation iPropO Σ := (uPredO (iResUR Σ)).

Class inG (Σ : gFunctors) (A : cmra) := InG {
  inG_id : gid Σ;
  inG_apply := rFunctor_apply (gFunctors_lookup Σ inG_id);
  inG_prf : A = inG_apply (iPropO Σ) _;
}.
Local Definition own_def `{!inG Σ A} (γ : gname) (a : A) : iProp Σ.
Admitted.
Local Definition own_aux : seal (@own_def).
Admitted.
Definition own := own_aux.(unseal).
Global Arguments own {Σ A _} γ a.
Local Instance nat_valid_instance : Valid nat.
Admitted.
Local Instance nat_pcore_instance : PCore nat.
Admitted.
Local Instance nat_op_instance : Op nat.
Admitted.
  Lemma nat_ra_mixin : RAMixin nat.
Admitted.
Canonical Structure natR : cmra.
exact (discreteR nat nat_ra_mixin).
Defined.
Local Instance nat_unit_instance : Unit nat.
Admitted.
  Lemma nat_ucmra_mixin : UcmraMixin nat.
Admitted.
Canonical Structure natUR : ucmra.
exact (Ucmra nat nat_ucmra_mixin).
Defined.

Class lcGS (Σ : gFunctors) := LcGS {
  #[local] lcGS_inG :: inG Σ (authR natUR);
  lcGS_name : gname;
}.
Export stdpp.coPset.

Inductive coPset_disj :=
  | CoPset : coPset → coPset_disj
  | CoPsetInvalid : coPset_disj.
  Canonical Structure coPset_disjO := leibnizO coPset_disj.
Local Instance coPset_disj_valid_instance : Valid coPset_disj.
Admitted.
Local Instance coPset_disj_op_instance : Op coPset_disj.
Admitted.
Local Instance coPset_disj_pcore_instance : PCore coPset_disj.
Admitted.

  Lemma coPset_disj_ra_mixin : RAMixin coPset_disj.
Admitted.
  Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin.
Import iris.algebra.gset.
  Class wsatGpreS (Σ : gFunctors) : Set := WsatGpreS {
    wsatGpreS_inv : inG Σ (gmap_viewR positive (agreeR $ laterO (iPropO Σ)));
    wsatGpreS_enabled : inG Σ coPset_disjR;
    wsatGpreS_disabled : inG Σ (gset_disjR positive);
  }.

  Class wsatGS (Σ : gFunctors) : Set := WsatG {
    wsat_inG : wsatGpreS Σ;
    invariant_name : gname;
    enabled_name : gname;
    disabled_name : gname;
  }.

Inductive has_lc := HasLc | HasNoLc.

Class invGS_gen (hlc : has_lc) (Σ : gFunctors) : Set := InvG {
  #[global] invGS_wsat :: wsatGS Σ;
  #[global] invGS_lc :: lcGS Σ;
}.
Global Instance uPred_bi_fupd `{!invGS_gen hlc Σ} : BiFUpd (uPredI (iResUR Σ)).
Admitted.

Global Instance uPred_bi_bupd_fupd `{!invGS_gen hlc Σ} : BiBUpdFUpd (uPredI (iResUR Σ)).
Admitted.
Export stdpp.namespaces.
Export iris.algebra.excl.
Import iris.proofmode.proofmode.

Class cinvG Σ := {
  #[local] cinv_inG :: inG Σ (prodR (optionR (exclR unitO)) (optionR fracR)) ;
}.

Section defs.
  Context `{!invGS_gen hlc Σ, !cinvG Σ}.
Definition cinv_own (γ : gname) (p : frac) : iProp Σ.
Admitted.
  Definition cinv_excl γ : iProp Σ := own γ (Some (Excl ()), None).
Definition cinv (N : namespace) (γ : gname) (P : iProp Σ) : iProp Σ.
Admitted.

  Lemma cinv_own_excl_alloc P :
    pred_infinite P → ⊢ |==> ∃ γ, ⌜P γ⌝ ∗ cinv_excl γ ∗ cinv_own γ 1.
Admitted.

  Lemma cinv_alloc_strong (I : gname → Prop) E N :
    pred_infinite I →
    ⊢ |={E}=> ∃ γ, ⌜ I γ ⌝ ∗ cinv_own γ 1 ∗ ∀ P, ▷ P ={E}=∗ cinv N γ P.
  Proof.
    iIntros (?).
iMod cinv_own_excl_alloc as (γ) "[$ [Hexcl $]]"; first done.
🛠️ 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 6.4MiB file on GitHub Actions Artifacts under build.log)
LIB 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]
iris/program_logic/lifting.vo (real: 2.91, user: 2.78, sys: 0.13, mem: 597944 ko)
COQNATIVE iris/program_logic/lifting.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/program_logic/total_weakestpre.v", line 106, characters 68-80:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/lifting.vo.native (real: 0.49, user: 0.38, sys: 0.11, mem: 157056 ko)
COQTEST [ref ignored] tests/algebra.v (ref: tests/algebra.ref)
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]
tests/algebra.vo (real: 1.28, user: 1.14, sys: 0.13, mem: 590428 ko)
ROCQ compile iris/base_logic/lib/cancelable_invariants.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q iris iris -Q iris_heap_lang iris.heap_lang -Q iris_unstable iris.unstable -Q iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.v 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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/iris
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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.kntTCrYV2z
MINIMIZER_DEBUG: files:  iris/base_logic/lib/cancelable_invariants.v /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/base_logic/lib/cancelable_invariants.v", line 90, characters 17-65:
Error: Tactic failure: iFrame: cannot frame ⌜?Goal γ⌝%I.

Command exited with non-zero status 1
iris/base_logic/lib/cancelable_invariants.vo (real: 1.46, user: 1.32, sys: 0.13, mem: 583992 ko)
make[2]: *** [Makefile.coq:813: iris/base_logic/lib/cancelable_invariants.vo] Error 1
make[2]: *** [iris/base_logic/lib/cancelable_invariants.vo] Deleting file 'iris/base_logic/lib/cancelable_invariants.glob'
make[2]: *** Waiting for unfinished jobs....
File "./iris/program_logic/total_weakestpre.v", line 274, characters 78-90:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/total_weakestpre.vo (real: 6.17, user: 6.02, sys: 0.15, mem: 636016 ko)
COQNATIVE iris/program_logic/total_weakestpre.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
iris/program_logic/total_weakestpre.vo.native (real: 0.58, user: 0.47, sys: 0.11, mem: 151844 ko)
make[1]: *** [Makefile.coq:411: all] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/iris'
make: *** [Makefile:3: all] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' iris 2
+ '[' iris '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real iris.log
    Time |  Peak Mem | File Name                                    
--------------------------------------------------------------------
0m19.96s | 636016 ko | Total Time / Peak Mem                        
--------------------------------------------------------------------
0m06.17s | 636016 ko | iris/program_logic/total_weakestpre.vo       
0m03.84s | 607256 ko | iris/program_logic/adequacy.vo               
0m02.91s | 597944 ko | iris/program_logic/lifting.vo                
0m02.13s | 598196 ko | iris/program_logic/atomic.vo                 
0m01.46s | 583992 ko | iris/base_logic/lib/cancelable_invariants.vo 
0m01.28s | 590428 ko | tests/algebra.vo                             
0m00.58s | 151844 ko | iris/program_logic/total_weakestpre.vo.native
0m00.56s | 156372 ko | iris/program_logic/atomic.vo.native          
0m00.54s | 165240 ko | iris/program_logic/adequacy.vo.native        
0m00.49s | 157056 ko | iris/program_logic/lifting.vo.native         
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 3.8MiB file on GitHub Actions Artifacts under bug.log)
tor.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp_qed88p6/Top/bug_01.v", line 169, characters 0-34:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp_qed88p6/Top/bug_01.v", line 177, characters 0-33:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp_qed88p6/Top/bug_01.v", line 180, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp_qed88p6/Top/bug_01.v", line 385, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_qed88p6/Top/bug_01.v", line 1775, characters 0-9:
Error: Could not declare a canonical structure agreeR.
Could not find its value in the global environment.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to admit lemmas with admit. Defined with Proof using

Non-fatal error: Failed to admit lemmas and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 113, characters 0-34:
Warning: Library File Stdlib.ZArith.ZArith_base is deprecated since 9.0.
use ZArith instead
[deprecated-library-file-since-9.0,deprecated-since-9.0,deprecated-library-file,deprecated,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 165, characters 0-30:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 167, characters 0-32:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 169, characters 0-34:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 177, characters 0-33:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 180, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 385, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 1831, characters 0-43:
Warning: Implicitly declaring hint databases is deprecated. Please explicitly
create "uPred_def"
[implicit-create-hint-db,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 1972, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 2007, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpxaak1sal/Top/bug_01.v", line 2008, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
Error: The section defs and module stdpp need to be closed.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions with admit. Defined with Proof using

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmp24fv5ezj/Top/bug_01.v", line 113, characters 0-34:
Warning: Library File Stdlib.ZArith.ZArith_base is deprecated since 9.0.
use ZArith instead
[deprecated-library-file-since-9.0,deprecated-since-9.0,deprecated-library-file,deprecated,default]
File "/tmp/tmp24fv5ezj/Top/bug_01.v", line 165, characters 0-30:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp24fv5ezj/Top/bug_01.v", line 167, characters 0-32:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp24fv5ezj/Top/bug_01.v", line 169, characters 0-34:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp24fv5ezj/Top/bug_01.v", line 177, characters 0-33:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp24fv5ezj/Top/bug_01.v", line 180, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp24fv5ezj/Top/bug_01.v", line 385, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp24fv5ezj/Top/bug_01.v", line 1776, characters 0-8:
Error: Could not declare a canonical structure agreeR.
Expected a record or structure constructor applied to arguments.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to add Proof using lines
�[92m
Adding Proof using lines successful.�[0m
Failed to do everything at once; trying one at a time.
Adding Proof using lines unsuccessful.
No successful changes.

I will now attempt to export modules
Module exportation successful

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

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

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to remove all lines, one at a time

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.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 10, 2025

Minimization interrupted by timeout, being automatically continued. Partially Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v in 5h 15m 6s (from ci-iris) (interrupted by timeout, being automatically continued) (full log on GitHub Actions - verbose log)
⭐ ⏱️ Partially Minimized Coq File (timeout) (truncated to first and last 32KiB; full 104KiB file on GitHub Actions Artifacts under bug.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines *)
(* coqc version 9.2+alpha compiled with OCaml 4.14.2
   coqtop version 9.2+alpha
   Expected coqc runtime on this file: 1.853 sec *)










Require iris.proofmode.modalities.
Require iris.proofmode.base.
Require iris.bi.bi.
Require iris.bi.embedding.
Require iris.bi.updates.
Require iris.bi.plainly.
Require iris.bi.internal_eq.
Require iris.bi.big_op.
Require iris.algebra.gmap.
Require iris.algebra.gset.
Require iris.algebra.list.
Require iris.algebra.big_op.
Require stdpp.gmultiset.
Require iris.bi.derived_laws_later.
Require iris.bi.derived_laws.
Require iris.bi.extensions.
Require iris.bi.derived_connectives.
Require stdpp.namespaces.
Require iris.bi.interface.
Require iris.algebra.csum.
Require stdpp.coPset.
Require stdpp.gmap.
Require iris.algebra.updates.
Require iris.algebra.stepindex_finite.
Require iris.algebra.proofmode_classes.
Require iris.algebra.local_updates.
Require iris.algebra.excl.
Require iris.algebra.cmra.
Require iris.algebra.monoid.
Require iris.algebra.ofe.
Require iris.algebra.stepindex.
Require iris.prelude.prelude.
Require stdpp.infinite.
Require stdpp.ssreflect.
Require stdpp.pretty.
Require stdpp.pmap.
Require stdpp.prelude.
Require stdpp.mapset.
Require stdpp.fin_map_dom.
Require stdpp.fin_maps.
Require stdpp.fin_sets.
Require stdpp.relations.
Require stdpp.listset.
Require stdpp.sets.
Require stdpp.strings.
Require stdpp.finite.
Require stdpp.vector.
Require stdpp.countable.
Require stdpp.list.
Require stdpp.list_numbers.
Require stdpp.list_tactics.
Require stdpp.list_misc.
Require stdpp.list_monad.
Require stdpp.list_relations.
Require stdpp.list_basics.
Require stdpp.lexico.
Require stdpp.numbers.
Require Stdlib.ZArith.ZArith.
Require stdpp.fin.
Require stdpp.orders.
Require stdpp.option.
Require stdpp.functions.
Require stdpp.tactics.
Require Stdlib.ZArith.Znumtheory.
Require Stdlib.ZArith.ZNsatz.
Require Stdlib.ZArith.Zbitwise.
Require Stdlib.btauto.Btauto.
Require Stdlib.micromega.ZArith_hints.
Require Stdlib.btauto.Reflect.
Require Stdlib.btauto.Algebra.
Require Stdlib.ZArith.Zcong.
Require Stdlib.ZArith.ZModOffset.
Require Stdlib.ZArith.Zdivisibility.
Require Stdlib.ZArith.Zdiv_facts.
Require Stdlib.micromega.Lia.
Require Stdlib.QArith.QArith.
Require Stdlib.micromega.ZMicromega.
Require Stdlib.QArith.QNsatz.
Require Stdlib.ZArith.Zdiv.
Require Stdlib.ZArith.Zpower.
Require Stdlib.ZArith.Zcomplements.
Require Stdlib.QArith.Qring.
Require Stdlib.QArith.Qfield.
Require Stdlib.QArith.Qcanon.
Require Stdlib.omega.PreOmega.
Require Stdlib.QArith.Qreduction.
Require Stdlib.micromega.Zify.
Require Stdlib.Strings.String.
Require Stdlib.QArith.QArith_base.
Require Stdlib.micromega.ZifyInst.
Require Stdlib.ZArith.ZArith_base.
Require Stdlib.Arith.Arith.
Require Stdlib.micromega.ZCoeff.
Require Stdlib.ZArith.Zhints.
Require Stdlib.NArith.NArith.
Require Stdlib.nsatz.NsatzTactic.
Require Stdlib.micromega.RingMicromega.
Require Stdlib.ZArith.Zabs.
Require Stdlib.setoid_ring.Integral_domain.
Require Stdlib.setoid_ring.Field.
Require Stdlib.ZArith.Zbool.
Require Stdlib.setoid_ring.ZArithRing.
Require Stdlib.setoid_ring.Field_tac.
Require Stdlib.setoid_ring.Cring.
Require Stdlib.setoid_ring.ArithRing.
Require Stdlib.ZArith.Wf_Z.
Require Stdlib.setoid_ring.NArithRing.
Require Stdlib.setoid_ring.Field_theory.
Require Stdlib.micromega.OrderedRing.
Require Stdlib.ZArith.ZArith_dec.
Require Stdlib.setoid_ring.Ring.
Require Stdlib.setoid_ring.Ncring_tac.
Require Stdlib.setoid_ring.Ring_base.
Require Stdlib.setoid_ring.Ncring_initial.
Require Stdlib.omega.OmegaLemmas.
Require Stdlib.ZArith.auxiliary.
Require Stdlib.ZArith.Zmisc.
Require Stdlib.ZArith.Zminmax.
Require Stdlib.ZArith.Zmin.
Require Stdlib.ZArith.Zmax.
Require Stdlib.setoid_ring.Ring_tac.
Require Stdlib.setoid_ring.Ncring_polynom.
Require Stdlib.ZArith.Zorder.
Require Stdlib.ZArith.Znat.
Require Stdlib.setoid_ring.InitialRing.
Require Stdlib.setoid_ring.Ring_polynom.
Require Stdlib.micromega.EnvRing.
Require Stdlib.micromega.VarMap.
Require Stdlib.micromega.Env.
Require Stdlib.setoid_ring.Ncring.
Require Stdlib.ZArith.Zpow_def.
Require Stdlib.ZArith.Zeven.
Require Stdlib.ZArith.Zcompare.
Require Stdlib.ZArith.BinInt.
Require Stdlib.micromega.DeclConstantZ.
Require Stdlib.Strings.Ascii.
Require stdpp.decidable.
Require iris.proofmode.ident_name.
Require Stdlib.Strings.Byte.
Require Stdlib.NArith.NArith_base.
Require stdpp.well_founded.
Require stdpp.proof_irrel.
Require Stdlib.Vectors.Vector.
Require stdpp.base.
Require Stdlib.Vectors.VectorEq.
Require Stdlib.ZArith.BinIntDef.
Require Stdlib.Vectors.VectorSpec.
Require Stdlib.NArith.Nnat.
Require Stdlib.setoid_ring.Ring_theory.
Require Stdlib.NArith.Nsqrt_def.
Require Stdlib.NArith.Ngcd_def.
Require Stdlib.NArith.Ndiv_def.
Require Stdlib.setoid_ring.BinList.
Require Stdlib.NArith.BinNat.
Require Stdlib.Vectors.VectorDef.
Require Stdlib.PArith.PArith.
Require Stdlib.NArith.BinNatDef.
Require Stdlib.Vectors.Fin.
Require Stdlib.PArith.Pnat.
Require Stdlib.PArith.POrderedType.
Require Stdlib.Arith.Arith_base.
Require Stdlib.PArith.BinPos.
Require Stdlib.Sorting.Permutation.
Require Stdlib.Lists.ListTactics.
Require Stdlib.micromega.Tauto.
Require Stdlib.Lists.Finite.
Require Stdlib.micromega.Refl.
Require Stdlib.Lists.ListDec.
Require Stdlib.Lists.List.
Require Stdlib.Arith.Peano_dec.
Require Stdlib.Arith.Wf_nat.
Require Stdlib.Arith.Factorial.
Require Stdlib.Arith.EqNat.
Require Stdlib.Arith.Compare_dec.
Require Stdlib.Arith.Between.
Require Stdlib.Arith.PeanoNat.
Require Stdlib.Numbers.Natural.Abstract.NProperties.
Require Stdlib.Numbers.Integer.Abstract.ZProperties.
Require Stdlib.Numbers.Natural.Abstract.NLcm0.
Require Stdlib.Numbers.Natural.Abstract.NBits.
Require Stdlib.Numbers.Integer.Abstract.ZLcm.
Require Stdlib.Numbers.Integer.Abstract.ZBits.
Require Stdlib.Numbers.Natural.Abstract.NLog.
Require Stdlib.Numbers.Natural.Abstract.NLcm.
Require Stdlib.Numbers.Integer.Abstract.ZPow.
Require Stdlib.Numbers.Natural.Abstract.NPow.
Require Stdlib.Numbers.Natural.Abstract.NDiv0.
Require Stdlib.Numbers.Integer.Abstract.ZGcd.
Require Stdlib.Numbers.Integer.Abstract.ZDivTrunc.
Require Stdlib.Numbers.Integer.Abstract.ZDivFloor.
Require Stdlib.Numbers.Natural.Abstract.NSqrt.
Require Stdlib.Numbers.Natural.Abstract.NParity.
Require Stdlib.Numbers.Natural.Abstract.NMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NGcd.
Require Stdlib.Numbers.Natural.Abstract.NDiv.
Require Stdlib.Numbers.Integer.Abstract.ZSgnAbs.
Require Stdlib.Numbers.Integer.Abstract.ZParity.
Require Stdlib.Numbers.Integer.Abstract.ZMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NSub.
Require Stdlib.Numbers.Integer.Abstract.ZMulOrder.
Require Stdlib.Numbers.Natural.Abstract.NMulOrder.
Require Stdlib.Numbers.Integer.Abstract.ZAddOrder.
Require Stdlib.Numbers.Natural.Abstract.NAddOrder.
Require Stdlib.Numbers.Integer.Abstract.ZLt.
Require Stdlib.Numbers.Natural.Abstract.NOrder.
Require Stdlib.Numbers.Integer.Abstract.ZMul.
Require Stdlib.Numbers.Natural.Abstract.NAdd.
Require Stdlib.Numbers.Integer.Abstract.ZAdd.
Require Stdlib.Numbers.Natural.Abstract.NBase.
Require Stdlib.Numbers.Integer.Abstract.ZBase.
Require Stdlib.Numbers.Natural.Abstract.NAxioms.
Require Stdlib.Numbers.Integer.Abstract.ZAxioms.
Require Stdlib.Numbers.NatInt.NZBits.
Require Ltac2.Ltac2.
Require Stdlib.Numbers.NatInt.NZLog.
Require Stdlib.Numbers.NatInt.NZSqrt.
Require Stdlib.Numbers.NatInt.NZPow.
Require Stdlib.Numbers.NatInt.NZParity.
Require Stdlib.Numbers.NatInt.NZGcd.
Require Stdlib.Numbers.NatInt.NZDiv.
Require Stdlib.Numbers.NatInt.NZMulOrder.
Require Stdlib.Numbers.NatInt.NZAddOrder.
Require Stdlib.Numbers.NatInt.NZOrder.
Require Stdlib.Numbers.NatInt.NZMul.
Require Stdlib.Numbers.NatInt.NZAdd.
Require Stdlib.Numbers.NatInt.NZBase.
Require Stdlib.Numbers.NatInt.NZAxioms.
Require Stdlib.Structures.GenericMinMax.
Require Stdlib.Structures.OrdersFacts.
Require Stdlib.Structures.OrdersTac.
Require Stdlib.Structures.Orders.
Require Ltac2.Notations.
Require Stdlib.Structures.Equalities.
Require Ltac2.Constr.
Require Ltac2.Fresh.
Require Stdlib.Numbers.NumPrelude.
Require Ltac2.List.
Require Ltac2.Lazy.
Require Ltac2.Array.
Require Ltac2.Ltac1.
Require Stdlib.Relations.Relations.
Require Stdlib.PArith.BinPosDef.
Require Ltac2.Pattern.
Require Ltac2.Option.
Require Stdlib.Relations.Operators_Properties.
Require Ltac2.Unification.
Require Ltac2.Ref.
Require Ltac2.RedFlags.
Require Ltac2.Printf.
Require Ltac2.FMap.
Require Ltac2.Env.
Require Ltac2.Control.
Require Ltac2.Char.
Require iris.bi.notation.
Require Stdlib.Relations.Relation_Operators.
Require Stdlib.Bool.Bool.
Require Ltac2.Uint63.
Require Ltac2.TransparentState.
Require Ltac2.String.
Require Ltac2.Std.
Require Ltac2.Proj.
Require Ltac2.Meta.
Require Ltac2.Message.
Require Ltac2.Int.
Require Ltac2.Ind.
Require Ltac2.Ident.
Require Ltac2.Float.
Require Ltac2.FSet.
Require Ltac2.Evar.
Require Ltac2.Constructor.
Require Ltac2.Constant.
Require Ltac2.Bool.
Require iris.prelude.options.
Require Stdlib.ssr.ssreflect.
Require Stdlib.ssr.ssrfun.
Require Stdlib.Unicode.Utf8.
Require Stdlib.Setoids.Setoid.
Require Stdlib.Relations.Relation_Definitions.
Require Stdlib.Program.Basics.
Require Stdlib.Numbers.BinNums.
Require Stdlib.Logic.Eqdep_dec.
Require Stdlib.Lists.ListDef.
Require Stdlib.Init.Sumbool.
Require Stdlib.Init.Peano.
Require Stdlib.Init.Byte.
Require Stdlib.Classes.Morphisms.
Require Stdlib.Classes.RelationClasses.
Require Stdlib.Classes.Morphisms_Prop.
Require Stdlib.BinNums.NatDef.
Require Stdlib.BinNums.PosDef.
Require Stdlib.BinNums.IntDef.
Require Ltac2.Init.
Require stdpp.options.
Require Stdlib.setoid_ring.Algebra_syntax.
Require Stdlib.micromega.ZifyClasses.
Require Stdlib.Unicode.Utf8_core.
Require Stdlib.Program.Syntax.
Require Stdlib.Logic.HLevelsBase.
Require Stdlib.Logic.EqdepFacts.
Require Stdlib.Logic.Decidable.
Require Stdlib.Classes.DecidableClass.
Require Corelib.Setoids.Setoid.
Require Corelib.Relations.Relation_Definitions.
Require Corelib.BinNums.PosDef.
Require Corelib.Init.Peano.
Require Corelib.Classes.RelationClasses.
Require Corelib.Classes.Morphisms_Prop.
Require Corelib.ssr.ssreflect.
Require Corelib.Init.Sumbool.
Require Corelib.Numbers.BinNums.
Require Corelib.Classes.Morphisms.
Require Corelib.Init.Ltac.
Require Corelib.Program.Basics.
Require Corelib.ssr.ssrfun.
Require Corelib.Lists.ListDef.
Require Corelib.BinNums.NatDef.
Import iris.proofmode.base.
Export iris.proofmode.ident_name.
Export iris.proofmode.modalities.


Inductive pm_error (s : string) := .

Class FromAssumption {PROP : bi} (p : bool) (P Q : PROP) :=
  from_assumption : □?p P ⊢ Q.

Class IntoPure {PROP : bi} (P : PROP) (φ : Prop) :=
  into_pure : P ⊢ ⌜φ⌝.


Class FromPure {PROP : bi} (a : bool) (P : PROP) (φ : Prop) :=
  from_pure : <affine>?a ⌜φ⌝ ⊢ P.

Class IntoPersistent {PROP : bi} (p : bool) (P Q : PROP) :=
  into_persistent : <pers>?p P ⊢ <pers> Q.


Class FromModal {PROP1 PROP2 : bi} {A}
    (φ : Prop) (M : modality PROP1 PROP2) (sel : A) (P : PROP2) (Q : PROP1) :=
  from_modal : φ → M Q ⊢ P.


Class FromAffinely {PROP : bi} (P Q : PROP) :=
  from_affinely : <affine> Q ⊢ P.


Class IntoAbsorbingly {PROP : bi} (P Q : PROP) :=
  into_absorbingly : P ⊢ <absorb> Q.


Class IntoWand {PROP : bi} (p q : bool) (R P Q : PROP) :=
  into_wand : □?p R ⊢ □?q P -∗ Q.

Class FromWand {PROP : bi} (P Q1 Q2 : PROP) := from_wand : (Q1 -∗ Q2) ⊢ P.

Class FromImpl {PROP : bi} (P Q1 Q2 : PROP) := from_impl : (Q1 → Q2) ⊢ P.


Class IntoAnd {PROP : bi} (p : bool) (P Q1 Q2 : PROP) :=
  into_and : □?p P ⊢ □?p (Q1 ∧ Q2).


Class IntoSep {PROP : bi} (P Q1 Q2 : PROP) :=
  into_sep : P ⊢ Q1 ∗ Q2.

Class IntoOr {PROP : bi} (P Q1 Q2 : PROP) := into_or : P ⊢ Q1 ∨ Q2.

Class IntoExist {PROP : bi} {A} (P : PROP) (Φ : A → PROP) (name: ident_name) :=
  into_exist : P ⊢ ∃ x, Φ x.

Class IntoForall {PROP : bi} {A} (P : PROP) (Φ : A → PROP) :=
  into_forall : P ⊢ ∀ x, Φ x.

Class FromForall {PROP : bi} {A} (P : PROP) (Φ : A → PROP) (name : ident_name) :=
  from_forall : (∀ x, Φ x) ⊢ P.


Class ElimModal {PROP : bi} (φ : Prop) (p p' : bool) (P P' : PROP) (Q Q' : PROP) :=
  elim_modal : φ → □?p P ∗ (□?p' P' -∗ Q') ⊢ Q.


Class AddModal {PROP : bi} (P P' : PROP) (Q : PROP) :=
  add_modal : P ∗ (P' -∗ Q) ⊢ Q.

Class Frame {PROP : bi} (p : bool) (R P Q : PROP) := frame : □?p R ∗ Q ⊢ P.


Class FrameInstantiateExistDisabled : Prop := frame_instantiate_exist_disabled {}.

Notation FrameInstantiateExistEnabled := (TCUnless FrameInstantiateExistDisabled).


Inductive as_emp_valid_direction :=
  | DirectionIntoEmpValid
  | DirectionFromEmpValid.


Class AsEmpValid {PROP : bi} (d : as_emp_valid_direction) (φ : Prop) (P : PROP) :=
  as_emp_valid : (d = DirectionIntoEmpValid → φ → ⊢ P) ∧
                 (d = DirectionFromEmpValid → (⊢ P) → φ).
Class AsEmpValid0 {PROP : bi} (d : as_emp_valid_direction) (φ : Prop) (P : PROP) :=
  as_emp_valid_0 : AsEmpValid d φ P.
Global Existing Instance as_emp_valid_0 | 0.
Lemma as_emp_valid_2 (φ : Prop) {PROP : bi} (P : PROP)
    `{!AsEmpValid DirectionFromEmpValid φ P} :
  (⊢ P) → φ.
Admitted.
Module Export iris_DOT_proofmode_DOT_classes.
Module Export iris.
Module Export proofmode.
Module Export classes.
End classes.

End proofmode.

End iris.

End iris_DOT_proofmode_DOT_classes.
Import iris.bi.bi.
Module Export modality_instances.
End modality_instances.
Import iris.proofmode.base.

Inductive env (A : Type) : Type :=
  | Enil : env A
  | Esnoc : env A → ident → A → env A.
Global Arguments Enil {_}.
Global Arguments Esnoc {_} _ _ _.

Fixpoint env_lookup {A} (i : ident) (Γ : env A) : option A :=
  match Γ with
  | Enil => None
  | Esnoc Γ j x => if ident_beq i j then Some x else env_lookup i Γ
  end.

Module Export env_notations.
  Notation "y ≫= f" := (pm_option_bind f y).
  Notation "x ← y ; z" := (y ≫= λ x, z).
  Notation "Γ !! j" := (env_lookup j Γ).
End env_notations.

Inductive env_wf {A} : env A → Prop :=
  | Enil_wf : env_wf Enil
  | Esnoc_wf Γ i x : Γ !! i = None → env_wf Γ → env_wf (Esnoc Γ i x).

Fixpoint env_to_list {A} (E : env A) : list A :=
  match E with Enil => [] | Esnoc Γ _ x => x :: env_to_list Γ end.
Coercion env_to_list : env >-> list.

Fixpoint env_dom {A} (Γ : env A) : list ident :=
  match Γ with Enil => [] | Esnoc Γ i _ => i :: env_dom Γ end.

Fixpoint env_app {A} (Γapp : env A) (Γ : env A) : option (env A) :=
  match Γapp with
  | Enil => Some Γ
  | Esnoc Γapp i x =>
     Γ' ← env_app Γapp Γ;
     match Γ' !! i with None => Some (Esnoc Γ' i x) | Some _ => None end
  end.

Fixpoint env_replace {A} (i: ident) (Γi: env A) (Γ: env A) : option (env A) :=
  match Γ with
  | Enil => None
  | Esnoc Γ j x =>
     if ident_beq i j then env_app Γi Γ else
     match Γi !! j with
     | None => Γ' ← env_replace i Γi Γ; Some (Esnoc Γ' j x)
     | Some _ => None
     end
  end.

Fixpoint env_delete {A} (i : ident) (Γ : env A) : env A :=
  match Γ with
  | Enil => Enil
  | Esnoc Γ j x => if ident_beq i j then Γ else Esnoc (env_delete i Γ) j x
  end.

Fixpoint env_lookup_delete {A} (i : ident) (Γ : env A) : option (A * env A) :=
  match Γ with
  | Enil => None
  | Esnoc Γ j x =>
     if ident_beq i j then Some (x,Γ)
     else '(y,Γ') ← env_lookup_delete i Γ; Some (y, Esnoc Γ' j x)
  end.

Section env.
End env.

Record envs (PROP : bi) := Envs {
  env_intuitionistic : env PROP;
  env_spatial : env PROP;
  env_counter : positive
}.
Global Arguments Envs {_} _ _ _.
Global Arguments env_spatial {_} _.

Notation env_and_persistently Γ := ([∧ list] P ∈ env_to_list Γ, <pers> P)%I.
Definition envs_entails {PROP : bi} (Δ : envs PROP) (Q : PROP) : Prop.
Admitted.
Definition envs_dom {PROP} (Δ : envs PROP) : list ident.
Admitted.
Definition envs_lookup {PROP} (i : ident) (Δ : envs PROP) : option (bool * PROP).
exact (let (Γp,Γs,n) := Δ in
  match env_lookup i Γp with
  | Some P => Some (true, P)
  | None => P ← env_lookup i Γs; Some (false, P)
  end).
Defined.
Definition envs_delete {PROP} (remove_intuitionistic : bool)
    (i : ident) (p : bool) (Δ : envs PROP) : envs PROP.
exact (let (Γp,Γs,n) := Δ in
  match p with
  | true => Envs (if remove_intuitionistic then env_delete i Γp else Γp) Γs n
  | false => Envs Γp (env_delete i Γs) n
  end).
Defined.
Definition envs_lookup_delete {PROP} (remove_intuitionistic : bool)
    (i : ident) (Δ : envs PROP) : option (bool * PROP * envs PROP).
Admitted.
Definition envs_snoc {PROP} (Δ : envs PROP)
    (p : bool) (j : ident) (P : PROP) : envs PROP.
Admitted.
Definition envs_app {PROP : bi} (p : bool)
    (Γ : env PROP) (Δ : envs PROP) : option (envs PROP).
exact (let (Γp,Γs,n) := Δ in
  match p with
  | true => _ ← env_app Γ Γs; Γp' ← env_app Γ Γp; Some (Envs Γp' Γs n)
  | false => _ ← env_app Γ Γp; Γs' ← env_app Γ Γs; Some (Envs Γp Γs' n)
  end).
Defined.
Definition envs_simple_replace {PROP : bi} (i : ident) (p : bool)
    (Γ : env PROP) (Δ : envs PROP) : option (envs PROP).
exact (let (Γp,Γs,n) := Δ in
  match p with
  | true => _ ← env_app Γ Γs; Γp' ← env_replace i Γ Γp; Some (Envs Γp' Γs n)
  | false => _ ← env_app Γ Γp; Γs' ← env_replace i Γ Γs; Some (Envs Γp Γs' n)
  end).
Defined.
Definition envs_replace {PROP : bi} (i : ident) (p q : bool)
    (Γ : env PROP) (Δ : envs PROP) : option (envs PROP).
exact (if beq p q then envs_simple_replace i p Γ Δ
  else envs_app q Γ (envs_delete true i p Δ)).
Defined.
Definition env_spatial_is_nil {PROP} (Δ : envs PROP) : bool.
Admitted.
Definition envs_clear_spatial {PROP} (Δ : envs PROP) : envs PROP.
Admitted.
Definition envs_clear_intuitionistic {PROP} (Δ : envs PROP) : envs PROP.
Admitted.
Definition envs_incr_counter {PROP} (Δ : envs PROP) : envs PROP.
Admitted.

Fixpoint envs_split_go {PROP}
    (js : list ident) (Δ1 Δ2 : envs PROP) : option (envs PROP * envs PROP) :=
  match js with
  | [] => Some (Δ1, Δ2)
  | j :: js =>
     '(p,P,Δ1') ← envs_lookup_delete true j Δ1;
     if p : bool then envs_split_go js Δ1 Δ2 else
     envs_split_go js Δ1' (envs_snoc Δ2 false j P)
  end.
Definition envs_split {PROP} (d : direction)
    (js : list ident) (Δ : envs PROP) : option (envs PROP * envs PROP).
Admitted.

Fixpoint env_to_prop_go {PROP : bi} (acc : PROP) (Γ : env PROP) : PROP :=
  match Γ with Enil => acc | Esnoc Γ _ P => env_to_prop_go (P ∗ acc)%I Γ end.
Definition env_to_prop {PROP : bi} (Γ : env PROP) : PROP.
Admitted.

Fixpoint env_to_prop_and_go {PROP : bi} (acc : PROP) (Γ : env PROP) : PROP :=
  match Γ with Enil => acc | Esnoc Γ _ P => env_to_prop_and_go (P ∧ acc)%I Γ end.
Definition env_to_prop_and {PROP : bi} (Γ : env PROP) : PROP.
Admitted.

Section envs.
End envs.
Module Export iris_DOT_proofmode_DOT_environments.
Module Export iris.
Module Export proofmode.
Module Export environments.
End environments.

End proofmode.

End iris.

End iris_DOT_proofmode_DOT_environments.

Local Set Universe Polymorphism.

Inductive tele : Type :=
  | TeleO : tele
  | TeleS {X} (binder : X → tele) : tele.
Fixpoint tele_fun (TT : tele) (T : Type) : Type.
exact (match TT with
  | TeleO => T
  | TeleS b => ∀ x, tele_fun (b x) T
  end).
Defined.

Notation "TT -t> A" :=
  (tele_fun TT A) (at level 99, A at level 200, right associativity).

Definition tele_fold {X Y} {TT : tele} (step : ∀ {A : Type}, (A → Y) → Y) (base : X → Y)
  : (TT -t> X) → Y :=
  (fix rec {TT} : (TT -t> X) → Y :=
     match TT as TT return (TT -t> X) → Y with
     | TeleO => λ x : X, base x
     | TeleS b => λ f, step (λ x, rec (f x))
     end) TT.

Record tele_arg_cons {X : Type} (f : X → Type) : Type := TeleArgCons
  { tele_arg_head : X;
    tele_arg_tail : f tele_arg_head }.
Global Arguments TeleArgCons {_ _} _ _.
Fixpoint tele_arg@{u} (t : tele@{u}) : Type@{u}.
exact (match t with
  | TeleO => unit
  | TeleS f => tele_arg_cons (λ x, tele_arg (f x))
  end).
Defined.

Notation TargS a b :=
  ((@TeleArgCons _ (λ x, tele_arg (_ x)) a b) : (tele_arg (TeleS _))) (only parsing).
Coercion tele_arg : tele >-> Sortclass.

Fixpoint tele_app {TT : tele} {U} : (TT -t> U) -> TT → U :=
  match TT as TT return (TT -t> U) -> TT → U with
  | TeleO => λ F _, F
  | TeleS r => λ (F : TeleS r -t> U) '(TeleArgCons x b),
      tele_app (F x) b
  end.

Fixpoint tele_bind {U} {TT : tele} : (TT → U) → TT -t> U :=
  match TT as TT return (TT → U) → TT -t> U with
  | TeleO => λ F, F tt
  | @TeleS X b => λ (F : TeleS b → U) (x : X),
      tele_bind (λ a, F (TargS x a))
  end.
Definition tforall {TT : tele} (Ψ : TT → Prop) : Prop.
Admitted.

Notation "'∀..' x .. y , P" := (tforall (λ x, .. (tforall (λ y, P)) .. ))
  (at level 200, x binder, y binder, right associativity,
  format "∀..  x  ..  y ,  P") : stdpp_scope.
Module Export stdpp.
Module Export telescopes.
End telescopes.

End stdpp.
Export stdpp.telescopes.
Export iris.bi.bi.
Import bi.
Definition bi_texist {PROP : bi} {TT : tele@{Quant}} (Ψ : TT → PROP) : PROP.
exact (tele_fold (@bi_exist PROP) (λ x, x) (tele_bind Ψ)).
Defined.
Definition bi_tforall {PROP : bi} {TT : tele@{Quant}} (Ψ : TT → PROP) : PROP.
Admitted.

Notation "'∃..' x .. y , P" := (bi_texist (λ x, .. (bi_texist (λ y, P)) .. )%I)
  (at level 200, x binder, y binder, right associativity,
  format "∃..  x  ..  y ,  P") : bi_scope.
Module Export iris_DOT_bi_DOT_telescopes.
Module Export iris.
Module Export bi.
Module Export telescopes.
End telescopes.

End bi.

End iris.

End iris_DOT_bi_DOT_telescopes.

Export iris.bi.bi.

Class MakeSep {PROP : bi} (P Q PQ : PROP) := make_sep : P ∗ Q ⊣⊢ PQ .
Class KnownLMakeSep {PROP : bi} (P Q PQ : PROP) :=
  #[global] knownl_make_sep :: MakeSep P Q PQ.
Module Export classes_make.
End classes_make.
Export iris.bi.telescopes.
Export iris.proofmode.base.
Export iris.proofmode.environments.
Export iris.proofmode.classes.
Import env_notations.

Local Open Scope lazy_bool_scope.

Section tactics.
Context {PROP : bi}.
Implicit Types P Q : PROP.

Lemma tac_start P : envs_entails (Envs Enil Enil 1) P → ⊢ P.
Admitted.

Class AffineEnv (Γ : env PROP) := affine_env : Forall Affine Γ.

Lemma tac_emp_intro Δ : AffineEnv (env_spatial Δ) → envs_entails Δ emp.
Admitted.

Lemma tac_assumption Δ i p P Q :
  envs_lookup i Δ = Some (p,P) →
  FromAssumption p P Q →
  (let Δ' := envs_delete true i p Δ in
   if env_spatial_is_nil Δ' then TCTrue
   else TCOr (Absorbing Q) (AffineEnv (env_spatial Δ'))) →
  envs_entails Δ Q.
Admitted.

Lemma tac_rename Δ i j p P Q :
  envs_lookup i Δ = Some (p,P) →
  match envs_simple_replace i p (Esnoc Enil j P) Δ with
  | None => False
  | Some Δ' => envs_entails Δ' Q
  end →
  envs_entails Δ Q.
Admitted.

Lemma tac_clear Δ i p P Q :
  envs_lookup i Δ = Some (p,P) →
  (if p then TCTrue else TCOr (Affine P) (Absorbing Q)) →
  envs_entails (envs_delete true i p Δ) Q →
  envs_entails Δ Q.
Admitted.

Lemma tac_ex_falso Δ Q : envs_entails Δ False → envs_entails Δ Q.
Admitted.

Lemma tac_pure_intro Δ Q φ a :
  FromPure a Q φ →
  (if a then AffineEnv (env_spatial Δ) else TCTrue) →
  φ →
  envs_entails Δ Q.
Admitted.

Lemma tac_pure Δ i p P φ Q :
  envs_lookup i Δ = Some (p, P) →
  IntoPure P φ →
  (if p then TCTrue else TCOr (Affine P) (Absorbing Q)) →
  (φ → envs_entails (envs_delete true i p Δ) Q) → envs_entails Δ Q.
Admitted.

Lemma tac_intuitionistic Δ i j p P P' Q :
  envs_lookup i Δ = Some (p, P) →
  IntoPersistent p P P' →
  (if p then TCTrue else TCOr (Affine P) (Absorbing Q)) →
  match envs_replace i p true (Esnoc Enil j P') Δ with
  | None => False
  | Some Δ' => envs_entails Δ' Q
  end →
  envs_entails Δ Q.
Admitted.

Lemma tac_spatial Δ i j p P P' Q :
  envs_lookup i Δ = Some (p, P) →
  (if p then FromAffinely P' P else TCEq P' P) →
  match envs_replace i p false (Esnoc Enil j P') Δ with
  | None => False
  | Some Δ' => envs_entails Δ' Q
  end →
  envs_entails Δ Q.
Admitted.

Lemma tac_impl_intro Δ i P P' Q R :
  FromImpl R P Q →
  (if env_spatial_is_nil Δ then TCTrue else Persistent P) →
  FromAffinely P' P →
  match envs_app false (Esnoc Enil i P') Δ with
  | None => False
  | Some Δ' => envs_entails Δ' Q
  end →
  envs_entails Δ R.
Admitted.
Lemma tac_impl_intro_intuitionistic Δ i P P' Q R :
  FromImpl R P Q →
  IntoPersistent false P P' →
  match envs_app true (Esnoc Enil i P') Δ with
  | None => False
  | Some Δ' => envs_entails Δ' Q
  end →
  envs_entails Δ R.
Admitted.
Lemma tac_impl_intro_drop Δ P Q R :
  FromImpl R P Q → envs_entails Δ Q → envs_entails Δ R.
Admitted.

Lemma tac_wand_intro Δ i P Q R :
  FromWand R P Q →
  match envs_app false (Esnoc Enil i P) Δ with
  | None => False
  | Some Δ' => envs_entails Δ' Q
  end →
  envs_entails Δ R.
Admitted.

Lemma tac_wand_intro_intuitionistic Δ i P P' Q R :
  FromWand R P Q →
  IntoPersistent false P P' →
  TCOr (Affine P) (Absorbing Q) →
  match envs_app true (Esnoc Enil i P') Δ with
  | None => False
  | Some Δ' => envs_entails Δ' Q
  end →
  envs_entails Δ R.
Admitted.
Lemma tac_wand_intro_drop Δ P Q R :
  FromWand R P Q →
  TCOr (Affine P) (Absorbing Q) →
  envs_entails Δ Q →
  envs_entails Δ R.
Admitted.

Lemma tac_specialize remove_intuitionistic Δ i p j q P1 P2 R Q :
  envs_lookup i Δ = Some (p, P1) →
  let Δ' := envs_delete remove_intuitionistic i p Δ in
  envs_lookup j Δ' = Some (q, R) →
  IntoWand q p R P1 P2 →
  match envs_replace j q (p &&& q) (Esnoc Enil j P2) Δ' with
  | Some Δ'' => envs_entails Δ'' Q
  | None => False
  end → envs_entails Δ Q.
Admitted.

Lemma tac_specialize_assert Δ j (q am neg : bool) js R P1 P2 P1' Q :
  envs_lookup j Δ = Some (q, R) →
  IntoWand q false R P1 P2 →
  (if am then AddModal P1' P1 Q else TCEq P1' P1) →
  match
    '(Δ1,Δ2) ← envs_split (if neg is true then Right else Left)
                          js (envs_delete true j q Δ);
    Δ2' ← envs_app (negb am &&& q &&& env_spatial_is_nil Δ1) (Esnoc Enil j P2) Δ2;
    Some (Δ1,Δ2')
  with
  | Some (Δ1,Δ2') =>

     envs_entails Δ1 P1' ∧ envs_entails Δ2' Q
  | None => False
  end → envs_entails Δ Q.
Admitted.

Lemma tac_unlock_emp Δ Q : envs_entails Δ Q → envs_entails Δ (emp ∗ locked Q).
Admitted.
Lemma tac_unlock_True Δ Q : envs_entails Δ Q → envs_entails Δ (True ∗ locked Q).
Admitted.
Lemma tac_unlock Δ Q : envs_entails Δ Q → envs_entails Δ (locked Q).
Admitted.

Lemma tac_specialize_frame Δ j (q am : bool) R P1 P2 P1' Q Q' :
  envs_lookup j Δ = Some (q, R) →
  IntoWand q false R P1 P2 →
  (if am then AddModal P1' P1 Q else TCEq P1' P1) →
  envs_entails (envs_delete true j q Δ) (P1' ∗ locked Q') →
  Q' = (P2 -∗ Q)%I →
  envs_entails Δ Q.
Admitted.

Lemma tac_specialize_assert_pure Δ j q a R P1 P2 φ Q :
  envs_lookup j Δ = Some (q, R) →
  IntoWand q false R P1 P2 →
  FromPure a P1 φ →
  φ →
  match envs_simple_replace j q (Esnoc Enil j P2) Δ with
  | None => False
  | Some Δ' => envs_entails Δ' Q
  end →
  envs_entails Δ Q.
Admitted.

Lemma tac_specialize_assert_intuitionistic Δ j q P1 P1' P2 R Q :
  envs_lookup j Δ = Some (q, R) →
  IntoWand q true R P1 P2 →
  Persistent P1 →
  IntoAbsorbingly P1' P1 →
  envs_entails (envs_delete true j q Δ) P1' →
  match envs_simple_replace j q (Esnoc Enil j P2) Δ with
  | Some Δ'' => envs_entails Δ'' Q
  | None => False
  end → envs_entails Δ Q.
Admitted.

Lemma tac_specialize_intuitionistic_helper Δ j q P R R' Q :
  envs_lookup j Δ = Some (q,P) →
  (if q then TCTrue else BiAffine PROP) →
  envs_entails Δ (<absorb> R) →
  IntoPersistent false R R' →
  match envs_replace j q true (Esnoc Enil j R') Δ with
  | Some Δ'' => envs_entails Δ'' Q
  | None => False
  end → envs_entails Δ Q.
Admitted.

Lemma tac_specialize_intuitionistic_helper_done Δ i q P :
  envs_lookup i Δ = Some (q,P) →
  envs_entails Δ (<absorb> P).
Admitted.

Lemma tac_revert Δ i Q :
  match envs_lookup_delete true i Δ with
  | Some (p,P,Δ') => envs_entails Δ' ((if p then □ P else P)%I -∗ Q)
  | None => False
  end →
  envs_entails Δ Q.
Admitted.

Definition IntoEmpValid (φ : Type) (P : PROP) := φ → ⊢ P.

Lemma into_emp_valid_here φ P : AsEmpValid DirectionIntoEmpValid φ P → IntoEmpValid φ P.
Admitted.
Lemma into_emp_valid_impl (φ ψ : Type) P :
  φ → Into

[...]

end in
               fail 1 "iSpecialize: cannot solve" Q "using done"
             | let Q := match goal with |- ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done" ]
    | false => idtac
    end in
  let Δ := iGetCtx in
  lazymatch pats with
    | [] => idtac
    | SIdent ?H2 [] :: ?pats =>

       notypeclasses refine (tac_specialize false _ H2 _ H1 _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H2 := pretty_ident H2 in
          fail "iSpecialize:" H2 "not found"
         |pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |tc_solve ||
          let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
          let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
          fail "iSpecialize: cannot instantiate" P "with" Q
         |pm_reduce; iSpecializePat_go H1 pats]
    | SIdent ?H2 ?pats1 :: ?pats =>

       let H2tmp := iFresh in
       iPoseProofCoreHyp H2 as H2tmp;

       iRevertHyp H1 with (fun p =>
         iSpecializePat_go H2tmp pats1;
           [..
           |_iIntroMaybePersistent H1 p]);

         [..
         |
          notypeclasses refine (tac_specialize true _ H2tmp _ H1 _ _ _ _ _ _ _ _ _);
            [pm_reflexivity ||
             let H2tmp := pretty_ident H2tmp in
             fail "iSpecialize:" H2tmp "not found"
            |pm_reflexivity ||
             let H1 := pretty_ident H1 in
             fail "iSpecialize:" H1 "not found"
            |tc_solve ||
             let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
             let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
             fail "iSpecialize: cannot instantiate" P "with" Q
            |pm_reduce; iSpecializePat_go H1 pats]]
    | SPureGoal ?d :: ?pats =>
       notypeclasses refine (tac_specialize_assert_pure _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- FromPure _ ?Q _ => Q end in
          fail "iSpecialize:" Q "not pure"
         |solve_done d
         |pm_reduce;
          iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic false ?Hs_frame [] ?d) :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve
         |pm_reduce; iFrame Hs_frame; solve_done d
         |pm_reduce; iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: ?pats =>
       fail "iSpecialize: cannot select hypotheses for intuitionistic premise"
    | SGoal (SpecGoal ?m ?lr ?Hs_frame ?Hs ?d) :: ?pats =>
       let Hs' := eval cbv in (if lr then Hs else Hs_frame ++ Hs) in
       notypeclasses refine (tac_specialize_assert _ H1 _
           (if m is GModal then true else false) lr Hs' _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          lazymatch goal with
          | |- False =>
            let Hs' := iMissingHypsCore Δ Hs' in
            fail "iSpecialize: hypotheses" Hs' "not found"
          | _ =>
            notypeclasses refine (conj _ _);
              [iFrame Hs_frame; solve_done d
              |iSpecializePat_go H1 pats]
          end]
    | SAutoFrame GIntuitionistic :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve ||
          fail "iSpecialize: Cannot find IntoAbsorbingly;"
               "this should not happen, please report a bug"
         |pm_reduce; solve [iFrame "∗ #"]
         |pm_reduce; iSpecializePat_go H1 pats]
    | SAutoFrame ?m :: ?pats =>
       notypeclasses refine (tac_specialize_frame _ H1 _
           (if m is GModal then true else false) _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          first
            [notypeclasses refine (tac_unlock_emp _ _ _)
            |notypeclasses refine (tac_unlock_True _ _ _)
            |iFrame "∗ #"; notypeclasses refine (tac_unlock _ _ _)
            |let P :=
               match goal with |- envs_entails _ (?P ∗ locked _)%I => P end in
             fail 1 "iSpecialize: premise" P "cannot be solved by framing"]
         |exact eq_refl]; _iIntroSpatial H1; iSpecializePat_go H1 pats
    end.

Local Tactic Notation "iSpecializePat" open_constr(H) constr(pat) :=
  let pats := spec_pat.parse pat in iSpecializePat_go H pats.

Fixpoint use_tac_specialize_intuitionistic_helper {M}
    (Δ : envs M) (pats : list spec_pat) : bool :=
  match pats with
  | [] => false
  | SPureGoal _ :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SAutoFrame _ :: _ => true
  | SIdent H _ :: pats =>
     match envs_lookup_delete false H Δ with
     | Some (false, _, Δ) => true
     | Some (true, _, Δ) => use_tac_specialize_intuitionistic_helper Δ pats
     | None => false
     end
  | SGoal (SpecGoal GModal _ _ _ _) :: _ => false
  | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SGoal (SpecGoal GSpatial neg Hs_frame Hs _) :: pats =>
     match envs_split (if neg is true then Right else Left)
                      (if neg then Hs else pm_app Hs_frame Hs) Δ with
     | Some (Δ1,Δ2) => if env_spatial_is_nil Δ1
                       then use_tac_specialize_intuitionistic_helper Δ2 pats
                       else true
     | None => false
     end
  end.

Tactic Notation "iSpecializeCore" open_constr(H)
    "with" open_constr(xs) open_constr(pat) "as" constr(p) :=
  let p := intro_pat_intuitionistic p in
  let pat := spec_pat.parse pat in
  let H :=
    lazymatch type of H with
    | string => constr:(INamed H)
    | _ => H
    end in
  iSpecializeArgs H xs; [..|
    lazymatch type of H with
    | ident =>
       let pat := spec_pat.parse pat in
       let Δ := iGetCtx in

       let b := eval lazy [use_tac_specialize_intuitionistic_helper] in
         (if p then use_tac_specialize_intuitionistic_helper Δ pat else false) in
       lazymatch eval pm_eval in b with
       | true =>

          lazymatch iTypeOf H with
          | Some (?q, _) =>
             let PROP := iBiOfGoal in

             lazymatch eval lazy in (q || tc_to_bool (BiAffine PROP)) with
             | true =>
                notypeclasses refine (tac_specialize_intuitionistic_helper _ H _ _ _ _ _ _ _ _ _ _);
                  [pm_reflexivity

                  |pm_reduce; tc_solve

                  |iSpecializePat H pat;
                    [..
                    |notypeclasses refine (tac_specialize_intuitionistic_helper_done _ H _ _ _);
                     pm_reflexivity]
                  |tc_solve ||
                   let Q := match goal with |- IntoPersistent _ ?Q _ => Q end in
                   fail "iSpecialize:" Q "not persistent"
                  |pm_reduce ]
             | false => iSpecializePat H pat
             end
          | None =>
             let H := pretty_ident H in
             fail "iSpecialize:" H "not found"
          end
       | false => iSpecializePat H pat
       end
    | _ => fail "iSpecialize:" H "should be a hypothesis, use iPoseProof instead"
    end].

Tactic Notation "iSpecializeCore" open_constr(t) "as" constr(p) :=
  lazymatch type of t with
  | string => iSpecializeCore t with hnil "" as p
  | ident => iSpecializeCore t with hnil "" as p
  | _ =>
    lazymatch t with
    | ITrm ?H ?xs ?pat => iSpecializeCore H with xs pat as p
    | _ => fail "iSpecialize:" t "should be a proof mode term"
    end
  end.

Tactic Notation "iPoseProofCore" open_constr(lem)
    "as" constr(p) tactic3(tac) :=
  iStartProof;
  let t := lazymatch lem with ITrm ?t ?xs ?pat => t | _ => lem end in
  let t := lazymatch type of t with string => constr:(INamed t) | _ => t end in
  let spec_tac Htmp :=
    lazymatch lem with
    | ITrm _ ?xs ?pat => iSpecializeCore (ITrm Htmp xs pat) as p
    | _ => idtac
    end in
  lazymatch type of t with
  | ident =>
     let Htmp := iFresh in
     iPoseProofCoreHyp t as Htmp; spec_tac Htmp; [..|tac Htmp]
  | _ => iPoseProofCoreLem t as (fun Htmp => spec_tac Htmp; [..|tac Htmp])
  end.

Tactic Notation "iOrDestruct" constr(H) "as" constr(H1) constr(H2) :=
  eapply tac_or_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iOrDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoOr ?P _ _ => P end in
     fail "iOrDestruct: cannot destruct" P
    | pm_reduce;
      lazymatch goal with
      | |- False =>
        let H1 := pretty_ident H1 in
        let H2 := pretty_ident H2 in
        fail "iOrDestruct:" H1 "or" H2 "not fresh"
      |  _ => split
      end].

Ltac _iAndDestruct H H1 H2 :=
  eapply tac_and_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iAndDestruct:" H "not found"
    |pm_reduce; tc_solve ||
     let P :=
       lazymatch goal with
       | |- IntoSep ?P _ _ => P
       | |- IntoAnd _ ?P _ _ => P
       end in
     fail "iAndDestruct: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
       | |- False =>
         let H1 := pretty_ident H1 in
         let H2 := pretty_ident H2 in
         fail "iAndDestruct:" H1 "or" H2 "not fresh"
       | _ => idtac
     end].

Ltac _iAndDestructChoice H d H' :=
  eapply tac_and_destruct_choice with H _ d H' _ _ _;
    [pm_reflexivity || fail "iAndDestructChoice:" H "not found"
    |pm_reduce; tc_solve ||
     let P := match goal with |- TCOr (IntoAnd _ ?P _ _) _ => P end in
     fail "iAndDestructChoice: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iAndDestructChoice:" H' "not fresh"
     | _ => idtac
     end].

Tactic Notation "_iExistDestruct" constr(H)
    "as" simple_intropattern(x) constr(Hx) :=
  eapply tac_exist_destruct with H _ Hx _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iExistDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoExist ?P _ _ => P end in
     fail "iExistDestruct: cannot destruct" P|];
    let name := lazymatch goal with
                | |- let _ := (λ name, _) in _ => name
                end in
    intros _;
    let y := fresh name in
    intros y; pm_reduce;
    lazymatch goal with
    | |- False =>
      let Hx := pretty_ident Hx in
      fail "iExistDestruct:" Hx "not fresh"
    | _ => revert y; intros x
    end.

Tactic Notation "iModIntro" uconstr(sel) :=
  iStartProof;
  notypeclasses refine (tac_modal_intro _ _ sel _ _ _ _ _ _ _ _ _ _ _ _ _ _);
    [tc_solve ||
     fail "iModIntro: the goal is not a modality"
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalIntuitionisticEnv _ _ _ ?s => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: intuitionistic context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: intuitionistic context is non-empty"
     end
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalSpatialEnv _ _ _ ?s _ => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: spatial context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: spatial context is non-empty"
     end
    |pm_reduce; tc_solve ||
     fail "iModIntro: cannot filter spatial context when goal is not absorbing"
    |iSolveSideCondition
    |pm_prettify
      ].
Tactic Notation "iModIntro" := iModIntro _.

Tactic Notation "iModCore" constr(H) "as" constr(H') :=
  eapply tac_modal_elim with H H' _ _ _ _ _ _;
    [pm_reflexivity || fail "iMod:" H "not found"
    |tc_solve ||
     let P := match goal with |- ElimModal _ _ _ ?P _ _ _ => P end in
     let Q := match goal with |- ElimModal _ _ _ _ _ ?Q _ => Q end in
     fail "iMod: cannot eliminate modality" P "in" Q
    |iSolveSideCondition
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iMod:" H' "not fresh"
     | _ => pm_prettify
     end].

Ltac _ident_for_pat pat :=
  lazymatch pat with
  | IIdent ?x => x
  | _ => let x := iFresh in x
  end.

Ltac _ident_for_pat_default pat default :=
  lazymatch pat with
  | IIdent ?x => x
  | _ =>
    lazymatch default with
    | IAnon _ => default
    | _ => let x := iFresh in x
    end
  end.

Ltac _iDestructHypGo Hz pat0 pat :=
  lazymatch pat with
  | IFresh =>
     lazymatch Hz with
     | IAnon _ => idtac
     | INamed ?Hz => let Hz' := iFresh in iRename Hz into Hz'
     end
  | IDrop => _iClearHyp Hz
  | IFrame => iFrame Hz
  | IIdent Hz => idtac
  | IIdent ?y => iRename Hz into y
  | IList [[]] => iExFalso; iExact Hz

  | IList [[?pat1; IDrop]] =>
     let x := _ident_for_pat_default pat1 Hz in
     _iAndDestructChoice Hz Left x;
     _iDestructHypGo x pat0 pat1
  | IList [[IDrop; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iAndDestructChoice Hz Right x;
     _iDestructHypGo x pat0 pat2

  | IList [[IPure IGallinaAnon; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as ? x; _iDestructHypGo x pat0 pat2
  | IList [[IPure (IGallinaNamed ?s); ?pat2]] =>
     let x := fresh in
     let y := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as x y;
     rename_by_string x s;
     _iDestructHypGo y pat0 pat2
  | IList [[?pat1; ?pat2]] =>

     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat pat2 in
     _iAndDestruct Hz x1 x2;
     _iDestructHypGo x1 pat0 pat1; _iDestructHypGo x2 pat0 pat2
  | IList [_ :: _ :: _] => fail "iDestruct:" pat0 "has too many conjuncts"
  | IList [[_]] => fail "iDestruct:" pat0 "has just a single conjunct"

  | IList [[?pat1];[?pat2]] =>
     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat_default pat2 Hz in
     iOrDestruct Hz as x1 x2;
     [_iDestructHypGo x1 pat0 pat1|_iDestructHypGo x2 pat0 pat2]

  | IList (_ :: _ :: _ :: _) => fail "iDestruct:" pat0 "has too many disjuncts"

  | IList [_;_] => fail "iDestruct: in" pat0 "a disjunct has multiple patterns"

  | IPure IGallinaAnon => iPure Hz as ?
  | IPure (IGallinaNamed ?s) =>
     let x := fresh in
     iPure Hz as x;
     rename_by_string x s
  | IRewrite Right => iPure Hz as ->
  | IRewrite Left => iPure Hz as <-
  | IIntuitionistic ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iIntuitionistic Hz x; _iDestructHypGo x pat0 pat
  | ISpatial ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iSpatial Hz x; _iDestructHypGo x pat0 pat
  | IModalElim ?pat =>
    let x := _ident_for_pat_default pat Hz in
    iModCore Hz as x; _iDestructHypGo x pat0 pat
  | _ => fail "iDestruct:" pat0 "is not supported due to" pat
  end.
Ltac _iDestructHypFindPat Hgo pat found pats :=
  lazymatch pats with
  | [] =>
    lazymatch found with
    | true => pm_prettify
    | false => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
    end
  | ISimpl :: ?pats => simpl; _iDestructHypFindPat Hgo pat found pats
  | IClear ?H :: ?pats => iClear H; _iDestructHypFindPat Hgo pat found pats
  | IClearFrame ?H :: ?pats => iFrame H; _iDestructHypFindPat Hgo pat found pats
  | ?pat1 :: ?pats =>
     lazymatch found with
     | false => _iDestructHypGo Hgo pat pat1; _iDestructHypFindPat Hgo pat true pats
     | true => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
     end
  end.

Ltac _iDestructHyp0 H pat :=
  let pats := intro_pat.parse pat in
  _iDestructHypFindPat H pat false pats.
Ltac _iDestructHyp H xs pat :=
  ltac1_list_iter ltac:(fun x => _iExistDestruct H as x H) xs;
  _iDestructHyp0 H pat.

Tactic Notation "iDestructHyp" constr(H) "as" constr(pat) :=
  _iDestructHyp0 H pat.

Ltac _iIntros_go pats startproof :=
  lazymatch pats with
  | [] =>
    lazymatch startproof with
    | true => iStartProof
    | false => idtac
    end

  | IPure (IGallinaNamed ?s) :: ?pats =>
     let i := fresh in
     _iIntro (i);
     rename_by_string i s;
     _iIntros_go pats startproof
  | IPure IGallinaAnon :: ?pats => _iIntro (?); _iIntros_go pats startproof
  | IIntuitionistic (IIdent ?H) :: ?pats => _iIntroPersistent H; _iIntros_go pats false
  | IDrop :: ?pats => _iIntroDrop; _iIntros_go pats startproof
  | IIdent ?H :: ?pats => _iIntroSpatial H; _iIntros_go pats startproof

  | IPureIntro :: ?pats => iPureIntro; _iIntros_go pats false
  | IModalIntro :: ?pats => iModIntro; _iIntros_go pats false
  | IForall :: ?pats => repeat _iIntroForall; _iIntros_go pats startproof
  | IAll :: ?pats => repeat (_iIntroForall || _iIntro); _iIntros_go pats startproof

  | ISimpl :: ?pats => simpl; _iIntros_go pats startproof
  | IClear ?H :: ?pats => iClear H; _iIntros_go pats false
  | IClearFrame ?H :: ?pats => iFrame H; _iIntros_go pats false
  | IDone :: ?pats => try done; _iIntros_go pats startproof

  | IIntuitionistic ?pat :: ?pats =>
     let H := iFresh in _iIntroPersistent H; iDestructHyp H as pat; _iIntros_go pats false
  | ?pat :: ?pats =>
     let H := iFresh in _iIntroSpatial H; iDestructHyp H as pat; _iIntros_go pats false
  end.

Ltac _iIntros0 pat :=
  let pats := intro_pat.parse pat in

  lazymatch pats with
  | [] => idtac
  | _ => _iIntros_go pats true
  end.
Ltac _iIntros xs pat :=
  ltac1_list_iter ltac:(fun x => _iIntro (x)) xs;
  _iIntros0 pat.
Tactic Notation "iIntros" "(" ne_simple_intropattern_list(xs) ")" :=
  _iIntros xs "".

Tactic Notation "iDestructCore" open_constr(lem) "as" constr(p) tactic3(tac) :=
  let intro_destruct n :=
    let rec go n' :=
      lazymatch n' with
      | 0 => fail "iDestruct: cannot introduce" n "hypotheses"
      | 1 => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; tac H
      | S ?n' => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; go n'
      end in
    intros; go n in
  lazymatch type of lem with
  | nat => intro_destruct lem
  | Z =>

     let n := eval cbv in (Z.to_nat lem) in intro_destruct n
  | ident => tac lem
  | string => tac constr:(INamed lem)
  | _ => iPoseProofCore lem as p tac
  end.
Tactic Notation "iMod" open_constr(lem) "as" "(" ne_simple_intropattern_list(xs) ")"
    constr(pat) :=
  iDestructCore lem as false (fun H => iModCore H as H; last _iDestructHyp H xs pat).

Section class_instances.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance as_emp_valid_emp_valid d P : AsEmpValid0 d (⊢ P) P | 0.
Admitted.

Global Instance into_sep_sep P Q : IntoSep (P ∗ Q) P Q.
Admitted.

Global Instance into_exist_exist {A} (Φ : A → PROP) name :
  AsIdentName Φ name → IntoExist (bi_exist Φ) Φ name.
Admitted.
End class_instances.

Section class_instances_updates.
Context {PROP : bi}.
Implicit Types P Q R : PROP.
Global Instance elim_modal_bupd_fupd
    `{!BiBUpd PROP, !BiFUpd PROP, !BiBUpdFUpd PROP} p E1 E2 P Q :
  ElimModal True p false (|==> P) P (|={E1,E2}=> Q) (|={E1,E2}=> Q) | 10.
Admitted.
End class_instances_updates.

Section class_instances_frame.
Context {PROP : bi}.
Implicit Types P Q R : PROP.
Global Instance frame_here p R : Frame p R R emp | 1.
Admitted.
Global Instance frame_sep_l R P1 P2 Q Q' :
  Frame false R P1 Q → MakeSep Q P2 Q' → Frame false R (P1 ∗ P2) Q' | 9.
Admitted.

Inductive GatherEvarsEq {A} (x : A) : A → Prop :=
  GatherEvarsEq_refl : GatherEvarsEq x x.

#[projections(primitive)] Class FrameExistRequirements
    (p : bool) (R : PROP) {A} (Φ : A → PROP) (a' : A) (G' : PROP) := {
  frame_exist_witness : A;
  frame_exist_resource : PROP;
  frame_exist_proof : Frame p R (Φ frame_exist_witness) frame_exist_resource;
  frame_exist_witness_eq : GatherEvarsEq frame_exist_witness a';
  frame_exist_resource_eq : TCEq frame_exist_resource G'
}.
Global Existing Instance Build_FrameExistRequirements.

Inductive TCCbnTele {A} (x : A) : A → Prop :=
  TCCbnTele_refl : TCCbnTele x x.

Global Instance frame_exist {A} p R (Φ : A → PROP)
    (TT : tele) (g : TT → A) (Ψ : TT → PROP) Q :
  FrameInstantiateExistEnabled →
  (∀ c, FrameExistRequirements p R Φ (g c) (Ψ c)) →
  TCCbnTele (∃.. c, Ψ c)%I Q →
  Frame p R (∃ a, Φ a) Q.
Admitted.
Global Instance frame_fupd `{!BiFUpd PROP} p E1 E2 R P Q :
  Frame p R P Q → Frame p R (|={E1,E2}=> P) (|={E1,E2}=> Q) | 2.
Admitted.
End class_instances_frame.

Ltac solve_gather_evars_eq :=
  lazymatch goal with
  | |- GatherEvarsEq ?a (?g ?c) =>
    let rec retcon_tele T arg :=

      match a with
      | context [?term] =>
        is_evar term;
        let X := type of term in
        lazymatch X with
        | tele => fail
        | _ => idtac
        end;
        let T' := open_constr:(_) in
        unify T (TeleS (λ _ : X, T'));

        unify term (tele_arg_head (λ _ : X, T') arg);

        retcon_tele T' (tele_arg_tail (λ _ : X, T') arg)

      | _ =>

        unify T TeleO
      end
    in
    let T' := lazymatch (type of c) with tele_arg ?T => T end in
    retcon_tele T' c;
    exact (GatherEvarsEq_refl _)
  end.

Global Hint Extern 0 (GatherEvarsEq _ _) =>
  solve_gather_evars_eq : typeclass_instances.

Global Hint Extern 0 (TCCbnTele _ _) =>
  cbn [bi_texist tele_fold tele_bind tele_arg_head tele_arg_tail];
  exact (TCCbnTele_refl _) : typeclass_instances.

Section class_instances_make.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance make_sep_emp_l P : KnownLMakeSep emp P P.
Admitted.
End class_instances_make.
Export iris.algebra.cmra.

Record agree (A : Type) : Type := {
  agree_car : list A;
  agree_not_nil : bool_decide (agree_car = []) = false
}.
Global Arguments agree_car {_} _.

Section agree.
Context {SI : sidx} {A : ofe}.
Local Instance agree_dist : Dist (agree A).
Admitted.
Local Instance agree_equiv : Equiv (agree A).
Admitted.

Definition agree_ofe_mixin : OfeMixin (agree A).
Admitted.
Canonical Structure agreeO := Ofe (agree A) agree_ofe_mixin.
Local Instance agree_validN_instance : ValidN (agree A).
Admitted.
Local Instance agree_valid_instance : Valid (agree A).
Admitted.

Local Program Instance agree_op_instance : Op (agree A) := λ x y,
  {| agree_car := agree_car x ++ agree_car y |}.
Admit Obligations.
Local Instance agree_pcore_instance : PCore (agree A).
Admitted.

Definition agree_cmra_mixin : CmraMixin (agree A).
Admitted.
Canonical Structure agreeR : cmra.
exact (Cmra (agree A) agree_cmra_mixin).
Defined.

End agree.
Global Arguments agreeR {_} _.

Record uPred (M : ucmra) : Type := UPred {
  uPred_holds : nat → M → Prop;

  uPred_mono n1 n2 x1 x2 :
    uPred_holds n1 x1 → x1 ≼{n2} x2 → n2 ≤ n1 → uPred_holds n2 x2
}.

Local Coercion uPred_holds : uPred >-> Funclass.

Section cofe.
  Context {M : ucmra}.
Local Instance uPred_equiv : Equiv (uPred M).
Admitted.
Local Instance uPred_dist : Dist (uPred M).
Admitted.
  Definition uPred_ofe_mixin : OfeMixin (uPred M).
Admitted.
Canonical Structure uPredO : ofe.
exact (Ofe (uPred M) uPred_ofe_mixin).
Defined.

  Program Definition uPred_compl : Compl uPredO := λ c,
    {| uPred_holds n x := ∀ n', n' ≤ n → ✓{n'} x → c n' n' x |}.
Admit Obligations.
  Global Program Instance uPred_cofe : Cofe uPredO := cofe_finite uPred_compl _.
Admit Obligations.
End cofe.
Global Arguments uPredO : clear implicits.

Inductive uPred_entails {M} (P Q : uPred M) : Prop :=
  { uPred_in_entails : ∀ n x, ✓{n} x → P n x → Q n x }.
Global Hint Resolve uPred_mono : uPred_def.

Local Program Definition uPred_pure_def {M} (φ : Prop) : uPred M :=
  {| uPred_holds n x := φ |}.
Solve Obligations with done.
Local Definition uPred_pure_aux : seal (@uPred_pure_def).
Admitted.
Definition uPred_pure := uPred_pure_aux.(unseal).
Global Arguments uPred_pure {M}.

Local Program Definition uPred_and_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∧ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_and_aux : seal (@uPred_and_def).
Admitted.
Definition uPred_and := uPred_and_aux.(unseal).
Global Arguments uPred_and {M}.

Local Program Definition uPred_or_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∨ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_or_aux : seal (@uPred_or_def).
Admitted.
Definition uPred_or := uPred_or_aux.(unseal).
Global Arguments uPred_or {M}.

Local Program Definition uPred_impl_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       x ≼ x' → n' ≤ n → ✓{n'} x' → P n' x' → Q n' x' |}.
Admit Obligations.
Local Definition uPred_impl_aux : seal (@uPred_impl_def).
Admitted.
Definition uPred_impl := uPred_impl_aux.(unseal).
Global Arguments uPred_impl {M}.

Local Program Definition uPred_forall_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∀ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_forall_aux : seal (@uPred_forall_def).
Admitted.
Definition uPred_forall := uPred_forall_aux.(unseal).

Local Program Definition uPred_exist_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∃ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_exist_aux : seal (@uPred_exist_def).
Admitted.
Definition uPred_exist := uPred_exist_aux.(unseal).

Local Program Definition uPred_sep_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∃ x1 x2, x ≡{n}≡ x1 ⋅ x2 ∧ P n x1 ∧ Q n x2 |}.
Admit Obligations.
Local Definition uPred_sep_aux : seal (@uPred_sep_def).
Admitted.
Definition uPred_sep := uPred_sep_aux.(unseal).
Global Arguments uPred_sep {M}.

Local Program Definition uPred_wand_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       n' ≤ n → ✓{n'} (x ⋅ x') → P n' x' → Q n' (x ⋅ x') |}.
Admit Obligations.
Local Definition uPred_wand_aux : seal (@uPred_wand_def).
Admitted.
Definition uPred_wand := uPred_wand_aux.(unseal).
Global Arguments uPred_wand {M}.

Local Program Definition uPred_plainly_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n ε |}.
Solve Obligations with naive_solver eauto using uPred_mono, ucmra_unit_validN.

Local Program Definition uPred_persistently_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n (core x) |}.
Solve Obligations with naive_solver eauto using uPred_mono, cmra_core_monoN.
Local Definition uPred_persistently_aux : seal (@uPred_persistently_def).
Admitted.
Definition uPred_persistently := uPred_persistently_aux.(unseal).
Global Arguments uPred_persistently {M}.

Local Program Definition uPred_later_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := match n return _ with 0 => True | S n' => P n' x end |}.
Admit Obligations.
Local Definition uPred_later_aux : seal (@uPred_later_def).
Admitted.
Definition uPred_later := uPred_later_aux.(unseal).
Global Arguments uPred_later {M}.
Definition uPred_emp {M} : uPred M.
Admitted.

Lemma uPred_bi_mixin (M : ucmra) :
  BiMixin
    uPred_entails uPred_emp uPred_pure uPred_and uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_wand.
Admitted.

Lemma uPred_bi_persistently_mixin (M : ucmra) :
  BiPersistentlyMixin
    uPred_entails uPred_emp uPred_and
    (@uPred_exist M) uPred_sep uPred_persistently.
Admitted.

Lemma uPred_bi_later_mixin (M : ucmra) :
  BiLaterMixin
    uPred_entails uPred_pure uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_persistently uPred_later.
Admitted.
Canonical Structure uPredI (M : ucmra) : bi.
exact ({| bi_ofe_mixin := ofe_mixin_of (uPred M);
     bi_bi_mixin := uPred_bi_mixin M;
     bi_bi_later_mixin := uPred_bi_later_mixin M;
     bi_bi_persistently_mixin := uPred_bi_persistently_mixin M |}).
Defined.
Global Instance uPred_bi_bupd M : BiBUpd (uPredI M).
Admitted.

Notation frac := Qp (only parsing).
  Canonical Structure fracO := leibnizO frac.
Local Instance frac_valid_instance : Valid frac.
Admitted.
Local Instance frac_pcore_instance : PCore frac.
Admitted.
Local Instance frac_op_instance : Op frac.
Admitted.

  Definition frac_ra_mixin : RAMixin frac.
Admitted.
  Canonical Structure fracR := discreteR frac frac_ra_mixin.
Definition gmap_viewR {SI : sidx} (K : Type) `{Countable K} (V : cmra) : cmra.
Admitted.
Definition authR {SI : sidx} (A : ucmra) : cmra.
Admitted.

Structure gFunctor := GFunctor {
  gFunctor_F :> rFunctor;
  gFunctor_map_contractive : rFunctorContractive gFunctor_F;
}.

Record gFunctors := GFunctors {
  gFunctors_len : nat;
  gFunctors_lookup : fin gFunctors_len → gFunctor
}.

Definition gid (Σ : gFunctors) := fin (gFunctors_len Σ).

Definition gname := positive.
Definition iResUR (Σ : gFunctors) : ucmra.
Admitted.
  Notation iProp Σ := (uPred (iResUR Σ)).
  Notation iPropO Σ := (uPredO (iResUR Σ)).

Class inG (Σ : gFunctors) (A : cmra) := InG {
  inG_id : gid Σ;
  inG_apply := rFunctor_apply (gFunctors_lookup Σ inG_id);
  inG_prf : A = inG_apply (iPropO Σ) _;
}.
Local Definition own_def `{!inG Σ A} (γ : gname) (a : A) : iProp Σ.
Admitted.
Local Definition own_aux : seal (@own_def).
Admitted.
Definition own := own_aux.(unseal).
Global Arguments own {Σ A _} γ a.
Local Instance nat_valid_instance : Valid nat.
Admitted.
Local Instance nat_pcore_instance : PCore nat.
Admitted.
Local Instance nat_op_instance : Op nat.
Admitted.
  Lemma nat_ra_mixin : RAMixin nat.
Admitted.
Canonical Structure natR : cmra.
exact (discreteR nat nat_ra_mixin).
Defined.
Local Instance nat_unit_instance : Unit nat.
Admitted.
  Lemma nat_ucmra_mixin : UcmraMixin nat.
Admitted.
Canonical Structure natUR : ucmra.
exact (Ucmra nat nat_ucmra_mixin).
Defined.

Class lcGS (Σ : gFunctors) := LcGS {
  #[local] lcGS_inG :: inG Σ (authR natUR);
  lcGS_name : gname;
}.

Inductive coPset_disj :=
  | CoPset : coPset → coPset_disj
  | CoPsetInvalid : coPset_disj.
  Canonical Structure coPset_disjO := leibnizO coPset_disj.
Local Instance coPset_disj_valid_instance : Valid coPset_disj.
Admitted.
Local Instance coPset_disj_op_instance : Op coPset_disj.
Admitted.
Local Instance coPset_disj_pcore_instance : PCore coPset_disj.
Admitted.

  Lemma coPset_disj_ra_mixin : RAMixin coPset_disj.
Admitted.
  Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin.
Import iris.algebra.gset.
  Class wsatGpreS (Σ : gFunctors) : Set := WsatGpreS {
    wsatGpreS_inv : inG Σ (gmap_viewR positive (agreeR $ laterO (iPropO Σ)));
    wsatGpreS_enabled : inG Σ coPset_disjR;
    wsatGpreS_disabled : inG Σ (gset_disjR positive);
  }.

  Class wsatGS (Σ : gFunctors) : Set := WsatG {
    wsat_inG : wsatGpreS Σ;
    invariant_name : gname;
    enabled_name : gname;
    disabled_name : gname;
  }.

Inductive has_lc := HasLc | HasNoLc.

Class invGS_gen (hlc : has_lc) (Σ : gFunctors) : Set := InvG {
  #[global] invGS_wsat :: wsatGS Σ;
  #[global] invGS_lc :: lcGS Σ;
}.
Global Instance uPred_bi_fupd `{!invGS_gen hlc Σ} : BiFUpd (uPredI (iResUR Σ)).
Admitted.

Global Instance uPred_bi_bupd_fupd `{!invGS_gen hlc Σ} : BiBUpdFUpd (uPredI (iResUR Σ)).
Admitted.
Export iris.algebra.excl.

Class cinvG Σ := {
  #[local] cinv_inG :: inG Σ (prodR (optionR (exclR unitO)) (optionR fracR)) ;
}.

Section defs.
  Context `{!invGS_gen hlc Σ, !cinvG Σ}.
Definition cinv_own (γ : gname) (p : frac) : iProp Σ.
Admitted.
  Definition cinv_excl γ : iProp Σ := own γ (Some (Excl ()), None).
Definition cinv (N : namespace) (γ : gname) (P : iProp Σ) : iProp Σ.
Admitted.

  Lemma cinv_own_excl_alloc P :
    pred_infinite P → ⊢ |==> ∃ γ, ⌜P γ⌝ ∗ cinv_excl γ ∗ cinv_own γ 1.
Admitted.

  Lemma cinv_alloc_strong (I : gname → Prop) E N :
    pred_infinite I →
    ⊢ |={E}=> ∃ γ, ⌜ I γ ⌝ ∗ cinv_own γ 1 ∗ ∀ P, ▷ P ={E}=∗ cinv N γ P.
  Proof.
    iIntros (?).
iMod cinv_own_excl_alloc as (γ) "[$ [Hexcl $]]"; first done.
🛠️ 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 6.4MiB file on GitHub Actions Artifacts under build.log)
LIB 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]
iris/program_logic/lifting.vo (real: 2.86, user: 2.71, sys: 0.14, mem: 597684 ko)
COQNATIVE iris/program_logic/lifting.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/program_logic/total_weakestpre.v", line 106, characters 68-80:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/lifting.vo.native (real: 0.49, user: 0.37, sys: 0.11, mem: 157280 ko)
COQTEST [ref ignored] tests/algebra.v (ref: tests/algebra.ref)
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]
tests/algebra.vo (real: 1.24, user: 1.12, sys: 0.12, mem: 590544 ko)
ROCQ compile iris/base_logic/lib/cancelable_invariants.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q iris iris -Q iris_heap_lang iris.heap_lang -Q iris_unstable iris.unstable -Q iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.v 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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/iris
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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.R3FYvBSOiH
MINIMIZER_DEBUG: files:  iris/base_logic/lib/cancelable_invariants.v /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/base_logic/lib/cancelable_invariants.v", line 90, characters 17-65:
Error: Tactic failure: iFrame: cannot frame ⌜?Goal γ⌝%I.

Command exited with non-zero status 1
iris/base_logic/lib/cancelable_invariants.vo (real: 1.44, user: 1.32, sys: 0.12, mem: 584220 ko)
make[2]: *** [Makefile.coq:813: iris/base_logic/lib/cancelable_invariants.vo] Error 1
make[2]: *** [iris/base_logic/lib/cancelable_invariants.vo] Deleting file 'iris/base_logic/lib/cancelable_invariants.glob'
make[2]: *** Waiting for unfinished jobs....
File "./iris/program_logic/total_weakestpre.v", line 274, characters 78-90:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/total_weakestpre.vo (real: 6.00, user: 5.85, sys: 0.14, mem: 636148 ko)
COQNATIVE iris/program_logic/total_weakestpre.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
iris/program_logic/total_weakestpre.vo.native (real: 0.58, user: 0.47, sys: 0.11, mem: 152232 ko)
make[1]: *** [Makefile.coq:411: all] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/iris'
make: *** [Makefile:3: all] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' iris 2
+ '[' iris '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real iris.log
    Time |  Peak Mem | File Name                                    
--------------------------------------------------------------------
0m19.52s | 636148 ko | Total Time / Peak Mem                        
--------------------------------------------------------------------
0m06.00s | 636148 ko | iris/program_logic/total_weakestpre.vo       
0m03.80s | 607220 ko | iris/program_logic/adequacy.vo               
0m02.86s | 597684 ko | iris/program_logic/lifting.vo                
0m02.01s | 598100 ko | iris/program_logic/atomic.vo                 
0m01.44s | 584220 ko | iris/base_logic/lib/cancelable_invariants.vo 
0m01.24s | 590544 ko | tests/algebra.vo                             
0m00.58s | 152232 ko | iris/program_logic/total_weakestpre.vo.native
0m00.56s | 156608 ko | iris/program_logic/atomic.vo.native          
0m00.54s | 165992 ko | iris/program_logic/adequacy.vo.native        
0m00.49s | 157280 ko | iris/program_logic/lifting.vo.native         
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 3.9MiB file on GitHub Actions Artifacts under bug.log)
 do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to admit lemmas with admit. Defined with Proof using

Non-fatal error: Failed to admit lemmas and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 101, characters 0-34:
Warning: Library File Stdlib.ZArith.ZArith_base is deprecated since 9.0.
use ZArith instead
[deprecated-library-file-since-9.0,deprecated-since-9.0,deprecated-library-file,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 153, characters 0-30:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 155, characters 0-32:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 157, characters 0-34:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 165, characters 0-33:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 168, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 609, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 614, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 846, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 973, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 1683, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 3129, characters 0-43:
Warning: Implicitly declaring hint databases is deprecated. Please explicitly
create "uPred_def"
[implicit-create-hint-db,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 3243, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 3275, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp016mo8z5/Top/bug_01.v", line 3276, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
Error: The section defs, module spec_pat, module intro_pat and module sel_pat
need to be closed.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions with admit. Defined with Proof using

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 101, characters 0-34:
Warning: Library File Stdlib.ZArith.ZArith_base is deprecated since 9.0.
use ZArith instead
[deprecated-library-file-since-9.0,deprecated-since-9.0,deprecated-library-file,deprecated,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 153, characters 0-30:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 155, characters 0-32:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 157, characters 0-34:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 165, characters 0-33:
Warning: Using Vector.t is known to be technically difficult, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Vector.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 168, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 609, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 614, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 846, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpc8vwu4px/Top/bug_01.v", line 938, characters 23-24:
Error: Found type "X" where "TeleO -t> X" was expected
(cannot unify "TeleO -t> X" and "X").


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to add Proof using lines
�[92m
Adding Proof using lines successful.�[0m
Failed to do everything at once; trying one at a time.
Adding Proof using lines unsuccessful.
No successful changes.

I will now attempt to export modules
Module exportation successful

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

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

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to remove all lines, one at a time

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.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 11, 2025

Minimization interrupted by timeout, being automatically continued. Partially Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v in 5h 15m 7s (from ci-iris) (interrupted by timeout, being automatically continued) (full log on GitHub Actions - verbose log)
⭐ ⏱️ Partially Minimized Coq File (timeout) (truncated to first and last 32KiB; full 139KiB file on GitHub Actions Artifacts under bug.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines, then from 3034 lines to 2591 lines, then from 2604 lines to 2735 lines, then from 2741 lines to 2612 lines, then from 2625 lines to 3086 lines, then from 3092 lines to 2663 lines, then from 2676 lines to 2732 lines, then from 2738 lines to 2681 lines, then from 2694 lines to 2724 lines, then from 2730 lines to 2694 lines, then from 2707 lines to 2743 lines, then from 2749 lines to 2706 lines, then from 2719 lines to 2750 lines, then from 2756 lines to 2717 lines, then from 2730 lines to 3394 lines, then from 3401 lines to 2731 lines, then from 2745 lines to 2868 lines, then from 2874 lines to 2746 lines, then from 2760 lines to 2816 lines, then from 2823 lines to 2751 lines, then from 2765 lines to 3567 lines, then from 3574 lines to 2766 lines, then from 2780 lines to 3375 lines, then from 3382 lines to 2771 lines, then from 2785 lines to 3275 lines, then from 3282 lines to 3100 lines, then from 3107 lines to 2756 lines, then from 2769 lines to 3160 lines, then from 3167 lines to 2770 lines, then from 2784 lines to 3082 lines, then from 3089 lines to 2783 lines, then from 2797 lines to 3468 lines, then from 3475 lines to 2785 lines, then from 2799 lines to 3753 lines, then from 3760 lines to 2851 lines, then from 2865 lines to 3684 lines, then from 3691 lines to 2871 lines, then from 2885 lines to 3846 lines, then from 3853 lines to 2873 lines, then from 2887 lines to 3477 lines, then from 3484 lines to 2876 lines, then from 2890 lines to 3327 lines, then from 3334 lines to 2925 lines, then from 2944 lines to 2856 lines, then from 2871 lines to 2858 lines, then from 2872 lines to 2856 lines, then from 2869 lines to 6474 lines, then from 6481 lines to 2873 lines, then from 2882 lines to 2863 lines, then from 2876 lines to 3627 lines, then from 3634 lines to 2872 lines, then from 2886 lines to 4897 lines, then from 4904 lines to 2904 lines, then from 2918 lines to 3219 lines, then from 3226 lines to 2919 lines, then from 2933 lines to 3323 lines, then from 3330 lines to 2973 lines, then from 2987 lines to 3755 lines, then from 3762 lines to 3170 lines, then from 3184 lines to 3391 lines, then from 3397 lines to 3217 lines, then from 3231 lines to 3614 lines, then from 3621 lines to 3243 lines, then from 3257 lines to 4364 lines, then from 4371 lines to 3246 lines, then from 3260 lines to 3765 lines, then from 3772 lines to 3258 lines, then from 3277 lines to 3167 lines, then from 3180 lines to 3709 lines, then from 3716 lines to 3194 lines, then from 3208 lines to 3727 lines, then from 3734 lines to 3199 lines, then from 3213 lines to 5472 lines, then from 5479 lines to 3470 lines, then from 3484 lines to 4779 lines, then from 4786 lines to 3496 lines, then from 3510 lines to 3815 lines, then from 3822 lines to 3506 lines, then from 3520 lines to 6150 lines, then from 6157 lines to 3700 lines, then from 3687 lines to 3583 lines, then from 3596 lines to 4232 lines, then from 4239 lines to 3636 lines, then from 3650 lines to 3902 lines, then from 3909 lines to 3635 lines, then from 3649 lines to 4815 lines, then from 4822 lines to 3636 lines, then from 3650 lines to 3906 lines, then from 3913 lines to 3645 lines, then from 3659 lines to 3673 lines, then from 3680 lines to 3653 lines, then from 3667 lines to 3921 lines, then from 3928 lines to 3661 lines, then from 3675 lines to 4684 lines, then from 4691 lines to 3700 lines, then from 3714 lines to 4365 lines, then from 4372 lines to 3702 lines, then from 3716 lines to 4097 lines, then from 4104 lines to 3717 lines, then from 3731 lines to 4459 lines, then from 4466 lines to 3895 lines, then from 3900 lines to 3665 lines, then from 3678 lines to 4074 lines, then from 4081 lines to 3664 lines, then from 3678 lines to 4045 lines, then from 4052 lines to 3665 lines, then from 3679 lines to 4116 lines, then from 4123 lines to 3710 lines, then from 3724 lines to 4412 lines, then from 4418 lines to 3736 lines, then from 3750 lines to 4512 lines, then from 4519 lines to 3738 lines, then from 3752 lines to 4132 lines, then from 4139 lines to 3761 lines, then from 3775 lines to 5073 lines, then from 5080 lines to 3768 lines, then from 3782 lines to 3796 lines, then from 3803 lines to 3781 lines, then from 3795 lines to 5455 lines, then from 5457 lines to 3802 lines, then from 3816 lines to 4085 lines, then from 4092 lines to 3807 lines, then from 3821 lines to 4515 lines, then from 4522 lines to 4275 lines, then from 4270 lines to 3749 lines, then from 3762 lines to 4353 lines, then from 4360 lines to 3750 lines, then from 3764 lines to 4377 lines, then from 4384 lines to 3766 lines, then from 3780 lines to 4068 lines, then from 4075 lines to 3769 lines, then from 3783 lines to 4010 lines, then from 4017 lines to 3778 lines, then from 3792 lines to 4463 lines, then from 4469 lines to 3780 lines, then from 3794 lines to 4319 lines, then from 4326 lines to 3782 lines, then from 3796 lines to 5281 lines, then from 5288 lines to 3833 lines, then from 3847 lines to 6045 lines, then from 6051 lines to 3920 lines *)
(* coqc version 9.2+alpha compiled with OCaml 4.14.2
   coqtop version 9.2+alpha
   Modules that could not be inlined: Ltac2.Pattern, Ltac2.Ltac1, Ltac2.Array, Stdlib.Vectors.Fin
   Expected coqc runtime on this file: 1.447 sec *)










Require stdpp.list_basics.
Require Stdlib.Vectors.Fin.
Require Ltac2.Array.
Require Ltac2.Ltac1.
Require Ltac2.Pattern.
Export Stdlib.Sorting.Permutation.
Export stdpp.list_basics.

Global Arguments Permutation {_} _ _ : assert.

Infix "≡ₚ" := Permutation (at level 70, no associativity) : stdpp_scope.
Notation "(≡ₚ)" := Permutation (only parsing) : stdpp_scope.


Inductive submseteq {A} : relation (list A) :=
  | submseteq_nil : submseteq [] []
  | submseteq_skip x l1 l2 : submseteq l1 l2 → submseteq (x :: l1) (x :: l2)
  | submseteq_swap x y l : submseteq (y :: x :: l) (x :: y :: l)
  | submseteq_cons x l1 l2 : submseteq l1 l2 → submseteq l1 (x :: l2)
  | submseteq_trans l1 l2 l3 : submseteq l1 l2 → submseteq l2 l3 → submseteq l1 l3.
Infix "⊆+" := submseteq (at level 70) : stdpp_scope.

Section general_properties.
Context {A : Type}.
Implicit Types x y z : A.
Implicit Types l k : list A.

Global Instance cons_Permutation_inj_r x : Inj (≡ₚ) (≡ₚ) (x ::.).
Admitted.
Lemma submseteq_nil_l l : [] ⊆+ l.
Admitted.

Global Instance: Proper ((≡ₚ) ==> (≡ₚ) ==> iff) (@submseteq A).
Admitted.

Lemma elem_of_submseteq l k x : x ∈ l → l ⊆+ k → x ∈ k.
Admitted.
Lemma submseteq_cons_l x l k : x :: l ⊆+ k ↔ ∃ k', k ≡ₚ x :: k' ∧ l ⊆+ k'.
Admitted.
  Context `{!EqDecision A}.

  Local Program Fixpoint elem_of_or_Permutation x l :
      (x ∉ l) + { k | l ≡ₚ x :: k } :=
    match l with
    | [] => inl _
    | y :: l =>
       if decide (x = y) then inr (l ↾ _) else
       match elem_of_or_Permutation x l return _ with
       | inl _ => inl _ | inr (k ↾ _) => inr ((y :: k) ↾ _)
       end
    end.
Admit Obligations.

  Global Program Instance submseteq_dec : RelDecision (@submseteq A) :=
    fix go l1 l2 :=
    match l1 with
    | [] => left _
    | x :: l1 =>
       match elem_of_or_Permutation x l2 return _ with
       | inl _ => right _
       | inr (l2 ↾ _) => cast_if (go l1 l2)
       end
    end.
  Next Obligation.
intros _ l1 l2 _.
apply submseteq_nil_l.
Qed.
  Next Obligation.
    intros _ ? l2 x l1 <- Hx Hxl1.
eapply Hx, elem_of_submseteq, Hxl1.
by left.
  Qed.
  Next Obligation.
intros _ ?? x l1 <- _ l2 -> Hl.
by apply submseteq_skip.
Qed.
  Next Obligation.
    intros _ ?? x l1 <- _ l2 -> Hl (l2' & Hl2%(inj _) & ?)%submseteq_cons_l.
    apply Hl.
by rewrite Hl2.
  Qed.
End general_properties.
Module Export list_relations.
End list_relations.
Definition mapM `{MBind M, MRet M} {A B} (f : A → M B) : list A → M (list B).
Admitted.

Section general_properties.

End general_properties.

Section fmap.
End fmap.

Section ext.
End ext.

Section omap.
End omap.

Section bind.
End bind.

Section ret_join.
End ret_join.

Section mapM.
End mapM.

Section imap.
End imap.

Section permutations.
End permutations.

Section powermset.
End powermset.

Section zip_with.

End zip_with.

Section zip.
End zip.
Section zipped_list_ind.
End zipped_list_ind.
Module Export stdpp_DOT_list_monad.
Module Export stdpp.
Module Export list_monad.
End list_monad.

End stdpp.

End stdpp_DOT_list_monad.
Module Export list_tactics.
End list_tactics.
Module Export list_numbers.
End list_numbers.
Export stdpp.list_monad.
Module Export stdpp_DOT_list.
Module Export stdpp.
Module Export list.
End list.

End stdpp.

End stdpp_DOT_list.

Notation fin := Fin.t.
Module Export fin.
End fin.
Export stdpp.list.

Class Countable A `{EqDecision A} := {
  encode : A → positive;
  decode : positive → option A;
  decode_encode x : decode (encode x) = Some x
}.
Global Instance pos_countable : Countable positive.
Admitted.
Module Export stdpp.
Module Export countable.
End countable.

End stdpp.
Module Import LocalFalse.
End LocalFalse.
Export stdpp.countable.

Global Instance set_subseteq_instance `{ElemOf A C} : SubsetEq C | 20.
Admitted.
Global Instance set_disjoint_instance `{ElemOf A C} : Disjoint C | 20.
Admitted.

Section semi_set.
  Context `{SemiSet A C}.
  Implicit Types X Y : C.

  Lemma union_subseteq X Y Z : X ∪ Y ⊆ Z ↔ X ⊆ Z ∧ Y ⊆ Z.
Admitted.
End semi_set.

Definition pred_infinite {A} (P : A → Prop) := ∀ xs : list A, ∃ x, P x ∧ x ∉ xs.
Export Corelib.Init.Byte.

Module Export Ascii.

Inductive ascii : Set := Ascii (_ _ _ _ _ _ _ _ : bool).
Delimit Scope char_scope with char.
Bind Scope char_scope with ascii.
Definition eqb (a b : ascii) : bool.
Admitted.
Definition ascii_of_byte (b : byte) : ascii.
exact (let '(b0, (b1, (b2, (b3, (b4, (b5, (b6, b7))))))) := Byte.to_bits b in
     Ascii b0 b1 b2 b3 b4 b5 b6 b7).
Defined.
Definition byte_of_ascii (a : ascii) : byte.
Admitted.
  String Notation ascii ascii_of_byte byte_of_ascii : char_scope.
Module Export String.

Inductive string : Set :=
  | EmptyString : string
  | String : ascii -> string -> string.

#[local] Open Scope lazy_bool_scope.

Fixpoint eqb s1 s2 : bool :=
 match s1, s2 with
 | EmptyString, EmptyString => true
 | String c1 s1', String c2 s2' => Ascii.eqb c1 c2 &&& eqb s1' s2'
 | _,_ => false
 end.
Fixpoint string_of_list_ascii (s : list ascii) : string.
exact (match s with
     | nil => EmptyString
     | cons ch s => String ch (string_of_list_ascii s)
     end).
Defined.
Definition string_of_list_byte (s : list byte) : string.
exact (string_of_list_ascii (List.map ascii_of_byte s)).
Defined.
Definition list_byte_of_string (s : string) : list byte.
Admitted.

String Notation string
  String.string_of_list_byte String.list_byte_of_string : stdpp_scope.

Module Export Ascii.
Definition is_nat (x : ascii) : option nat.
exact (match x with
    | "0" => Some 0
    | "1" => Some 1
    | "2" => Some 2
    | "3" => Some 3
    | "4" => Some 4
    | "5" => Some 5
    | "6" => Some 6
    | "7" => Some 7
    | "8" => Some 8
    | "9" => Some 9
    | _ => None
    end%char).
Defined.
Definition is_space (x : ascii) : bool.
exact (match x with
    | "009" | "010" | "011" | "012" | "013" | " " => true | _ => false
    end%char).
Defined.

Module Export String.
Fixpoint rev_app (s1 s2 : string) : string.
exact (match s1 with
    | "" => s2
    | String a s1 => rev_app s1 (String a s2)
    end).
Defined.
Definition rev (s : string) : string.
exact (rev_app s "").
Defined.

Record mapset' (Munit : Type) : Type :=
  Mapset { mapset_car: Munit }.
Notation mapset M := (mapset' (M unit)).

Local Open Scope positive_scope.

Local Notation "P ~ 0" := (λ p, P p~0) : function_scope.
Local Notation "P ~ 1" := (λ p, P p~1) : function_scope.

Inductive gmap_dep_ne (A : Type) (P : positive → Prop) :=
  | GNode001 : gmap_dep_ne A P~1  → gmap_dep_ne A P
  | GNode010 : P 1 → A → gmap_dep_ne A P
  | GNode011 : P 1 → A → gmap_dep_ne A P~1 → gmap_dep_ne A P
  | GNode100 : gmap_dep_ne A P~0 → gmap_dep_ne A P
  | GNode101 : gmap_dep_ne A P~0 → gmap_dep_ne A P~1 → gmap_dep_ne A P
  | GNode110 : gmap_dep_ne A P~0 → P 1 → A → gmap_dep_ne A P
  | GNode111 : gmap_dep_ne A P~0 → P 1 → A → gmap_dep_ne A P~1 → gmap_dep_ne A P.

Variant gmap_dep (A : Type) (P : positive → Prop) :=
  | GEmpty : gmap_dep A P
  | GNodes : gmap_dep_ne A P → gmap_dep A P.

Record gmap_key K `{Countable K} (q : positive) :=
  GMapKey { _ : encode (A:=K) <$> decode q = Some q }.

Record gmap K `{Countable K} A := GMap { gmap_car : gmap_dep A (gmap_key K) }.

Definition gset K `{Countable K} := mapset (gmap K).

Export stdpp.base.
Export Corelib.ssr.ssreflect.

Record SIdxMixin {I} (ilt ile : relation I) (zero : I) (succ : I → I) := {
  sidx_mixin_lt_trans : Transitive ilt;
  sidx_mixin_lt_wf : well_founded ilt;
  sidx_mixin_lt_trichotomy : TrichotomyT ilt;
  sidx_mixin_le_lteq n m : ile n m ↔ ilt n m ∨ n = m;
  sidx_mixin_nlt_0_r n : ¬ ilt n zero;
  sidx_mixin_lt_succ_diag_r n : ilt n (succ n);
  sidx_mixin_le_succ_l_2 n m : ilt n m → ile (succ n) m;

  sidx_mixin_weak_case n : {m | n = succ m} + (∀ m, ilt m n → ilt (succ m) n);
}.

Structure sidx := SIdx {
  sidx_car :> Type;
  sidx_lt : relation sidx_car;
  sidx_le : relation sidx_car;
  sidx_zero : sidx_car;
  sidx_succ : sidx_car → sidx_car;
  sidx_mixin : SIdxMixin sidx_lt sidx_le sidx_zero sidx_succ;
}.

Existing Class sidx.
Global Arguments SIdx _ {_ _ _ _} _.
Global Arguments sidx_lt {_}.
Global Arguments sidx_le {_}.
Global Arguments sidx_zero {_}.
Global Arguments sidx_succ {_} _.

Declare Scope sidx_scope.

Local Open Scope sidx_scope.

Notation "0ᵢ" := sidx_zero (at level 0).
Notation "'Sᵢ'" := sidx_succ (at level 0).
Notation "n < m" := (sidx_lt n m) : sidx_scope.
Notation "n ≤ m" := (sidx_le n m) : sidx_scope.

Class SIdxFinite (SI : sidx) :=
  finite_index n : n = 0ᵢ ∨ ∃ m, n = Sᵢ m.

Module Export SIdx.
Section sidx.
  Context {SI : sidx}.

  Record limit (n : SI) := Limit {
    limit_gt_S m : m < n → Sᵢ m < n;
    limit_neq_0 : n ≠ 0ᵢ;
  }.

  Lemma limit_finite `{!SIdxFinite SI} n : ¬limit n.
Admitted.
End sidx.

Class Dist {SI : sidx} A := dist : SI → relation A.
Notation "x ≡{ n }≡ y" := (dist n x y)
  (at level 70, n at next level, format "x  ≡{ n }≡  y").
Notation NonExpansive f := (∀ n, Proper (dist n ==> dist n) f).
Notation NonExpansive2 f := (∀ n, Proper (dist n ==> dist n ==> dist n) f).

Record OfeMixin {SI : sidx} A `{Equiv A, !Dist A} := {
  mixin_equiv_dist (x y : A) : x ≡ y ↔ ∀ n, x ≡{n}≡ y;
  mixin_dist_equivalence n : Equivalence (@dist SI A _ n);
  mixin_dist_le n m (x y : A) : x ≡{n}≡ y → m ≤ n → x ≡{m}≡ y
}.

Structure ofe {SI : sidx} := Ofe {
  ofe_car :> Type;
  ofe_equiv : Equiv ofe_car;
  ofe_dist : Dist ofe_car;
  ofe_mixin : OfeMixin ofe_car
}.
Global Arguments Ofe {_} _ {_ _} _.

Global Hint Extern 0 (Equiv _) => refine (ofe_equiv _); shelve : typeclass_instances.
Global Hint Extern 0 (Dist _) => refine (ofe_dist _); shelve : typeclass_instances.
Definition ofe_mixin_of' {SI : sidx} A {Ac : ofe} (f : Ac → A) : OfeMixin Ac.
exact (ofe_mixin Ac).
Defined.
Notation ofe_mixin_of A :=
  ltac:(let H := eval hnf in (ofe_mixin_of' A id) in exact H) (only parsing).

Record chain {SI : sidx} (A : ofe) := {
  chain_car :> SI → A;
  chain_cauchy n m: n ≤ m → chain_car m ≡{n}≡ chain_car n
}.

Record bchain {SI : sidx} (A : ofe) (n : SI) := {
  bchain_car :> ∀ m, m < n → A;
  bchain_cauchy m p Hm Hp : m ≤ p → bchain_car p Hp ≡{m}≡ bchain_car m Hm
}.

Notation Compl A := (chain A%type → A).
Notation LBCompl A := (∀ n, SIdx.limit n → bchain A%type n → A).

Class Cofe {SI : sidx} (A : ofe) := {
  compl : Compl A;
  lbcompl : LBCompl A;
  conv_compl n c : compl c ≡{n}≡ c n;
  conv_lbcompl {n} Hn (c : bchain A n) {m} Hm : lbcompl n Hn c ≡{m}≡ c m Hm;

  lbcompl_ne n {Hn} (c1 c2 : bchain A n) m :
    (∀ p (Hp : p < n), c1 p Hp ≡{m}≡ c2 p Hp) →
    lbcompl n Hn c1 ≡{m}≡ lbcompl n Hn c2
}.

Record dist_later {SI : sidx} `{!Dist A} (n : SI) (x y : A) : Prop :=
  { dist_later_lt : ∀ m, m < n → x ≡{m}≡ y }.

Notation Contractive f := (∀ n, Proper (dist_later n ==> dist n) f).

Record ofe_mor {SI : sidx} (A B : ofe) : Type := OfeMor {
  ofe_mor_car :> A → B;
  ofe_mor_ne : NonExpansive ofe_mor_car
}.

Section ofe_mor.
  Context {SI : sidx} {A B : ofe}.
Local Instance ofe_mor_equiv : Equiv (ofe_mor A B).
Admitted.
Local Instance ofe_mor_dist : Dist (ofe_mor A B).
Admitted.
  Definition ofe_mor_ofe_mixin : OfeMixin (ofe_mor A B).
Admitted.
  Canonical Structure ofe_morO := Ofe (ofe_mor A B) ofe_mor_ofe_mixin.
End ofe_mor.

Global Arguments ofe_morO {_} _ _.
Notation "A -n> B" :=
  (ofe_morO A B) (at level 99, B at level 200, right associativity).
Definition cid {SI : sidx} {A: ofe} : A -n> A.
Admitted.
Definition ccompose {SI : sidx} {A B C: ofe}
  (f : B -n> C) (g : A -n> B) : A -n> C.
Admitted.
Infix "◎" := ccompose (at level 40, left associativity).

Section unit.
  Context {SI : sidx}.
Local Instance unit_dist : Dist unit.
Admitted.
  Definition unit_ofe_mixin : OfeMixin unit.
Admitted.
Canonical Structure unitO : ofe.
exact (Ofe unit unit_ofe_mixin).
Defined.
End unit.

Section product.
  Context {SI : sidx} {A B : ofe}.
Local Instance prod_dist : Dist (A * B).
Admitted.

  Definition prod_ofe_mixin : OfeMixin (A * B).
Admitted.
Canonical Structure prodO : ofe.
exact (Ofe (A * B) prod_ofe_mixin).
Defined.
End product.

Section discrete_ofe.
  Context {SI : sidx} `{Equiv A} (Heq : @Equivalence A (≡)).
Local Instance discrete_dist : Dist A.
Admitted.
  Definition discrete_ofe_mixin : OfeMixin A.
Admitted.
End discrete_ofe.

Notation leibnizO A := (Ofe A (@discrete_ofe_mixin _ _ equivL eq_equivalence)).

Notation discrete_ofe_equivalence_of A := ltac:(
  match constr:(ofe_mixin_of A) with
  | discrete_ofe_mixin ?H => exact H
  end) (only parsing).
Canonical Structure natO {SI : sidx} : ofe.
exact (leibnizO nat).
Defined.

Section option.
  Context {SI : sidx} {A : ofe}.
Local Instance option_dist : Dist (option A).
Admitted.

  Definition option_ofe_mixin : OfeMixin (option A).
Admitted.
  Canonical Structure optionO := Ofe (option A) option_ofe_mixin.
End option.

Record later (A : Type) : Type := Next { later_car : A }.

Section later.
  Context {SI : sidx} {A : ofe}.
Local Instance later_equiv : Equiv (later A).
Admitted.
Local Instance later_dist : Dist (later A).
Admitted.

  Definition later_ofe_mixin : OfeMixin (later A).
Admitted.
Canonical Structure laterO : ofe.
exact (Ofe (later A) later_ofe_mixin).
Defined.
End later.

Global Arguments laterO {_} _.

Class Monoid {SI : sidx} {M : ofe} (o : M → M → M) := {
  monoid_unit : M;
  monoid_ne : NonExpansive2 o;
  monoid_assoc : Assoc (≡) o;
  monoid_comm : Comm (≡) o;
  monoid_left_id : LeftId (≡) monoid_unit o;
}.

Fixpoint big_opL {SI : sidx} {M : ofe}
    {o : M → M → M} `{!Monoid o} {A} (f : nat → A → M) (xs : list A) : M :=
  match xs with
  | [] => monoid_unit
  | x :: xs => o (f 0 x) (big_opL (λ n, f (S n)) xs)
  end.
Global Arguments big_opL {SI} {M} o {_ A} _ !_ /.

Class PCore (A : Type) := pcore : A → option A.

Class Op (A : Type) := op : A → A → A.
Infix "⋅" := op (at level 50, left associativity) : stdpp_scope.
Notation "(⋅)" := op (only parsing) : stdpp_scope.

Definition included {A} `{!Equiv A, !Op A} (x y : A) := ∃ z, y ≡ x ⋅ z.
Infix "≼" := included (at level 70) : stdpp_scope.

Class ValidN {SI : sidx} (A : Type) := validN : SI → A → Prop.
Notation "✓{ n } x" := (validN n x)
  (at level 20, n at next level, format "✓{ n }  x").

Class Valid (A : Type) := valid : A → Prop.
Notation "✓ x" := (valid x) (at level 20) : stdpp_scope.

Definition includedN {SI : sidx} `{!Dist A, Op A} (n : SI) (x y : A) :=
  ∃ z, y ≡{n}≡ x ⋅ z.
Notation "x ≼{ n } y" := (includedN n x y)
  (at level 70, n at next level, format "x  ≼{ n }  y") : stdpp_scope.
Global Hint Extern 0 (_ ≼{_} _) => reflexivity : core.
  Record CmraMixin {SI : sidx} A
      `{!Dist A, !Equiv A, !PCore A, !Op A, !Valid A, !ValidN A} := {

    mixin_cmra_op_ne (x : A) : NonExpansive (op x);
    mixin_cmra_pcore_ne n (x y : A) cx :
      x ≡{n}≡ y → pcore x = Some cx → ∃ cy, pcore y = Some cy ∧ cx ≡{n}≡ cy;
    mixin_cmra_validN_ne n : Proper (dist (A := A) n ==> impl) (validN n);

    mixin_cmra_valid_validN (x : A) : ✓ x ↔ ∀ n, ✓{n} x;
    mixin_cmra_validN_le n n' (x : A) : ✓{n} x → n' ≤ n → ✓{n'} x;

    mixin_cmra_assoc : Assoc (≡@{A}) (⋅);
    mixin_cmra_comm : Comm (≡@{A}) (⋅);
    mixin_cmra_pcore_l (x : A) cx : pcore x = Some cx → cx ⋅ x ≡ x;
    mixin_cmra_pcore_idemp (x : A) cx : pcore x = Some cx → pcore cx ≡ Some cx;
    mixin_cmra_pcore_mono (x y : A) cx :
      x ≼ y → pcore x = Some cx → ∃ cy, pcore y = Some cy ∧ cx ≼ cy;
    mixin_cmra_validN_op_l n (x y : A) : ✓{n} (x ⋅ y) → ✓{n} x;
    mixin_cmra_extend n (x y1 y2 : A) :
      ✓{n} x → x ≡{n}≡ y1 ⋅ y2 →
      { z1 : A & { z2 | x ≡ z1 ⋅ z2 ∧ z1 ≡{n}≡ y1 ∧ z2 ≡{n}≡ y2 } }
  }.

#[projections(primitive=no)]
Structure cmra {SI : sidx} := Cmra' {
  cmra_car :> Type;
  cmra_equiv : Equiv cmra_car;
  cmra_dist : Dist cmra_car;
  cmra_pcore : PCore cmra_car;
  cmra_op : Op cmra_car;
  cmra_valid : Valid cmra_car;
  cmra_validN : ValidN cmra_car;
  cmra_ofe_mixin : OfeMixin cmra_car;
  cmra_mixin : CmraMixin cmra_car;
}.
Global Arguments Cmra' {_} _ {_ _ _ _ _ _} _ _.

Notation Cmra A m := (Cmra' A (ofe_mixin_of A%type) m) (only parsing).

Global Hint Extern 0 (PCore _) => refine (cmra_pcore _); shelve : typeclass_instances.
Global Hint Extern 0 (Op _) => refine (cmra_op _); shelve : typeclass_instances.
Global Hint Extern 0 (Valid _) => refine (cmra_valid _); shelve : typeclass_instances.
Global Hint Extern 0 (ValidN _) => refine (cmra_validN _); shelve : typeclass_instances.
Coercion cmra_ofeO {SI : sidx} (A : cmra) : ofe.
exact (Ofe A (cmra_ofe_mixin A)).
Defined.
Canonical Structure cmra_ofeO.
Definition cmra_mixin_of' {SI : sidx} A {Ac : cmra}
  (f : Ac → A) : CmraMixin Ac.
Admitted.
Notation cmra_mixin_of A :=
  ltac:(let H := eval hnf in (cmra_mixin_of' A id) in exact H) (only parsing).
Definition core {A} `{!PCore A} (x : A) : A.
Admitted.

Class Unit (A : Type) := ε : A.

Record UcmraMixin {SI : sidx} A
    `{!Dist A, !Equiv A, !PCore A, !Op A, !Valid A, !Unit A} := {
  mixin_ucmra_unit_valid : ✓ (ε : A);
  mixin_ucmra_unit_left_id : LeftId (≡@{A}) ε (⋅);
  mixin_ucmra_pcore_unit : pcore ε ≡@{option A} Some ε
}.

#[projections(primitive=no)]
Structure ucmra {SI : sidx} := Ucmra' {
  ucmra_car :> Type;
  ucmra_equiv : Equiv ucmra_car;
  ucmra_dist : Dist ucmra_car;
  ucmra_pcore : PCore ucmra_car;
  ucmra_op : Op ucmra_car;
  ucmra_valid : Valid ucmra_car;
  ucmra_validN : ValidN ucmra_car;
  ucmra_unit : Unit ucmra_car;
  ucmra_ofe_mixin : OfeMixin ucmra_car;
  ucmra_cmra_mixin : CmraMixin ucmra_car;
  ucmra_mixin : UcmraMixin ucmra_car;
}.
Global Arguments Ucmra' {_} _ {_ _ _ _ _ _ _} _ _ _.
Notation Ucmra A m :=
  (Ucmra' A (ofe_mixin_of A%type) (cmra_mixin_of A%type) m) (only parsing).

Global Hint Extern 0 (Unit _) => refine (ucmra_unit _); shelve : typeclass_instances.
Coercion ucmra_ofeO {SI : sidx} (A : ucmra) : ofe.
exact (Ofe A (ucmra_ofe_mixin A)).
Defined.
Canonical Structure ucmra_ofeO.
Coercion ucmra_cmraR {SI : sidx} (A : ucmra) : cmra.
exact (Cmra' A (ucmra_ofe_mixin A) (ucmra_cmra_mixin A)).
Defined.
Canonical Structure ucmra_cmraR.

Class CmraMorphism {SI : sidx} {A B : cmra} (f : A → B) := {
  #[global] cmra_morphism_ne :: NonExpansive f;
  cmra_morphism_validN n x : ✓{n} x → ✓{n} f x;
  cmra_morphism_pcore x : f <$> pcore x ≡ pcore (f x);
  cmra_morphism_op x y : f (x ⋅ y) ≡ f x ⋅ f y
}.

Section cmra.
Context {SI : sidx} {A : cmra}.
Implicit Types x y z : A.
  Global Instance cmra_includedN_preorder n : PreOrder (@includedN SI A _ _ n).
Admitted.
  Lemma cmra_core_monoN n x y : x ≼{n} y → core x ≼{n} core y.
Admitted.
End cmra.

Section ucmra.
  Context {SI : sidx} {A : ucmra}.

  Lemma ucmra_unit_validN n : ✓{n} (ε:A).
Admitted.
End ucmra.

  Record rFunctor {SI : sidx} := RFunctor {
  rFunctor_car : ∀ A `{!Cofe A} B `{!Cofe B}, cmra;
  rFunctor_map `{!Cofe A1, !Cofe A2, !Cofe B1, !Cofe B2} :
    ((A2 -n> A1) * (B1 -n> B2)) → rFunctor_car A1 B1 -n> rFunctor_car A2 B2;
  rFunctor_map_ne `{!Cofe A1, !Cofe A2, !Cofe B1, !Cofe B2} :
    NonExpansive (@rFunctor_map A1 _ A2 _ B1 _ B2 _);
  rFunctor_map_id `{!Cofe A, !Cofe B} (x : rFunctor_car A B) :
    rFunctor_map (cid,cid) x ≡ x;
  rFunctor_map_compose `{!Cofe A1, !Cofe A2, !Cofe A3, !Cofe B1, !Cofe B2, !Cofe B3}
      (f : A2 -n> A1) (g : A3 -n> A2) (f' : B1 -n> B2) (g' : B2 -n> B3) x :
    rFunctor_map (f◎g, g'◎f') x ≡ rFunctor_map (g,g') (rFunctor_map (f,f') x);
  rFunctor_mor `{!Cofe A1, !Cofe A2, !Cofe B1, !Cofe B2}
      (fg : (A2 -n> A1) * (B1 -n> B2)) :
    CmraMorphism (rFunctor_map fg)
}.

Class rFunctorContractive {SI : sidx} (F : rFunctor) :=
  #[global] rFunctor_map_contractive `{!Cofe A1, !Cofe A2, !Cofe B1, !Cofe B2} ::
    Contractive (@rFunctor_map SI F A1 _ A2 _ B1 _ B2 _).
Definition rFunctor_apply {SI : sidx} (F: rFunctor) (A: ofe) `{!Cofe A} : cmra.
Admitted.

Record RAMixin A `{Equiv A, PCore A, Op A, Valid A} := {

  ra_op_proper (x : A) : Proper ((≡) ==> (≡)) (op x);
  ra_core_proper (x y : A) cx :
    x ≡ y → pcore x = Some cx → ∃ cy, pcore y = Some cy ∧ cx ≡ cy;
  ra_validN_proper : Proper ((≡@{A}) ==> impl) valid;

  ra_assoc : Assoc (≡@{A}) (⋅);
  ra_comm : Comm (≡@{A}) (⋅);
  ra_pcore_l (x : A) cx : pcore x = Some cx → cx ⋅ x ≡ x;
  ra_pcore_idemp (x : A) cx : pcore x = Some cx → pcore cx ≡ Some cx;
  ra_pcore_mono (x y : A) cx :
    x ≼ y → pcore x = Some cx → ∃ cy, pcore y = Some cy ∧ cx ≼ cy;
  ra_valid_op_l (x y : A) : ✓ (x ⋅ y) → ✓ x
}.

Section discrete.
  Context {SI : sidx} `{!Equiv A, !PCore A, !Op A, !Valid A}.
  Context (Heq : @Equivalence A (≡)).
  Context (ra_mix : RAMixin A).
  Existing Instances discrete_dist.
Local Instance discrete_validN_instance : ValidN A.
Admitted.
  Definition discrete_cmra_mixin : CmraMixin A.
Admitted.
End discrete.

Notation discreteR A ra_mix :=
  (Cmra A (discrete_cmra_mixin (discrete_ofe_equivalence_of A%type) ra_mix))
  (only parsing).

Section prod.
  Context {SI : sidx} {A B : cmra}.
Local Instance prod_op_instance : Op (A * B).
Admitted.
Local Instance prod_pcore_instance : PCore (A * B).
Admitted.
Local Instance prod_valid_instance : Valid (A * B).
Admitted.
Local Instance prod_validN_instance : ValidN (A * B).
Admitted.

  Definition prod_cmra_mixin : CmraMixin (A * B).
Admitted.
  Canonical Structure prodR := Cmra (prod A B) prod_cmra_mixin.
End prod.

Global Arguments prodR {_} _ _.

Section option.
  Context {SI : sidx} {A : cmra}.
Local Instance option_valid_instance : Valid (option A).
Admitted.
Local Instance option_validN_instance : ValidN (option A).
Admitted.
Local Instance option_pcore_instance : PCore (option A).
Admitted.
Local Instance option_op_instance : Op (option A).
Admitted.

  Lemma option_cmra_mixin : CmraMixin (option A).
Admitted.
  Canonical Structure optionR := Cmra (option A) option_cmra_mixin.
End option.

Global Arguments optionR {_} _.

Inductive gset_disj K `{Countable K} :=
  | GSet : gset K → gset_disj K
  | GSetInvalid : gset_disj K.

Section gset_disj.
  Context {SI : sidx} `{Countable K}.

  Canonical Structure gset_disjO := leibnizO (gset_disj K).
Local Instance gset_disj_valid_instance : Valid (gset_disj K).
Admitted.
Local Instance gset_disj_op_instance : Op (gset_disj K).
Admitted.
Local Instance gset_disj_pcore_instance : PCore (gset_disj K).
Admitted.

  Lemma gset_disj_ra_mixin : RAMixin (gset_disj K).
Admitted.
  Canonical Structure gset_disjR := discreteR (gset_disj K) gset_disj_ra_mixin.

  End gset_disj.
Global Arguments gset_disjR {_} _ {_ _}.

Lemma nat_sidx_mixin : SIdxMixin lt le 0 S.
Admitted.
Canonical Structure natSI : sidx.
exact (SIdx nat nat_sidx_mixin).
Defined.
Global Existing Instance natSI | 0.

Global Instance nat_sidx_finite : SIdxFinite natSI.
Admitted.

  Program Definition cofe_finite {A} (compl : Compl A)
      (conv_compl: ∀ n c, compl c ≡{n}≡ c n) : Cofe A :=
    {| compl := compl; lbcompl n Hn := False_rect _ (SIdx.limit_finite _ Hn) |}.
Admit Obligations.

Res

[...]

l "iSpecialize:" P "not an implication/wand" in
  let solve_done d :=
    lazymatch d with
    | true =>
       first [ done
             | let Q := match goal with |- envs_entails _ ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done"
             | let Q := match goal with |- ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done" ]
    | false => idtac
    end in
  let Δ := iGetCtx in
  lazymatch pats with
    | [] => idtac
    | SIdent ?H2 [] :: ?pats =>

       notypeclasses refine (tac_specialize false _ H2 _ H1 _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H2 := pretty_ident H2 in
          fail "iSpecialize:" H2 "not found"
         |pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |tc_solve ||
          let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
          let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
          fail "iSpecialize: cannot instantiate" P "with" Q
         |pm_reduce; iSpecializePat_go H1 pats]
    | SIdent ?H2 ?pats1 :: ?pats =>

       let H2tmp := iFresh in
       iPoseProofCoreHyp H2 as H2tmp;

       iRevertHyp H1 with (fun p =>
         iSpecializePat_go H2tmp pats1;
           [..
           |_iIntroMaybePersistent H1 p]);

         [..
         |
          notypeclasses refine (tac_specialize true _ H2tmp _ H1 _ _ _ _ _ _ _ _ _);
            [pm_reflexivity ||
             let H2tmp := pretty_ident H2tmp in
             fail "iSpecialize:" H2tmp "not found"
            |pm_reflexivity ||
             let H1 := pretty_ident H1 in
             fail "iSpecialize:" H1 "not found"
            |tc_solve ||
             let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
             let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
             fail "iSpecialize: cannot instantiate" P "with" Q
            |pm_reduce; iSpecializePat_go H1 pats]]
    | SPureGoal ?d :: ?pats =>
       notypeclasses refine (tac_specialize_assert_pure _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- FromPure _ ?Q _ => Q end in
          fail "iSpecialize:" Q "not pure"
         |solve_done d
         |pm_reduce;
          iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic false ?Hs_frame [] ?d) :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve
         |pm_reduce; iFrame Hs_frame; solve_done d
         |pm_reduce; iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: ?pats =>
       fail "iSpecialize: cannot select hypotheses for intuitionistic premise"
    | SGoal (SpecGoal ?m ?lr ?Hs_frame ?Hs ?d) :: ?pats =>
       let Hs' := eval cbv in (if lr then Hs else Hs_frame ++ Hs) in
       notypeclasses refine (tac_specialize_assert _ H1 _
           (if m is GModal then true else false) lr Hs' _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          lazymatch goal with
          | |- False =>
            let Hs' := iMissingHypsCore Δ Hs' in
            fail "iSpecialize: hypotheses" Hs' "not found"
          | _ =>
            notypeclasses refine (conj _ _);
              [iFrame Hs_frame; solve_done d
              |iSpecializePat_go H1 pats]
          end]
    | SAutoFrame GIntuitionistic :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve ||
          fail "iSpecialize: Cannot find IntoAbsorbingly;"
               "this should not happen, please report a bug"
         |pm_reduce; solve [iFrame "∗ #"]
         |pm_reduce; iSpecializePat_go H1 pats]
    | SAutoFrame ?m :: ?pats =>
       notypeclasses refine (tac_specialize_frame _ H1 _
           (if m is GModal then true else false) _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          first
            [notypeclasses refine (tac_unlock_emp _ _ _)
            |notypeclasses refine (tac_unlock_True _ _ _)
            |iFrame "∗ #"; notypeclasses refine (tac_unlock _ _ _)
            |let P :=
               match goal with |- envs_entails _ (?P ∗ locked _)%I => P end in
             fail 1 "iSpecialize: premise" P "cannot be solved by framing"]
         |exact eq_refl]; _iIntroSpatial H1; iSpecializePat_go H1 pats
    end.

Local Tactic Notation "iSpecializePat" open_constr(H) constr(pat) :=
  let pats := spec_pat.parse pat in iSpecializePat_go H pats.

Fixpoint use_tac_specialize_intuitionistic_helper {M}
    (Δ : envs M) (pats : list spec_pat) : bool :=
  match pats with
  | [] => false
  | SPureGoal _ :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SAutoFrame _ :: _ => true
  | SIdent H _ :: pats =>
     match envs_lookup_delete false H Δ with
     | Some (false, _, Δ) => true
     | Some (true, _, Δ) => use_tac_specialize_intuitionistic_helper Δ pats
     | None => false
     end
  | SGoal (SpecGoal GModal _ _ _ _) :: _ => false
  | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SGoal (SpecGoal GSpatial neg Hs_frame Hs _) :: pats =>
     match envs_split (if neg is true then Right else Left)
                      (if neg then Hs else pm_app Hs_frame Hs) Δ with
     | Some (Δ1,Δ2) => if env_spatial_is_nil Δ1
                       then use_tac_specialize_intuitionistic_helper Δ2 pats
                       else true
     | None => false
     end
  end.

Tactic Notation "iSpecializeCore" open_constr(H)
    "with" open_constr(xs) open_constr(pat) "as" constr(p) :=
  let p := intro_pat_intuitionistic p in
  let pat := spec_pat.parse pat in
  let H :=
    lazymatch type of H with
    | string => constr:(INamed H)
    | _ => H
    end in
  iSpecializeArgs H xs; [..|
    lazymatch type of H with
    | ident =>
       let pat := spec_pat.parse pat in
       let Δ := iGetCtx in

       let b := eval lazy [use_tac_specialize_intuitionistic_helper] in
         (if p then use_tac_specialize_intuitionistic_helper Δ pat else false) in
       lazymatch eval pm_eval in b with
       | true =>

          lazymatch iTypeOf H with
          | Some (?q, _) =>
             let PROP := iBiOfGoal in

             lazymatch eval lazy in (q || tc_to_bool (BiAffine PROP)) with
             | true =>
                notypeclasses refine (tac_specialize_intuitionistic_helper _ H _ _ _ _ _ _ _ _ _ _);
                  [pm_reflexivity

                  |pm_reduce; tc_solve

                  |iSpecializePat H pat;
                    [..
                    |notypeclasses refine (tac_specialize_intuitionistic_helper_done _ H _ _ _);
                     pm_reflexivity]
                  |tc_solve ||
                   let Q := match goal with |- IntoPersistent _ ?Q _ => Q end in
                   fail "iSpecialize:" Q "not persistent"
                  |pm_reduce ]
             | false => iSpecializePat H pat
             end
          | None =>
             let H := pretty_ident H in
             fail "iSpecialize:" H "not found"
          end
       | false => iSpecializePat H pat
       end
    | _ => fail "iSpecialize:" H "should be a hypothesis, use iPoseProof instead"
    end].

Tactic Notation "iSpecializeCore" open_constr(t) "as" constr(p) :=
  lazymatch type of t with
  | string => iSpecializeCore t with hnil "" as p
  | ident => iSpecializeCore t with hnil "" as p
  | _ =>
    lazymatch t with
    | ITrm ?H ?xs ?pat => iSpecializeCore H with xs pat as p
    | _ => fail "iSpecialize:" t "should be a proof mode term"
    end
  end.

Tactic Notation "iPoseProofCore" open_constr(lem)
    "as" constr(p) tactic3(tac) :=
  iStartProof;
  let t := lazymatch lem with ITrm ?t ?xs ?pat => t | _ => lem end in
  let t := lazymatch type of t with string => constr:(INamed t) | _ => t end in
  let spec_tac Htmp :=
    lazymatch lem with
    | ITrm _ ?xs ?pat => iSpecializeCore (ITrm Htmp xs pat) as p
    | _ => idtac
    end in
  lazymatch type of t with
  | ident =>
     let Htmp := iFresh in
     iPoseProofCoreHyp t as Htmp; spec_tac Htmp; [..|tac Htmp]
  | _ => iPoseProofCoreLem t as (fun Htmp => spec_tac Htmp; [..|tac Htmp])
  end.

Tactic Notation "iOrDestruct" constr(H) "as" constr(H1) constr(H2) :=
  eapply tac_or_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iOrDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoOr ?P _ _ => P end in
     fail "iOrDestruct: cannot destruct" P
    | pm_reduce;
      lazymatch goal with
      | |- False =>
        let H1 := pretty_ident H1 in
        let H2 := pretty_ident H2 in
        fail "iOrDestruct:" H1 "or" H2 "not fresh"
      |  _ => split
      end].

Ltac _iAndDestruct H H1 H2 :=
  eapply tac_and_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iAndDestruct:" H "not found"
    |pm_reduce; tc_solve ||
     let P :=
       lazymatch goal with
       | |- IntoSep ?P _ _ => P
       | |- IntoAnd _ ?P _ _ => P
       end in
     fail "iAndDestruct: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
       | |- False =>
         let H1 := pretty_ident H1 in
         let H2 := pretty_ident H2 in
         fail "iAndDestruct:" H1 "or" H2 "not fresh"
       | _ => idtac
     end].

Ltac _iAndDestructChoice H d H' :=
  eapply tac_and_destruct_choice with H _ d H' _ _ _;
    [pm_reflexivity || fail "iAndDestructChoice:" H "not found"
    |pm_reduce; tc_solve ||
     let P := match goal with |- TCOr (IntoAnd _ ?P _ _) _ => P end in
     fail "iAndDestructChoice: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iAndDestructChoice:" H' "not fresh"
     | _ => idtac
     end].

Tactic Notation "_iExistDestruct" constr(H)
    "as" simple_intropattern(x) constr(Hx) :=
  eapply tac_exist_destruct with H _ Hx _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iExistDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoExist ?P _ _ => P end in
     fail "iExistDestruct: cannot destruct" P|];
    let name := lazymatch goal with
                | |- let _ := (λ name, _) in _ => name
                end in
    intros _;
    let y := fresh name in
    intros y; pm_reduce;
    lazymatch goal with
    | |- False =>
      let Hx := pretty_ident Hx in
      fail "iExistDestruct:" Hx "not fresh"
    | _ => revert y; intros x
    end.

Tactic Notation "iModIntro" uconstr(sel) :=
  iStartProof;
  notypeclasses refine (tac_modal_intro _ _ sel _ _ _ _ _ _ _ _ _ _ _ _ _ _);
    [tc_solve ||
     fail "iModIntro: the goal is not a modality"
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalIntuitionisticEnv _ _ _ ?s => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: intuitionistic context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: intuitionistic context is non-empty"
     end
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalSpatialEnv _ _ _ ?s _ => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: spatial context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: spatial context is non-empty"
     end
    |pm_reduce; tc_solve ||
     fail "iModIntro: cannot filter spatial context when goal is not absorbing"
    |iSolveSideCondition
    |pm_prettify
      ].
Tactic Notation "iModIntro" := iModIntro _.

Tactic Notation "iModCore" constr(H) "as" constr(H') :=
  eapply tac_modal_elim with H H' _ _ _ _ _ _;
    [pm_reflexivity || fail "iMod:" H "not found"
    |tc_solve ||
     let P := match goal with |- ElimModal _ _ _ ?P _ _ _ => P end in
     let Q := match goal with |- ElimModal _ _ _ _ _ ?Q _ => Q end in
     fail "iMod: cannot eliminate modality" P "in" Q
    |iSolveSideCondition
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iMod:" H' "not fresh"
     | _ => pm_prettify
     end].

Ltac _ident_for_pat pat :=
  lazymatch pat with
  | IIdent ?x => x
  | _ => let x := iFresh in x
  end.

Ltac _ident_for_pat_default pat default :=
  lazymatch pat with
  | IIdent ?x => x
  | _ =>
    lazymatch default with
    | IAnon _ => default
    | _ => let x := iFresh in x
    end
  end.

Ltac _iDestructHypGo Hz pat0 pat :=
  lazymatch pat with
  | IFresh =>
     lazymatch Hz with
     | IAnon _ => idtac
     | INamed ?Hz => let Hz' := iFresh in iRename Hz into Hz'
     end
  | IDrop => _iClearHyp Hz
  | IFrame => iFrame Hz
  | IIdent Hz => idtac
  | IIdent ?y => iRename Hz into y
  | IList [[]] => iExFalso; iExact Hz

  | IList [[?pat1; IDrop]] =>
     let x := _ident_for_pat_default pat1 Hz in
     _iAndDestructChoice Hz Left x;
     _iDestructHypGo x pat0 pat1
  | IList [[IDrop; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iAndDestructChoice Hz Right x;
     _iDestructHypGo x pat0 pat2

  | IList [[IPure IGallinaAnon; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as ? x; _iDestructHypGo x pat0 pat2
  | IList [[IPure (IGallinaNamed ?s); ?pat2]] =>
     let x := fresh in
     let y := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as x y;
     rename_by_string x s;
     _iDestructHypGo y pat0 pat2
  | IList [[?pat1; ?pat2]] =>

     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat pat2 in
     _iAndDestruct Hz x1 x2;
     _iDestructHypGo x1 pat0 pat1; _iDestructHypGo x2 pat0 pat2
  | IList [_ :: _ :: _] => fail "iDestruct:" pat0 "has too many conjuncts"
  | IList [[_]] => fail "iDestruct:" pat0 "has just a single conjunct"

  | IList [[?pat1];[?pat2]] =>
     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat_default pat2 Hz in
     iOrDestruct Hz as x1 x2;
     [_iDestructHypGo x1 pat0 pat1|_iDestructHypGo x2 pat0 pat2]

  | IList (_ :: _ :: _ :: _) => fail "iDestruct:" pat0 "has too many disjuncts"

  | IList [_;_] => fail "iDestruct: in" pat0 "a disjunct has multiple patterns"

  | IPure IGallinaAnon => iPure Hz as ?
  | IPure (IGallinaNamed ?s) =>
     let x := fresh in
     iPure Hz as x;
     rename_by_string x s
  | IRewrite Right => iPure Hz as ->
  | IRewrite Left => iPure Hz as <-
  | IIntuitionistic ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iIntuitionistic Hz x; _iDestructHypGo x pat0 pat
  | ISpatial ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iSpatial Hz x; _iDestructHypGo x pat0 pat
  | IModalElim ?pat =>
    let x := _ident_for_pat_default pat Hz in
    iModCore Hz as x; _iDestructHypGo x pat0 pat
  | _ => fail "iDestruct:" pat0 "is not supported due to" pat
  end.
Ltac _iDestructHypFindPat Hgo pat found pats :=
  lazymatch pats with
  | [] =>
    lazymatch found with
    | true => pm_prettify
    | false => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
    end
  | ISimpl :: ?pats => simpl; _iDestructHypFindPat Hgo pat found pats
  | IClear ?H :: ?pats => iClear H; _iDestructHypFindPat Hgo pat found pats
  | IClearFrame ?H :: ?pats => iFrame H; _iDestructHypFindPat Hgo pat found pats
  | ?pat1 :: ?pats =>
     lazymatch found with
     | false => _iDestructHypGo Hgo pat pat1; _iDestructHypFindPat Hgo pat true pats
     | true => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
     end
  end.

Ltac _iDestructHyp0 H pat :=
  let pats := intro_pat.parse pat in
  _iDestructHypFindPat H pat false pats.
Ltac _iDestructHyp H xs pat :=
  ltac1_list_iter ltac:(fun x => _iExistDestruct H as x H) xs;
  _iDestructHyp0 H pat.

Tactic Notation "iDestructHyp" constr(H) "as" constr(pat) :=
  _iDestructHyp0 H pat.

Ltac _iIntros_go pats startproof :=
  lazymatch pats with
  | [] =>
    lazymatch startproof with
    | true => iStartProof
    | false => idtac
    end

  | IPure (IGallinaNamed ?s) :: ?pats =>
     let i := fresh in
     _iIntro (i);
     rename_by_string i s;
     _iIntros_go pats startproof
  | IPure IGallinaAnon :: ?pats => _iIntro (?); _iIntros_go pats startproof
  | IIntuitionistic (IIdent ?H) :: ?pats => _iIntroPersistent H; _iIntros_go pats false
  | IDrop :: ?pats => _iIntroDrop; _iIntros_go pats startproof
  | IIdent ?H :: ?pats => _iIntroSpatial H; _iIntros_go pats startproof

  | IPureIntro :: ?pats => iPureIntro; _iIntros_go pats false
  | IModalIntro :: ?pats => iModIntro; _iIntros_go pats false
  | IForall :: ?pats => repeat _iIntroForall; _iIntros_go pats startproof
  | IAll :: ?pats => repeat (_iIntroForall || _iIntro); _iIntros_go pats startproof

  | ISimpl :: ?pats => simpl; _iIntros_go pats startproof
  | IClear ?H :: ?pats => iClear H; _iIntros_go pats false
  | IClearFrame ?H :: ?pats => iFrame H; _iIntros_go pats false
  | IDone :: ?pats => try done; _iIntros_go pats startproof

  | IIntuitionistic ?pat :: ?pats =>
     let H := iFresh in _iIntroPersistent H; iDestructHyp H as pat; _iIntros_go pats false
  | ?pat :: ?pats =>
     let H := iFresh in _iIntroSpatial H; iDestructHyp H as pat; _iIntros_go pats false
  end.

Ltac _iIntros0 pat :=
  let pats := intro_pat.parse pat in

  lazymatch pats with
  | [] => idtac
  | _ => _iIntros_go pats true
  end.
Ltac _iIntros xs pat :=
  ltac1_list_iter ltac:(fun x => _iIntro (x)) xs;
  _iIntros0 pat.
Tactic Notation "iIntros" "(" ne_simple_intropattern_list(xs) ")" :=
  _iIntros xs "".

Tactic Notation "iDestructCore" open_constr(lem) "as" constr(p) tactic3(tac) :=
  let intro_destruct n :=
    let rec go n' :=
      lazymatch n' with
      | 0 => fail "iDestruct: cannot introduce" n "hypotheses"
      | 1 => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; tac H
      | S ?n' => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; go n'
      end in
    intros; go n in
  lazymatch type of lem with
  | nat => intro_destruct lem
  | Z =>

     let n := eval cbv in (Z.to_nat lem) in intro_destruct n
  | ident => tac lem
  | string => tac constr:(INamed lem)
  | _ => iPoseProofCore lem as p tac
  end.
Tactic Notation "iMod" open_constr(lem) "as" "(" ne_simple_intropattern_list(xs) ")"
    constr(pat) :=
  iDestructCore lem as false (fun H => iModCore H as H; last _iDestructHyp H xs pat).

Section class_instances.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance as_emp_valid_emp_valid d P : AsEmpValid0 d (⊢ P) P | 0.
Admitted.

Global Instance into_sep_sep P Q : IntoSep (P ∗ Q) P Q.
Admitted.

Global Instance into_exist_exist {A} (Φ : A → PROP) name :
  AsIdentName Φ name → IntoExist (bi_exist Φ) Φ name.
Admitted.
End class_instances.
Global Instance elim_modal_bupd_fupd
    `{!BiBUpd PROP, !BiFUpd PROP, !BiBUpdFUpd PROP} p E1 E2 P Q :
  ElimModal True p false (|==> P) P (|={E1,E2}=> Q) (|={E1,E2}=> Q) | 10.
Admitted.

Section class_instances_frame.
Context {PROP : bi}.
Implicit Types P Q R : PROP.
Global Instance frame_here p R : Frame p R R emp | 1.
Admitted.
Global Instance frame_sep_l R P1 P2 Q Q' :
  Frame false R P1 Q → MakeSep Q P2 Q' → Frame false R (P1 ∗ P2) Q' | 9.
Admitted.

Inductive GatherEvarsEq {A} (x : A) : A → Prop :=
  GatherEvarsEq_refl : GatherEvarsEq x x.

#[projections(primitive)] Class FrameExistRequirements
    (p : bool) (R : PROP) {A} (Φ : A → PROP) (a' : A) (G' : PROP) := {
  frame_exist_witness : A;
  frame_exist_resource : PROP;
  frame_exist_proof : Frame p R (Φ frame_exist_witness) frame_exist_resource;
  frame_exist_witness_eq : GatherEvarsEq frame_exist_witness a';
  frame_exist_resource_eq : TCEq frame_exist_resource G'
}.
Global Existing Instance Build_FrameExistRequirements.

Inductive TCCbnTele {A} (x : A) : A → Prop :=
  TCCbnTele_refl : TCCbnTele x x.

Global Instance frame_exist {A} p R (Φ : A → PROP)
    (TT : tele) (g : TT → A) (Ψ : TT → PROP) Q :
  FrameInstantiateExistEnabled →
  (∀ c, FrameExistRequirements p R Φ (g c) (Ψ c)) →
  TCCbnTele (∃.. c, Ψ c)%I Q →
  Frame p R (∃ a, Φ a) Q.
Admitted.
Global Instance frame_fupd `{!BiFUpd PROP} p E1 E2 R P Q :
  Frame p R P Q → Frame p R (|={E1,E2}=> P) (|={E1,E2}=> Q) | 2.
Admitted.
End class_instances_frame.

Ltac solve_gather_evars_eq :=
  lazymatch goal with
  | |- GatherEvarsEq ?a (?g ?c) =>
    let rec retcon_tele T arg :=

      match a with
      | context [?term] =>
        is_evar term;
        let X := type of term in
        lazymatch X with
        | tele => fail
        | _ => idtac
        end;
        let T' := open_constr:(_) in
        unify T (TeleS (λ _ : X, T'));

        unify term (tele_arg_head (λ _ : X, T') arg);

        retcon_tele T' (tele_arg_tail (λ _ : X, T') arg)

      | _ =>

        unify T TeleO
      end
    in
    let T' := lazymatch (type of c) with tele_arg ?T => T end in
    retcon_tele T' c;
    exact (GatherEvarsEq_refl _)
  end.

Global Hint Extern 0 (GatherEvarsEq _ _) =>
  solve_gather_evars_eq : typeclass_instances.

Global Hint Extern 0 (TCCbnTele _ _) =>
  cbn [bi_texist tele_fold tele_bind tele_arg_head tele_arg_tail];
  exact (TCCbnTele_refl _) : typeclass_instances.

Section class_instances_make.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance make_sep_emp_l P : KnownLMakeSep emp P P.
Admitted.
End class_instances_make.

Record agree (A : Type) : Type := {
  agree_car : list A;
  agree_not_nil : bool_decide (agree_car = []) = false
}.
Global Arguments agree_car {_} _.

Section agree.
Context {SI : sidx} {A : ofe}.
Local Instance agree_dist : Dist (agree A).
Admitted.
Local Instance agree_equiv : Equiv (agree A).
Admitted.

Definition agree_ofe_mixin : OfeMixin (agree A).
Admitted.
Canonical Structure agreeO := Ofe (agree A) agree_ofe_mixin.
Local Instance agree_validN_instance : ValidN (agree A).
Admitted.
Local Instance agree_valid_instance : Valid (agree A).
Admitted.

Local Program Instance agree_op_instance : Op (agree A) := λ x y,
  {| agree_car := agree_car x ++ agree_car y |}.
Admit Obligations.
Local Instance agree_pcore_instance : PCore (agree A).
Admitted.

Definition agree_cmra_mixin : CmraMixin (agree A).
Admitted.
Canonical Structure agreeR : cmra.
exact (Cmra (agree A) agree_cmra_mixin).
Defined.

End agree.
Global Arguments agreeR {_} _.

Record uPred (M : ucmra) : Type := UPred {
  uPred_holds : nat → M → Prop;

  uPred_mono n1 n2 x1 x2 :
    uPred_holds n1 x1 → x1 ≼{n2} x2 → n2 ≤ n1 → uPred_holds n2 x2
}.

Local Coercion uPred_holds : uPred >-> Funclass.

Section cofe.
  Context {M : ucmra}.
Local Instance uPred_equiv : Equiv (uPred M).
Admitted.
Local Instance uPred_dist : Dist (uPred M).
Admitted.
  Definition uPred_ofe_mixin : OfeMixin (uPred M).
Admitted.
Canonical Structure uPredO : ofe.
exact (Ofe (uPred M) uPred_ofe_mixin).
Defined.

  Program Definition uPred_compl : Compl uPredO := λ c,
    {| uPred_holds n x := ∀ n', n' ≤ n → ✓{n'} x → c n' n' x |}.
Admit Obligations.
  Global Program Instance uPred_cofe : Cofe uPredO := cofe_finite uPred_compl _.
Admit Obligations.
End cofe.
Global Arguments uPredO : clear implicits.

Inductive uPred_entails {M} (P Q : uPred M) : Prop :=
  { uPred_in_entails : ∀ n x, ✓{n} x → P n x → Q n x }.
Global Hint Resolve uPred_mono : uPred_def.

Local Program Definition uPred_pure_def {M} (φ : Prop) : uPred M :=
  {| uPred_holds n x := φ |}.
Solve Obligations with done.
Local Definition uPred_pure_aux : seal (@uPred_pure_def).
Admitted.
Definition uPred_pure := uPred_pure_aux.(unseal).
Global Arguments uPred_pure {M}.

Local Program Definition uPred_and_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∧ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_and_aux : seal (@uPred_and_def).
Admitted.
Definition uPred_and := uPred_and_aux.(unseal).
Global Arguments uPred_and {M}.

Local Program Definition uPred_or_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∨ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_or_aux : seal (@uPred_or_def).
Admitted.
Definition uPred_or := uPred_or_aux.(unseal).
Global Arguments uPred_or {M}.

Local Program Definition uPred_impl_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       x ≼ x' → n' ≤ n → ✓{n'} x' → P n' x' → Q n' x' |}.
Admit Obligations.
Local Definition uPred_impl_aux : seal (@uPred_impl_def).
Admitted.
Definition uPred_impl := uPred_impl_aux.(unseal).
Global Arguments uPred_impl {M}.

Local Program Definition uPred_forall_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∀ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_forall_aux : seal (@uPred_forall_def).
Admitted.
Definition uPred_forall := uPred_forall_aux.(unseal).

Local Program Definition uPred_exist_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∃ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_exist_aux : seal (@uPred_exist_def).
Admitted.
Definition uPred_exist := uPred_exist_aux.(unseal).

Local Program Definition uPred_sep_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∃ x1 x2, x ≡{n}≡ x1 ⋅ x2 ∧ P n x1 ∧ Q n x2 |}.
Admit Obligations.
Local Definition uPred_sep_aux : seal (@uPred_sep_def).
Admitted.
Definition uPred_sep := uPred_sep_aux.(unseal).
Global Arguments uPred_sep {M}.

Local Program Definition uPred_wand_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       n' ≤ n → ✓{n'} (x ⋅ x') → P n' x' → Q n' (x ⋅ x') |}.
Admit Obligations.
Local Definition uPred_wand_aux : seal (@uPred_wand_def).
Admitted.
Definition uPred_wand := uPred_wand_aux.(unseal).
Global Arguments uPred_wand {M}.

Local Program Definition uPred_plainly_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n ε |}.
Solve Obligations with naive_solver eauto using uPred_mono, ucmra_unit_validN.

Local Program Definition uPred_persistently_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n (core x) |}.
Solve Obligations with naive_solver eauto using uPred_mono, cmra_core_monoN.
Local Definition uPred_persistently_aux : seal (@uPred_persistently_def).
Admitted.
Definition uPred_persistently := uPred_persistently_aux.(unseal).
Global Arguments uPred_persistently {M}.

Local Program Definition uPred_later_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := match n return _ with 0 => True | S n' => P n' x end |}.
Admit Obligations.
Local Definition uPred_later_aux : seal (@uPred_later_def).
Admitted.
Definition uPred_later := uPred_later_aux.(unseal).
Global Arguments uPred_later {M}.
Definition uPred_emp {M} : uPred M.
Admitted.

Lemma uPred_bi_mixin (M : ucmra) :
  BiMixin
    uPred_entails uPred_emp uPred_pure uPred_and uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_wand.
Admitted.

Lemma uPred_bi_persistently_mixin (M : ucmra) :
  BiPersistentlyMixin
    uPred_entails uPred_emp uPred_and
    (@uPred_exist M) uPred_sep uPred_persistently.
Admitted.

Lemma uPred_bi_later_mixin (M : ucmra) :
  BiLaterMixin
    uPred_entails uPred_pure uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_persistently uPred_later.
Admitted.
Canonical Structure uPredI (M : ucmra) : bi.
exact ({| bi_ofe_mixin := ofe_mixin_of (uPred M);
     bi_bi_mixin := uPred_bi_mixin M;
     bi_bi_later_mixin := uPred_bi_later_mixin M;
     bi_bi_persistently_mixin := uPred_bi_persistently_mixin M |}).
Defined.
Global Instance uPred_bi_bupd M : BiBUpd (uPredI M).
Admitted.

Notation frac := Qp (only parsing).
  Canonical Structure fracO := leibnizO frac.
Local Instance frac_valid_instance : Valid frac.
Admitted.
Local Instance frac_pcore_instance : PCore frac.
Admitted.
Local Instance frac_op_instance : Op frac.
Admitted.

  Definition frac_ra_mixin : RAMixin frac.
Admitted.
  Canonical Structure fracR := discreteR frac frac_ra_mixin.
Definition gmap_viewR {SI : sidx} (K : Type) `{Countable K} (V : cmra) : cmra.
Admitted.
Definition authR {SI : sidx} (A : ucmra) : cmra.
Admitted.

Structure gFunctor := GFunctor {
  gFunctor_F :> rFunctor;
  gFunctor_map_contractive : rFunctorContractive gFunctor_F;
}.

Record gFunctors := GFunctors {
  gFunctors_len : nat;
  gFunctors_lookup : fin gFunctors_len → gFunctor
}.

Definition gid (Σ : gFunctors) := fin (gFunctors_len Σ).

Definition gname := positive.
Definition iResUR (Σ : gFunctors) : ucmra.
Admitted.
  Notation iProp Σ := (uPred (iResUR Σ)).
  Notation iPropO Σ := (uPredO (iResUR Σ)).

Class inG (Σ : gFunctors) (A : cmra) := InG {
  inG_id : gid Σ;
  inG_apply := rFunctor_apply (gFunctors_lookup Σ inG_id);
  inG_prf : A = inG_apply (iPropO Σ) _;
}.
Local Definition own_def `{!inG Σ A} (γ : gname) (a : A) : iProp Σ.
Admitted.
Local Definition own_aux : seal (@own_def).
Admitted.
Definition own := own_aux.(unseal).
Global Arguments own {Σ A _} γ a.
Local Instance nat_valid_instance : Valid nat.
Admitted.
Local Instance nat_pcore_instance : PCore nat.
Admitted.
Local Instance nat_op_instance : Op nat.
Admitted.
  Lemma nat_ra_mixin : RAMixin nat.
Admitted.
Canonical Structure natR : cmra.
exact (discreteR nat nat_ra_mixin).
Defined.
Local Instance nat_unit_instance : Unit nat.
Admitted.
  Lemma nat_ucmra_mixin : UcmraMixin nat.
Admitted.
Canonical Structure natUR : ucmra.
exact (Ucmra nat nat_ucmra_mixin).
Defined.

Class lcGS (Σ : gFunctors) := LcGS {
  #[local] lcGS_inG :: inG Σ (authR natUR);
  lcGS_name : gname;
}.

Inductive coPset_disj :=
  | CoPset : coPset → coPset_disj
  | CoPsetInvalid : coPset_disj.
  Canonical Structure coPset_disjO := leibnizO coPset_disj.
Local Instance coPset_disj_valid_instance : Valid coPset_disj.
Admitted.
Local Instance coPset_disj_op_instance : Op coPset_disj.
Admitted.
Local Instance coPset_disj_pcore_instance : PCore coPset_disj.
Admitted.

  Lemma coPset_disj_ra_mixin : RAMixin coPset_disj.
Admitted.
  Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin.
  Class wsatGpreS (Σ : gFunctors) : Set := WsatGpreS {
    wsatGpreS_inv : inG Σ (gmap_viewR positive (agreeR $ laterO (iPropO Σ)));
    wsatGpreS_enabled : inG Σ coPset_disjR;
    wsatGpreS_disabled : inG Σ (gset_disjR positive);
  }.

  Class wsatGS (Σ : gFunctors) : Set := WsatG {
    wsat_inG : wsatGpreS Σ;
    invariant_name : gname;
    enabled_name : gname;
    disabled_name : gname;
  }.

Inductive has_lc := HasLc | HasNoLc.

Class invGS_gen (hlc : has_lc) (Σ : gFunctors) : Set := InvG {
  #[global] invGS_wsat :: wsatGS Σ;
  #[global] invGS_lc :: lcGS Σ;
}.
Global Instance uPred_bi_fupd `{!invGS_gen hlc Σ} : BiFUpd (uPredI (iResUR Σ)).
Admitted.

Global Instance uPred_bi_bupd_fupd `{!invGS_gen hlc Σ} : BiBUpdFUpd (uPredI (iResUR Σ)).
Admitted.

Class cinvG Σ := {
  #[local] cinv_inG :: inG Σ (prodR (optionR (exclR unitO)) (optionR fracR)) ;
}.

Section defs.
  Context `{!invGS_gen hlc Σ, !cinvG Σ}.
Definition cinv_own (γ : gname) (p : frac) : iProp Σ.
Admitted.
  Definition cinv_excl γ : iProp Σ := own γ (Some (Excl ()), None).
Definition cinv (N : namespace) (γ : gname) (P : iProp Σ) : iProp Σ.
Admitted.

  Lemma cinv_own_excl_alloc P :
    pred_infinite P → ⊢ |==> ∃ γ, ⌜P γ⌝ ∗ cinv_excl γ ∗ cinv_own γ 1.
Admitted.

  Lemma cinv_alloc_strong (I : gname → Prop) E N :
    pred_infinite I →
    ⊢ |={E}=> ∃ γ, ⌜ I γ ⌝ ∗ cinv_own γ 1 ∗ ∀ P, ▷ P ={E}=∗ cinv N γ P.
  Proof.
    iIntros (?).
iMod cinv_own_excl_alloc as (γ) "[$ [Hexcl $]]"; first done.
🛠️ Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted) (truncated to 6.0KiB; full 149KiB file on GitHub Actions Artifacts under tmp.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines, then from 3034 lines to 2591 lines, then from 2604 lines to 2735 lines, then from 2741 lines to 2612 lines, then from 2625 lines to 3086 lines, then from 3092 lines to 2663 lines, then from 2676 lines to 2732 lines, then from 2738 lines to 2681 lines, then from 2694 lines to 2724 lines, then from 2730 lines to 2694 lines, then from 2707 lines to 2743 lines, then from 2749 lines to 2706 lines, then from 2719 lines to 2750 lines, then from 2756 lines to 2717 lines, then from 2730 lines to 3394 lines, then from 3401 lines to 2731 lines, then from 2745 lines to 2868 lines, then from 2874 lines to 2746 lines, then from 2760 lines to 2816 lines, then from 2823 lines to 2751 lines, then from 2765 lines to 3567 lines, then from 3574 lines to 2766 lines, then from 2780 lines to 3375 lines, then from 3382 lines to 2771 lines, then from 2785 lines to 3275 lines, then from 3282 lines to 3100 lines, then from 3107 lines to 2756 lines, then from 2769 lines to 3160 lines, then from 3167 lines to 2770 lines, then from 2784 lines to 3082 lines, then from 3089 lines to 2783 lines, then from 2797 lines to 3468 lines, then from 3475 lines to 2785 lines, then from 2799 lines to 3753 lines, then from 3760 lines to 2851 lines, then from 2865 lines to 3684 lines, then from 3691 lines to 2871 lines, then from 2885 lines to 3846 lines, then from 3853 lines to 2873 lines, then from 2887 lines to 3477 lines, then from 3484 lines to 2876 lines, then from 2890 lines to 3327 lines, then from 3334 lines to 2925 lines, then from 2944 lines to 2856 lines, then from 2871 lines to 2858 lines, then from 2872 lines to 2856 lines, then from 2869 lines to 6474 lines, then from 6481 lines to 2873 lines, then from 2882 lines to 2863 lines, then from 2876 lines to 3627 lines, then from 3634 lines to 2872 lines, then from 2886 lines to 4897 lines, then from 4904 lines to 2904 lines, then from 2918 lines to 3219 lines, then from 3226 lines to 2919 lines, th
🛠️ 📜 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 6.4MiB file on GitHub Actions Artifacts under build.log)
 than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
File "./iris/program_logic/total_weakestpre.v", line 106, characters 68-80:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/lifting.vo (real: 2.80, user: 2.64, sys: 0.15, mem: 597780 ko)
COQNATIVE iris/program_logic/lifting.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
iris/program_logic/lifting.vo.native (real: 0.48, user: 0.36, sys: 0.11, mem: 157264 ko)
COQTEST [ref ignored] tests/algebra.v (ref: tests/algebra.ref)
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]
tests/algebra.vo (real: 1.24, user: 1.11, sys: 0.12, mem: 590252 ko)
ROCQ compile iris/base_logic/lib/cancelable_invariants.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q iris iris -Q iris_heap_lang iris.heap_lang -Q iris_unstable iris.unstable -Q iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.v 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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/iris
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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.VDDMOPNLJi
MINIMIZER_DEBUG: files:  iris/base_logic/lib/cancelable_invariants.v /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/program_logic/total_weakestpre.v", line 274, characters 78-90:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
File "./iris/base_logic/lib/cancelable_invariants.v", line 90, characters 17-65:
Error: Tactic failure: iFrame: cannot frame ⌜?Goal γ⌝%I.

Command exited with non-zero status 1
iris/base_logic/lib/cancelable_invariants.vo (real: 1.43, user: 1.29, sys: 0.13, mem: 583800 ko)
make[2]: *** [Makefile.coq:813: iris/base_logic/lib/cancelable_invariants.vo] Error 1
make[2]: *** [iris/base_logic/lib/cancelable_invariants.vo] Deleting file 'iris/base_logic/lib/cancelable_invariants.glob'
make[2]: *** Waiting for unfinished jobs....
iris/program_logic/total_weakestpre.vo (real: 6.06, user: 5.91, sys: 0.15, mem: 636048 ko)
COQNATIVE iris/program_logic/total_weakestpre.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
iris/program_logic/total_weakestpre.vo.native (real: 0.58, user: 0.46, sys: 0.11, mem: 150840 ko)
make[1]: *** [Makefile.coq:411: all] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/iris'
make: *** [Makefile:3: all] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' iris 2
+ '[' iris '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real iris.log
    Time |  Peak Mem | File Name                                    
--------------------------------------------------------------------
0m19.82s | 636048 ko | Total Time / Peak Mem                        
--------------------------------------------------------------------
0m06.06s | 636048 ko | iris/program_logic/total_weakestpre.vo       
0m04.04s | 607240 ko | iris/program_logic/adequacy.vo               
0m02.80s | 597780 ko | iris/program_logic/lifting.vo                
0m02.09s | 598116 ko | iris/program_logic/atomic.vo                 
0m01.43s | 583800 ko | iris/base_logic/lib/cancelable_invariants.vo 
0m01.24s | 590252 ko | tests/algebra.vo                             
0m00.58s | 150840 ko | iris/program_logic/total_weakestpre.vo.native
0m00.56s | 157800 ko | iris/program_logic/atomic.vo.native          
0m00.54s | 165584 ko | iris/program_logic/adequacy.vo.native        
0m00.48s | 157264 ko | iris/program_logic/lifting.vo.native         
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 66MiB file on GitHub Actions Artifacts under bug.log)
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 199, characters 0-35:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope char_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 274, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 360, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 361, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 382, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 395, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 396, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 412, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 471, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 473, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 583, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 596, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 625, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 710, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 832, characters 0-30:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope bi_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 1075, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 1078, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 1413, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 1497, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 1610, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 2240, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 3674, characters 0-43:
Warning: Implicitly declaring hint databases is deprecated. Please explicitly
create "uPred_def"
[implicit-create-hint-db,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 3788, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 3820, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 3821, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmph587ufg0/Top/bug_01.v", line 3917, characters 0-8:
Error:  (in proof cinv_alloc_strong): Attempt to save an incomplete proof
(the proof term is not complete because of given up (admitted) goals).
If this is really what you want to do, use Admitted in place of Qed.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions with admit. Defined with Proof using

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpk735h72k/Top/bug_01.v", line 12, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpk735h72k/Top/bug_01.v", line 76, characters 0-8:
Error:
 (in proof submseteq_dec_obligation_1): Attempt to save an incomplete proof
(the proof term is not complete because of given up (admitted) goals).
If this is really what you want to do, use Admitted in place of Qed.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to add Proof using lines
�[92m
Adding Proof using lines successful.�[0m
Failed to do everything at once; trying one at a time.
Adding Proof using lines 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 lift Requires to the top of the file while inserting option settings

I will now attempt to lift Requires to the top of the file while inserting option settings

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.]
�[92m
Aborted removal successful.�[0m

I will now attempt to remove unused Ltacs

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.

cc @JasonGross

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 12, 2025

Minimization interrupted by timeout, being automatically continued. Partially Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v in 5h 15m 8s (from ci-iris) (interrupted by timeout, being automatically continued) (full log on GitHub Actions - verbose log)
⭐ ⏱️ Partially Minimized Coq File (timeout) (truncated to first and last 32KiB; full 148KiB file on GitHub Actions Artifacts under bug.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines, then from 3034 lines to 2591 lines, then from 2604 lines to 2735 lines, then from 2741 lines to 2612 lines, then from 2625 lines to 3086 lines, then from 3092 lines to 2663 lines, then from 2676 lines to 2732 lines, then from 2738 lines to 2681 lines, then from 2694 lines to 2724 lines, then from 2730 lines to 2694 lines, then from 2707 lines to 2743 lines, then from 2749 lines to 2706 lines, then from 2719 lines to 2750 lines, then from 2756 lines to 2717 lines, then from 2730 lines to 3394 lines, then from 3401 lines to 2731 lines, then from 2745 lines to 2868 lines, then from 2874 lines to 2746 lines, then from 2760 lines to 2816 lines, then from 2823 lines to 2751 lines, then from 2765 lines to 3567 lines, then from 3574 lines to 2766 lines, then from 2780 lines to 3375 lines, then from 3382 lines to 2771 lines, then from 2785 lines to 3275 lines, then from 3282 lines to 3100 lines, then from 3107 lines to 2756 lines, then from 2769 lines to 3160 lines, then from 3167 lines to 2770 lines, then from 2784 lines to 3082 lines, then from 3089 lines to 2783 lines, then from 2797 lines to 3468 lines, then from 3475 lines to 2785 lines, then from 2799 lines to 3753 lines, then from 3760 lines to 2851 lines, then from 2865 lines to 3684 lines, then from 3691 lines to 2871 lines, then from 2885 lines to 3846 lines, then from 3853 lines to 2873 lines, then from 2887 lines to 3477 lines, then from 3484 lines to 2876 lines, then from 2890 lines to 3327 lines, then from 3334 lines to 2925 lines, then from 2944 lines to 2856 lines, then from 2871 lines to 2858 lines, then from 2872 lines to 2856 lines, then from 2869 lines to 6474 lines, then from 6481 lines to 2873 lines, then from 2882 lines to 2863 lines, then from 2876 lines to 3627 lines, then from 3634 lines to 2872 lines, then from 2886 lines to 4897 lines, then from 4904 lines to 2904 lines, then from 2918 lines to 3219 lines, then from 3226 lines to 2919 lines, then from 2933 lines to 3323 lines, then from 3330 lines to 2973 lines, then from 2987 lines to 3755 lines, then from 3762 lines to 3170 lines, then from 3184 lines to 3391 lines, then from 3397 lines to 3217 lines, then from 3231 lines to 3614 lines, then from 3621 lines to 3243 lines, then from 3257 lines to 4364 lines, then from 4371 lines to 3246 lines, then from 3260 lines to 3765 lines, then from 3772 lines to 3258 lines, then from 3277 lines to 3167 lines, then from 3180 lines to 3709 lines, then from 3716 lines to 3194 lines, then from 3208 lines to 3727 lines, then from 3734 lines to 3199 lines, then from 3213 lines to 5472 lines, then from 5479 lines to 3470 lines, then from 3484 lines to 4779 lines, then from 4786 lines to 3496 lines, then from 3510 lines to 3815 lines, then from 3822 lines to 3506 lines, then from 3520 lines to 6150 lines, then from 6157 lines to 3700 lines, then from 3687 lines to 3583 lines, then from 3596 lines to 4232 lines, then from 4239 lines to 3636 lines, then from 3650 lines to 3902 lines, then from 3909 lines to 3635 lines, then from 3649 lines to 4815 lines, then from 4822 lines to 3636 lines, then from 3650 lines to 3906 lines, then from 3913 lines to 3645 lines, then from 3659 lines to 3673 lines, then from 3680 lines to 3653 lines, then from 3667 lines to 3921 lines, then from 3928 lines to 3661 lines, then from 3675 lines to 4684 lines, then from 4691 lines to 3700 lines, then from 3714 lines to 4365 lines, then from 4372 lines to 3702 lines, then from 3716 lines to 4097 lines, then from 4104 lines to 3717 lines, then from 3731 lines to 4459 lines, then from 4466 lines to 3895 lines, then from 3900 lines to 3665 lines, then from 3678 lines to 4074 lines, then from 4081 lines to 3664 lines, then from 3678 lines to 4045 lines, then from 4052 lines to 3665 lines, then from 3679 lines to 4116 lines, then from 4123 lines to 3710 lines, then from 3724 lines to 4412 lines, then from 4418 lines to 3736 lines, then from 3750 lines to 4512 lines, then from 4519 lines to 3738 lines, then from 3752 lines to 4132 lines, then from 4139 lines to 3761 lines, then from 3775 lines to 5073 lines, then from 5080 lines to 3768 lines, then from 3782 lines to 3796 lines, then from 3803 lines to 3781 lines, then from 3795 lines to 5455 lines, then from 5457 lines to 3802 lines, then from 3816 lines to 4085 lines, then from 4092 lines to 3807 lines, then from 3821 lines to 4515 lines, then from 4522 lines to 4275 lines, then from 4270 lines to 3749 lines, then from 3762 lines to 4353 lines, then from 4360 lines to 3750 lines, then from 3764 lines to 4377 lines, then from 4384 lines to 3766 lines, then from 3780 lines to 4068 lines, then from 4075 lines to 3769 lines, then from 3783 lines to 4010 lines, then from 4017 lines to 3778 lines, then from 3792 lines to 4463 lines, then from 4469 lines to 3780 lines, then from 3794 lines to 4319 lines, then from 4326 lines to 3782 lines, then from 3796 lines to 5281 lines, then from 5288 lines to 3833 lines, then from 3847 lines to 6045 lines, then from 6051 lines to 3920 lines, then from 3929 lines to 3838 lines, then from 3851 lines to 5509 lines, then from 5516 lines to 3858 lines, then from 3872 lines to 5710 lines, then from 5716 lines to 3883 lines, then from 3897 lines to 4576 lines, then from 4583 lines to 3901 lines, then from 3915 lines to 4076 lines, then from 4083 lines to 3914 lines, then from 3928 lines to 4206 lines, then from 4213 lines to 3931 lines, then from 3945 lines to 5585 lines, then from 5585 lines to 4004 lines, then from 4018 lines to 4692 lines, then from 4699 lines to 4173 lines *)
(* coqc version 9.2+alpha compiled with OCaml 4.14.2
   coqtop version 9.2+alpha
   Modules that could not be inlined: Ltac2.Pattern, Ltac2.Ltac1, Ltac2.Array, Stdlib.Vectors.Fin
   Expected coqc runtime on this file: 1.408 sec *)










Require stdpp.tactics.
Require Stdlib.micromega.Lia.
Require Stdlib.micromega.ZMicromega.
Require Stdlib.ZArith.Zdiv.
Require Stdlib.ZArith.Zcomplements.
Require Stdlib.omega.PreOmega.
Require Stdlib.micromega.Zify.
Require Stdlib.micromega.ZifyInst.
Require Stdlib.Arith.Arith.
Require Stdlib.micromega.ZCoeff.
Require Stdlib.micromega.RingMicromega.
Require Stdlib.ZArith.Zabs.
Require Stdlib.ZArith.Zbool.
Require Stdlib.setoid_ring.ZArithRing.
Require Stdlib.setoid_ring.ArithRing.
Require Stdlib.ZArith.Wf_Z.
Require Stdlib.micromega.OrderedRing.
Require Stdlib.ZArith.ZArith_dec.
Require Stdlib.setoid_ring.Ring.
Require Stdlib.setoid_ring.Ring_base.
Require Stdlib.ZArith.Zmisc.
Require Stdlib.setoid_ring.Ring_tac.
Require Stdlib.ZArith.Zorder.
Require Stdlib.ZArith.Znat.
Require Stdlib.setoid_ring.InitialRing.
Require Stdlib.setoid_ring.Ring_polynom.
Require Stdlib.micromega.EnvRing.
Require Stdlib.micromega.VarMap.
Require Stdlib.micromega.Env.
Require Stdlib.ZArith.Zpow_def.
Require Stdlib.ZArith.Zeven.
Require Stdlib.ZArith.Zcompare.
Require Stdlib.ZArith.BinInt.
Require Stdlib.micromega.DeclConstantZ.
Require stdpp.decidable.
Require stdpp.proof_irrel.
Require stdpp.base.
Require Stdlib.ZArith.BinIntDef.
Require Stdlib.NArith.Nnat.
Require Stdlib.setoid_ring.Ring_theory.
Require Stdlib.setoid_ring.BinList.
Require Stdlib.NArith.BinNat.
Require Stdlib.NArith.BinNatDef.
Require Stdlib.Vectors.Fin.
Require Stdlib.PArith.Pnat.
Require Stdlib.Arith.Arith_base.
Require Stdlib.PArith.BinPos.
Require Stdlib.Sorting.Permutation.
Require Stdlib.Lists.ListTactics.
Require Stdlib.micromega.Tauto.
Require Stdlib.Lists.Finite.
Require Stdlib.micromega.Refl.
Require Stdlib.Lists.ListDec.
Require Stdlib.Lists.List.
Require Stdlib.Arith.Peano_dec.
Require Stdlib.Arith.Wf_nat.
Require Stdlib.Arith.Factorial.
Require Stdlib.Arith.EqNat.
Require Stdlib.Arith.Compare_dec.
Require Stdlib.Arith.Between.
Require Stdlib.Arith.PeanoNat.
Require Stdlib.Numbers.Natural.Abstract.NProperties.
Require Stdlib.Numbers.Integer.Abstract.ZProperties.
Require Stdlib.Numbers.Natural.Abstract.NLcm0.
Require Stdlib.Numbers.Natural.Abstract.NBits.
Require Stdlib.Numbers.Integer.Abstract.ZLcm.
Require Stdlib.Numbers.Integer.Abstract.ZBits.
Require Stdlib.Numbers.Natural.Abstract.NLog.
Require Stdlib.Numbers.Natural.Abstract.NLcm.
Require Stdlib.Numbers.Integer.Abstract.ZPow.
Require Stdlib.Numbers.Natural.Abstract.NPow.
Require Stdlib.Numbers.Natural.Abstract.NDiv0.
Require Stdlib.Numbers.Integer.Abstract.ZGcd.
Require Stdlib.Numbers.Integer.Abstract.ZDivTrunc.
Require Stdlib.Numbers.Integer.Abstract.ZDivFloor.
Require Stdlib.Numbers.Natural.Abstract.NSqrt.
Require Stdlib.Numbers.Natural.Abstract.NParity.
Require Stdlib.Numbers.Natural.Abstract.NMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NGcd.
Require Stdlib.Numbers.Natural.Abstract.NDiv.
Require Stdlib.Numbers.Integer.Abstract.ZSgnAbs.
Require Stdlib.Numbers.Integer.Abstract.ZParity.
Require Stdlib.Numbers.Integer.Abstract.ZMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NSub.
Require Stdlib.Numbers.Integer.Abstract.ZMulOrder.
Require Stdlib.Numbers.Natural.Abstract.NMulOrder.
Require Stdlib.Numbers.Integer.Abstract.ZAddOrder.
Require Stdlib.Numbers.Natural.Abstract.NAddOrder.
Require Stdlib.Numbers.Integer.Abstract.ZLt.
Require Stdlib.Numbers.Natural.Abstract.NOrder.
Require Stdlib.Numbers.Integer.Abstract.ZMul.
Require Stdlib.Numbers.Natural.Abstract.NAdd.
Require Stdlib.Numbers.Integer.Abstract.ZAdd.
Require Stdlib.Numbers.Natural.Abstract.NBase.
Require Stdlib.Numbers.Integer.Abstract.ZBase.
Require Stdlib.Numbers.Natural.Abstract.NAxioms.
Require Stdlib.Numbers.Integer.Abstract.ZAxioms.
Require Stdlib.Numbers.NatInt.NZBits.
Require Stdlib.Numbers.NatInt.NZLog.
Require Stdlib.Numbers.NatInt.NZSqrt.
Require Stdlib.Numbers.NatInt.NZPow.
Require Stdlib.Numbers.NatInt.NZParity.
Require Stdlib.Numbers.NatInt.NZGcd.
Require Stdlib.Numbers.NatInt.NZDiv.
Require Stdlib.Numbers.NatInt.NZMulOrder.
Require Stdlib.Numbers.NatInt.NZAddOrder.
Require Stdlib.Numbers.NatInt.NZOrder.
Require Stdlib.Numbers.NatInt.NZMul.
Require Stdlib.Numbers.NatInt.NZAdd.
Require Stdlib.Numbers.NatInt.NZBase.
Require Stdlib.Numbers.NatInt.NZAxioms.
Require Stdlib.Structures.GenericMinMax.
Require Stdlib.Structures.OrdersFacts.
Require Stdlib.Structures.OrdersTac.
Require Stdlib.Structures.Orders.
Require Stdlib.Structures.Equalities.
Require Stdlib.Numbers.NumPrelude.
Require Ltac2.Array.
Require Ltac2.Ltac1.
Require Stdlib.Relations.Relations.
Require Stdlib.PArith.BinPosDef.
Require Ltac2.Pattern.
Require Stdlib.Relations.Operators_Properties.
Require Ltac2.Control.
Require Stdlib.Relations.Relation_Operators.
Require Stdlib.Bool.Bool.
Require Ltac2.Std.
Require Ltac2.Message.

Module Export AdmitTactic.
Module Import LocalFalse.
End LocalFalse.
End AdmitTactic.

Module Export stdpp_DOT_option_WRAPPED.
Module Export option.

Export stdpp.tactics.


Inductive option_Forall2 {A B} (R: A → B → Prop) : option A → option B → Prop :=
  | Some_Forall2 x y : R x y → option_Forall2 R (Some x) (Some y)
  | None_Forall2 : option_Forall2 R None None.

Section Forall2.
End Forall2.
Global Instance option_equiv `{Equiv A} : Equiv (option A). exact (option_Forall2 (≡)). Defined.

Section setoids.
End setoids.
Global Instance option_bind: MBind option. exact (λ A B f mx,
  match mx with Some x => f x | None => None end). Defined.
Global Instance option_fmap: FMap option. exact (@option_map). Defined.
Class Maybe2 {A1 A2 B : Type} (c : A1 → A2 → B) :=
  maybe2 : B → option (A1 * A2).
Global Arguments maybe2 {_ _ _} _ {_} !_ / : assert.

Section union_intersection_difference.
End union_intersection_difference.

End option.
Module Export stdpp.
Module Export option.
Include stdpp_DOT_option_WRAPPED.option.
End option.

Export Stdlib.ZArith.BinInt.

Record Q : Set := Qmake {Qnum : Z; Qden : positive}.
Delimit Scope Q_scope with Q.

Open Scope Q_scope.

Notation "a # b" := (Qmake a b) (at level 55, no associativity) : Q_scope.

Notation QDen p := (Zpos (Qden p)).
Definition Qlt (x y : Q) := (Qnum x * QDen y < Qnum y * QDen x)%Z.
Infix "<" := Qlt : Q_scope.

Definition Qmult (x y : Q) := (Qnum x * Qnum y) # (Qden x * Qden y).

Definition Qinv (x : Q) :=
  match Qnum x with
  | Z0 => 0#1
  | Zpos p => (QDen x)#p
  | Zneg p => (Zneg (Qden x))#p
  end.

Definition Qdiv (x y : Q) := Qmult x (Qinv y).

Inductive IZ :=
  | IZpow_pos : Z -> positive -> IZ
  | IZ0 : IZ
  | IZpos : positive -> IZ
  | IZneg : positive -> IZ.

Inductive IQ :=
  | IQmake : IZ -> positive -> IQ
  | IQmult : IQ -> IQ -> IQ
  | IQdiv : IQ -> IQ -> IQ.

Definition IZ_of_Z z :=
  match z with
  | Z0 => IZ0
  | Zpos e => IZpos e
  | Zneg e => IZneg e
  end.
Definition of_decimal (d:Decimal.decimal) : IQ.
exact (let '(i, f, e) :=
    match d with
    | Decimal.Decimal i f => (i, f, Decimal.Pos Decimal.Nil)
    | Decimal.DecimalExp i f e => (i, f, e)
    end in
  let num := Z.of_int (Decimal.app_int i f) in
  let den := Nat.iter (Decimal.nb_digits f) (Pos.mul 10) 1%positive in
  let q := IQmake (IZ_of_Z num) den in
  let e := Z.of_int e in
  match e with
  | Z0 => q
  | Zpos e => IQmult q (IQmake (IZpow_pos 10 e) 1)
  | Zneg e => IQdiv q (IQmake (IZpow_pos 10 e) 1)
  end).
Defined.
Definition of_hexadecimal (d:Hexadecimal.hexadecimal) : IQ.
Admitted.
Definition of_number (n : Number.number) : IQ.
exact (match n with
  | Number.Decimal d => of_decimal d
  | Number.Hexadecimal h => of_hexadecimal h
  end).
Defined.
Definition to_number (q:IQ) : option Number.number.
Admitted.

Number Notation Q of_number to_number (via IQ
  mapping [Qmake => IQmake, Qmult => IQmult, Qdiv => IQdiv,
           Z.pow_pos => IZpow_pos, Z0 => IZ0, Zpos => IZpos, Zneg => IZneg])
  : Q_scope.
Module Export QArith_base.
End QArith_base.

Definition Qred (q:Q) :=
  let (q1,q2) := q in
  let (r1,r2) := snd (Z.ggcd q1 (Zpos q2))
  in r1#(Z.to_pos r2).
Module Export Stdlib_DOT_QArith_DOT_Qreduction.
Module Export Stdlib.
Module Export QArith.
Module Export Qreduction.
End Qreduction.

End QArith.

End Stdlib.

End Stdlib_DOT_QArith_DOT_Qreduction.
Module Import LocalFalse.
End LocalFalse.
Export Stdlib.QArith.Qreduction.
Module Export Stdlib_DOT_QArith_DOT_QArith.
Module Export Stdlib.
Module Export QArith.
Module Export QArith.
End QArith.

End QArith.

End Stdlib.

End Stdlib_DOT_QArith_DOT_QArith.

Record Qc : Set := Qcmake { this :> Q ; canon : Qred this = this }.
Delimit Scope Qc_scope with Qc.
Definition Q2Qc (q:Q) : Qc.
Admitted.

Notation " 0 " := (Q2Qc 0) : Qc_scope.
Definition Qclt (x y : Qc) := (x < y)%Q.
Infix "<" := Qclt : Qc_scope.
Module Export Stdlib.
Module Export QArith.
Module Export Qcanon.
End Qcanon.

End QArith.

End Stdlib.
Import Stdlib.QArith.QArith.
Import Stdlib.QArith.Qcanon.
Export stdpp.option.
Global Instance eq_dec: EqDecision positive.
Admitted.
Definition Qc_of_Z (n : Z) : Qc.
Admitted.
Local Close Scope Qc_scope.

Record Qp := mk_Qp { Qp_to_Qc : Qc ; Qp_prf : (0 < Qp_to_Qc)%Qc }.
Bind Scope Qp_scope with Qp.

Program Definition pos_to_Qp (n : positive) : Qp := mk_Qp (Qc_of_Z $ Z.pos n) _.
Admit Obligations.

Module Export Qp.

  Module Import notations.

    Notation "1" := (pos_to_Qp 1) : Qp_scope.
  End notations.

Export Qp.notations.

Local Close Scope Qp_scope.

Notation "(::)" := cons (only parsing) : list_scope.
Notation "( x ::.)" := (cons x) (only parsing) : list_scope.
Global Instance maybe_cons {A} : Maybe2 (@cons A).
Admitted.
Definition reverse {A} (l : list A) : list A.
exact (rev_append l []).
Defined.

Section list_set.
  Context `{dec : EqDecision A}.
Fixpoint list_difference (l k : list A) : list A.
Admitted.
End list_set.

Section general_properties.
Context {A : Type}.
Implicit Types l k : list A.
Global Instance list_eq_nil_dec l : Decision (l = []).
Admitted.

End general_properties.
Export Stdlib.Sorting.Permutation.

Global Arguments Permutation {_} _ _ : assert.

Infix "≡ₚ" := Permutation (at level 70, no associativity) : stdpp_scope.
Notation "(≡ₚ)" := Permutation (only parsing) : stdpp_scope.

Inductive submseteq {A} : relation (list A) :=
  | submseteq_nil : submseteq [] []
  | submseteq_skip x l1 l2 : submseteq l1 l2 → submseteq (x :: l1) (x :: l2)
  | submseteq_swap x y l : submseteq (y :: x :: l) (x :: y :: l)
  | submseteq_cons x l1 l2 : submseteq l1 l2 → submseteq l1 (x :: l2)
  | submseteq_trans l1 l2 l3 : submseteq l1 l2 → submseteq l2 l3 → submseteq l1 l3.
Infix "⊆+" := submseteq (at level 70) : stdpp_scope.

Section general_properties.
Context {A : Type}.
Implicit Types x y z : A.
Implicit Types l k : list A.

Global Instance cons_Permutation_inj_r x : Inj (≡ₚ) (≡ₚ) (x ::.).
Admitted.
Lemma submseteq_nil_l l : [] ⊆+ l.
Admitted.

Global Instance: Proper ((≡ₚ) ==> (≡ₚ) ==> iff) (@submseteq A).
Admitted.

Lemma elem_of_submseteq l k x : x ∈ l → l ⊆+ k → x ∈ k.
Admitted.
Lemma submseteq_cons_l x l k : x :: l ⊆+ k ↔ ∃ k', k ≡ₚ x :: k' ∧ l ⊆+ k'.
Admitted.
  Context `{!EqDecision A}.

  Local Program Fixpoint elem_of_or_Permutation x l :
      (x ∉ l) + { k | l ≡ₚ x :: k } :=
    match l with
    | [] => inl _
    | y :: l =>
       if decide (x = y) then inr (l ↾ _) else
       match elem_of_or_Permutation x l return _ with
       | inl _ => inl _ | inr (k ↾ _) => inr ((y :: k) ↾ _)
       end
    end.
Admit Obligations.

  Global Program Instance submseteq_dec : RelDecision (@submseteq A) :=
    fix go l1 l2 :=
    match l1 with
    | [] => left _
    | x :: l1 =>
       match elem_of_or_Permutation x l2 return _ with
       | inl _ => right _
       | inr (l2 ↾ _) => cast_if (go l1 l2)
       end
    end.
  Next Obligation.
intros _ l1 l2 _.
apply submseteq_nil_l.
Qed.
  Next Obligation.
    intros _ ? l2 x l1 <- Hx Hxl1.
eapply Hx, elem_of_submseteq, Hxl1.
by left.
  Qed.
  Next Obligation.
intros _ ?? x l1 <- _ l2 -> Hl.
by apply submseteq_skip.
Qed.
  Next Obligation.
    intros _ ?? x l1 <- _ l2 -> Hl (l2' & Hl2%(inj _) & ?)%submseteq_cons_l.
    apply Hl.
by rewrite Hl2.
  Qed.
End general_properties.
Definition mapM `{MBind M, MRet M} {A B} (f : A → M B) : list A → M (list B).
Admitted.

Notation fin := Fin.t.

Class Countable A `{EqDecision A} := {
  encode : A → positive;
  decode : positive → option A;
  decode_encode x : decode (encode x) = Some x
}.
Global Instance pos_countable : Countable positive.
Admitted.

Global Instance set_subseteq_instance `{ElemOf A C} : SubsetEq C | 20.
Admitted.
Global Instance set_disjoint_instance `{ElemOf A C} : Disjoint C | 20.
Admitted.

Section semi_set.
  Context `{SemiSet A C}.
  Implicit Types X Y : C.

  Lemma union_subseteq X Y Z : X ∪ Y ⊆ Z ↔ X ⊆ Z ∧ Y ⊆ Z.
Admitted.
End semi_set.

Definition pred_infinite {A} (P : A → Prop) := ∀ xs : list A, ∃ x, P x ∧ x ∉ xs.
Export Corelib.Init.Byte.

Module Export Ascii.

Inductive ascii : Set := Ascii (_ _ _ _ _ _ _ _ : bool).
Delimit Scope char_scope with char.
Bind Scope char_scope with ascii.
Definition eqb (a b : ascii) : bool.
Admitted.
Definition ascii_of_byte (b : byte) : ascii.
exact (let '(b0, (b1, (b2, (b3, (b4, (b5, (b6, b7))))))) := Byte.to_bits b in
     Ascii b0 b1 b2 b3 b4 b5 b6 b7).
Defined.
Definition byte_of_ascii (a : ascii) : byte.
Admitted.
  String Notation ascii ascii_of_byte byte_of_ascii : char_scope.
Module Export String.

Inductive string : Set :=
  | EmptyString : string
  | String : ascii -> string -> string.

#[local] Open Scope lazy_bool_scope.

Fixpoint eqb s1 s2 : bool :=
 match s1, s2 with
 | EmptyString, EmptyString => true
 | String c1 s1', String c2 s2' => Ascii.eqb c1 c2 &&& eqb s1' s2'
 | _,_ => false
 end.
Fixpoint string_of_list_ascii (s : list ascii) : string.
exact (match s with
     | nil => EmptyString
     | cons ch s => String ch (string_of_list_ascii s)
     end).
Defined.
Definition string_of_list_byte (s : list byte) : string.
exact (string_of_list_ascii (List.map ascii_of_byte s)).
Defined.
Definition list_byte_of_string (s : string) : list byte.
Admitted.

String Notation string
  String.string_of_list_byte String.list_byte_of_string : stdpp_scope.

Module Export Ascii.
Definition is_nat (x : ascii) : option nat.
exact (match x with
    | "0" => Some 0
    | "1" => Some 1
    | "2" => Some 2
    | "3" => Some 3
    | "4" => Some 4
    | "5" => Some 5
    | "6" => Some 6
    | "7" => Some 7
    | "8" => Some 8
    | "9" => Some 9
    | _ => None
    end%char).
Defined.
Definition is_space (x : ascii) : bool.
exact (match x with
    | "009" | "010" | "011" | "012" | "013" | " " => true | _ => false
    end%char).
Defined.

Module Export String.
Fixpoint rev_app (s1 s2 : string) : string.
exact (match s1 with
    | "" => s2
    | String a s1 => rev_app s1 (String a s2)
    end).
Defined.
Definition rev (s : string) : string.
exact (rev_app s "").
Defined.

Record mapset' (Munit : Type) : Type :=
  Mapset { mapset_car: Munit }.
Notation mapset M := (mapset' (M unit)).

Local Open Scope positive_scope.

Local Notation "P ~ 0" := (λ p, P p~0) : function_scope.
Local Notation "P ~ 1" := (λ p, P p~1) : function_scope.

Inductive gmap_dep_ne (A : Type) (P : positive → Prop) :=
  | GNode001 : gmap_dep_ne A P~1  → gmap_dep_ne A P
  | GNode010 : P 1 → A → gmap_dep_ne A P
  | GNode011 : P 1 → A → gmap_dep_ne A P~1 → gmap_dep_ne A P
  | GNode100 : gmap_dep_ne A P~0 → gmap_dep_ne A P
  | GNode101 : gmap_dep_ne A P~0 → gmap_dep_ne A P~1 → gmap_dep_ne A P
  | GNode110 : gmap_dep_ne A P~0 → P 1 → A → gmap_dep_ne A P
  | GNode111 : gmap_dep_ne A P~0 → P 1 → A → gmap_dep_ne A P~1 → gmap_dep_ne A P.

Variant gmap_dep (A : Type) (P : positive → Prop) :=
  | GEmpty : gmap_dep A P
  | GNodes : gmap_dep_ne A P → gmap_dep A P.

Record gmap_key K `{Countable K} (q : positive) :=
  GMapKey { _ : encode (A:=K) <$> decode q = Some q }.

Record gmap K `{Countable K} A := GMap { gmap_car : gmap_dep A (gmap_key K) }.

Definition gset K `{Countable K} := mapset (gmap K).

Export stdpp.base.
Export Corelib.ssr.ssreflect.

Record SIdxMixin {I} (ilt ile : relation I) (zero : I) (succ : I → I) := {
  sidx_mixin_lt_trans : Transitive ilt;
  sidx_mixin_lt_wf : well_founded ilt;
  sidx_mixin_lt_trichotomy : TrichotomyT ilt;
  sidx_mixin_le_lteq n m : ile n m ↔ ilt n m ∨ n = m;
  sidx_mixin_nlt_0_r n : ¬ ilt n zero;
  sidx_mixin_lt_succ_diag_r n : ilt n (succ n);
  sidx_mixin_le_succ_l_2 n m : ilt n m → ile (succ n) m;

  sidx_mixin_weak_case n : {m | n = succ m} + (∀ m, ilt m n → ilt (succ m) n);
}.

Structure sidx := SIdx {
  sidx_car :> Type;
  sidx_lt : relation sidx_car;
  sidx_le : relation sidx_car;
  sidx_zero : sidx_car;
  sidx_succ : sidx_car → sidx_car;
  sidx_mixin : SIdxMixin sidx_lt sidx_le sidx_zero sidx_succ;
}.

Existing Class sidx.
Global Arguments SIdx _ {_ _ _ _} _.
Global Arguments sidx_lt {_}.
Global Arguments sidx_le {_}.
Global Arguments sidx_zero {_}.
Global Arguments sidx_succ {_} _.

Declare Scope sidx_scope.

Local Open Scope sidx_scope.

Notation "0ᵢ" := sidx_zero (at level 0).
Notation "'Sᵢ'" := sidx_succ (at level 0).
Notation "n < m" := (sidx_lt n m) : sidx_scope.
Notation "n ≤ m" := (sidx_le n m) : sidx_scope.

Class SIdxFinite (SI : sidx) :=
  finite_index n : n = 0ᵢ ∨ ∃ m, n = Sᵢ m.

Module Export SIdx.
Section sidx.
  Context {SI : sidx}.

  Record limit (n : SI) := Limit {
    limit_gt_S m : m < n → Sᵢ m < n;
    limit_neq_0 : n ≠ 0ᵢ;
  }.

  Lemma limit_finite `{!SIdxFinite SI} n : ¬limit n.
Admitted.
End sidx.

Class Dist {SI : sidx} A := dist : SI → relation A.
Notation "x ≡{ n }≡ y" := (dist n x y)
  (at level 70, n at next level, format "x  ≡{ n }≡  y").
Notation NonExpansive f := (∀ n, Proper (dist n ==> dist n) f).
Notation NonExpansive2 f := (∀ n, Proper (dist n ==> dist n ==> dist n) f).

Record OfeMixin {SI : sidx} A `{Equiv A, !Dist A} := {
  mixin_equiv_dist (x y : A) : x ≡ y ↔ ∀ n, x ≡{n}≡ y;
  mixin_dist_equivalence n : Equivalence (@dist SI A _ n);
  mixin_dist_le n m (x y : A) : x ≡{n}≡ y → m ≤ n → x ≡{m}≡ y
}.

Structure ofe {SI : sidx} := Ofe {
  ofe_car :> Type;
  ofe_equiv : Equiv ofe_car;
  ofe_dist : Dist ofe_car;
  ofe_mixin : OfeMixin ofe_car
}.
Global Arguments Ofe {_} _ {_ _} _.

Global Hint Extern 0 (Equiv _) => refine (ofe_equiv _); shelve : typeclass_instances.
Global Hint Extern 0 (Dist _) => refine (ofe_dist _); shelve : typeclass_instances.
Definition ofe_mixin_of' {SI : sidx} A {Ac : ofe} (f : Ac → A) : OfeMixin Ac.
exact (ofe_mixin Ac).
Defined.
Notation ofe_mixin_of A :=
  ltac:(let H := eval hnf in (ofe_mixin_of' A id) in exact H) (only parsing).

Record chain {SI : sidx} (A : ofe) := {
  chain_car :> SI → A;
  chain_cauchy n m: n ≤ m → chain_car m ≡{n}≡ chain_car n
}.

Record bchain {SI : sidx} (A : ofe) (n : SI) := {
  bchain_car :> ∀ m, m < n → A;
  bchain_cauchy m p Hm Hp : m ≤ p → bchain_car p Hp ≡{m}≡ bchain_car m Hm
}.

Notation Compl A := (chain A%type → A).
Notation LBCompl A := (∀ n, SIdx.limit n → bchain A%type n → A).

Class Cofe {SI : sidx} (A : ofe) := {
  compl : Compl A;
  lbcompl : LBCompl A;
  conv_compl n c : compl c ≡{n}≡ c n;
  conv_lbcompl {n} Hn (c : bchain A n) {m} Hm : lbcompl n Hn c ≡{m}≡ c m Hm;

  lbcompl_ne n {Hn} (c1 c2 : bchain A n) m :
    (∀ p (Hp : p < n), c1 p Hp ≡{m}≡ c2 p Hp) →
    lbcompl n Hn c1 ≡{m}≡ lbcompl n Hn c2
}.

Record dist_later {SI : sidx} `{!Dist A} (n : SI) (x y : A) : Prop :=
  { dist_later_lt : ∀ m, m < n → x ≡{m}≡ y }.

Notation Contractive f := (∀ n, Proper (dist_later n ==> dist n) f).

Record ofe_mor {SI : sidx} (A B : ofe) : Type := OfeMor {
  ofe_mor_car :> A → B;
  ofe_mor_ne : NonExpansive ofe_mor_car
}.

Section ofe_mor.
  Context {SI : sidx} {A B : ofe}.
Local Instance ofe_mor_equiv : Equiv (ofe_mor A B).
Admitted.
Local Instance ofe_mor_dist : Dist (ofe_mor A B).
Admitted.
  Definition ofe_mor_ofe_mixin : OfeMixin (ofe_mor A B).
Admitted.
  Canonical Structure ofe_morO := Ofe (ofe_mor A B) ofe_mor_ofe_mixin.
End ofe_mor.

Global Arguments ofe_morO {_} _ _.
Notation "A -n> B" :=
  (ofe_morO A B) (at level 99, B at level 200, right associativity).
Definition cid {SI : sidx} {A: ofe} : A -n> A.
Admitted.
Definition ccompose {SI : sidx} {A B C: ofe}
  (f : B -n> C) (g : A -n> B) : A -n> C.
Admitted.
Infix "◎" := ccompose (at level 40, left associativity).

Section unit.
  Context {SI : sidx}.
Local Instance unit_dist : Dist unit.
Admitted.
  Definition unit_ofe_mixin : OfeMixin unit.
Admitted.
Canonical Structure unitO : ofe.
exact (Ofe unit unit_ofe_mixin).
Defined.
End unit.

Section product.
  Context {SI : sidx} {A B : ofe}.
Local Instance prod_dist : Dist (A * B).
Admitted.

  Definition prod_ofe_mixin : OfeMixin (A * B).
Admitted.
Canonical Structure prodO : ofe.
exact (Ofe (A * B) prod_ofe_mixin).
Defined.
End product.

Section discrete_ofe.
  Context {SI : sidx} `{Equiv A} (Heq : @Equivalence A (≡)).
Local Instance discrete_dist : Dist A.
Admitted.
  Definition discrete_ofe_mixin : OfeMixin A.
Admitted.
End discrete_ofe.

Notation leibnizO A := (Ofe A (@discrete_ofe_mixin _ _ equivL eq_equivalence)).

Notation discrete_ofe_equivalence_of A := ltac:(
  match constr:(ofe_mixin_of A) with
  | discrete_ofe_mixin ?H => exact H
  end) (only parsing).
Canonical Structure natO {SI : sidx} : ofe.
exact (leibnizO nat).
Defined.

Section option.
  Context {SI : sidx} {A : ofe}.
Local Instance option_dist : Dist (option A).
Admitted.

  Definition option_ofe_mixin : OfeMixin (option A).
Admitted.
  Canonical Structure optionO := Ofe (option A) option_ofe_mixin.
End option.

Record later (A : Type) : Type := Next { later_car : A }.

Section later.
  Context {SI : sidx} {A : ofe}.
Local Instance later_equiv : Equiv (later A).
Admitted.
Local Instance later_dist : Dist (later A).
Admitted.

  Definition later_ofe_mixin : OfeMixin (later A).
Admitted.
Canonical Structure laterO : ofe.
exact (Ofe (later A) later_ofe_mixin).
Defined.
End later.

Global Arguments laterO {_} _.

Class Monoid {SI : sidx} {M : ofe} (o : M → M → M) := {
  monoid_unit : M;
  monoid_ne : NonExpansive2 o;
  monoid_assoc : Assoc (≡) o;
  monoid_comm : Comm (≡) o;
  monoid_left_id : LeftId (≡) monoid_unit o;
}.

Fixpoint big_opL {SI : sidx} {M : ofe}
    {o : M → M → M} `{!Monoid o} {A} (f : nat → A → M) (xs : list A) : M :=
  match xs with
  | [] => monoid_unit
  | x :: xs => o (f 0 x) (big_opL (λ n, f (S n)) xs)
  end.
Global Arguments big_opL {SI} {M} o {_ A} _ !_ /.

Class PCore (A : Type) := pcore : A → option A.

Class Op (A : Type) := op : A → A → A.
Infix "⋅" := op (at level 50, left associativity) : std

[...]

l "iSpecialize:" P "not an implication/wand" in
  let solve_done d :=
    lazymatch d with
    | true =>
       first [ done
             | let Q := match goal with |- envs_entails _ ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done"
             | let Q := match goal with |- ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done" ]
    | false => idtac
    end in
  let Δ := iGetCtx in
  lazymatch pats with
    | [] => idtac
    | SIdent ?H2 [] :: ?pats =>

       notypeclasses refine (tac_specialize false _ H2 _ H1 _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H2 := pretty_ident H2 in
          fail "iSpecialize:" H2 "not found"
         |pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |tc_solve ||
          let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
          let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
          fail "iSpecialize: cannot instantiate" P "with" Q
         |pm_reduce; iSpecializePat_go H1 pats]
    | SIdent ?H2 ?pats1 :: ?pats =>

       let H2tmp := iFresh in
       iPoseProofCoreHyp H2 as H2tmp;

       iRevertHyp H1 with (fun p =>
         iSpecializePat_go H2tmp pats1;
           [..
           |_iIntroMaybePersistent H1 p]);

         [..
         |
          notypeclasses refine (tac_specialize true _ H2tmp _ H1 _ _ _ _ _ _ _ _ _);
            [pm_reflexivity ||
             let H2tmp := pretty_ident H2tmp in
             fail "iSpecialize:" H2tmp "not found"
            |pm_reflexivity ||
             let H1 := pretty_ident H1 in
             fail "iSpecialize:" H1 "not found"
            |tc_solve ||
             let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
             let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
             fail "iSpecialize: cannot instantiate" P "with" Q
            |pm_reduce; iSpecializePat_go H1 pats]]
    | SPureGoal ?d :: ?pats =>
       notypeclasses refine (tac_specialize_assert_pure _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- FromPure _ ?Q _ => Q end in
          fail "iSpecialize:" Q "not pure"
         |solve_done d
         |pm_reduce;
          iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic false ?Hs_frame [] ?d) :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve
         |pm_reduce; iFrame Hs_frame; solve_done d
         |pm_reduce; iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: ?pats =>
       fail "iSpecialize: cannot select hypotheses for intuitionistic premise"
    | SGoal (SpecGoal ?m ?lr ?Hs_frame ?Hs ?d) :: ?pats =>
       let Hs' := eval cbv in (if lr then Hs else Hs_frame ++ Hs) in
       notypeclasses refine (tac_specialize_assert _ H1 _
           (if m is GModal then true else false) lr Hs' _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          lazymatch goal with
          | |- False =>
            let Hs' := iMissingHypsCore Δ Hs' in
            fail "iSpecialize: hypotheses" Hs' "not found"
          | _ =>
            notypeclasses refine (conj _ _);
              [iFrame Hs_frame; solve_done d
              |iSpecializePat_go H1 pats]
          end]
    | SAutoFrame GIntuitionistic :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve ||
          fail "iSpecialize: Cannot find IntoAbsorbingly;"
               "this should not happen, please report a bug"
         |pm_reduce; solve [iFrame "∗ #"]
         |pm_reduce; iSpecializePat_go H1 pats]
    | SAutoFrame ?m :: ?pats =>
       notypeclasses refine (tac_specialize_frame _ H1 _
           (if m is GModal then true else false) _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          first
            [notypeclasses refine (tac_unlock_emp _ _ _)
            |notypeclasses refine (tac_unlock_True _ _ _)
            |iFrame "∗ #"; notypeclasses refine (tac_unlock _ _ _)
            |let P :=
               match goal with |- envs_entails _ (?P ∗ locked _)%I => P end in
             fail 1 "iSpecialize: premise" P "cannot be solved by framing"]
         |exact eq_refl]; _iIntroSpatial H1; iSpecializePat_go H1 pats
    end.

Local Tactic Notation "iSpecializePat" open_constr(H) constr(pat) :=
  let pats := spec_pat.parse pat in iSpecializePat_go H pats.

Fixpoint use_tac_specialize_intuitionistic_helper {M}
    (Δ : envs M) (pats : list spec_pat) : bool :=
  match pats with
  | [] => false
  | SPureGoal _ :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SAutoFrame _ :: _ => true
  | SIdent H _ :: pats =>
     match envs_lookup_delete false H Δ with
     | Some (false, _, Δ) => true
     | Some (true, _, Δ) => use_tac_specialize_intuitionistic_helper Δ pats
     | None => false
     end
  | SGoal (SpecGoal GModal _ _ _ _) :: _ => false
  | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SGoal (SpecGoal GSpatial neg Hs_frame Hs _) :: pats =>
     match envs_split (if neg is true then Right else Left)
                      (if neg then Hs else pm_app Hs_frame Hs) Δ with
     | Some (Δ1,Δ2) => if env_spatial_is_nil Δ1
                       then use_tac_specialize_intuitionistic_helper Δ2 pats
                       else true
     | None => false
     end
  end.

Tactic Notation "iSpecializeCore" open_constr(H)
    "with" open_constr(xs) open_constr(pat) "as" constr(p) :=
  let p := intro_pat_intuitionistic p in
  let pat := spec_pat.parse pat in
  let H :=
    lazymatch type of H with
    | string => constr:(INamed H)
    | _ => H
    end in
  iSpecializeArgs H xs; [..|
    lazymatch type of H with
    | ident =>
       let pat := spec_pat.parse pat in
       let Δ := iGetCtx in

       let b := eval lazy [use_tac_specialize_intuitionistic_helper] in
         (if p then use_tac_specialize_intuitionistic_helper Δ pat else false) in
       lazymatch eval pm_eval in b with
       | true =>

          lazymatch iTypeOf H with
          | Some (?q, _) =>
             let PROP := iBiOfGoal in

             lazymatch eval lazy in (q || tc_to_bool (BiAffine PROP)) with
             | true =>
                notypeclasses refine (tac_specialize_intuitionistic_helper _ H _ _ _ _ _ _ _ _ _ _);
                  [pm_reflexivity

                  |pm_reduce; tc_solve

                  |iSpecializePat H pat;
                    [..
                    |notypeclasses refine (tac_specialize_intuitionistic_helper_done _ H _ _ _);
                     pm_reflexivity]
                  |tc_solve ||
                   let Q := match goal with |- IntoPersistent _ ?Q _ => Q end in
                   fail "iSpecialize:" Q "not persistent"
                  |pm_reduce ]
             | false => iSpecializePat H pat
             end
          | None =>
             let H := pretty_ident H in
             fail "iSpecialize:" H "not found"
          end
       | false => iSpecializePat H pat
       end
    | _ => fail "iSpecialize:" H "should be a hypothesis, use iPoseProof instead"
    end].

Tactic Notation "iSpecializeCore" open_constr(t) "as" constr(p) :=
  lazymatch type of t with
  | string => iSpecializeCore t with hnil "" as p
  | ident => iSpecializeCore t with hnil "" as p
  | _ =>
    lazymatch t with
    | ITrm ?H ?xs ?pat => iSpecializeCore H with xs pat as p
    | _ => fail "iSpecialize:" t "should be a proof mode term"
    end
  end.

Tactic Notation "iPoseProofCore" open_constr(lem)
    "as" constr(p) tactic3(tac) :=
  iStartProof;
  let t := lazymatch lem with ITrm ?t ?xs ?pat => t | _ => lem end in
  let t := lazymatch type of t with string => constr:(INamed t) | _ => t end in
  let spec_tac Htmp :=
    lazymatch lem with
    | ITrm _ ?xs ?pat => iSpecializeCore (ITrm Htmp xs pat) as p
    | _ => idtac
    end in
  lazymatch type of t with
  | ident =>
     let Htmp := iFresh in
     iPoseProofCoreHyp t as Htmp; spec_tac Htmp; [..|tac Htmp]
  | _ => iPoseProofCoreLem t as (fun Htmp => spec_tac Htmp; [..|tac Htmp])
  end.

Tactic Notation "iOrDestruct" constr(H) "as" constr(H1) constr(H2) :=
  eapply tac_or_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iOrDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoOr ?P _ _ => P end in
     fail "iOrDestruct: cannot destruct" P
    | pm_reduce;
      lazymatch goal with
      | |- False =>
        let H1 := pretty_ident H1 in
        let H2 := pretty_ident H2 in
        fail "iOrDestruct:" H1 "or" H2 "not fresh"
      |  _ => split
      end].

Ltac _iAndDestruct H H1 H2 :=
  eapply tac_and_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iAndDestruct:" H "not found"
    |pm_reduce; tc_solve ||
     let P :=
       lazymatch goal with
       | |- IntoSep ?P _ _ => P
       | |- IntoAnd _ ?P _ _ => P
       end in
     fail "iAndDestruct: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
       | |- False =>
         let H1 := pretty_ident H1 in
         let H2 := pretty_ident H2 in
         fail "iAndDestruct:" H1 "or" H2 "not fresh"
       | _ => idtac
     end].

Ltac _iAndDestructChoice H d H' :=
  eapply tac_and_destruct_choice with H _ d H' _ _ _;
    [pm_reflexivity || fail "iAndDestructChoice:" H "not found"
    |pm_reduce; tc_solve ||
     let P := match goal with |- TCOr (IntoAnd _ ?P _ _) _ => P end in
     fail "iAndDestructChoice: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iAndDestructChoice:" H' "not fresh"
     | _ => idtac
     end].

Tactic Notation "_iExistDestruct" constr(H)
    "as" simple_intropattern(x) constr(Hx) :=
  eapply tac_exist_destruct with H _ Hx _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iExistDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoExist ?P _ _ => P end in
     fail "iExistDestruct: cannot destruct" P|];
    let name := lazymatch goal with
                | |- let _ := (λ name, _) in _ => name
                end in
    intros _;
    let y := fresh name in
    intros y; pm_reduce;
    lazymatch goal with
    | |- False =>
      let Hx := pretty_ident Hx in
      fail "iExistDestruct:" Hx "not fresh"
    | _ => revert y; intros x
    end.

Tactic Notation "iModIntro" uconstr(sel) :=
  iStartProof;
  notypeclasses refine (tac_modal_intro _ _ sel _ _ _ _ _ _ _ _ _ _ _ _ _ _);
    [tc_solve ||
     fail "iModIntro: the goal is not a modality"
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalIntuitionisticEnv _ _ _ ?s => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: intuitionistic context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: intuitionistic context is non-empty"
     end
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalSpatialEnv _ _ _ ?s _ => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: spatial context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: spatial context is non-empty"
     end
    |pm_reduce; tc_solve ||
     fail "iModIntro: cannot filter spatial context when goal is not absorbing"
    |iSolveSideCondition
    |pm_prettify
      ].
Tactic Notation "iModIntro" := iModIntro _.

Tactic Notation "iModCore" constr(H) "as" constr(H') :=
  eapply tac_modal_elim with H H' _ _ _ _ _ _;
    [pm_reflexivity || fail "iMod:" H "not found"
    |tc_solve ||
     let P := match goal with |- ElimModal _ _ _ ?P _ _ _ => P end in
     let Q := match goal with |- ElimModal _ _ _ _ _ ?Q _ => Q end in
     fail "iMod: cannot eliminate modality" P "in" Q
    |iSolveSideCondition
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iMod:" H' "not fresh"
     | _ => pm_prettify
     end].

Ltac _ident_for_pat pat :=
  lazymatch pat with
  | IIdent ?x => x
  | _ => let x := iFresh in x
  end.

Ltac _ident_for_pat_default pat default :=
  lazymatch pat with
  | IIdent ?x => x
  | _ =>
    lazymatch default with
    | IAnon _ => default
    | _ => let x := iFresh in x
    end
  end.

Ltac _iDestructHypGo Hz pat0 pat :=
  lazymatch pat with
  | IFresh =>
     lazymatch Hz with
     | IAnon _ => idtac
     | INamed ?Hz => let Hz' := iFresh in iRename Hz into Hz'
     end
  | IDrop => _iClearHyp Hz
  | IFrame => iFrame Hz
  | IIdent Hz => idtac
  | IIdent ?y => iRename Hz into y
  | IList [[]] => iExFalso; iExact Hz

  | IList [[?pat1; IDrop]] =>
     let x := _ident_for_pat_default pat1 Hz in
     _iAndDestructChoice Hz Left x;
     _iDestructHypGo x pat0 pat1
  | IList [[IDrop; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iAndDestructChoice Hz Right x;
     _iDestructHypGo x pat0 pat2

  | IList [[IPure IGallinaAnon; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as ? x; _iDestructHypGo x pat0 pat2
  | IList [[IPure (IGallinaNamed ?s); ?pat2]] =>
     let x := fresh in
     let y := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as x y;
     rename_by_string x s;
     _iDestructHypGo y pat0 pat2
  | IList [[?pat1; ?pat2]] =>

     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat pat2 in
     _iAndDestruct Hz x1 x2;
     _iDestructHypGo x1 pat0 pat1; _iDestructHypGo x2 pat0 pat2
  | IList [_ :: _ :: _] => fail "iDestruct:" pat0 "has too many conjuncts"
  | IList [[_]] => fail "iDestruct:" pat0 "has just a single conjunct"

  | IList [[?pat1];[?pat2]] =>
     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat_default pat2 Hz in
     iOrDestruct Hz as x1 x2;
     [_iDestructHypGo x1 pat0 pat1|_iDestructHypGo x2 pat0 pat2]

  | IList (_ :: _ :: _ :: _) => fail "iDestruct:" pat0 "has too many disjuncts"

  | IList [_;_] => fail "iDestruct: in" pat0 "a disjunct has multiple patterns"

  | IPure IGallinaAnon => iPure Hz as ?
  | IPure (IGallinaNamed ?s) =>
     let x := fresh in
     iPure Hz as x;
     rename_by_string x s
  | IRewrite Right => iPure Hz as ->
  | IRewrite Left => iPure Hz as <-
  | IIntuitionistic ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iIntuitionistic Hz x; _iDestructHypGo x pat0 pat
  | ISpatial ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iSpatial Hz x; _iDestructHypGo x pat0 pat
  | IModalElim ?pat =>
    let x := _ident_for_pat_default pat Hz in
    iModCore Hz as x; _iDestructHypGo x pat0 pat
  | _ => fail "iDestruct:" pat0 "is not supported due to" pat
  end.
Ltac _iDestructHypFindPat Hgo pat found pats :=
  lazymatch pats with
  | [] =>
    lazymatch found with
    | true => pm_prettify
    | false => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
    end
  | ISimpl :: ?pats => simpl; _iDestructHypFindPat Hgo pat found pats
  | IClear ?H :: ?pats => iClear H; _iDestructHypFindPat Hgo pat found pats
  | IClearFrame ?H :: ?pats => iFrame H; _iDestructHypFindPat Hgo pat found pats
  | ?pat1 :: ?pats =>
     lazymatch found with
     | false => _iDestructHypGo Hgo pat pat1; _iDestructHypFindPat Hgo pat true pats
     | true => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
     end
  end.

Ltac _iDestructHyp0 H pat :=
  let pats := intro_pat.parse pat in
  _iDestructHypFindPat H pat false pats.
Ltac _iDestructHyp H xs pat :=
  ltac1_list_iter ltac:(fun x => _iExistDestruct H as x H) xs;
  _iDestructHyp0 H pat.

Tactic Notation "iDestructHyp" constr(H) "as" constr(pat) :=
  _iDestructHyp0 H pat.

Ltac _iIntros_go pats startproof :=
  lazymatch pats with
  | [] =>
    lazymatch startproof with
    | true => iStartProof
    | false => idtac
    end

  | IPure (IGallinaNamed ?s) :: ?pats =>
     let i := fresh in
     _iIntro (i);
     rename_by_string i s;
     _iIntros_go pats startproof
  | IPure IGallinaAnon :: ?pats => _iIntro (?); _iIntros_go pats startproof
  | IIntuitionistic (IIdent ?H) :: ?pats => _iIntroPersistent H; _iIntros_go pats false
  | IDrop :: ?pats => _iIntroDrop; _iIntros_go pats startproof
  | IIdent ?H :: ?pats => _iIntroSpatial H; _iIntros_go pats startproof

  | IPureIntro :: ?pats => iPureIntro; _iIntros_go pats false
  | IModalIntro :: ?pats => iModIntro; _iIntros_go pats false
  | IForall :: ?pats => repeat _iIntroForall; _iIntros_go pats startproof
  | IAll :: ?pats => repeat (_iIntroForall || _iIntro); _iIntros_go pats startproof

  | ISimpl :: ?pats => simpl; _iIntros_go pats startproof
  | IClear ?H :: ?pats => iClear H; _iIntros_go pats false
  | IClearFrame ?H :: ?pats => iFrame H; _iIntros_go pats false
  | IDone :: ?pats => try done; _iIntros_go pats startproof

  | IIntuitionistic ?pat :: ?pats =>
     let H := iFresh in _iIntroPersistent H; iDestructHyp H as pat; _iIntros_go pats false
  | ?pat :: ?pats =>
     let H := iFresh in _iIntroSpatial H; iDestructHyp H as pat; _iIntros_go pats false
  end.

Ltac _iIntros0 pat :=
  let pats := intro_pat.parse pat in

  lazymatch pats with
  | [] => idtac
  | _ => _iIntros_go pats true
  end.
Ltac _iIntros xs pat :=
  ltac1_list_iter ltac:(fun x => _iIntro (x)) xs;
  _iIntros0 pat.
Tactic Notation "iIntros" "(" ne_simple_intropattern_list(xs) ")" :=
  _iIntros xs "".

Tactic Notation "iDestructCore" open_constr(lem) "as" constr(p) tactic3(tac) :=
  let intro_destruct n :=
    let rec go n' :=
      lazymatch n' with
      | 0 => fail "iDestruct: cannot introduce" n "hypotheses"
      | 1 => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; tac H
      | S ?n' => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; go n'
      end in
    intros; go n in
  lazymatch type of lem with
  | nat => intro_destruct lem
  | Z =>

     let n := eval cbv in (Z.to_nat lem) in intro_destruct n
  | ident => tac lem
  | string => tac constr:(INamed lem)
  | _ => iPoseProofCore lem as p tac
  end.
Tactic Notation "iMod" open_constr(lem) "as" "(" ne_simple_intropattern_list(xs) ")"
    constr(pat) :=
  iDestructCore lem as false (fun H => iModCore H as H; last _iDestructHyp H xs pat).

Section class_instances.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance as_emp_valid_emp_valid d P : AsEmpValid0 d (⊢ P) P | 0.
Admitted.

Global Instance into_sep_sep P Q : IntoSep (P ∗ Q) P Q.
Admitted.

Global Instance into_exist_exist {A} (Φ : A → PROP) name :
  AsIdentName Φ name → IntoExist (bi_exist Φ) Φ name.
Admitted.
End class_instances.
Global Instance elim_modal_bupd_fupd
    `{!BiBUpd PROP, !BiFUpd PROP, !BiBUpdFUpd PROP} p E1 E2 P Q :
  ElimModal True p false (|==> P) P (|={E1,E2}=> Q) (|={E1,E2}=> Q) | 10.
Admitted.

Section class_instances_frame.
Context {PROP : bi}.
Implicit Types P Q R : PROP.
Global Instance frame_here p R : Frame p R R emp | 1.
Admitted.
Global Instance frame_sep_l R P1 P2 Q Q' :
  Frame false R P1 Q → MakeSep Q P2 Q' → Frame false R (P1 ∗ P2) Q' | 9.
Admitted.

Inductive GatherEvarsEq {A} (x : A) : A → Prop :=
  GatherEvarsEq_refl : GatherEvarsEq x x.

#[projections(primitive)] Class FrameExistRequirements
    (p : bool) (R : PROP) {A} (Φ : A → PROP) (a' : A) (G' : PROP) := {
  frame_exist_witness : A;
  frame_exist_resource : PROP;
  frame_exist_proof : Frame p R (Φ frame_exist_witness) frame_exist_resource;
  frame_exist_witness_eq : GatherEvarsEq frame_exist_witness a';
  frame_exist_resource_eq : TCEq frame_exist_resource G'
}.
Global Existing Instance Build_FrameExistRequirements.

Inductive TCCbnTele {A} (x : A) : A → Prop :=
  TCCbnTele_refl : TCCbnTele x x.

Global Instance frame_exist {A} p R (Φ : A → PROP)
    (TT : tele) (g : TT → A) (Ψ : TT → PROP) Q :
  FrameInstantiateExistEnabled →
  (∀ c, FrameExistRequirements p R Φ (g c) (Ψ c)) →
  TCCbnTele (∃.. c, Ψ c)%I Q →
  Frame p R (∃ a, Φ a) Q.
Admitted.
Global Instance frame_fupd `{!BiFUpd PROP} p E1 E2 R P Q :
  Frame p R P Q → Frame p R (|={E1,E2}=> P) (|={E1,E2}=> Q) | 2.
Admitted.
End class_instances_frame.

Ltac solve_gather_evars_eq :=
  lazymatch goal with
  | |- GatherEvarsEq ?a (?g ?c) =>
    let rec retcon_tele T arg :=

      match a with
      | context [?term] =>
        is_evar term;
        let X := type of term in
        lazymatch X with
        | tele => fail
        | _ => idtac
        end;
        let T' := open_constr:(_) in
        unify T (TeleS (λ _ : X, T'));

        unify term (tele_arg_head (λ _ : X, T') arg);

        retcon_tele T' (tele_arg_tail (λ _ : X, T') arg)

      | _ =>

        unify T TeleO
      end
    in
    let T' := lazymatch (type of c) with tele_arg ?T => T end in
    retcon_tele T' c;
    exact (GatherEvarsEq_refl _)
  end.

Global Hint Extern 0 (GatherEvarsEq _ _) =>
  solve_gather_evars_eq : typeclass_instances.

Global Hint Extern 0 (TCCbnTele _ _) =>
  cbn [bi_texist tele_fold tele_bind tele_arg_head tele_arg_tail];
  exact (TCCbnTele_refl _) : typeclass_instances.

Section class_instances_make.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance make_sep_emp_l P : KnownLMakeSep emp P P.
Admitted.
End class_instances_make.

Record agree (A : Type) : Type := {
  agree_car : list A;
  agree_not_nil : bool_decide (agree_car = []) = false
}.
Global Arguments agree_car {_} _.

Section agree.
Context {SI : sidx} {A : ofe}.
Local Instance agree_dist : Dist (agree A).
Admitted.
Local Instance agree_equiv : Equiv (agree A).
Admitted.

Definition agree_ofe_mixin : OfeMixin (agree A).
Admitted.
Canonical Structure agreeO := Ofe (agree A) agree_ofe_mixin.
Local Instance agree_validN_instance : ValidN (agree A).
Admitted.
Local Instance agree_valid_instance : Valid (agree A).
Admitted.

Local Program Instance agree_op_instance : Op (agree A) := λ x y,
  {| agree_car := agree_car x ++ agree_car y |}.
Admit Obligations.
Local Instance agree_pcore_instance : PCore (agree A).
Admitted.

Definition agree_cmra_mixin : CmraMixin (agree A).
Admitted.
Canonical Structure agreeR : cmra.
exact (Cmra (agree A) agree_cmra_mixin).
Defined.

End agree.
Global Arguments agreeR {_} _.

Record uPred (M : ucmra) : Type := UPred {
  uPred_holds : nat → M → Prop;

  uPred_mono n1 n2 x1 x2 :
    uPred_holds n1 x1 → x1 ≼{n2} x2 → n2 ≤ n1 → uPred_holds n2 x2
}.

Local Coercion uPred_holds : uPred >-> Funclass.

Section cofe.
  Context {M : ucmra}.
Local Instance uPred_equiv : Equiv (uPred M).
Admitted.
Local Instance uPred_dist : Dist (uPred M).
Admitted.
  Definition uPred_ofe_mixin : OfeMixin (uPred M).
Admitted.
Canonical Structure uPredO : ofe.
exact (Ofe (uPred M) uPred_ofe_mixin).
Defined.

  Program Definition uPred_compl : Compl uPredO := λ c,
    {| uPred_holds n x := ∀ n', n' ≤ n → ✓{n'} x → c n' n' x |}.
Admit Obligations.
  Global Program Instance uPred_cofe : Cofe uPredO := cofe_finite uPred_compl _.
Admit Obligations.
End cofe.
Global Arguments uPredO : clear implicits.

Inductive uPred_entails {M} (P Q : uPred M) : Prop :=
  { uPred_in_entails : ∀ n x, ✓{n} x → P n x → Q n x }.
Global Hint Resolve uPred_mono : uPred_def.

Local Program Definition uPred_pure_def {M} (φ : Prop) : uPred M :=
  {| uPred_holds n x := φ |}.
Solve Obligations with done.
Local Definition uPred_pure_aux : seal (@uPred_pure_def).
Admitted.
Definition uPred_pure := uPred_pure_aux.(unseal).
Global Arguments uPred_pure {M}.

Local Program Definition uPred_and_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∧ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_and_aux : seal (@uPred_and_def).
Admitted.
Definition uPred_and := uPred_and_aux.(unseal).
Global Arguments uPred_and {M}.

Local Program Definition uPred_or_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∨ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_or_aux : seal (@uPred_or_def).
Admitted.
Definition uPred_or := uPred_or_aux.(unseal).
Global Arguments uPred_or {M}.

Local Program Definition uPred_impl_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       x ≼ x' → n' ≤ n → ✓{n'} x' → P n' x' → Q n' x' |}.
Admit Obligations.
Local Definition uPred_impl_aux : seal (@uPred_impl_def).
Admitted.
Definition uPred_impl := uPred_impl_aux.(unseal).
Global Arguments uPred_impl {M}.

Local Program Definition uPred_forall_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∀ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_forall_aux : seal (@uPred_forall_def).
Admitted.
Definition uPred_forall := uPred_forall_aux.(unseal).

Local Program Definition uPred_exist_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∃ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_exist_aux : seal (@uPred_exist_def).
Admitted.
Definition uPred_exist := uPred_exist_aux.(unseal).

Local Program Definition uPred_sep_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∃ x1 x2, x ≡{n}≡ x1 ⋅ x2 ∧ P n x1 ∧ Q n x2 |}.
Admit Obligations.
Local Definition uPred_sep_aux : seal (@uPred_sep_def).
Admitted.
Definition uPred_sep := uPred_sep_aux.(unseal).
Global Arguments uPred_sep {M}.

Local Program Definition uPred_wand_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       n' ≤ n → ✓{n'} (x ⋅ x') → P n' x' → Q n' (x ⋅ x') |}.
Admit Obligations.
Local Definition uPred_wand_aux : seal (@uPred_wand_def).
Admitted.
Definition uPred_wand := uPred_wand_aux.(unseal).
Global Arguments uPred_wand {M}.

Local Program Definition uPred_plainly_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n ε |}.
Solve Obligations with naive_solver eauto using uPred_mono, ucmra_unit_validN.

Local Program Definition uPred_persistently_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n (core x) |}.
Solve Obligations with naive_solver eauto using uPred_mono, cmra_core_monoN.
Local Definition uPred_persistently_aux : seal (@uPred_persistently_def).
Admitted.
Definition uPred_persistently := uPred_persistently_aux.(unseal).
Global Arguments uPred_persistently {M}.

Local Program Definition uPred_later_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := match n return _ with 0 => True | S n' => P n' x end |}.
Admit Obligations.
Local Definition uPred_later_aux : seal (@uPred_later_def).
Admitted.
Definition uPred_later := uPred_later_aux.(unseal).
Global Arguments uPred_later {M}.
Definition uPred_emp {M} : uPred M.
Admitted.

Lemma uPred_bi_mixin (M : ucmra) :
  BiMixin
    uPred_entails uPred_emp uPred_pure uPred_and uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_wand.
Admitted.

Lemma uPred_bi_persistently_mixin (M : ucmra) :
  BiPersistentlyMixin
    uPred_entails uPred_emp uPred_and
    (@uPred_exist M) uPred_sep uPred_persistently.
Admitted.

Lemma uPred_bi_later_mixin (M : ucmra) :
  BiLaterMixin
    uPred_entails uPred_pure uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_persistently uPred_later.
Admitted.
Canonical Structure uPredI (M : ucmra) : bi.
exact ({| bi_ofe_mixin := ofe_mixin_of (uPred M);
     bi_bi_mixin := uPred_bi_mixin M;
     bi_bi_later_mixin := uPred_bi_later_mixin M;
     bi_bi_persistently_mixin := uPred_bi_persistently_mixin M |}).
Defined.
Global Instance uPred_bi_bupd M : BiBUpd (uPredI M).
Admitted.

Notation frac := Qp (only parsing).
  Canonical Structure fracO := leibnizO frac.
Local Instance frac_valid_instance : Valid frac.
Admitted.
Local Instance frac_pcore_instance : PCore frac.
Admitted.
Local Instance frac_op_instance : Op frac.
Admitted.

  Definition frac_ra_mixin : RAMixin frac.
Admitted.
  Canonical Structure fracR := discreteR frac frac_ra_mixin.
Definition gmap_viewR {SI : sidx} (K : Type) `{Countable K} (V : cmra) : cmra.
Admitted.
Definition authR {SI : sidx} (A : ucmra) : cmra.
Admitted.

Structure gFunctor := GFunctor {
  gFunctor_F :> rFunctor;
  gFunctor_map_contractive : rFunctorContractive gFunctor_F;
}.

Record gFunctors := GFunctors {
  gFunctors_len : nat;
  gFunctors_lookup : fin gFunctors_len → gFunctor
}.

Definition gid (Σ : gFunctors) := fin (gFunctors_len Σ).

Definition gname := positive.
Definition iResUR (Σ : gFunctors) : ucmra.
Admitted.
  Notation iProp Σ := (uPred (iResUR Σ)).
  Notation iPropO Σ := (uPredO (iResUR Σ)).

Class inG (Σ : gFunctors) (A : cmra) := InG {
  inG_id : gid Σ;
  inG_apply := rFunctor_apply (gFunctors_lookup Σ inG_id);
  inG_prf : A = inG_apply (iPropO Σ) _;
}.
Local Definition own_def `{!inG Σ A} (γ : gname) (a : A) : iProp Σ.
Admitted.
Local Definition own_aux : seal (@own_def).
Admitted.
Definition own := own_aux.(unseal).
Global Arguments own {Σ A _} γ a.
Local Instance nat_valid_instance : Valid nat.
Admitted.
Local Instance nat_pcore_instance : PCore nat.
Admitted.
Local Instance nat_op_instance : Op nat.
Admitted.
  Lemma nat_ra_mixin : RAMixin nat.
Admitted.
Canonical Structure natR : cmra.
exact (discreteR nat nat_ra_mixin).
Defined.
Local Instance nat_unit_instance : Unit nat.
Admitted.
  Lemma nat_ucmra_mixin : UcmraMixin nat.
Admitted.
Canonical Structure natUR : ucmra.
exact (Ucmra nat nat_ucmra_mixin).
Defined.

Class lcGS (Σ : gFunctors) := LcGS {
  #[local] lcGS_inG :: inG Σ (authR natUR);
  lcGS_name : gname;
}.

Inductive coPset_disj :=
  | CoPset : coPset → coPset_disj
  | CoPsetInvalid : coPset_disj.
  Canonical Structure coPset_disjO := leibnizO coPset_disj.
Local Instance coPset_disj_valid_instance : Valid coPset_disj.
Admitted.
Local Instance coPset_disj_op_instance : Op coPset_disj.
Admitted.
Local Instance coPset_disj_pcore_instance : PCore coPset_disj.
Admitted.

  Lemma coPset_disj_ra_mixin : RAMixin coPset_disj.
Admitted.
  Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin.
  Class wsatGpreS (Σ : gFunctors) : Set := WsatGpreS {
    wsatGpreS_inv : inG Σ (gmap_viewR positive (agreeR $ laterO (iPropO Σ)));
    wsatGpreS_enabled : inG Σ coPset_disjR;
    wsatGpreS_disabled : inG Σ (gset_disjR positive);
  }.

  Class wsatGS (Σ : gFunctors) : Set := WsatG {
    wsat_inG : wsatGpreS Σ;
    invariant_name : gname;
    enabled_name : gname;
    disabled_name : gname;
  }.

Inductive has_lc := HasLc | HasNoLc.

Class invGS_gen (hlc : has_lc) (Σ : gFunctors) : Set := InvG {
  #[global] invGS_wsat :: wsatGS Σ;
  #[global] invGS_lc :: lcGS Σ;
}.
Global Instance uPred_bi_fupd `{!invGS_gen hlc Σ} : BiFUpd (uPredI (iResUR Σ)).
Admitted.

Global Instance uPred_bi_bupd_fupd `{!invGS_gen hlc Σ} : BiBUpdFUpd (uPredI (iResUR Σ)).
Admitted.

Class cinvG Σ := {
  #[local] cinv_inG :: inG Σ (prodR (optionR (exclR unitO)) (optionR fracR)) ;
}.

Section defs.
  Context `{!invGS_gen hlc Σ, !cinvG Σ}.
Definition cinv_own (γ : gname) (p : frac) : iProp Σ.
Admitted.
  Definition cinv_excl γ : iProp Σ := own γ (Some (Excl ()), None).
Definition cinv (N : namespace) (γ : gname) (P : iProp Σ) : iProp Σ.
Admitted.

  Lemma cinv_own_excl_alloc P :
    pred_infinite P → ⊢ |==> ∃ γ, ⌜P γ⌝ ∗ cinv_excl γ ∗ cinv_own γ 1.
Admitted.

  Lemma cinv_alloc_strong (I : gname → Prop) E N :
    pred_infinite I →
    ⊢ |={E}=> ∃ γ, ⌜ I γ ⌝ ∗ cinv_own γ 1 ∗ ∀ P, ▷ P ={E}=∗ cinv N γ P.
  Proof.
    iIntros (?).
iMod cinv_own_excl_alloc as (γ) "[$ [Hexcl $]]"; first done.
🛠️ Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted) (truncated to 6.0KiB; full 152KiB file on GitHub Actions Artifacts under tmp.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines, then from 3034 lines to 2591 lines, then from 2604 lines to 2735 lines, then from 2741 lines to 2612 lines, then from 2625 lines to 3086 lines, then from 3092 lines to 2663 lines, then from 2676 lines to 2732 lines, then from 2738 lines to 2681 lines, then from 2694 lines to 2724 lines, then from 2730 lines to 2694 lines, then from 2707 lines to 2743 lines, then from 2749 lines to 2706 lines, then from 2719 lines to 2750 lines, then from 2756 lines to 2717 lines, then from 2730 lines to 3394 lines, then from 3401 lines to 2731 lines, then from 2745 lines to 2868 lines, then from 2874 lines to 2746 lines, then from 2760 lines to 2816 lines, then from 2823 lines to 2751 lines, then from 2765 lines to 3567 lines, then from 3574 lines to 2766 lines, then from 2780 lines to 3375 lines, then from 3382 lines to 2771 lines, then from 2785 lines to 3275 lines, then from 3282 lines to 3100 lines, then from 3107 lines to 2756 lines, then from 2769 lines to 3160 lines, then from 3167 lines to 2770 lines, then from 2784 lines to 3082 lines, then from 3089 lines to 2783 lines, then from 2797 lines to 3468 lines, then from 3475 lines to 2785 lines, then from 2799 lines to 3753 lines, then from 3760 lines to 2851 lines, then from 2865 lines to 3684 lines, then from 3691 lines to 2871 lines, then from 2885 lines to 3846 lines, then from 3853 lines to 2873 lines, then from 2887 lines to 3477 lines, then from 3484 lines to 2876 lines, then from 2890 lines to 3327 lines, then from 3334 lines to 2925 lines, then from 2944 lines to 2856 lines, then from 2871 lines to 2858 lines, then from 2872 lines to 2856 lines, then from 2869 lines to 6474 lines, then from 6481 lines to 2873 lines, then from 2882 lines to 2863 lines, then from 2876 lines to 3627 lines, then from 3634 lines to 2872 lines, then from 2886 lines to 4897 lines, then from 4904 lines to 2904 lines, then from 2918 lines to 3219 lines, then from 3226 lines to 2919 lines, th
🛠️ 📜 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 6.4MiB file on GitHub Actions Artifacts under build.log)
LIB 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]
iris/program_logic/lifting.vo (real: 2.83, user: 2.69, sys: 0.13, mem: 597680 ko)
COQNATIVE iris/program_logic/lifting.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/program_logic/total_weakestpre.v", line 106, characters 68-80:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/lifting.vo.native (real: 0.49, user: 0.37, sys: 0.11, mem: 157156 ko)
COQTEST [ref ignored] tests/algebra.v (ref: tests/algebra.ref)
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]
tests/algebra.vo (real: 1.25, user: 1.12, sys: 0.12, mem: 590380 ko)
ROCQ compile iris/base_logic/lib/cancelable_invariants.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q iris iris -Q iris_heap_lang iris.heap_lang -Q iris_unstable iris.unstable -Q iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.v 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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/iris
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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.2GW1fvEagc
MINIMIZER_DEBUG: files:  iris/base_logic/lib/cancelable_invariants.v /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/base_logic/lib/cancelable_invariants.v", line 90, characters 17-65:
Error: Tactic failure: iFrame: cannot frame ⌜?Goal γ⌝%I.

Command exited with non-zero status 1
iris/base_logic/lib/cancelable_invariants.vo (real: 1.47, user: 1.33, sys: 0.14, mem: 583836 ko)
make[2]: *** [Makefile.coq:813: iris/base_logic/lib/cancelable_invariants.vo] Error 1
make[2]: *** [iris/base_logic/lib/cancelable_invariants.vo] Deleting file 'iris/base_logic/lib/cancelable_invariants.glob'
make[2]: *** Waiting for unfinished jobs....
File "./iris/program_logic/total_weakestpre.v", line 274, characters 78-90:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/total_weakestpre.vo (real: 5.92, user: 5.76, sys: 0.15, mem: 636184 ko)
COQNATIVE iris/program_logic/total_weakestpre.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
iris/program_logic/total_weakestpre.vo.native (real: 0.58, user: 0.45, sys: 0.13, mem: 151848 ko)
make[1]: *** [Makefile.coq:411: all] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/iris'
make: *** [Makefile:3: all] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' iris 2
+ '[' iris '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real iris.log
    Time |  Peak Mem | File Name                                    
--------------------------------------------------------------------
0m19.36s | 636184 ko | Total Time / Peak Mem                        
--------------------------------------------------------------------
0m05.92s | 636184 ko | iris/program_logic/total_weakestpre.vo       
0m03.74s | 607156 ko | iris/program_logic/adequacy.vo               
0m02.83s | 597680 ko | iris/program_logic/lifting.vo                
0m01.97s | 598208 ko | iris/program_logic/atomic.vo                 
0m01.47s | 583836 ko | iris/base_logic/lib/cancelable_invariants.vo 
0m01.25s | 590380 ko | tests/algebra.vo                             
0m00.58s | 151848 ko | iris/program_logic/total_weakestpre.vo.native
0m00.57s | 157832 ko | iris/program_logic/atomic.vo.native          
0m00.54s | 167000 ko | iris/program_logic/adequacy.vo.native        
0m00.49s | 157156 ko | iris/program_logic/lifting.vo.native         
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 70MiB file on GitHub Actions Artifacts under bug.log)
4, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1115, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1136, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1149, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1150, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1166, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1225, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1227, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1337, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1350, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1379, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1464, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1586, characters 0-30:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope bi_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1829, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 1832, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 2167, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 2251, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 2364, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 2994, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 4428, characters 0-43:
Warning: Implicitly declaring hint databases is deprecated. Please explicitly
create "uPred_def"
[implicit-create-hint-db,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 4542, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 4574, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpwn698_hh/Top/bug_01.v", line 4575, characters 2-10:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
Error: The section defs, module spec_pat, module intro_pat, module sel_pat,
module base, module Ltac2, module SIdx, module String, module Ascii, module
String, module Ascii and module Qp need to be closed.


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions with admit. Defined with Proof using

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpj22gqrjw/Top/bug_01.v", line 54, characters 0-27:
Warning: Alternatives to Fin.t are available, see
<https://github.com/coq/stdlib/blob/master/theories/Vectors/Fin.v>.
[warn-library-file-stdlib-vector,stdlib-vector,warn-library-file,user-warn,default]
File "/tmp/tmpj22gqrjw/Top/bug_01.v", line 222, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpj22gqrjw/Top/bug_01.v", line 681, characters 0-29:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope Q_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpj22gqrjw/Top/bug_01.v", line 687, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmpj22gqrjw/Top/bug_01.v", line 768, characters 0-31:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope Qc_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpj22gqrjw/Top/bug_01.v", line 792, characters 47-48:
Error:
In environment
Qp : Type
Qp_to_Qc : Qc
The term "of_number_subproof" has type "IQ" while it is expected to have type
 "Q".


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to add Proof using lines
�[92m
Adding Proof using lines successful.�[0m
Failed to do everything at once; trying one at a time.
Adding Proof using lines unsuccessful.
No successful changes.

I will now attempt to export modules
Module exportation successful

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

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

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to remove all lines, one at a time

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.

cc @JasonGross

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 12, 2025

Minimization interrupted by timeout, being automatically continued. Partially Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v in 5h 15m 7s (from ci-iris) (interrupted by timeout, being automatically continued) (full log on GitHub Actions - verbose log)
⭐ ⏱️ Partially Minimized Coq File (timeout) (truncated to first and last 32KiB; full 220KiB file on GitHub Actions Artifacts under bug.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines, then from 3034 lines to 2591 lines, then from 2604 lines to 2735 lines, then from 2741 lines to 2612 lines, then from 2625 lines to 3086 lines, then from 3092 lines to 2663 lines, then from 2676 lines to 2732 lines, then from 2738 lines to 2681 lines, then from 2694 lines to 2724 lines, then from 2730 lines to 2694 lines, then from 2707 lines to 2743 lines, then from 2749 lines to 2706 lines, then from 2719 lines to 2750 lines, then from 2756 lines to 2717 lines, then from 2730 lines to 3394 lines, then from 3401 lines to 2731 lines, then from 2745 lines to 2868 lines, then from 2874 lines to 2746 lines, then from 2760 lines to 2816 lines, then from 2823 lines to 2751 lines, then from 2765 lines to 3567 lines, then from 3574 lines to 2766 lines, then from 2780 lines to 3375 lines, then from 3382 lines to 2771 lines, then from 2785 lines to 3275 lines, then from 3282 lines to 3100 lines, then from 3107 lines to 2756 lines, then from 2769 lines to 3160 lines, then from 3167 lines to 2770 lines, then from 2784 lines to 3082 lines, then from 3089 lines to 2783 lines, then from 2797 lines to 3468 lines, then from 3475 lines to 2785 lines, then from 2799 lines to 3753 lines, then from 3760 lines to 2851 lines, then from 2865 lines to 3684 lines, then from 3691 lines to 2871 lines, then from 2885 lines to 3846 lines, then from 3853 lines to 2873 lines, then from 2887 lines to 3477 lines, then from 3484 lines to 2876 lines, then from 2890 lines to 3327 lines, then from 3334 lines to 2925 lines, then from 2944 lines to 2856 lines, then from 2871 lines to 2858 lines, then from 2872 lines to 2856 lines, then from 2869 lines to 6474 lines, then from 6481 lines to 2873 lines, then from 2882 lines to 2863 lines, then from 2876 lines to 3627 lines, then from 3634 lines to 2872 lines, then from 2886 lines to 4897 lines, then from 4904 lines to 2904 lines, then from 2918 lines to 3219 lines, then from 3226 lines to 2919 lines, then from 2933 lines to 3323 lines, then from 3330 lines to 2973 lines, then from 2987 lines to 3755 lines, then from 3762 lines to 3170 lines, then from 3184 lines to 3391 lines, then from 3397 lines to 3217 lines, then from 3231 lines to 3614 lines, then from 3621 lines to 3243 lines, then from 3257 lines to 4364 lines, then from 4371 lines to 3246 lines, then from 3260 lines to 3765 lines, then from 3772 lines to 3258 lines, then from 3277 lines to 3167 lines, then from 3180 lines to 3709 lines, then from 3716 lines to 3194 lines, then from 3208 lines to 3727 lines, then from 3734 lines to 3199 lines, then from 3213 lines to 5472 lines, then from 5479 lines to 3470 lines, then from 3484 lines to 4779 lines, then from 4786 lines to 3496 lines, then from 3510 lines to 3815 lines, then from 3822 lines to 3506 lines, then from 3520 lines to 6150 lines, then from 6157 lines to 3700 lines, then from 3687 lines to 3583 lines, then from 3596 lines to 4232 lines, then from 4239 lines to 3636 lines, then from 3650 lines to 3902 lines, then from 3909 lines to 3635 lines, then from 3649 lines to 4815 lines, then from 4822 lines to 3636 lines, then from 3650 lines to 3906 lines, then from 3913 lines to 3645 lines, then from 3659 lines to 3673 lines, then from 3680 lines to 3653 lines, then from 3667 lines to 3921 lines, then from 3928 lines to 3661 lines, then from 3675 lines to 4684 lines, then from 4691 lines to 3700 lines, then from 3714 lines to 4365 lines, then from 4372 lines to 3702 lines, then from 3716 lines to 4097 lines, then from 4104 lines to 3717 lines, then from 3731 lines to 4459 lines, then from 4466 lines to 3895 lines, then from 3900 lines to 3665 lines, then from 3678 lines to 4074 lines, then from 4081 lines to 3664 lines, then from 3678 lines to 4045 lines, then from 4052 lines to 3665 lines, then from 3679 lines to 4116 lines, then from 4123 lines to 3710 lines, then from 3724 lines to 4412 lines, then from 4418 lines to 3736 lines, then from 3750 lines to 4512 lines, then from 4519 lines to 3738 lines, then from 3752 lines to 4132 lines, then from 4139 lines to 3761 lines, then from 3775 lines to 5073 lines, then from 5080 lines to 3768 lines, then from 3782 lines to 3796 lines, then from 3803 lines to 3781 lines, then from 3795 lines to 5455 lines, then from 5457 lines to 3802 lines, then from 3816 lines to 4085 lines, then from 4092 lines to 3807 lines, then from 3821 lines to 4515 lines, then from 4522 lines to 4275 lines, then from 4270 lines to 3749 lines, then from 3762 lines to 4353 lines, then from 4360 lines to 3750 lines, then from 3764 lines to 4377 lines, then from 4384 lines to 3766 lines, then from 3780 lines to 4068 lines, then from 4075 lines to 3769 lines, then from 3783 lines to 4010 lines, then from 4017 lines to 3778 lines, then from 3792 lines to 4463 lines, then from 4469 lines to 3780 lines, then from 3794 lines to 4319 lines, then from 4326 lines to 3782 lines, then from 3796 lines to 5281 lines, then from 5288 lines to 3833 lines, then from 3847 lines to 6045 lines, then from 6051 lines to 3920 lines, then from 3929 lines to 3838 lines, then from 3851 lines to 5509 lines, then from 5516 lines to 3858 lines, then from 3872 lines to 5710 lines, then from 5716 lines to 3883 lines, then from 3897 lines to 4576 lines, then from 4583 lines to 3901 lines, then from 3915 lines to 4076 lines, then from 4083 lines to 3914 lines, then from 3928 lines to 4206 lines, then from 4213 lines to 3931 lines, then from 3945 lines to 5585 lines, then from 5585 lines to 4004 lines, then from 4018 lines to 4692 lines, then from 4699 lines to 4173 lines, then from 4176 lines to 3980 lines, then from 3993 lines to 5077 lines, then from 5082 lines to 4189 lines, then from 4203 lines to 4554 lines, then from 4561 lines to 4209 lines, then from 4223 lines to 4353 lines, then from 4360 lines to 4222 lines, then from 4236 lines to 5968 lines, then from 5970 lines to 4409 lines, then from 4423 lines to 4466 lines, then from 4473 lines to 4410 lines, then from 4424 lines to 4438 lines, then from 4445 lines to 4424 lines, then from 4438 lines to 4475 lines, then from 4482 lines to 4436 lines, then from 4450 lines to 4495 lines, then from 4500 lines to 4455 lines, then from 4469 lines to 4483 lines, then from 4490 lines to 4456 lines, then from 4470 lines to 5435 lines, then from 5441 lines to 4505 lines, then from 4519 lines to 4833 lines, then from 4840 lines to 4510 lines, then from 4524 lines to 4725 lines, then from 4732 lines to 4515 lines, then from 4529 lines to 8662 lines, then from 8642 lines to 6958 lines *)
(* coqc version 9.2+alpha compiled with OCaml 4.14.2
   coqtop version 9.2+alpha
   Modules that could not be inlined: Ltac2.Pattern, Ltac2.Ltac1, Ltac2.Array, Stdlib.Vectors.Fin
   Expected coqc runtime on this file: 1.756 sec *)










Require Stdlib.ZArith.BinInt.
Require Stdlib.ZArith.BinIntDef.
Require Stdlib.NArith.BinNat.
Require Stdlib.NArith.BinNatDef.
Require Stdlib.Vectors.Fin.
Require Stdlib.PArith.Pnat.
Require Stdlib.Arith.Arith_base.
Require Stdlib.PArith.BinPos.
Require Stdlib.Arith.Peano_dec.
Require Stdlib.Arith.Wf_nat.
Require Stdlib.Arith.Factorial.
Require Stdlib.Arith.EqNat.
Require Stdlib.Arith.Compare_dec.
Require Stdlib.Arith.Between.
Require Stdlib.Arith.PeanoNat.
Require Stdlib.Numbers.Natural.Abstract.NProperties.
Require Stdlib.Numbers.Integer.Abstract.ZProperties.
Require Stdlib.Numbers.Natural.Abstract.NLcm0.
Require Stdlib.Numbers.Natural.Abstract.NBits.
Require Stdlib.Numbers.Integer.Abstract.ZLcm.
Require Stdlib.Numbers.Integer.Abstract.ZBits.
Require Stdlib.Numbers.Natural.Abstract.NLog.
Require Stdlib.Numbers.Natural.Abstract.NLcm.
Require Stdlib.Numbers.Integer.Abstract.ZPow.
Require Stdlib.Numbers.Natural.Abstract.NPow.
Require Stdlib.Numbers.Natural.Abstract.NDiv0.
Require Stdlib.Numbers.Integer.Abstract.ZGcd.
Require Stdlib.Numbers.Integer.Abstract.ZDivTrunc.
Require Stdlib.Numbers.Integer.Abstract.ZDivFloor.
Require Stdlib.Numbers.Natural.Abstract.NSqrt.
Require Stdlib.Numbers.Natural.Abstract.NParity.
Require Stdlib.Numbers.Natural.Abstract.NMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NGcd.
Require Stdlib.Numbers.Natural.Abstract.NDiv.
Require Stdlib.Numbers.Integer.Abstract.ZSgnAbs.
Require Stdlib.Numbers.Integer.Abstract.ZParity.
Require Stdlib.Numbers.Integer.Abstract.ZMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NSub.
Require Stdlib.Numbers.Integer.Abstract.ZMulOrder.
Require Stdlib.Numbers.Natural.Abstract.NMulOrder.
Require Stdlib.Numbers.Integer.Abstract.ZAddOrder.
Require Stdlib.Numbers.Natural.Abstract.NAddOrder.
Require Stdlib.Numbers.Integer.Abstract.ZLt.
Require Stdlib.Numbers.Natural.Abstract.NOrder.
Require Stdlib.Numbers.Integer.Abstract.ZMul.
Require Stdlib.Numbers.Natural.Abstract.NAdd.
Require Stdlib.Numbers.Integer.Abstract.ZAdd.
Require Stdlib.Numbers.Natural.Abstract.NBase.
Require Stdlib.Numbers.Integer.Abstract.ZBase.
Require Stdlib.Numbers.Natural.Abstract.NAxioms.
Require Stdlib.Numbers.Integer.Abstract.ZAxioms.
Require Stdlib.Numbers.NatInt.NZBits.
Require Stdlib.Numbers.NatInt.NZLog.
Require Stdlib.Numbers.NatInt.NZSqrt.
Require Stdlib.Numbers.NatInt.NZPow.
Require Stdlib.Numbers.NatInt.NZParity.
Require Stdlib.Numbers.NatInt.NZGcd.
Require Stdlib.Numbers.NatInt.NZDiv.
Require Stdlib.Numbers.NatInt.NZMulOrder.
Require Stdlib.Numbers.NatInt.NZAddOrder.
Require Stdlib.Numbers.NatInt.NZOrder.
Require Stdlib.Numbers.NatInt.NZMul.
Require Stdlib.Numbers.NatInt.NZAdd.
Require Stdlib.Numbers.NatInt.NZBase.
Require Stdlib.Numbers.NatInt.NZAxioms.
Require Stdlib.Structures.GenericMinMax.
Require Stdlib.Structures.OrdersFacts.
Require Stdlib.Structures.OrdersTac.
Require Stdlib.Structures.Orders.
Require Stdlib.Structures.Equalities.
Require Stdlib.Numbers.NumPrelude.
Require Ltac2.Array.
Require Ltac2.Ltac1.
Require Stdlib.Relations.Relations.
Require Stdlib.PArith.BinPosDef.
Require Ltac2.Pattern.
Require Stdlib.Relations.Operators_Properties.
Require Ltac2.Control.
Require Stdlib.Relations.Relation_Operators.
Require Stdlib.Bool.Bool.
Require Ltac2.Std.
Require Ltac2.Message.
Require Ltac2.Int.
Require Ltac2.Bool.
Require Stdlib.Setoids.Setoid.
Require Stdlib.Relations.Relation_Definitions.
Require Stdlib.Program.Basics.
Require Stdlib.Numbers.BinNums.
Require Stdlib.Logic.Eqdep_dec.
Require Stdlib.Lists.ListDef.
Require Stdlib.Classes.RelationClasses.
Require Stdlib.Classes.Morphisms_Prop.
Require Stdlib.Classes.Morphisms.
Require Stdlib.BinNums.NatDef.
Require Stdlib.BinNums.PosDef.
Require Stdlib.BinNums.IntDef.
Require Ltac2.Init.
Require Stdlib.Logic.HLevelsBase.
Require Stdlib.Logic.EqdepFacts.
Require Stdlib.Logic.Decidable.
Require Stdlib.Classes.DecidableClass.
Require Corelib.BinNums.PosDef.
Require Corelib.BinNums.NatDef.
Require Corelib.BinNums.IntDef.
Require Corelib.Numbers.BinNums.
Require Corelib.Relations.Relation_Definitions.
Require Corelib.Setoids.Setoid.
Require Corelib.Lists.ListDef.
Require Corelib.Program.Basics.
Require Corelib.ssr.ssrfun.
Require Corelib.Classes.Morphisms_Prop.
Require Corelib.Classes.Morphisms.
Require Corelib.Classes.RelationClasses.

Module Export AdmitTactic.
Module Import LocalFalse.
Inductive False : Prop := .
End LocalFalse.
Axiom proof_admitted : False.
Import Coq.Init.Ltac.
Tactic Notation "admit" := abstract case proof_admitted.
End AdmitTactic.

Module Export Stdlib_DOT_Lists_DOT_List_WRAPPED.
Module Export List.









Import Stdlib.Arith.PeanoNat.
Import Stdlib.Classes.Morphisms.
Export Stdlib.Lists.ListDef.

Set Implicit Arguments.








#[local] Open Scope bool_scope.
Open Scope list_scope.


Module Export ListNotations.
Notation "[ ]" := nil (format "[ ]") : list_scope.
Notation "[ x ]" := (cons x nil) : list_scope.
Notation "[ x ; y ; .. ; z ]" :=  (cons x (cons y .. (cons z nil) ..))
  (format "[ '[' x ;  '/' y ;  '/' .. ;  '/' z ']' ]") : list_scope.
End ListNotations.

Import ListNotations.

Section Lists.

  Variable A : Type.

  

  Definition hd (default:A) (l:list A) :=
    match l with
      | [] => default
      | x :: _ => x
    end.

  Definition hd_error (l:list A) :=
    match l with
      | [] => None
      | x :: _ => Some x
    end.

  Definition tl (l:list A) :=
    match l with
      | [] => []
      | _ :: l' => l'
    end.
Fixpoint In (a:A) (l:list A) : Prop. exact (match l with
      | [] => False
      | b :: l' => b = a \/ In a l'
    end). Defined.

End Lists.

Section Facts.

  Variable A : Type.

  

  
  Theorem nil_cons (x:A) (l:list A) : [] <> x :: l.
Admitted.

  

  Theorem destruct_list (l : list A) : {x:A & {tl:list A | l = x::tl}}+{l = []}.
Admitted.

  Lemma hd_error_tl_repr l (a:A) r :
    hd_error l = Some a /\ tl l = r <-> l = a :: r.
Admitted.

  Lemma hd_error_some_nil l (a:A) : hd_error l = Some a -> l <> [].
Admitted.

  Theorem length_zero_iff_nil (l : list A):
    length l = 0 <-> l = [].
Admitted.

  

  Theorem hd_error_nil : hd_error (@nil A) = None.
Admitted.

  Theorem hd_error_cons (l : list A) (x : A) : hd_error (x::l) = Some x.
Admitted.

  
  
  

  
  Theorem app_cons_not_nil (x y:list A) (a:A) : [] <> x ++ a :: y.
Admitted.

  
  Theorem app_nil_l (l:list A) : [] ++ l = l.
Admitted.

  Theorem app_nil_r (l:list A) : l ++ [] = l.
Admitted.

  
  
  Theorem app_nil_end_deprecated (l:list A) : l = l ++ [].
Admitted.
  

  
  Theorem app_assoc (l m n:list A) : l ++ m ++ n = (l ++ m) ++ n.
Admitted.

  
  
  Theorem app_assoc_reverse_deprecated (l m n:list A) : (l ++ m) ++ n = l ++ m ++ n.
Admitted.
  

  
  Theorem app_comm_cons (x y:list A) (a:A) : a :: (x ++ y) = (a :: x) ++ y.
Admitted.

  

  Theorem app_eq_nil (l l':list A) : l ++ l' = [] -> l = [] /\ l' = [].
Admitted.

  Lemma app_eq_cons x y z (a : A):
    x ++ y = a :: z -> (x = [] /\ y = a :: z) \/ exists x', x = a :: x' /\ z = x' ++ y.
Admitted.

  Theorem app_eq_unit (x y:list A) (a:A) :
      x ++ y = [a] -> x = [] /\ y = [a] \/ x = [a] /\ y = [].
Admitted.

  Lemma elt_eq_unit l1 l2 (a b : A) :
    l1 ++ a :: l2 = [b] -> a = b /\ l1 = [] /\ l2 = [].
Admitted.

  Theorem app_eq_app X (x1 x2 y1 y2: list X) : x1++x2 = y1++y2 ->
    exists l, (x1 = y1++l /\ y2 = l++x2) \/ (y1 = x1++l /\ x2 = l++y2).
Admitted.

  Lemma app_inj_tail :
    forall (x y:list A) (a b:A), x ++ [a] = y ++ [b] -> x = y /\ a = b.
Admitted.

  Lemma app_inj_tail_iff :
    forall (x y:list A) (a b:A), x ++ [a] = y ++ [b] <-> x = y /\ a = b.
Admitted.

  

  Lemma length_nil : length (@nil A) = 0.
Admitted.

  Lemma length_cons : forall (l : list A) a, length (a :: l) = S (length l).
Admitted.

  Lemma length_app : forall l l' : list A, length (l++l') = length l + length l'.
Admitted.

  Lemma length_app_comm : forall l l' : list A, length (l++l') = length (l'++l).
Admitted.

  Lemma last_length : forall (l : list A) a, length (l ++ [a]) = S (length l).
Admitted.

  Lemma app_inv_head_iff:
   forall l l1 l2 : list A, l ++ l1 = l ++ l2 <-> l1 = l2.
Admitted.

  Lemma app_inv_head:
   forall l l1 l2 : list A, l ++ l1 = l ++ l2 -> l1 = l2.
Admitted.

  Lemma app_inv_tail:
    forall l l1 l2 : list A, l1 ++ l = l2 ++ l -> l1 = l2.
Admitted.

  Lemma app_inv_tail_iff:
    forall l l1 l2 : list A, l1 ++ l = l2 ++ l <-> l1 = l2.
Admitted.

  
  
  

  

  Theorem in_eq : forall (a:A) (l:list A), In a (a :: l).
Admitted.

  Theorem in_cons : forall (a b:A) (l:list A), In b l -> In b (a :: l).
Admitted.

  Theorem not_in_cons (x a : A) (l : list A):
    ~ In x (a::l) <-> x<>a /\ ~ In x l.
Admitted.

  Theorem in_nil : forall a:A, ~ In a [].
Admitted.

  Lemma in_app_or : forall (l m:list A) (a:A), In a (l ++ m) -> In a l \/ In a m.
Admitted.

  Lemma in_or_app : forall (l m:list A) (a:A), In a l \/ In a m -> In a (l ++ m).
Admitted.

  Lemma in_app_iff : forall l l' (a:A), In a (l++l') <-> In a l \/ In a l'.
Admitted.

  Theorem in_split : forall x (l:list A), In x l -> exists l1 l2, l = l1++x::l2.
Admitted.

  Lemma in_elt : forall (x:A) l1 l2, In x (l1 ++ x :: l2).
Admitted.

  Lemma in_elt_inv : forall (x y : A) l1 l2,
    In x (l1 ++ y :: l2) -> x = y \/ In x (l1 ++ l2).
Admitted.

  Lemma app_inj_pivot x1 x2 y1 y2 (a : A): x1 ++ a :: x2 = y1 ++ a :: y2 ->
    ((In a x1 /\ In a y2) \/ (In a x2 /\ In a y1)) \/ (x1 = y1 /\ x2 = y2).
Admitted.

  
  Lemma in_inv : forall (a b:A) (l:list A), In b (a :: l) -> a = b \/ In b l.
Admitted.

  
  Theorem in_dec :
    (forall x y:A, {x = y} + {x <> y}) ->
    forall (a:A) (l:list A), {In a l} + {~ In a l}.
Admitted.

  Lemma length_tl l : length (@tl A l) = length l - 1.
Admitted.
End Facts.

#[global]
Hint Resolve app_assoc app_assoc_reverse_deprecated: datatypes.
#[global]
Hint Resolve app_comm_cons app_cons_not_nil: datatypes.
#[global]
Hint Immediate app_eq_nil: datatypes.
#[global]
Hint Resolve app_eq_unit app_inj_tail: datatypes.
#[global]
Hint Resolve in_eq in_cons in_inv in_nil in_app_or in_or_app: datatypes.


#[local] Ltac Tauto.intuition_solver ::= auto with datatypes.





Section Elts.

  Variable A : Type.

  
  
  

  #[local] Notation nth := (@nth A).
Fixpoint nth_ok (n:nat) (l:list A) (default:A) {struct l} : bool. exact (match n, l with
      | O, x :: l' => true
      | O, [] => false
      | S m, [] => false
      | S m, x :: l' => nth_ok m l' default
    end). Defined.

  Lemma nth_in_or_default :
    forall (n:nat) (l:list A) (d:A), {In (nth n l d) l} + {nth n l d = d}.
Admitted.

  Lemma nth_S_cons :
    forall (n:nat) (l:list A) (d a:A),
      In (nth n l d) l -> In (nth (S n) (a :: l) d) (a :: l).
Admitted.
Fixpoint nth_error (l:list A) (n:nat) {struct n} : option A. exact (match n, l with
      | O, x :: _ => Some x
      | S n, _ :: l' => nth_error l' n
      | _, _ => None
    end). Defined.
Definition nth_default (default:A) (l:list A) (n:nat) : A. exact (match nth_error l n with
      | Some x => x
      | None => default
    end). Defined.

  Lemma nth_default_eq :
    forall n l (d:A), nth_default d l n = nth n l d.
Admitted.

  

  Lemma nth_In :
    forall (n:nat) (l:list A) (d:A), n < length l -> In (nth n l d) l.
Admitted.

  Lemma In_nth l x d : In x l ->
    exists n, n < length l /\ nth n l d = x.
Admitted.

  Lemma nth_overflow : forall l n d, length l <= n -> nth n l d = d.
Admitted.

  Lemma nth_indep :
    forall l n d d', n < length l -> nth n l d = nth n l d'.
Admitted.

  Lemma app_nth1 :
    forall l l' d n, n < length l -> nth n (l++l') d = nth n l d.
Admitted.

  Lemma app_nth2 :
    forall l l' d n, n >= length l -> nth n (l++l') d = nth (n-length l) l' d.
Admitted.

  Lemma app_nth2_plus : forall l l' d n,
    nth (length l + n) (l ++ l') d = nth n l' d.
Admitted.

  Lemma nth_middle : forall l l' a d,
    nth (length l) (l ++ a :: l') d = a.
Admitted.

  Lemma nth_split n l d : n < length l ->
    exists l1, exists l2, l = l1 ++ nth n l d :: l2 /\ length l1 = n.
Admitted.

  Lemma nth_ext : forall l l' d d', length l = length l' ->
    (forall n, n < length l -> nth n l d = nth n l' d') -> l = l'.
Admitted.

  

  Lemma nth_error_In l n x : nth_error l n = Some x -> In x l.
Admitted.

  Lemma In_nth_error l x : In x l -> exists n, nth_error l n = Some x.
Admitted.

  Lemma In_iff_nth_error l x : In x l <-> exists n, nth_error l n = Some x.
Admitted.

  Lemma nth_error_None l n : nth_error l n = None <-> length l <= n.
Admitted.

  Lemma nth_error_Some l n : nth_error l n <> None <-> n < length l.
Admitted.

  Lemma nth_error_split l n a : nth_error l n = Some a ->
    exists l1, exists l2, l = l1 ++ a :: l2 /\ length l1 = n.
Admitted.

  Lemma nth_error_app1 l l' n : n < length l ->
    nth_error (l++l') n = nth_error l n.
Admitted.

  Lemma nth_error_app2 l l' n : length l <= n ->
    nth_error (l++l') n = nth_error l' (n-length l).
Admitted.

  Lemma nth_error_app l l' n : nth_error (l ++ l') n =
    if Nat.ltb n (length l)
    then nth_error l n
    else nth_error l' (n - length l).
Admitted.

  Lemma nth_error_ext l l':
    (forall n, nth_error l n = nth_error l' n) -> l = l'.
Admitted.

  Lemma unfold_nth_error l n
    : nth_error l n
      = match n, l with
        | O, x :: _ => Some x
        | S n, _ :: l' => nth_error l' n
        | _, _ => None
        end.
Admitted.

  Lemma nth_error_nil n : nth_error [] n = None.
Admitted.

  Lemma nth_error_cons x xs n
    : nth_error (x :: xs) n
      = match n with
        | O => Some x
        | S n => nth_error xs n
        end.
Admitted.

  Lemma nth_error_0 l
    : nth_error l O = hd_error l.
Admitted.

  Lemma nth_error_S l n
    : nth_error l (S n) = nth_error (tl l) n.
Admitted.

  Lemma nth_error_cons_0 x l : nth_error (cons x l) 0 = Some x.
Admitted.

  Lemma nth_error_cons_succ x l n :
    nth_error (cons x l) (S n) = nth_error l n.
Admitted.

  

  Lemma nth_error_nth : forall (l : list A) (n : nat) (x d : A),
    nth_error l n = Some x -> nth n l d = x.
Admitted.

  Lemma nth_error_nth' : forall (l : list A) (n : nat) (d : A),
    n < length l -> nth_error l n = Some (nth n l d).
Admitted.

  Lemma nth_error_nth_None (l : list A) (n : nat) (d : A) :
    nth_error l n = None -> nth n l d = d.
Admitted.
Fixpoint last (l:list A) (d:A) : A. exact (match l with
    | [] => d
    | [a] => a
    | a :: l' => last l' d
  end). Defined.

  Lemma last_last : forall l a d, last (l ++ [a]) d = a.
Admitted.
Fixpoint removelast (l:list A) : list A. exact (match l with
      | [] =>  []
      | [a] => []
      | a :: l' => a :: removelast l'
    end). Defined.

  Lemma app_removelast_last :
    forall l d, l <> [] -> l = removelast l ++ [last l d].
Admitted.

  Lemma exists_last :
    forall l, l <> [] -> { l' : (list A) & { a : A | l = l' ++ [a]}}.
Admitted.

  Lemma removelast_app :
    forall l l', l' <> [] -> removelast (l++l') = l ++ removelast l'.
Admitted.

  Lemma removelast_last : forall l a, removelast (l ++ [a]) = l.
Admitted.

  
  
  

  Hypothesis eq_dec : forall x y : A, {x = y}+{x <> y}.
Fixpoint remove (x : A) (l : list A) : list A. exact (match l with
      | [] => []
      | y::tl => if (eq_dec x y) then remove x tl else y :: remove x tl
    end). Defined.

  Lemma remove_cons : forall x l, remove x (x :: l) = remove x l.
Admitted.

  Lemma remove_app : forall x l1 l2,
    remove x (l1 ++ l2) = remove x l1 ++ remove x l2.
Admitted.

  Theorem remove_In : forall (l : list A) (x : A), ~ In x (remove x l).
Admitted.

  Lemma notin_remove: forall l x, ~ In x l -> remove x l = l.
Admitted.

  Lemma in_remove: forall l x y, In x (remove y l) -> In x l /\ x <> y.
Admitted.

  Lemma in_in_remove : forall l x y, x <> y -> In x l -> In x (remove y l).
Admitted.

  Lemma remove_remove_comm : forall l x y,
    remove x (remove y l) = remove y (remove x l).
Admitted.

  Lemma remove_remove_eq : forall l x, remove x (remove x l) = remove x l.
Admitted.

  Lemma remove_length_le : forall l x, length (remove x l) <= length l.
Admitted.

  Lemma remove_length_lt : forall l x, In x l -> length (remove x l) < length l.
Admitted.
Fixpoint count_occ (l : list A) (x : A) : nat. exact (match l with
      | [] => 0
      | y :: tl =>
        let n := count_occ tl x in
        if eq_dec y x then S n else n
    end). Defined.

  
  Theorem count_occ_In l x : In x l <-> count_occ l x > 0.
Admitted.

  Theorem count_occ_not_In l x : ~ In x l <-> count_occ l x = 0.
Admitted.

  Lemma count_occ_nil x : count_occ [] x = 0.
Admitted.

  Theorem count_occ_inv_nil l :
    (forall x:A, count_occ l x = 0) <-> l = [].
Admitted.

  Lemma count_occ_cons_eq l x y :
    x = y -> count_occ (x::l) y = S (count_occ l y).
Admitted.

  Lemma count_occ_cons_neq l x y :
    x <> y -> count_occ (x::l) y = count_occ l y.
Admitted.

  Lemma count_occ_app l1 l2 x :
    count_occ (l1 ++ l2) x = count_occ l1 x + count_occ l2 x.
Admitted.

  Lemma count_occ_elt_eq l1 l2 x y : x = y ->
    count_occ (l1 ++ x :: l2) y = S (count_occ (l1 ++ l2) y).
Admitted.

  Lemma count_occ_elt_neq l1 l2 x y : x <> y ->
    count_occ (l1 ++ x :: l2) y = count_occ (l1 ++ l2) y.
Admitted.

  Lemma count_occ_bound x l : count_occ l x <= length l.
Admitted.

End Elts.
Notation nth := nth.





Section ListOps.

  Variable A : Type.
Fixpoint rev (l:list A) : list A. exact (match l with
      | [] => []
      | x :: l' => rev l' ++ [x]
    end). Defined.

  Lemma rev_app_distr : forall x y:list A, rev (x ++ y) = rev y ++ rev x.
Admitted.

  Remark rev_unit : forall (l:list A) (a:A), rev (l ++ [a]) = a :: rev l.
Admitted.

  Lemma rev_involutive : forall l:list A, rev (rev l) = l.
Admitted.

  Lemma rev_inj (l1 l2: list A):
    rev l1 = rev l2 -> l1 = l2.
Admitted.

  Lemma rev_eq_app : forall l l1 l2, rev l = l1 ++ l2 -> l = rev l2 ++ rev l1.
Admitted.

  
  
  

  Lemma rev_list_ind : forall P:list A-> Prop,
    P [] ->
    (forall (a:A) (l:list A), P (rev l) -> P (rev (a :: l))) ->
    forall l:list A, P (rev l).
Admitted.

  Theorem rev_ind : forall P:list A -> Prop,
    P [] ->
    (forall (x:A) (l:list A), P l -> P (l ++ [x])) -> forall l:list A, P l.
Admitted.

  

  Lemma in_rev : forall l x, In x l <-> In x (rev l).
Admitted.

  Lemma length_rev : forall l, length (rev l) = length l.
Admitted.

  Lemma rev_nth : forall l d n, n < length l ->
    nth n (rev l) d = nth (length l - S n) l d.
Admitted.

  Lemma nth_error_rev n l : nth_error (rev l) n =
    if Nat.ltb n (length l) then nth_error l (length l - S n) else None.
Admitted.
Fixpoint rev_append (l l': list A) : list A. exact (match l with
      | [] => l'
      | a :: l => rev_append l (a::l')
    end). Defined.

  Definition rev' l : list A := rev_append l [].

  Lemma rev_append_rev : forall l l', rev_append l l' = rev l ++ l'.
Admitted.

  Lemma rev_alt : forall l, rev l = rev_append l [].
Admitted.
Fixpoint concat (l : list (list A)) : list A. exact (match l with
     | [] => []
     | x :: l => x ++ concat l
    end). Defined.

  Lemma concat_nil : concat [] = [].
Admitted.

  Lemma concat_cons : forall x l, concat (cons x l) = x ++ concat l.
Admitted.

  Lemma concat_app : forall l1 l2, concat (l1 ++ l2) = concat l1 ++ concat l2.
Admitted.

  Lemma in_concat : forall l y,
    In y (concat l) <-> exists x, In x l /\ In y x.
Admitted.

  
  
  

  Hypothesis eq_dec : forall (x y : A), {x = y}+{x <> y}.

  Lemma list_eq_dec : forall l l':list A, {l = l'} + {l <> l'}.
Admitted.

  Lemma count_occ_rev l x : count_occ eq_dec (rev l) x = count_occ eq_dec l x.
Admitted.

End ListOps.









Section Map.
  Variables (A : Type) (B : Type).
  Variable f : A -> B.

  #[local] Notation map := (@map A B f).

  Lemma map_cons (x:A)(l:list A) : map (x::l) = (f x) :: (map l).
Admitted.

  Lemma in_map :
    forall (l:list A) (x:A), In x l -> In (f x) (map l).
Admitted.

  Lemma in_map_iff : forall l y, In y (map l) <-> exists x, f x = y /\ In x l.
Admitted.

  Lemma length_map : forall l, length (map l) = length l.
Admitted.

  Lemma map_nth : forall l d n,
    nth n (map l) (f d) = f (nth n l d).
Admitted.

  Lemma nth_error_map : forall n l,
    nth_error (map l) n = option_map f (nth_error l n).
Admitted.

  Lemma map_nth_error : forall n l d,
    nth_error l n = Some d -> nth_error (map l) n = Some (f d).
Admitted.

  Lemma tl_map l : tl (map l) = map (tl l).
Admitted.

  Lemma map_app : forall l l',
    map (l++l') = (map l)++(map l').
Admitted.

  Lemma map_last : forall l a,
    map (l ++ [a]) = (map l) ++ [f a].
Admitted.

  Lemma map_rev : forall l, map (rev l) = rev (map l).
Admitted.

  Lemma map_eq_nil : forall l, map l = [] -> l = [].
Admitted.

  Lemma map_eq_cons : forall l l' b,
    map l = b :: l' -> exists a tl, l = a :: tl /\ f a = b /\ map tl = l'.
Admitted.

  Lemma map_eq_app  : forall l l1 l2,
    map l = l1 ++ l2 -> exists l1' l2', l = l1' ++ l2' /\ map l1' = l1 /\ map l2' = l2.
Admitted.

  

  Hypothesis decA: forall x1 x2 : A, {x1 = x2} + {x1 <> x2}.
  Hypothesis decB: forall y1 y2 : B, {y1 = y2} + {y1 <> y2}.

  Theorem count_occ_map x l:
    count_occ decA l x = count_occ decB (map l) (f x).
Admitted.

End Map.
Notation map := map.





Section FlatMap.
  Variables (A : Type) (B : Type).
  Variable f : A -> list B.
Fixpoint flat_map (l:list A) : list B. exact (match l with
        | [] => []
        | x :: l => f x ++ flat_map l
      end). Defined.

    Lemma flat_map_concat_map l :
      flat_map l = concat (map f l).
Admitted.

    Lemma flat_map_app l1 l2 :
      flat_map (l1 ++ l2) = flat_map l1 ++ flat_map l2.
Admitted.

    Lemma in_flat_map l y :
      In y (flat_map l) <-> exists x, In x l /\ In y (f x).
Admitted.

End FlatMap.

Lemma concat_map : forall A B (f : A -> B) l, map f (concat l) = concat (map (map f) l).
Admitted.

Lemma remove_concat A (eq_dec : forall x y : A, {x = y}+{x <> y}) : forall l x,
  re

[...]

l "iSpecialize:" P "not an implication/wand" in
  let solve_done d :=
    lazymatch d with
    | true =>
       first [ done
             | let Q := match goal with |- envs_entails _ ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done"
             | let Q := match goal with |- ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done" ]
    | false => idtac
    end in
  let Δ := iGetCtx in
  lazymatch pats with
    | [] => idtac
    | SIdent ?H2 [] :: ?pats =>

       notypeclasses refine (tac_specialize false _ H2 _ H1 _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H2 := pretty_ident H2 in
          fail "iSpecialize:" H2 "not found"
         |pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |tc_solve ||
          let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
          let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
          fail "iSpecialize: cannot instantiate" P "with" Q
         |pm_reduce; iSpecializePat_go H1 pats]
    | SIdent ?H2 ?pats1 :: ?pats =>

       let H2tmp := iFresh in
       iPoseProofCoreHyp H2 as H2tmp;

       iRevertHyp H1 with (fun p =>
         iSpecializePat_go H2tmp pats1;
           [..
           |_iIntroMaybePersistent H1 p]);

         [..
         |
          notypeclasses refine (tac_specialize true _ H2tmp _ H1 _ _ _ _ _ _ _ _ _);
            [pm_reflexivity ||
             let H2tmp := pretty_ident H2tmp in
             fail "iSpecialize:" H2tmp "not found"
            |pm_reflexivity ||
             let H1 := pretty_ident H1 in
             fail "iSpecialize:" H1 "not found"
            |tc_solve ||
             let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
             let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
             fail "iSpecialize: cannot instantiate" P "with" Q
            |pm_reduce; iSpecializePat_go H1 pats]]
    | SPureGoal ?d :: ?pats =>
       notypeclasses refine (tac_specialize_assert_pure _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- FromPure _ ?Q _ => Q end in
          fail "iSpecialize:" Q "not pure"
         |solve_done d
         |pm_reduce;
          iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic false ?Hs_frame [] ?d) :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve
         |pm_reduce; iFrame Hs_frame; solve_done d
         |pm_reduce; iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: ?pats =>
       fail "iSpecialize: cannot select hypotheses for intuitionistic premise"
    | SGoal (SpecGoal ?m ?lr ?Hs_frame ?Hs ?d) :: ?pats =>
       let Hs' := eval cbv in (if lr then Hs else Hs_frame ++ Hs) in
       notypeclasses refine (tac_specialize_assert _ H1 _
           (if m is GModal then true else false) lr Hs' _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          lazymatch goal with
          | |- False =>
            let Hs' := iMissingHypsCore Δ Hs' in
            fail "iSpecialize: hypotheses" Hs' "not found"
          | _ =>
            notypeclasses refine (conj _ _);
              [iFrame Hs_frame; solve_done d
              |iSpecializePat_go H1 pats]
          end]
    | SAutoFrame GIntuitionistic :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve ||
          fail "iSpecialize: Cannot find IntoAbsorbingly;"
               "this should not happen, please report a bug"
         |pm_reduce; solve [iFrame "∗ #"]
         |pm_reduce; iSpecializePat_go H1 pats]
    | SAutoFrame ?m :: ?pats =>
       notypeclasses refine (tac_specialize_frame _ H1 _
           (if m is GModal then true else false) _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          first
            [notypeclasses refine (tac_unlock_emp _ _ _)
            |notypeclasses refine (tac_unlock_True _ _ _)
            |iFrame "∗ #"; notypeclasses refine (tac_unlock _ _ _)
            |let P :=
               match goal with |- envs_entails _ (?P ∗ locked _)%I => P end in
             fail 1 "iSpecialize: premise" P "cannot be solved by framing"]
         |exact eq_refl]; _iIntroSpatial H1; iSpecializePat_go H1 pats
    end.

Local Tactic Notation "iSpecializePat" open_constr(H) constr(pat) :=
  let pats := spec_pat.parse pat in iSpecializePat_go H pats.

Fixpoint use_tac_specialize_intuitionistic_helper {M}
    (Δ : envs M) (pats : list spec_pat) : bool :=
  match pats with
  | [] => false
  | SPureGoal _ :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SAutoFrame _ :: _ => true
  | SIdent H _ :: pats =>
     match envs_lookup_delete false H Δ with
     | Some (false, _, Δ) => true
     | Some (true, _, Δ) => use_tac_specialize_intuitionistic_helper Δ pats
     | None => false
     end
  | SGoal (SpecGoal GModal _ _ _ _) :: _ => false
  | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SGoal (SpecGoal GSpatial neg Hs_frame Hs _) :: pats =>
     match envs_split (if neg is true then Right else Left)
                      (if neg then Hs else pm_app Hs_frame Hs) Δ with
     | Some (Δ1,Δ2) => if env_spatial_is_nil Δ1
                       then use_tac_specialize_intuitionistic_helper Δ2 pats
                       else true
     | None => false
     end
  end.

Tactic Notation "iSpecializeCore" open_constr(H)
    "with" open_constr(xs) open_constr(pat) "as" constr(p) :=
  let p := intro_pat_intuitionistic p in
  let pat := spec_pat.parse pat in
  let H :=
    lazymatch type of H with
    | string => constr:(INamed H)
    | _ => H
    end in
  iSpecializeArgs H xs; [..|
    lazymatch type of H with
    | ident =>
       let pat := spec_pat.parse pat in
       let Δ := iGetCtx in

       let b := eval lazy [use_tac_specialize_intuitionistic_helper] in
         (if p then use_tac_specialize_intuitionistic_helper Δ pat else false) in
       lazymatch eval pm_eval in b with
       | true =>

          lazymatch iTypeOf H with
          | Some (?q, _) =>
             let PROP := iBiOfGoal in

             lazymatch eval lazy in (q || tc_to_bool (BiAffine PROP)) with
             | true =>
                notypeclasses refine (tac_specialize_intuitionistic_helper _ H _ _ _ _ _ _ _ _ _ _);
                  [pm_reflexivity

                  |pm_reduce; tc_solve

                  |iSpecializePat H pat;
                    [..
                    |notypeclasses refine (tac_specialize_intuitionistic_helper_done _ H _ _ _);
                     pm_reflexivity]
                  |tc_solve ||
                   let Q := match goal with |- IntoPersistent _ ?Q _ => Q end in
                   fail "iSpecialize:" Q "not persistent"
                  |pm_reduce ]
             | false => iSpecializePat H pat
             end
          | None =>
             let H := pretty_ident H in
             fail "iSpecialize:" H "not found"
          end
       | false => iSpecializePat H pat
       end
    | _ => fail "iSpecialize:" H "should be a hypothesis, use iPoseProof instead"
    end].

Tactic Notation "iSpecializeCore" open_constr(t) "as" constr(p) :=
  lazymatch type of t with
  | string => iSpecializeCore t with hnil "" as p
  | ident => iSpecializeCore t with hnil "" as p
  | _ =>
    lazymatch t with
    | ITrm ?H ?xs ?pat => iSpecializeCore H with xs pat as p
    | _ => fail "iSpecialize:" t "should be a proof mode term"
    end
  end.

Tactic Notation "iPoseProofCore" open_constr(lem)
    "as" constr(p) tactic3(tac) :=
  iStartProof;
  let t := lazymatch lem with ITrm ?t ?xs ?pat => t | _ => lem end in
  let t := lazymatch type of t with string => constr:(INamed t) | _ => t end in
  let spec_tac Htmp :=
    lazymatch lem with
    | ITrm _ ?xs ?pat => iSpecializeCore (ITrm Htmp xs pat) as p
    | _ => idtac
    end in
  lazymatch type of t with
  | ident =>
     let Htmp := iFresh in
     iPoseProofCoreHyp t as Htmp; spec_tac Htmp; [..|tac Htmp]
  | _ => iPoseProofCoreLem t as (fun Htmp => spec_tac Htmp; [..|tac Htmp])
  end.

Tactic Notation "iOrDestruct" constr(H) "as" constr(H1) constr(H2) :=
  eapply tac_or_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iOrDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoOr ?P _ _ => P end in
     fail "iOrDestruct: cannot destruct" P
    | pm_reduce;
      lazymatch goal with
      | |- False =>
        let H1 := pretty_ident H1 in
        let H2 := pretty_ident H2 in
        fail "iOrDestruct:" H1 "or" H2 "not fresh"
      |  _ => split
      end].

Ltac _iAndDestruct H H1 H2 :=
  eapply tac_and_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iAndDestruct:" H "not found"
    |pm_reduce; tc_solve ||
     let P :=
       lazymatch goal with
       | |- IntoSep ?P _ _ => P
       | |- IntoAnd _ ?P _ _ => P
       end in
     fail "iAndDestruct: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
       | |- False =>
         let H1 := pretty_ident H1 in
         let H2 := pretty_ident H2 in
         fail "iAndDestruct:" H1 "or" H2 "not fresh"
       | _ => idtac
     end].

Ltac _iAndDestructChoice H d H' :=
  eapply tac_and_destruct_choice with H _ d H' _ _ _;
    [pm_reflexivity || fail "iAndDestructChoice:" H "not found"
    |pm_reduce; tc_solve ||
     let P := match goal with |- TCOr (IntoAnd _ ?P _ _) _ => P end in
     fail "iAndDestructChoice: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iAndDestructChoice:" H' "not fresh"
     | _ => idtac
     end].

Tactic Notation "_iExistDestruct" constr(H)
    "as" simple_intropattern(x) constr(Hx) :=
  eapply tac_exist_destruct with H _ Hx _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iExistDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoExist ?P _ _ => P end in
     fail "iExistDestruct: cannot destruct" P|];
    let name := lazymatch goal with
                | |- let _ := (λ name, _) in _ => name
                end in
    intros _;
    let y := fresh name in
    intros y; pm_reduce;
    lazymatch goal with
    | |- False =>
      let Hx := pretty_ident Hx in
      fail "iExistDestruct:" Hx "not fresh"
    | _ => revert y; intros x
    end.

Tactic Notation "iModIntro" uconstr(sel) :=
  iStartProof;
  notypeclasses refine (tac_modal_intro _ _ sel _ _ _ _ _ _ _ _ _ _ _ _ _ _);
    [tc_solve ||
     fail "iModIntro: the goal is not a modality"
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalIntuitionisticEnv _ _ _ ?s => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: intuitionistic context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: intuitionistic context is non-empty"
     end
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalSpatialEnv _ _ _ ?s _ => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: spatial context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: spatial context is non-empty"
     end
    |pm_reduce; tc_solve ||
     fail "iModIntro: cannot filter spatial context when goal is not absorbing"
    |iSolveSideCondition
    |pm_prettify
      ].
Tactic Notation "iModIntro" := iModIntro _.

Tactic Notation "iModCore" constr(H) "as" constr(H') :=
  eapply tac_modal_elim with H H' _ _ _ _ _ _;
    [pm_reflexivity || fail "iMod:" H "not found"
    |tc_solve ||
     let P := match goal with |- ElimModal _ _ _ ?P _ _ _ => P end in
     let Q := match goal with |- ElimModal _ _ _ _ _ ?Q _ => Q end in
     fail "iMod: cannot eliminate modality" P "in" Q
    |iSolveSideCondition
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iMod:" H' "not fresh"
     | _ => pm_prettify
     end].

Ltac _ident_for_pat pat :=
  lazymatch pat with
  | IIdent ?x => x
  | _ => let x := iFresh in x
  end.

Ltac _ident_for_pat_default pat default :=
  lazymatch pat with
  | IIdent ?x => x
  | _ =>
    lazymatch default with
    | IAnon _ => default
    | _ => let x := iFresh in x
    end
  end.

Ltac _iDestructHypGo Hz pat0 pat :=
  lazymatch pat with
  | IFresh =>
     lazymatch Hz with
     | IAnon _ => idtac
     | INamed ?Hz => let Hz' := iFresh in iRename Hz into Hz'
     end
  | IDrop => _iClearHyp Hz
  | IFrame => iFrame Hz
  | IIdent Hz => idtac
  | IIdent ?y => iRename Hz into y
  | IList [[]] => iExFalso; iExact Hz

  | IList [[?pat1; IDrop]] =>
     let x := _ident_for_pat_default pat1 Hz in
     _iAndDestructChoice Hz Left x;
     _iDestructHypGo x pat0 pat1
  | IList [[IDrop; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iAndDestructChoice Hz Right x;
     _iDestructHypGo x pat0 pat2

  | IList [[IPure IGallinaAnon; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as ? x; _iDestructHypGo x pat0 pat2
  | IList [[IPure (IGallinaNamed ?s); ?pat2]] =>
     let x := fresh in
     let y := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as x y;
     rename_by_string x s;
     _iDestructHypGo y pat0 pat2
  | IList [[?pat1; ?pat2]] =>

     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat pat2 in
     _iAndDestruct Hz x1 x2;
     _iDestructHypGo x1 pat0 pat1; _iDestructHypGo x2 pat0 pat2
  | IList [_ :: _ :: _] => fail "iDestruct:" pat0 "has too many conjuncts"
  | IList [[_]] => fail "iDestruct:" pat0 "has just a single conjunct"

  | IList [[?pat1];[?pat2]] =>
     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat_default pat2 Hz in
     iOrDestruct Hz as x1 x2;
     [_iDestructHypGo x1 pat0 pat1|_iDestructHypGo x2 pat0 pat2]

  | IList (_ :: _ :: _ :: _) => fail "iDestruct:" pat0 "has too many disjuncts"

  | IList [_;_] => fail "iDestruct: in" pat0 "a disjunct has multiple patterns"

  | IPure IGallinaAnon => iPure Hz as ?
  | IPure (IGallinaNamed ?s) =>
     let x := fresh in
     iPure Hz as x;
     rename_by_string x s
  | IRewrite Right => iPure Hz as ->
  | IRewrite Left => iPure Hz as <-
  | IIntuitionistic ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iIntuitionistic Hz x; _iDestructHypGo x pat0 pat
  | ISpatial ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iSpatial Hz x; _iDestructHypGo x pat0 pat
  | IModalElim ?pat =>
    let x := _ident_for_pat_default pat Hz in
    iModCore Hz as x; _iDestructHypGo x pat0 pat
  | _ => fail "iDestruct:" pat0 "is not supported due to" pat
  end.
Ltac _iDestructHypFindPat Hgo pat found pats :=
  lazymatch pats with
  | [] =>
    lazymatch found with
    | true => pm_prettify
    | false => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
    end
  | ISimpl :: ?pats => simpl; _iDestructHypFindPat Hgo pat found pats
  | IClear ?H :: ?pats => iClear H; _iDestructHypFindPat Hgo pat found pats
  | IClearFrame ?H :: ?pats => iFrame H; _iDestructHypFindPat Hgo pat found pats
  | ?pat1 :: ?pats =>
     lazymatch found with
     | false => _iDestructHypGo Hgo pat pat1; _iDestructHypFindPat Hgo pat true pats
     | true => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
     end
  end.

Ltac _iDestructHyp0 H pat :=
  let pats := intro_pat.parse pat in
  _iDestructHypFindPat H pat false pats.
Ltac _iDestructHyp H xs pat :=
  ltac1_list_iter ltac:(fun x => _iExistDestruct H as x H) xs;
  _iDestructHyp0 H pat.

Tactic Notation "iDestructHyp" constr(H) "as" constr(pat) :=
  _iDestructHyp0 H pat.

Ltac _iIntros_go pats startproof :=
  lazymatch pats with
  | [] =>
    lazymatch startproof with
    | true => iStartProof
    | false => idtac
    end

  | IPure (IGallinaNamed ?s) :: ?pats =>
     let i := fresh in
     _iIntro (i);
     rename_by_string i s;
     _iIntros_go pats startproof
  | IPure IGallinaAnon :: ?pats => _iIntro (?); _iIntros_go pats startproof
  | IIntuitionistic (IIdent ?H) :: ?pats => _iIntroPersistent H; _iIntros_go pats false
  | IDrop :: ?pats => _iIntroDrop; _iIntros_go pats startproof
  | IIdent ?H :: ?pats => _iIntroSpatial H; _iIntros_go pats startproof

  | IPureIntro :: ?pats => iPureIntro; _iIntros_go pats false
  | IModalIntro :: ?pats => iModIntro; _iIntros_go pats false
  | IForall :: ?pats => repeat _iIntroForall; _iIntros_go pats startproof
  | IAll :: ?pats => repeat (_iIntroForall || _iIntro); _iIntros_go pats startproof

  | ISimpl :: ?pats => simpl; _iIntros_go pats startproof
  | IClear ?H :: ?pats => iClear H; _iIntros_go pats false
  | IClearFrame ?H :: ?pats => iFrame H; _iIntros_go pats false
  | IDone :: ?pats => try done; _iIntros_go pats startproof

  | IIntuitionistic ?pat :: ?pats =>
     let H := iFresh in _iIntroPersistent H; iDestructHyp H as pat; _iIntros_go pats false
  | ?pat :: ?pats =>
     let H := iFresh in _iIntroSpatial H; iDestructHyp H as pat; _iIntros_go pats false
  end.

Ltac _iIntros0 pat :=
  let pats := intro_pat.parse pat in

  lazymatch pats with
  | [] => idtac
  | _ => _iIntros_go pats true
  end.
Ltac _iIntros xs pat :=
  ltac1_list_iter ltac:(fun x => _iIntro (x)) xs;
  _iIntros0 pat.
Tactic Notation "iIntros" "(" ne_simple_intropattern_list(xs) ")" :=
  _iIntros xs "".

Tactic Notation "iDestructCore" open_constr(lem) "as" constr(p) tactic3(tac) :=
  let intro_destruct n :=
    let rec go n' :=
      lazymatch n' with
      | 0 => fail "iDestruct: cannot introduce" n "hypotheses"
      | 1 => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; tac H
      | S ?n' => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; go n'
      end in
    intros; go n in
  lazymatch type of lem with
  | nat => intro_destruct lem
  | Z =>

     let n := eval cbv in (Z.to_nat lem) in intro_destruct n
  | ident => tac lem
  | string => tac constr:(INamed lem)
  | _ => iPoseProofCore lem as p tac
  end.
Tactic Notation "iMod" open_constr(lem) "as" "(" ne_simple_intropattern_list(xs) ")"
    constr(pat) :=
  iDestructCore lem as false (fun H => iModCore H as H; last _iDestructHyp H xs pat).

Section class_instances.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance as_emp_valid_emp_valid d P : AsEmpValid0 d (⊢ P) P | 0.
Admitted.

Global Instance into_sep_sep P Q : IntoSep (P ∗ Q) P Q.
Admitted.

Global Instance into_exist_exist {A} (Φ : A → PROP) name :
  AsIdentName Φ name → IntoExist (bi_exist Φ) Φ name.
Admitted.
End class_instances.
Global Instance elim_modal_bupd_fupd
    `{!BiBUpd PROP, !BiFUpd PROP, !BiBUpdFUpd PROP} p E1 E2 P Q :
  ElimModal True p false (|==> P) P (|={E1,E2}=> Q) (|={E1,E2}=> Q) | 10.
Admitted.

Section class_instances_frame.
Context {PROP : bi}.
Implicit Types P Q R : PROP.
Global Instance frame_here p R : Frame p R R emp | 1.
Admitted.
Global Instance frame_sep_l R P1 P2 Q Q' :
  Frame false R P1 Q → MakeSep Q P2 Q' → Frame false R (P1 ∗ P2) Q' | 9.
Admitted.

Inductive GatherEvarsEq {A} (x : A) : A → Prop :=
  GatherEvarsEq_refl : GatherEvarsEq x x.

#[projections(primitive)] Class FrameExistRequirements
    (p : bool) (R : PROP) {A} (Φ : A → PROP) (a' : A) (G' : PROP) := {
  frame_exist_witness : A;
  frame_exist_resource : PROP;
  frame_exist_proof : Frame p R (Φ frame_exist_witness) frame_exist_resource;
  frame_exist_witness_eq : GatherEvarsEq frame_exist_witness a';
  frame_exist_resource_eq : TCEq frame_exist_resource G'
}.
Global Existing Instance Build_FrameExistRequirements.

Inductive TCCbnTele {A} (x : A) : A → Prop :=
  TCCbnTele_refl : TCCbnTele x x.

Global Instance frame_exist {A} p R (Φ : A → PROP)
    (TT : tele) (g : TT → A) (Ψ : TT → PROP) Q :
  FrameInstantiateExistEnabled →
  (∀ c, FrameExistRequirements p R Φ (g c) (Ψ c)) →
  TCCbnTele (∃.. c, Ψ c)%I Q →
  Frame p R (∃ a, Φ a) Q.
Admitted.
Global Instance frame_fupd `{!BiFUpd PROP} p E1 E2 R P Q :
  Frame p R P Q → Frame p R (|={E1,E2}=> P) (|={E1,E2}=> Q) | 2.
Admitted.
End class_instances_frame.

Ltac solve_gather_evars_eq :=
  lazymatch goal with
  | |- GatherEvarsEq ?a (?g ?c) =>
    let rec retcon_tele T arg :=

      match a with
      | context [?term] =>
        is_evar term;
        let X := type of term in
        lazymatch X with
        | tele => fail
        | _ => idtac
        end;
        let T' := open_constr:(_) in
        unify T (TeleS (λ _ : X, T'));

        unify term (tele_arg_head (λ _ : X, T') arg);

        retcon_tele T' (tele_arg_tail (λ _ : X, T') arg)

      | _ =>

        unify T TeleO
      end
    in
    let T' := lazymatch (type of c) with tele_arg ?T => T end in
    retcon_tele T' c;
    exact (GatherEvarsEq_refl _)
  end.

Global Hint Extern 0 (GatherEvarsEq _ _) =>
  solve_gather_evars_eq : typeclass_instances.

Global Hint Extern 0 (TCCbnTele _ _) =>
  cbn [bi_texist tele_fold tele_bind tele_arg_head tele_arg_tail];
  exact (TCCbnTele_refl _) : typeclass_instances.

Section class_instances_make.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance make_sep_emp_l P : KnownLMakeSep emp P P.
Admitted.
End class_instances_make.

Record agree (A : Type) : Type := {
  agree_car : list A;
  agree_not_nil : bool_decide (agree_car = []) = false
}.
Global Arguments agree_car {_} _.

Section agree.
Context {SI : sidx} {A : ofe}.
Local Instance agree_dist : Dist (agree A).
Admitted.
Local Instance agree_equiv : Equiv (agree A).
Admitted.

Definition agree_ofe_mixin : OfeMixin (agree A).
Admitted.
Canonical Structure agreeO := Ofe (agree A) agree_ofe_mixin.
Local Instance agree_validN_instance : ValidN (agree A).
Admitted.
Local Instance agree_valid_instance : Valid (agree A).
Admitted.

Local Program Instance agree_op_instance : Op (agree A) := λ x y,
  {| agree_car := agree_car x ++ agree_car y |}.
Admit Obligations.
Local Instance agree_pcore_instance : PCore (agree A).
Admitted.

Definition agree_cmra_mixin : CmraMixin (agree A).
Admitted.
Canonical Structure agreeR : cmra.
exact (Cmra (agree A) agree_cmra_mixin).
Defined.

End agree.
Global Arguments agreeR {_} _.

Record uPred (M : ucmra) : Type := UPred {
  uPred_holds : nat → M → Prop;

  uPred_mono n1 n2 x1 x2 :
    uPred_holds n1 x1 → x1 ≼{n2} x2 → n2 ≤ n1 → uPred_holds n2 x2
}.

Local Coercion uPred_holds : uPred >-> Funclass.

Section cofe.
  Context {M : ucmra}.
Local Instance uPred_equiv : Equiv (uPred M).
Admitted.
Local Instance uPred_dist : Dist (uPred M).
Admitted.
  Definition uPred_ofe_mixin : OfeMixin (uPred M).
Admitted.
Canonical Structure uPredO : ofe.
exact (Ofe (uPred M) uPred_ofe_mixin).
Defined.

  Program Definition uPred_compl : Compl uPredO := λ c,
    {| uPred_holds n x := ∀ n', n' ≤ n → ✓{n'} x → c n' n' x |}.
Admit Obligations.
  Global Program Instance uPred_cofe : Cofe uPredO := cofe_finite uPred_compl _.
Admit Obligations.
End cofe.
Global Arguments uPredO : clear implicits.

Inductive uPred_entails {M} (P Q : uPred M) : Prop :=
  { uPred_in_entails : ∀ n x, ✓{n} x → P n x → Q n x }.
Global Hint Resolve uPred_mono : uPred_def.

Local Program Definition uPred_pure_def {M} (φ : Prop) : uPred M :=
  {| uPred_holds n x := φ |}.
Solve Obligations with done.
Local Definition uPred_pure_aux : seal (@uPred_pure_def).
Admitted.
Definition uPred_pure := uPred_pure_aux.(unseal).
Global Arguments uPred_pure {M}.

Local Program Definition uPred_and_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∧ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_and_aux : seal (@uPred_and_def).
Admitted.
Definition uPred_and := uPred_and_aux.(unseal).
Global Arguments uPred_and {M}.

Local Program Definition uPred_or_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∨ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_or_aux : seal (@uPred_or_def).
Admitted.
Definition uPred_or := uPred_or_aux.(unseal).
Global Arguments uPred_or {M}.

Local Program Definition uPred_impl_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       x ≼ x' → n' ≤ n → ✓{n'} x' → P n' x' → Q n' x' |}.
Admit Obligations.
Local Definition uPred_impl_aux : seal (@uPred_impl_def).
Admitted.
Definition uPred_impl := uPred_impl_aux.(unseal).
Global Arguments uPred_impl {M}.

Local Program Definition uPred_forall_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∀ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_forall_aux : seal (@uPred_forall_def).
Admitted.
Definition uPred_forall := uPred_forall_aux.(unseal).

Local Program Definition uPred_exist_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∃ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_exist_aux : seal (@uPred_exist_def).
Admitted.
Definition uPred_exist := uPred_exist_aux.(unseal).

Local Program Definition uPred_sep_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∃ x1 x2, x ≡{n}≡ x1 ⋅ x2 ∧ P n x1 ∧ Q n x2 |}.
Admit Obligations.
Local Definition uPred_sep_aux : seal (@uPred_sep_def).
Admitted.
Definition uPred_sep := uPred_sep_aux.(unseal).
Global Arguments uPred_sep {M}.

Local Program Definition uPred_wand_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       n' ≤ n → ✓{n'} (x ⋅ x') → P n' x' → Q n' (x ⋅ x') |}.
Admit Obligations.
Local Definition uPred_wand_aux : seal (@uPred_wand_def).
Admitted.
Definition uPred_wand := uPred_wand_aux.(unseal).
Global Arguments uPred_wand {M}.

Local Program Definition uPred_plainly_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n ε |}.
Solve Obligations with naive_solver eauto using uPred_mono, ucmra_unit_validN.

Local Program Definition uPred_persistently_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n (core x) |}.
Solve Obligations with naive_solver eauto using uPred_mono, cmra_core_monoN.
Local Definition uPred_persistently_aux : seal (@uPred_persistently_def).
Admitted.
Definition uPred_persistently := uPred_persistently_aux.(unseal).
Global Arguments uPred_persistently {M}.

Local Program Definition uPred_later_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := match n return _ with 0 => True | S n' => P n' x end |}.
Admit Obligations.
Local Definition uPred_later_aux : seal (@uPred_later_def).
Admitted.
Definition uPred_later := uPred_later_aux.(unseal).
Global Arguments uPred_later {M}.
Definition uPred_emp {M} : uPred M.
Admitted.

Lemma uPred_bi_mixin (M : ucmra) :
  BiMixin
    uPred_entails uPred_emp uPred_pure uPred_and uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_wand.
Admitted.

Lemma uPred_bi_persistently_mixin (M : ucmra) :
  BiPersistentlyMixin
    uPred_entails uPred_emp uPred_and
    (@uPred_exist M) uPred_sep uPred_persistently.
Admitted.

Lemma uPred_bi_later_mixin (M : ucmra) :
  BiLaterMixin
    uPred_entails uPred_pure uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_persistently uPred_later.
Admitted.
Canonical Structure uPredI (M : ucmra) : bi.
exact ({| bi_ofe_mixin := ofe_mixin_of (uPred M);
     bi_bi_mixin := uPred_bi_mixin M;
     bi_bi_later_mixin := uPred_bi_later_mixin M;
     bi_bi_persistently_mixin := uPred_bi_persistently_mixin M |}).
Defined.
Global Instance uPred_bi_bupd M : BiBUpd (uPredI M).
Admitted.

Notation frac := Qp (only parsing).
  Canonical Structure fracO := leibnizO frac.
Local Instance frac_valid_instance : Valid frac.
Admitted.
Local Instance frac_pcore_instance : PCore frac.
Admitted.
Local Instance frac_op_instance : Op frac.
Admitted.

  Definition frac_ra_mixin : RAMixin frac.
Admitted.
  Canonical Structure fracR := discreteR frac frac_ra_mixin.
Definition gmap_viewR {SI : sidx} (K : Type) `{Countable K} (V : cmra) : cmra.
Admitted.
Definition authR {SI : sidx} (A : ucmra) : cmra.
Admitted.

Structure gFunctor := GFunctor {
  gFunctor_F :> rFunctor;
  gFunctor_map_contractive : rFunctorContractive gFunctor_F;
}.

Record gFunctors := GFunctors {
  gFunctors_len : nat;
  gFunctors_lookup : fin gFunctors_len → gFunctor
}.

Definition gid (Σ : gFunctors) := fin (gFunctors_len Σ).

Definition gname := positive.
Definition iResUR (Σ : gFunctors) : ucmra.
Admitted.
  Notation iProp Σ := (uPred (iResUR Σ)).
  Notation iPropO Σ := (uPredO (iResUR Σ)).

Class inG (Σ : gFunctors) (A : cmra) := InG {
  inG_id : gid Σ;
  inG_apply := rFunctor_apply (gFunctors_lookup Σ inG_id);
  inG_prf : A = inG_apply (iPropO Σ) _;
}.
Local Definition own_def `{!inG Σ A} (γ : gname) (a : A) : iProp Σ.
Admitted.
Local Definition own_aux : seal (@own_def).
Admitted.
Definition own := own_aux.(unseal).
Global Arguments own {Σ A _} γ a.
Local Instance nat_valid_instance : Valid nat.
Admitted.
Local Instance nat_pcore_instance : PCore nat.
Admitted.
Local Instance nat_op_instance : Op nat.
Admitted.
  Lemma nat_ra_mixin : RAMixin nat.
Admitted.
Canonical Structure natR : cmra.
exact (discreteR nat nat_ra_mixin).
Defined.
Local Instance nat_unit_instance : Unit nat.
Admitted.
  Lemma nat_ucmra_mixin : UcmraMixin nat.
Admitted.
Canonical Structure natUR : ucmra.
exact (Ucmra nat nat_ucmra_mixin).
Defined.

Class lcGS (Σ : gFunctors) := LcGS {
  #[local] lcGS_inG :: inG Σ (authR natUR);
  lcGS_name : gname;
}.

Inductive coPset_disj :=
  | CoPset : coPset → coPset_disj
  | CoPsetInvalid : coPset_disj.
  Canonical Structure coPset_disjO := leibnizO coPset_disj.
Local Instance coPset_disj_valid_instance : Valid coPset_disj.
Admitted.
Local Instance coPset_disj_op_instance : Op coPset_disj.
Admitted.
Local Instance coPset_disj_pcore_instance : PCore coPset_disj.
Admitted.

  Lemma coPset_disj_ra_mixin : RAMixin coPset_disj.
Admitted.
  Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin.
  Class wsatGpreS (Σ : gFunctors) : Set := WsatGpreS {
    wsatGpreS_inv : inG Σ (gmap_viewR positive (agreeR $ laterO (iPropO Σ)));
    wsatGpreS_enabled : inG Σ coPset_disjR;
    wsatGpreS_disabled : inG Σ (gset_disjR positive);
  }.

  Class wsatGS (Σ : gFunctors) : Set := WsatG {
    wsat_inG : wsatGpreS Σ;
    invariant_name : gname;
    enabled_name : gname;
    disabled_name : gname;
  }.

Inductive has_lc := HasLc | HasNoLc.

Class invGS_gen (hlc : has_lc) (Σ : gFunctors) : Set := InvG {
  #[global] invGS_wsat :: wsatGS Σ;
  #[global] invGS_lc :: lcGS Σ;
}.
Global Instance uPred_bi_fupd `{!invGS_gen hlc Σ} : BiFUpd (uPredI (iResUR Σ)).
Admitted.

Global Instance uPred_bi_bupd_fupd `{!invGS_gen hlc Σ} : BiBUpdFUpd (uPredI (iResUR Σ)).
Admitted.

Class cinvG Σ := {
  #[local] cinv_inG :: inG Σ (prodR (optionR (exclR unitO)) (optionR fracR)) ;
}.

Section defs.
  Context `{!invGS_gen hlc Σ, !cinvG Σ}.
Definition cinv_own (γ : gname) (p : frac) : iProp Σ.
Admitted.
  Definition cinv_excl γ : iProp Σ := own γ (Some (Excl ()), None).
Definition cinv (N : namespace) (γ : gname) (P : iProp Σ) : iProp Σ.
Admitted.

  Lemma cinv_own_excl_alloc P :
    pred_infinite P → ⊢ |==> ∃ γ, ⌜P γ⌝ ∗ cinv_excl γ ∗ cinv_own γ 1.
Admitted.

  Lemma cinv_alloc_strong (I : gname → Prop) E N :
    pred_infinite I →
    ⊢ |={E}=> ∃ γ, ⌜ I γ ⌝ ∗ cinv_own γ 1 ∗ ∀ P, ▷ P ={E}=∗ cinv N γ P.
  Proof.
    iIntros (?).
iMod cinv_own_excl_alloc as (γ) "[$ [Hexcl $]]"; first done.
🛠️ Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted) (truncated to 6.0KiB; full 156KiB file on GitHub Actions Artifacts under tmp.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines, then from 3034 lines to 2591 lines, then from 2604 lines to 2735 lines, then from 2741 lines to 2612 lines, then from 2625 lines to 3086 lines, then from 3092 lines to 2663 lines, then from 2676 lines to 2732 lines, then from 2738 lines to 2681 lines, then from 2694 lines to 2724 lines, then from 2730 lines to 2694 lines, then from 2707 lines to 2743 lines, then from 2749 lines to 2706 lines, then from 2719 lines to 2750 lines, then from 2756 lines to 2717 lines, then from 2730 lines to 3394 lines, then from 3401 lines to 2731 lines, then from 2745 lines to 2868 lines, then from 2874 lines to 2746 lines, then from 2760 lines to 2816 lines, then from 2823 lines to 2751 lines, then from 2765 lines to 3567 lines, then from 3574 lines to 2766 lines, then from 2780 lines to 3375 lines, then from 3382 lines to 2771 lines, then from 2785 lines to 3275 lines, then from 3282 lines to 3100 lines, then from 3107 lines to 2756 lines, then from 2769 lines to 3160 lines, then from 3167 lines to 2770 lines, then from 2784 lines to 3082 lines, then from 3089 lines to 2783 lines, then from 2797 lines to 3468 lines, then from 3475 lines to 2785 lines, then from 2799 lines to 3753 lines, then from 3760 lines to 2851 lines, then from 2865 lines to 3684 lines, then from 3691 lines to 2871 lines, then from 2885 lines to 3846 lines, then from 3853 lines to 2873 lines, then from 2887 lines to 3477 lines, then from 3484 lines to 2876 lines, then from 2890 lines to 3327 lines, then from 3334 lines to 2925 lines, then from 2944 lines to 2856 lines, then from 2871 lines to 2858 lines, then from 2872 lines to 2856 lines, then from 2869 lines to 6474 lines, then from 6481 lines to 2873 lines, then from 2882 lines to 2863 lines, then from 2876 lines to 3627 lines, then from 3634 lines to 2872 lines, then from 2886 lines to 4897 lines, then from 4904 lines to 2904 lines, then from 2918 lines to 3219 lines, then from 3226 lines to 2919 lines, th
🛠️ 📜 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 6.4MiB file on GitHub Actions Artifacts under build.log)
LIB 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]
iris/program_logic/lifting.vo (real: 2.93, user: 2.77, sys: 0.16, mem: 597656 ko)
COQNATIVE iris/program_logic/lifting.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/program_logic/total_weakestpre.v", line 106, characters 68-80:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/lifting.vo.native (real: 0.49, user: 0.37, sys: 0.11, mem: 156968 ko)
COQTEST [ref ignored] tests/algebra.v (ref: tests/algebra.ref)
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]
tests/algebra.vo (real: 1.29, user: 1.17, sys: 0.12, mem: 590304 ko)
ROCQ compile iris/base_logic/lib/cancelable_invariants.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q iris iris -Q iris_heap_lang iris.heap_lang -Q iris_unstable iris.unstable -Q iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.v 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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/iris
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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.Ieoy8TNGJ5
MINIMIZER_DEBUG: files:  iris/base_logic/lib/cancelable_invariants.v /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/base_logic/lib/cancelable_invariants.v", line 90, characters 17-65:
Error: Tactic failure: iFrame: cannot frame ⌜?Goal γ⌝%I.

Command exited with non-zero status 1
iris/base_logic/lib/cancelable_invariants.vo (real: 1.51, user: 1.37, sys: 0.14, mem: 584020 ko)
make[2]: *** [Makefile.coq:813: iris/base_logic/lib/cancelable_invariants.vo] Error 1
make[2]: *** [iris/base_logic/lib/cancelable_invariants.vo] Deleting file 'iris/base_logic/lib/cancelable_invariants.glob'
make[2]: *** Waiting for unfinished jobs....
File "./iris/program_logic/total_weakestpre.v", line 274, characters 78-90:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/total_weakestpre.vo (real: 6.22, user: 6.06, sys: 0.16, mem: 635896 ko)
COQNATIVE iris/program_logic/total_weakestpre.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
iris/program_logic/total_weakestpre.vo.native (real: 0.59, user: 0.47, sys: 0.12, mem: 152368 ko)
make[1]: *** [Makefile.coq:411: all] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/iris'
make: *** [Makefile:3: all] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' iris 2
+ '[' iris '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real iris.log
    Time |  Peak Mem | File Name                                    
--------------------------------------------------------------------
0m20.33s | 635896 ko | Total Time / Peak Mem                        
--------------------------------------------------------------------
0m06.22s | 635896 ko | iris/program_logic/total_weakestpre.vo       
0m03.95s | 607312 ko | iris/program_logic/adequacy.vo               
0m02.93s | 597656 ko | iris/program_logic/lifting.vo                
0m02.22s | 598328 ko | iris/program_logic/atomic.vo                 
0m01.51s | 584020 ko | iris/base_logic/lib/cancelable_invariants.vo 
0m01.29s | 590304 ko | tests/algebra.vo                             
0m00.59s | 152368 ko | iris/program_logic/total_weakestpre.vo.native
0m00.58s | 157796 ko | iris/program_logic/atomic.vo.native          
0m00.55s | 165364 ko | iris/program_logic/adequacy.vo.native        
0m00.49s | 156968 ko | iris/program_logic/lifting.vo.native         
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 76MiB file on GitHub Actions Artifacts under bug.log)
deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2488, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2489, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2490, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2494, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2496, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2498, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2504, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2506, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2508, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2510, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2512, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2514, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2516, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2518, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2520, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2522, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2524, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2526, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2528, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2530, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2531, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2532, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2533, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2706, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2718, characters 0-37:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope stdpp_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2745, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2787, characters 0-63:
Warning: Closed notations (i.e. starting and ending with a terminal symbol)
should usually be at level 0 (default).
[closed-notation-not-level-0,parsing,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 2863, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 3113, characters 0-29:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope Q_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 3119, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 3173, characters 0-31:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope Qc_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp_z56pd4n/Top/bug_01.v", line 3186, characters 47-48:
Error:
In environment
Qp : Type
Qp_to_Qc : Qc
The term "of_number_subproof" has type "IQ" while it is expected to have type
 "Q".


�[93mIntermediate code not saved.�[0m
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to add Proof using lines
�[92m
Adding Proof using lines successful.�[0m
Failed to do everything at once; trying one at a time.
Adding Proof using lines unsuccessful.
No successful changes.

I will now attempt to export modules
Module exportation successful

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

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

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to lift Requires to the top of the file while inserting option settings

I will now attempt to remove all lines, one at a time

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.

cc @JasonGross

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 12, 2025

Minimization interrupted by timeout, being automatically continued. Partially Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v in 5h 15m 8s (from ci-iris) (interrupted by timeout, being automatically continued) (full log on GitHub Actions - verbose log)
⭐ ⏱️ Partially Minimized Coq File (timeout) (truncated to first and last 32KiB; full 188KiB file on GitHub Actions Artifacts under bug.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines, then from 3034 lines to 2591 lines, then from 2604 lines to 2735 lines, then from 2741 lines to 2612 lines, then from 2625 lines to 3086 lines, then from 3092 lines to 2663 lines, then from 2676 lines to 2732 lines, then from 2738 lines to 2681 lines, then from 2694 lines to 2724 lines, then from 2730 lines to 2694 lines, then from 2707 lines to 2743 lines, then from 2749 lines to 2706 lines, then from 2719 lines to 2750 lines, then from 2756 lines to 2717 lines, then from 2730 lines to 3394 lines, then from 3401 lines to 2731 lines, then from 2745 lines to 2868 lines, then from 2874 lines to 2746 lines, then from 2760 lines to 2816 lines, then from 2823 lines to 2751 lines, then from 2765 lines to 3567 lines, then from 3574 lines to 2766 lines, then from 2780 lines to 3375 lines, then from 3382 lines to 2771 lines, then from 2785 lines to 3275 lines, then from 3282 lines to 3100 lines, then from 3107 lines to 2756 lines, then from 2769 lines to 3160 lines, then from 3167 lines to 2770 lines, then from 2784 lines to 3082 lines, then from 3089 lines to 2783 lines, then from 2797 lines to 3468 lines, then from 3475 lines to 2785 lines, then from 2799 lines to 3753 lines, then from 3760 lines to 2851 lines, then from 2865 lines to 3684 lines, then from 3691 lines to 2871 lines, then from 2885 lines to 3846 lines, then from 3853 lines to 2873 lines, then from 2887 lines to 3477 lines, then from 3484 lines to 2876 lines, then from 2890 lines to 3327 lines, then from 3334 lines to 2925 lines, then from 2944 lines to 2856 lines, then from 2871 lines to 2858 lines, then from 2872 lines to 2856 lines, then from 2869 lines to 6474 lines, then from 6481 lines to 2873 lines, then from 2882 lines to 2863 lines, then from 2876 lines to 3627 lines, then from 3634 lines to 2872 lines, then from 2886 lines to 4897 lines, then from 4904 lines to 2904 lines, then from 2918 lines to 3219 lines, then from 3226 lines to 2919 lines, then from 2933 lines to 3323 lines, then from 3330 lines to 2973 lines, then from 2987 lines to 3755 lines, then from 3762 lines to 3170 lines, then from 3184 lines to 3391 lines, then from 3397 lines to 3217 lines, then from 3231 lines to 3614 lines, then from 3621 lines to 3243 lines, then from 3257 lines to 4364 lines, then from 4371 lines to 3246 lines, then from 3260 lines to 3765 lines, then from 3772 lines to 3258 lines, then from 3277 lines to 3167 lines, then from 3180 lines to 3709 lines, then from 3716 lines to 3194 lines, then from 3208 lines to 3727 lines, then from 3734 lines to 3199 lines, then from 3213 lines to 5472 lines, then from 5479 lines to 3470 lines, then from 3484 lines to 4779 lines, then from 4786 lines to 3496 lines, then from 3510 lines to 3815 lines, then from 3822 lines to 3506 lines, then from 3520 lines to 6150 lines, then from 6157 lines to 3700 lines, then from 3687 lines to 3583 lines, then from 3596 lines to 4232 lines, then from 4239 lines to 3636 lines, then from 3650 lines to 3902 lines, then from 3909 lines to 3635 lines, then from 3649 lines to 4815 lines, then from 4822 lines to 3636 lines, then from 3650 lines to 3906 lines, then from 3913 lines to 3645 lines, then from 3659 lines to 3673 lines, then from 3680 lines to 3653 lines, then from 3667 lines to 3921 lines, then from 3928 lines to 3661 lines, then from 3675 lines to 4684 lines, then from 4691 lines to 3700 lines, then from 3714 lines to 4365 lines, then from 4372 lines to 3702 lines, then from 3716 lines to 4097 lines, then from 4104 lines to 3717 lines, then from 3731 lines to 4459 lines, then from 4466 lines to 3895 lines, then from 3900 lines to 3665 lines, then from 3678 lines to 4074 lines, then from 4081 lines to 3664 lines, then from 3678 lines to 4045 lines, then from 4052 lines to 3665 lines, then from 3679 lines to 4116 lines, then from 4123 lines to 3710 lines, then from 3724 lines to 4412 lines, then from 4418 lines to 3736 lines, then from 3750 lines to 4512 lines, then from 4519 lines to 3738 lines, then from 3752 lines to 4132 lines, then from 4139 lines to 3761 lines, then from 3775 lines to 5073 lines, then from 5080 lines to 3768 lines, then from 3782 lines to 3796 lines, then from 3803 lines to 3781 lines, then from 3795 lines to 5455 lines, then from 5457 lines to 3802 lines, then from 3816 lines to 4085 lines, then from 4092 lines to 3807 lines, then from 3821 lines to 4515 lines, then from 4522 lines to 4275 lines, then from 4270 lines to 3749 lines, then from 3762 lines to 4353 lines, then from 4360 lines to 3750 lines, then from 3764 lines to 4377 lines, then from 4384 lines to 3766 lines, then from 3780 lines to 4068 lines, then from 4075 lines to 3769 lines, then from 3783 lines to 4010 lines, then from 4017 lines to 3778 lines, then from 3792 lines to 4463 lines, then from 4469 lines to 3780 lines, then from 3794 lines to 4319 lines, then from 4326 lines to 3782 lines, then from 3796 lines to 5281 lines, then from 5288 lines to 3833 lines, then from 3847 lines to 6045 lines, then from 6051 lines to 3920 lines, then from 3929 lines to 3838 lines, then from 3851 lines to 5509 lines, then from 5516 lines to 3858 lines, then from 3872 lines to 5710 lines, then from 5716 lines to 3883 lines, then from 3897 lines to 4576 lines, then from 4583 lines to 3901 lines, then from 3915 lines to 4076 lines, then from 4083 lines to 3914 lines, then from 3928 lines to 4206 lines, then from 4213 lines to 3931 lines, then from 3945 lines to 5585 lines, then from 5585 lines to 4004 lines, then from 4018 lines to 4692 lines, then from 4699 lines to 4173 lines, then from 4176 lines to 3980 lines, then from 3993 lines to 5077 lines, then from 5082 lines to 4189 lines, then from 4203 lines to 4554 lines, then from 4561 lines to 4209 lines, then from 4223 lines to 4353 lines, then from 4360 lines to 4222 lines, then from 4236 lines to 5968 lines, then from 5970 lines to 4409 lines, then from 4423 lines to 4466 lines, then from 4473 lines to 4410 lines, then from 4424 lines to 4438 lines, then from 4445 lines to 4424 lines, then from 4438 lines to 4475 lines, then from 4482 lines to 4436 lines, then from 4450 lines to 4495 lines, then from 4500 lines to 4455 lines, then from 4469 lines to 4483 lines, then from 4490 lines to 4456 lines, then from 4470 lines to 5435 lines, then from 5441 lines to 4505 lines, then from 4519 lines to 4833 lines, then from 4840 lines to 4510 lines, then from 4524 lines to 4725 lines, then from 4732 lines to 4515 lines, then from 4529 lines to 8662 lines, then from 8642 lines to 6958 lines, then from 6763 lines to 4497 lines, then from 4510 lines to 4525 lines, then from 4531 lines to 4499 lines, then from 4512 lines to 6477 lines, then from 6480 lines to 4780 lines, then from 4794 lines to 4898 lines, then from 4905 lines to 4785 lines, then from 4799 lines to 5043 lines, then from 5050 lines to 4792 lines, then from 4806 lines to 5089 lines, then from 5096 lines to 4800 lines, then from 4814 lines to 5160 lines, then from 5167 lines to 4827 lines, then from 4841 lines to 5035 lines, then from 5042 lines to 4850 lines, then from 4864 lines to 4998 lines, then from 5005 lines to 4873 lines, then from 4887 lines to 5240 lines, then from 5247 lines to 4896 lines, then from 4910 lines to 5004 lines, then from 5011 lines to 4904 lines, then from 4918 lines to 5101 lines, then from 5107 lines to 4972 lines, then from 4986 lines to 5383 lines, then from 5385 lines to 5135 lines, then from 5149 lines to 5163 lines, then from 5170 lines to 5137 lines, then from 5151 lines to 6412 lines, then from 6419 lines to 5375 lines, then from 5389 lines to 5821 lines, then from 5828 lines to 5841 lines *)
(* coqc version 9.2+alpha compiled with OCaml 4.14.2
   coqtop version 9.2+alpha
   Modules that could not be inlined: Ltac2.Pattern, Ltac2.Ltac1, Ltac2.Array, Stdlib.Vectors.Fin
   Expected coqc runtime on this file: 1.622 sec *)










Require Stdlib.Vectors.Fin.
Require Stdlib.Arith.Arith_base.
Require Stdlib.PArith.BinPos.
Require Stdlib.Arith.Peano_dec.
Require Stdlib.Arith.Wf_nat.
Require Stdlib.Arith.Factorial.
Require Stdlib.Arith.EqNat.
Require Stdlib.Arith.Compare_dec.
Require Stdlib.Arith.Between.
Require Stdlib.Arith.PeanoNat.
Require Stdlib.Numbers.Natural.Abstract.NProperties.
Require Stdlib.Numbers.Natural.Abstract.NLcm0.
Require Stdlib.Numbers.Natural.Abstract.NBits.
Require Stdlib.Numbers.Natural.Abstract.NLog.
Require Stdlib.Numbers.Natural.Abstract.NLcm.
Require Stdlib.Numbers.Natural.Abstract.NPow.
Require Stdlib.Numbers.Natural.Abstract.NDiv0.
Require Stdlib.Numbers.Natural.Abstract.NSqrt.
Require Stdlib.Numbers.Natural.Abstract.NParity.
Require Stdlib.Numbers.Natural.Abstract.NMaxMin.
Require Stdlib.Numbers.Natural.Abstract.NGcd.
Require Stdlib.Numbers.Natural.Abstract.NDiv.
Require Stdlib.Numbers.Natural.Abstract.NSub.
Require Stdlib.Numbers.Natural.Abstract.NMulOrder.
Require Stdlib.Numbers.Natural.Abstract.NAddOrder.
Require Stdlib.Numbers.Natural.Abstract.NOrder.
Require Stdlib.Numbers.Natural.Abstract.NAdd.
Require Stdlib.Numbers.Natural.Abstract.NBase.
Require Stdlib.Numbers.Natural.Abstract.NAxioms.
Require Stdlib.Numbers.NatInt.NZBits.
Require Stdlib.Numbers.NatInt.NZLog.
Require Stdlib.Numbers.NatInt.NZSqrt.
Require Stdlib.Numbers.NatInt.NZPow.
Require Stdlib.Numbers.NatInt.NZParity.
Require Stdlib.Numbers.NatInt.NZGcd.
Require Stdlib.Numbers.NatInt.NZDiv.
Require Stdlib.Numbers.NatInt.NZMulOrder.
Require Stdlib.Numbers.NatInt.NZAddOrder.
Require Stdlib.Numbers.NatInt.NZOrder.
Require Stdlib.Numbers.NatInt.NZMul.
Require Stdlib.Numbers.NatInt.NZAdd.
Require Stdlib.Numbers.NatInt.NZBase.
Require Stdlib.Numbers.NatInt.NZAxioms.
Require Stdlib.Structures.GenericMinMax.
Require Stdlib.Structures.OrdersFacts.
Require Stdlib.Structures.OrdersTac.
Require Stdlib.Structures.Orders.
Require Stdlib.Structures.Equalities.
Require Stdlib.Numbers.NumPrelude.
Require Ltac2.Array.
Require Ltac2.Ltac1.
Require Stdlib.Relations.Relations.
Require Stdlib.PArith.BinPosDef.
Require Ltac2.Pattern.
Require Stdlib.Relations.Operators_Properties.
Require Ltac2.Control.
Require Stdlib.Relations.Relation_Operators.
Require Stdlib.Bool.Bool.
Require Ltac2.Std.
Require Ltac2.Message.
Require Ltac2.Int.
Require Ltac2.Bool.
Require Stdlib.Setoids.Setoid.
Require Stdlib.Relations.Relation_Definitions.
Require Stdlib.Program.Basics.
Require Stdlib.Numbers.BinNums.
Require Stdlib.Logic.Eqdep_dec.
Require Stdlib.Classes.Morphisms.
Require Stdlib.Classes.RelationClasses.
Require Stdlib.Classes.Morphisms_Prop.
Require Stdlib.BinNums.NatDef.
Require Stdlib.BinNums.PosDef.
Require Ltac2.Init.
Require Stdlib.Logic.HLevelsBase.
Require Stdlib.Logic.EqdepFacts.
Require Stdlib.Logic.Decidable.
Require Stdlib.Classes.DecidableClass.
Require Corelib.ssr.ssrfun.
Require Corelib.Lists.ListDef.
Require Corelib.Classes.Morphisms.
Require Corelib.Numbers.BinNums.
Require Corelib.Relations.Relation_Definitions.
Require Corelib.Classes.Morphisms_Prop.
Require Corelib.BinNums.NatDef.
Require Corelib.Setoids.Setoid.
Require Corelib.BinNums.PosDef.
Require Corelib.Init.Ltac.
Require Corelib.BinNums.IntDef.
Require Corelib.Program.Basics.

Module Export AdmitTactic.
Module Import LocalFalse.
Inductive False : Prop := .
End LocalFalse.
Axiom proof_admitted : False.
Import Coq.Init.Ltac.
Tactic Notation "admit" := abstract case proof_admitted.
End AdmitTactic.

Module Stdlib_DOT_NArith_DOT_BinNatDef_WRAPPED.
Module BinNatDef.









Export Stdlib.Numbers.BinNums.
Import Stdlib.PArith.BinPos.
Export Stdlib.BinNums.NatDef.

#[local] Open Scope N_scope.

#[local] Notation "0" := N0.
#[local] Notation "1" := (Npos 1).
#[local] Notation "2" := (Npos 2).





Module N.

Include BinNums.NatDef.N.

Definition t := N.



#[global] Notation pos := Npos.



Definition zero := 0.
Definition one := 1.
Definition two := 2.



Definition succ n :=
  match n with
  | 0 => 1
  | pos p => pos (Pos.succ p)
  end.



Definition pred n :=
  match n with
  | 0 => 0
  | pos p => Pos.pred_N p
  end.



Definition add n m :=
  match n, m with
  | 0, _ => m
  | _, 0 => n
  | pos p, pos q => pos (p + q)
  end.

Infix "+" := add : N_scope.

Infix "-" := sub : N_scope.



Definition mul n m :=
  match n, m with
  | 0, _ => 0
  | _, 0 => 0
  | pos p, pos q => pos (p * q)
  end.

Infix "*" := mul : N_scope.

Infix "?=" := compare (at level 70, no associativity) : N_scope.



Definition eqb n m :=
  match n, m with
    | 0, 0 => true
    | pos p, pos q => Pos.eqb p q
    | _, _ => false
  end.

Definition ltb x y :=
 match x ?= y with Lt => true | _ => false end.

Infix "=?" := eqb (at level 70, no associativity) : N_scope.
Infix "<=?" := leb (at level 70, no associativity) : N_scope.
Infix "<?" := ltb (at level 70, no associativity) : N_scope.



Definition min n n' := match n ?= n' with
 | Lt | Eq => n
 | Gt => n'
 end.

Definition max n n' := match n ?= n' with
 | Lt | Eq => n'
 | Gt => n
 end.



Definition div2 n :=
  match n with
  | 0 => 0
  | 1 => 0
  | pos (p~0) => pos p
  | pos (p~1) => pos p
  end.



Definition even n :=
  match n with
    | 0 => true
    | pos (xO _) => true
    | _ => false
  end.

Definition odd n := negb (even n).



Definition pow n p :=
  match p, n with
    | 0, _ => 1
    | _, 0 => 0
    | pos p, pos q => pos (q^p)
  end.

Infix "^" := pow : N_scope.



Definition square n :=
  match n with
    | 0 => 0
    | pos p => pos (Pos.square p)
  end.



Definition log2 n :=
 match n with
   | 0 => 0
   | 1 => 0
   | pos (p~0) => pos (Pos.size p)
   | pos (p~1) => pos (Pos.size p)
 end.



Definition size n :=
 match n with
  | 0 => 0
  | pos p => pos (Pos.size p)
 end.

Definition size_nat n :=
 match n with
  | 0 => O
  | pos p => Pos.size_nat p
 end.



Definition div_eucl (a b:N) : N * N :=
  match a, b with
   | 0,  _ => (0, 0)
   | _, 0  => (0, a)
   | pos na, _ => pos_div_eucl na b
  end.

Definition div a b := fst (div_eucl a b).
Definition modulo a b := snd (div_eucl a b).

Infix "/" := div : N_scope.
Infix "mod" := modulo (at level 40, no associativity) : N_scope.



Definition gcd a b :=
 match a, b with
  | 0, _ => b
  | _, 0 => a
  | pos p, pos q => pos (Pos.gcd p q)
 end.



Definition ggcd a b :=
 match a, b with
  | 0, _ => (b,(0,1))
  | _, 0 => (a,(1,0))
  | pos p, pos q =>
     let '(g,(aa,bb)) := Pos.ggcd p q in
     (pos g, (pos aa, pos bb))
 end.



Definition sqrtrem n :=
 match n with
  | 0 => (0, 0)
  | pos p =>
    match Pos.sqrtrem p with
     | (s, IsPos r) => (pos s, pos r)
     | (s, _) => (pos s, 0)
    end
 end.

Definition sqrt n :=
 match n with
  | 0 => 0
  | pos p => pos (Pos.sqrt p)
 end.



Definition shiftl_nat (a:N) := nat_rect _ a (fun _ => double).
Definition shiftr_nat (a:N) := nat_rect _ a (fun _ => div2).

Definition shiftl a n :=
  match a with
    | 0 => 0
    | pos a => pos (Pos.shiftl a n)
  end.

Definition shiftr a n :=
  match n with
    | 0 => a
    | pos p => Pos.iter div2 a p
  end.



Definition testbit_nat (a:N) :=
  match a with
    | 0 => fun _ => false
    | pos p => Pos.testbit_nat p
  end.



Definition testbit a n :=
  match a with
    | 0 => false
    | pos p => Pos.testbit p n
  end.



Definition to_nat (a:N) :=
  match a with
    | 0 => O
    | pos p => Pos.to_nat p
  end.

Definition of_nat (n:nat) :=
  match n with
    | O => 0
    | S n' => pos (Pos.of_succ_nat n')
  end.



Definition iter (n:N) {A} (f:A->A) (x:A) : A :=
  match n with
    | 0 => x
    | pos p => Pos.iter f x p
  end.



Definition iter_op {A} (op : A -> A -> A) (z x : A) (n : N) :=
  match n with N0 => z | Npos p => Pos.iter_op op p x end.



Definition of_uint (d:Decimal.uint) := Pos.of_uint d.

Definition of_hex_uint (d:Hexadecimal.uint) := Pos.of_hex_uint d.

Definition of_num_uint (d:Number.uint) :=
  match d with
  | Number.UIntDecimal d => of_uint d
  | Number.UIntHexadecimal d => of_hex_uint d
  end.

Definition of_int (d:Decimal.int) :=
  match Decimal.norm d with
  | Decimal.Pos d => Some (Pos.of_uint d)
  | Decimal.Neg _ => None
  end.

Definition of_hex_int (d:Hexadecimal.int) :=
  match Hexadecimal.norm d with
  | Hexadecimal.Pos d => Some (Pos.of_hex_uint d)
  | Hexadecimal.Neg _ => None
  end.

Definition of_num_int (d:Number.int) :=
  match d with
  | Number.IntDecimal d => of_int d
  | Number.IntHexadecimal d => of_hex_int d
  end.

Definition to_uint n :=
  match n with
  | 0 => Decimal.zero
  | pos p => Pos.to_uint p
  end.

Definition to_hex_uint n :=
  match n with
  | 0 => Hexadecimal.zero
  | pos p => Pos.to_hex_uint p
  end.

Definition to_num_uint n := Number.UIntDecimal (to_uint n).

Definition to_num_hex_uint n := Number.UIntHexadecimal (to_hex_uint n).

Definition to_int n := Decimal.Pos (to_uint n).

Definition to_hex_int n := Hexadecimal.Pos (to_hex_uint n).

Definition to_num_int n := Number.IntDecimal (to_int n).

Definition to_num_hex_int n := Number.IntHexadecimal (to_hex_int n).

Number Notation N of_num_uint to_num_hex_uint : hex_N_scope.
Number Notation N of_num_uint to_num_uint : N_scope.

End N.


Number Notation N N.of_num_uint N.to_num_hex_uint : hex_N_scope.
Number Notation N N.of_num_uint N.to_num_uint : N_scope.

End BinNatDef.

End Stdlib_DOT_NArith_DOT_BinNatDef_WRAPPED.
Module Export Stdlib_DOT_NArith_DOT_BinNatDef.
Module Export Stdlib.
Module Export NArith.
Module BinNatDef.
Include Stdlib_DOT_NArith_DOT_BinNatDef_WRAPPED.BinNatDef.
End BinNatDef.

End NArith.

End Stdlib.

End Stdlib_DOT_NArith_DOT_BinNatDef.
Export Stdlib.Numbers.BinNums.
Import Stdlib.Structures.OrdersFacts.
Import Stdlib.Numbers.Natural.Abstract.NProperties.

#[local] Open Scope N_scope.

Module N
 <: NAxiomsSig
 <: UsualOrderedTypeFull
 <: UsualDecidableTypeFull
 <: TotalOrder.

Include BinNatDef.N.

Definition eq := @Logic.eq N.
Definition eq_equiv := @eq_equivalence N.

Definition lt x y := (x ?= y) = Lt.
Definition le x y := (x ?= y) <> Gt.

Infix "<=" := le : N_scope.
Infix "<" := lt : N_scope.
Notation "x <= y < z" := (x <= y /\ y < z) : N_scope.

Definition divide p q := exists r, q = r*p.
Notation "( p | q )" := (divide p q) (at level 0) : N_scope.

Definition Even n := exists m, n = 2*m.
Definition Odd n := exists m, n = 2*m+1.
Program Definition succ_wd : Proper (eq==>eq) succ.
Admitted.
Program Definition pred_wd : Proper (eq==>eq) pred.
Admitted.
Program Definition add_wd : Proper (eq==>eq==>eq) add.
Admitted.
Program Definition sub_wd : Proper (eq==>eq==>eq) sub.
Admitted.
Program Definition mul_wd : Proper (eq==>eq==>eq) mul.
Admitted.
Program Definition lt_wd : Proper (eq==>eq==>iff) lt.
Admitted.
Program Definition div_wd : Proper (eq==>eq==>eq) div.
Admitted.
Program Definition mod_wd : Proper (eq==>eq==>eq) modulo.
Admitted.
Program Definition pow_wd : Proper (eq==>eq==>eq) pow.
Admitted.
Program Definition testbit_wd : Proper (eq==>eq==>Logic.eq) testbit.
Admitted.

Definition eq_dec : forall n m : N, { n = m } + { n <> m }.
Admitted.

Theorem bi_induction :
  forall A : N -> Prop, Proper (Logic.eq==>iff) A ->
    A 0 -> (forall n, A n <-> A (succ n)) -> forall n : N, A n.
Admitted.

Lemma one_succ : 1 = succ 0.
Admitted.

Lemma two_succ : 2 = succ 1.
Admitted.

Lemma pred_0 : pred 0 = 0.
Admitted.

Theorem pred_succ n : pred (succ n) = n.
Admitted.

Theorem add_0_l n : 0 + n = n.
Admitted.

Theorem add_succ_l n m : succ n + m = succ (n + m).
Admitted.

Theorem sub_0_r n : n - 0 = n.
Admitted.

Theorem sub_succ_r n m : n - succ m = pred (n - m).
Admitted.

Theorem mul_0_l n : 0 * n = 0.
Admitted.

Theorem mul_succ_l n m : (succ n) * m = n * m + m.
Admitted.

Lemma eqb_eq n m : eqb n m = true <-> n=m.
Admitted.

Lemma ltb_lt n m : (n <? m) = true <-> n < m.
Admitted.

Lemma leb_le n m : (n <=? m) = true <-> n <= m.
Admitted.

Theorem compare_eq_iff n m : (n ?= m) = Eq <-> n = m.
Admitted.

Theorem compare_lt_iff n m : (n ?= m) = Lt <-> n < m.
Admitted.

Theorem compare_le_iff n m : (n ?= m) <> Gt <-> n <= m.
Admitted.

Theorem compare_antisym n m : (m ?= n) = CompOpp (n ?= m).
Admitted.

Include BoolOrderFacts.

Theorem min_l n m : n <= m -> min n m = n.
Admitted.

Theorem min_r n m : m <= n -> min n m = m.
Admitted.

Theorem max_l n m : m <= n -> max n m = n.
Admitted.

Theorem max_r n m : n <= m -> max n m = m.
Admitted.

Lemma lt_succ_r n m : n < succ m <-> n<=m.
Admitted.

Include NBasicProp <+ UsualMinMaxLogicalProperties <+ UsualMinMaxDecProperties.

Lemma pow_0_r n : n ^ 0 = 1.
Admitted.

Lemma pow_succ_r n p : 0<=p -> n^(succ p) = n * n^p.
Admitted.

Lemma pow_neg_r n p : p<0 -> n^p = 0.
Admitted.

Lemma square_spec n : square n = n * n.
Admitted.

Lemma log2_spec n : 0 < n ->
 2^(log2 n) <= n < 2^(succ (log2 n)).
Admitted.

Lemma log2_nonpos n : n<=0 -> log2 n = 0.
Admitted.

Lemma even_spec n : even n = true <-> Even n.
Admitted.

Lemma odd_spec n : odd n = true <-> Odd n.
Admitted.

Theorem div_mod a b : b<>0 -> a = b * (a/b) + (a mod b).
Admitted.

Theorem mod_bound_pos a b : 0<=a -> 0<b -> 0 <= a mod b < b.
Admitted.

Lemma sqrt_spec n : 0<=n ->
 let s := sqrt n in s*s <= n < (succ s)*(succ s).
Admitted.

Lemma sqrt_neg n : n<0 -> sqrt n = 0.
Admitted.

Lemma gcd_divide_l a b : (gcd a b | a).
Admitted.

Lemma gcd_divide_r a b : (gcd a b | b).
Admitted.

Lemma gcd_greatest a b c : (c|a) -> (c|b) -> (c|gcd a b).
Admitted.

Lemma gcd_nonneg a b : 0 <= gcd a b.
Admitted.

Lemma testbit_even_0 a : testbit (2*a) 0 = false.
Admitted.

Lemma testbit_odd_0 a : testbit (2*a+1) 0 = true.
Admitted.

Lemma testbit_odd_succ a n : 0<=n ->
 testbit (2*a+1) (succ n) = testbit a n.
Admitted.

Lemma testbit_even_succ a n : 0<=n ->
 testbit (2*a) (succ n) = testbit a n.
Admitted.

Lemma testbit_neg_r a n : n<0 -> testbit a n = false.
Admitted.

Lemma shiftr_spec a n m : 0<=m ->
 testbit (shiftr a n) m = testbit a (m+n).
Admitted.

Lemma shiftl_spec_high a n m : 0<=m -> n<=m ->
 testbit (shiftl a n) m = testbit a (m-n).
Admitted.

Lemma shiftl_spec_low a n m : m<n ->
 testbit (shiftl a n) m = false.
Admitted.

Lemma div2_spec a : div2 a = shiftr a 1.
Admitted.

Lemma lxor_spec a a' n :
 testbit (lxor a a') n = xorb (testbit a n) (testbit a' n).
Admitted.

Lemma lor_spec a a' n :
 testbit (lor a a') n = (testbit a n) || (testbit a' n).
Admitted.

Lemma land_spec a a' n :
 testbit (land a a') n = (testbit a n) && (testbit a' n).
Admitted.

Lemma ldiff_spec a a' n :
 testbit (ldiff a a') n = (testbit a n) && negb (testbit a' n).
Admitted.

End N.
Module Export Stdlib_DOT_NArith_DOT_BinNat.
Module Export Stdlib.
Module Export NArith.
Module Export BinNat.
End BinNat.

End NArith.

End Stdlib.

End Stdlib_DOT_NArith_DOT_BinNat.
Module Export IntDef.
End IntDef.
Module Export BinIntDef.
Import Stdlib.PArith.BinPos.
Import Stdlib.NArith.BinNat.

#[local] Open Scope Z_scope.

#[local] Notation "0" := Z0.
#[local] Notation "1" := (Zpos 1).
#[local] Notation "2" := (Zpos 2).

Module Z.

Include BinNums.IntDef.Z.

Definition t := Z.

#[global] Notation pos := Zpos.
#[global] Notation neg := Zneg.

Definition zero := 0.
Definition one := 1.
Definition two := 2.

Definition succ x := x + 1.

Definition pred x := x + neg 1.

Definition square x :=
  match x with
    | 0 => 0
    | pos p => pos (Pos.square p)
    | neg p => pos (Pos.square p)
  end.

Definition sgn z :=
  match z with
    | 0 => 0
    | pos p => 1
    | neg p => neg 1
  end.

Infix "=?" := eqb (at level 70, no associativity) : Z_scope.
Infix "<=?" := leb (at level 70, no associativity) : Z_scope.
Infix "<?" := ltb (at level 70, no associativity) : Z_scope.

Definition abs z :=
  match z with
    | 0 => 0
    | pos p => pos p
    | neg p => pos p
  end.

Definition of_uint (d:Decimal.uint) := of_N (Pos.of_uint d).

Definition of_hex_uint (d:Hexadecimal.uint) := of_N (Pos.of_hex_uint d).

Definition of_int (d:Decimal.int) :=
  match d with
  | Decimal.Pos d => of_uint d
  | Decimal.Neg d => opp (of_uint d)
  end.

Definition of_hex_int (d:Hexadecimal.int) :=
  match d with
  | Hexadecimal.Pos d => of_hex_uint d
  | Hexadecimal.Neg d => opp (of_hex_uint d)
  end.

Definition of_num_int (d:Number.int) :=
  match d with
  | Number.IntDecimal d => of_int d
  | Number.IntHexadecimal d => of_hex_int d
  end.

Definition to_int n :=
  match n with
  | 0 => Decimal.Pos Decimal.zero
  | pos p => Decimal.Pos (Pos.to_uint p)
  | neg p => Decimal.Neg (Pos.to_uint p)
  end.

Definition to_num_int n := Number.IntDecimal (to_int n).

Infix "/" := div : Z_scope.
Infix "mod" := modulo (at level 40, no associativity) : Z_scope.

Definition odd z :=
  match z with
    | 0 => false
    | pos (xO _) => false
    | neg (xO _) => false
    | _ => true
  end.

Definition log2 z :=
  match z with
    | pos (p~1) => pos (Pos.size p)
    | pos (p~0) => pos (Pos.size p)
    | _ => 0
  end.

Definition sqrt n :=
 match n with
  | pos p => pos (Pos.sqrt p)
  | _ => 0
 end.

Definition gcd a b :=
  match a,b with
    | 0, _ => abs b
    | _, 0 => abs a
    | pos a, pos b => pos (Pos.gcd a b)
    | pos a, neg b => pos (Pos.gcd a b)
    | neg a, pos b => pos (Pos.gcd a b)
    | neg a, neg b => pos (Pos.gcd a b)
  end.

Definition ggcd a b : Z*(Z*Z) :=
  match a,b with
    | 0, _ => (abs b,(0, sgn b))
    | _, 0 => (abs a,(sgn a, 0))
    | pos a, pos b =>
       let '(g,(aa,bb)) := Pos.ggcd a b in (pos g, (pos aa, pos bb))
    | pos a, neg b =>
       let '(g,(aa,bb)) := Pos.ggcd a b in (pos g, (pos aa, neg bb))
    | neg a, pos b =>
       let '(g,(aa,bb)) := Pos.ggcd a b in (pos g, (neg aa, pos bb))
    | neg a, neg b =>
       let '(g,(aa,bb)) := Pos.ggcd a b in (pos g, (neg aa, neg bb))
  end.

Definition testbit a n :=
 match n with
   | 0 => odd a
   | pos p =>
     match a with
       | 0 => false
       | pos a => Pos.testbit a (N.pos p)
       | neg a => negb (N.testbit (Pos.pred_N a) (N.pos p))
     end
   | neg _ => false
 end.

Definition ldiff a b :=
 match a, b with
   | 0, _ => 0
   | _, 0 => a
   | pos a, pos b => of_N (Pos.ldiff a b)
   | neg a, pos b => neg (N.succ_pos (N.lor (Pos.pred_N a) (N.pos b)))
   | pos a, neg b => of_N (N.land (N.pos a) (Pos.pred_N b))
   | neg a, neg b => of_N (N.ldiff (Pos.pred_N b) (Pos.pred_N a))
 end.
Number Notation Z of_num_int to_num_int : Z_scope.

End Z.

End BinIntDef.
Module Export Stdlib_DOT_ZArith_DOT_BinIntDef.
Module Export BinIntDef.
End BinIntDef.

End Stdlib_DOT_ZArith_DOT_BinIntDef.
Export Stdlib.Numbers.NatInt.NZAxioms.
Import Stdlib.Numbers.NatInt.NZDiv.

Module Type ZAxiom (Import Z : NZAxiomsSig').
End ZAxiom.

Module Type Opp (Import T:Typ).
End Opp.

Module Type OppNotation (T:Typ)(Import O : Opp T).
End OppNotation.

Module Type Opp' (T:Typ) := Opp T <+ OppNotation T.

Module Type IsOpp (Import Z : NZAxiomsSig')(Import O : Opp' Z).
End IsOpp.

Module Type OppCstNotation (Import A : NZAxiomsSig)(Import B : Opp A).
End OppCstNotation.

Module Type ZAxiomsMiniSig := NZOrdAxiomsSig <+ ZAxiom <+ Opp <+ IsOpp.
Module Type ZAxiomsMiniSig' := NZOrdAxiomsSig' <+ ZAxiom <+ Opp' <+ IsOpp
 <+ OppCstNotation.

Module Type HasAbs(Import Z : ZAxiomsMiniSig').
End HasAbs.

Module Type HasSgn (Import Z : ZAxiomsMiniSig').
End HasSgn.

Module Type ZDivSpecific (Import A:ZAxiomsMiniSig')(Import B : DivMod' A).
End ZDivSpecific.

Module Type ZDiv (Z:ZAxiomsMiniSig) := NZDiv.NZDiv Z <+ ZDivSpecific Z.

Module Type QuotRem (Import A : Typ).
End QuotRem.

Module Type QuotRemNotation (A : Typ)(Import B : QuotRem A).
End QuotRemNotation.

Module Type QuotRem' (A : Typ) := QuotRem A <+ QuotRemNotation A.

Module Type QuotRemSpec (Import A : ZAxiomsMiniSig')(Import B : QuotRem' A).
End QuotRemSpec.

Module Type ZQuot (Z:ZAxiomsMiniSig) := QuotRem Z <+ QuotRemSpec Z.

Module Type ZAxiomsSig := ZAxiomsMiniSig <+ OrderFunctions
   <+ HasAbs <+ HasSgn <+ NZParity.NZParity
   <+ NZPow.NZPow <+ NZSqrt.NZSqrt <+ NZLog.NZLog2 <+ NZGcd.NZGcd
   <+ ZDiv <+ ZQuot <+ NZBits.NZBits <+ NZSquare.
Module Export Stdlib_DOT_Numbers_DOT_Integer_DOT_Abstract_DOT_ZAxioms.
Module Export Stdlib.
Module Export Numbers.
Module Export Integer.
Module Export Abstract.
Module Export ZAxioms.
End ZAxioms.

End Abstract.

End Integer.

End Numbers.

End Stdlib.

End Stdlib_DOT_Numbers_DOT_Integer_DOT_Abstract_DOT_ZAxioms.
Export Stdlib.Numbers.Integer.Abstract.ZAxioms.
Import Stdlib.Numbers.NatInt.NZMulOrder.

Module ZBaseProp (Import Z : ZAxiomsMiniSig').
Include NZMulOrderProp Z.

End ZBaseProp.
Module Export ZBase.
End ZBase.

Module ZAddProp (Import Z : ZAxiomsMiniSig').
Include ZBaseProp Z.

End ZAddProp.
Module Export Stdlib_DOT_Numbers_DOT_Integer_DOT_Abstract_DOT_ZAdd.
Module Export Stdlib.
Module Export Numbers.
Module Export Integer.
Module Export Abstract.
Module Export ZAdd.
End ZAdd.

End Abstract.

End Integer.

[...]

l "iSpecialize:" P "not an implication/wand" in
  let solve_done d :=
    lazymatch d with
    | true =>
       first [ done
             | let Q := match goal with |- envs_entails _ ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done"
             | let Q := match goal with |- ?Q => Q end in
               fail 1 "iSpecialize: cannot solve" Q "using done" ]
    | false => idtac
    end in
  let Δ := iGetCtx in
  lazymatch pats with
    | [] => idtac
    | SIdent ?H2 [] :: ?pats =>

       notypeclasses refine (tac_specialize false _ H2 _ H1 _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H2 := pretty_ident H2 in
          fail "iSpecialize:" H2 "not found"
         |pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |tc_solve ||
          let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
          let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
          fail "iSpecialize: cannot instantiate" P "with" Q
         |pm_reduce; iSpecializePat_go H1 pats]
    | SIdent ?H2 ?pats1 :: ?pats =>

       let H2tmp := iFresh in
       iPoseProofCoreHyp H2 as H2tmp;

       iRevertHyp H1 with (fun p =>
         iSpecializePat_go H2tmp pats1;
           [..
           |_iIntroMaybePersistent H1 p]);

         [..
         |
          notypeclasses refine (tac_specialize true _ H2tmp _ H1 _ _ _ _ _ _ _ _ _);
            [pm_reflexivity ||
             let H2tmp := pretty_ident H2tmp in
             fail "iSpecialize:" H2tmp "not found"
            |pm_reflexivity ||
             let H1 := pretty_ident H1 in
             fail "iSpecialize:" H1 "not found"
            |tc_solve ||
             let P := match goal with |- IntoWand _ _ ?P ?Q _ => P end in
             let Q := match goal with |- IntoWand _ _ ?P ?Q _ => Q end in
             fail "iSpecialize: cannot instantiate" P "with" Q
            |pm_reduce; iSpecializePat_go H1 pats]]
    | SPureGoal ?d :: ?pats =>
       notypeclasses refine (tac_specialize_assert_pure _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- FromPure _ ?Q _ => Q end in
          fail "iSpecialize:" Q "not pure"
         |solve_done d
         |pm_reduce;
          iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic false ?Hs_frame [] ?d) :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve
         |pm_reduce; iFrame Hs_frame; solve_done d
         |pm_reduce; iSpecializePat_go H1 pats]
    | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: ?pats =>
       fail "iSpecialize: cannot select hypotheses for intuitionistic premise"
    | SGoal (SpecGoal ?m ?lr ?Hs_frame ?Hs ?d) :: ?pats =>
       let Hs' := eval cbv in (if lr then Hs else Hs_frame ++ Hs) in
       notypeclasses refine (tac_specialize_assert _ H1 _
           (if m is GModal then true else false) lr Hs' _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          lazymatch goal with
          | |- False =>
            let Hs' := iMissingHypsCore Δ Hs' in
            fail "iSpecialize: hypotheses" Hs' "not found"
          | _ =>
            notypeclasses refine (conj _ _);
              [iFrame Hs_frame; solve_done d
              |iSpecializePat_go H1 pats]
          end]
    | SAutoFrame GIntuitionistic :: ?pats =>
       notypeclasses refine (tac_specialize_assert_intuitionistic _ H1 _ _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve ||
          let Q := match goal with |- Persistent ?Q => Q end in
          fail "iSpecialize:" Q "not persistent"
         |tc_solve ||
          fail "iSpecialize: Cannot find IntoAbsorbingly;"
               "this should not happen, please report a bug"
         |pm_reduce; solve [iFrame "∗ #"]
         |pm_reduce; iSpecializePat_go H1 pats]
    | SAutoFrame ?m :: ?pats =>
       notypeclasses refine (tac_specialize_frame _ H1 _
           (if m is GModal then true else false) _ _ _ _ _ _ _ _ _ _ _);
         [pm_reflexivity ||
          let H1 := pretty_ident H1 in
          fail "iSpecialize:" H1 "not found"
         |solve_to_wand H1
         |tc_solve || fail "iSpecialize: goal not a modality"
         |pm_reduce;
          first
            [notypeclasses refine (tac_unlock_emp _ _ _)
            |notypeclasses refine (tac_unlock_True _ _ _)
            |iFrame "∗ #"; notypeclasses refine (tac_unlock _ _ _)
            |let P :=
               match goal with |- envs_entails _ (?P ∗ locked _)%I => P end in
             fail 1 "iSpecialize: premise" P "cannot be solved by framing"]
         |exact eq_refl]; _iIntroSpatial H1; iSpecializePat_go H1 pats
    end.

Local Tactic Notation "iSpecializePat" open_constr(H) constr(pat) :=
  let pats := spec_pat.parse pat in iSpecializePat_go H pats.

Fixpoint use_tac_specialize_intuitionistic_helper {M}
    (Δ : envs M) (pats : list spec_pat) : bool :=
  match pats with
  | [] => false
  | SPureGoal _ :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SAutoFrame _ :: _ => true
  | SIdent H _ :: pats =>
     match envs_lookup_delete false H Δ with
     | Some (false, _, Δ) => true
     | Some (true, _, Δ) => use_tac_specialize_intuitionistic_helper Δ pats
     | None => false
     end
  | SGoal (SpecGoal GModal _ _ _ _) :: _ => false
  | SGoal (SpecGoal GIntuitionistic _ _ _ _) :: pats =>
     use_tac_specialize_intuitionistic_helper Δ pats
  | SGoal (SpecGoal GSpatial neg Hs_frame Hs _) :: pats =>
     match envs_split (if neg is true then Right else Left)
                      (if neg then Hs else pm_app Hs_frame Hs) Δ with
     | Some (Δ1,Δ2) => if env_spatial_is_nil Δ1
                       then use_tac_specialize_intuitionistic_helper Δ2 pats
                       else true
     | None => false
     end
  end.

Tactic Notation "iSpecializeCore" open_constr(H)
    "with" open_constr(xs) open_constr(pat) "as" constr(p) :=
  let p := intro_pat_intuitionistic p in
  let pat := spec_pat.parse pat in
  let H :=
    lazymatch type of H with
    | string => constr:(INamed H)
    | _ => H
    end in
  iSpecializeArgs H xs; [..|
    lazymatch type of H with
    | ident =>
       let pat := spec_pat.parse pat in
       let Δ := iGetCtx in

       let b := eval lazy [use_tac_specialize_intuitionistic_helper] in
         (if p then use_tac_specialize_intuitionistic_helper Δ pat else false) in
       lazymatch eval pm_eval in b with
       | true =>

          lazymatch iTypeOf H with
          | Some (?q, _) =>
             let PROP := iBiOfGoal in

             lazymatch eval lazy in (q || tc_to_bool (BiAffine PROP)) with
             | true =>
                notypeclasses refine (tac_specialize_intuitionistic_helper _ H _ _ _ _ _ _ _ _ _ _);
                  [pm_reflexivity

                  |pm_reduce; tc_solve

                  |iSpecializePat H pat;
                    [..
                    |notypeclasses refine (tac_specialize_intuitionistic_helper_done _ H _ _ _);
                     pm_reflexivity]
                  |tc_solve ||
                   let Q := match goal with |- IntoPersistent _ ?Q _ => Q end in
                   fail "iSpecialize:" Q "not persistent"
                  |pm_reduce ]
             | false => iSpecializePat H pat
             end
          | None =>
             let H := pretty_ident H in
             fail "iSpecialize:" H "not found"
          end
       | false => iSpecializePat H pat
       end
    | _ => fail "iSpecialize:" H "should be a hypothesis, use iPoseProof instead"
    end].

Tactic Notation "iSpecializeCore" open_constr(t) "as" constr(p) :=
  lazymatch type of t with
  | string => iSpecializeCore t with hnil "" as p
  | ident => iSpecializeCore t with hnil "" as p
  | _ =>
    lazymatch t with
    | ITrm ?H ?xs ?pat => iSpecializeCore H with xs pat as p
    | _ => fail "iSpecialize:" t "should be a proof mode term"
    end
  end.

Tactic Notation "iPoseProofCore" open_constr(lem)
    "as" constr(p) tactic3(tac) :=
  iStartProof;
  let t := lazymatch lem with ITrm ?t ?xs ?pat => t | _ => lem end in
  let t := lazymatch type of t with string => constr:(INamed t) | _ => t end in
  let spec_tac Htmp :=
    lazymatch lem with
    | ITrm _ ?xs ?pat => iSpecializeCore (ITrm Htmp xs pat) as p
    | _ => idtac
    end in
  lazymatch type of t with
  | ident =>
     let Htmp := iFresh in
     iPoseProofCoreHyp t as Htmp; spec_tac Htmp; [..|tac Htmp]
  | _ => iPoseProofCoreLem t as (fun Htmp => spec_tac Htmp; [..|tac Htmp])
  end.

Tactic Notation "iOrDestruct" constr(H) "as" constr(H1) constr(H2) :=
  eapply tac_or_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iOrDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoOr ?P _ _ => P end in
     fail "iOrDestruct: cannot destruct" P
    | pm_reduce;
      lazymatch goal with
      | |- False =>
        let H1 := pretty_ident H1 in
        let H2 := pretty_ident H2 in
        fail "iOrDestruct:" H1 "or" H2 "not fresh"
      |  _ => split
      end].

Ltac _iAndDestruct H H1 H2 :=
  eapply tac_and_destruct with H _ H1 H2 _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iAndDestruct:" H "not found"
    |pm_reduce; tc_solve ||
     let P :=
       lazymatch goal with
       | |- IntoSep ?P _ _ => P
       | |- IntoAnd _ ?P _ _ => P
       end in
     fail "iAndDestruct: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
       | |- False =>
         let H1 := pretty_ident H1 in
         let H2 := pretty_ident H2 in
         fail "iAndDestruct:" H1 "or" H2 "not fresh"
       | _ => idtac
     end].

Ltac _iAndDestructChoice H d H' :=
  eapply tac_and_destruct_choice with H _ d H' _ _ _;
    [pm_reflexivity || fail "iAndDestructChoice:" H "not found"
    |pm_reduce; tc_solve ||
     let P := match goal with |- TCOr (IntoAnd _ ?P _ _) _ => P end in
     fail "iAndDestructChoice: cannot destruct" P
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iAndDestructChoice:" H' "not fresh"
     | _ => idtac
     end].

Tactic Notation "_iExistDestruct" constr(H)
    "as" simple_intropattern(x) constr(Hx) :=
  eapply tac_exist_destruct with H _ Hx _ _ _;
    [pm_reflexivity ||
     let H := pretty_ident H in
     fail "iExistDestruct:" H "not found"
    |tc_solve ||
     let P := match goal with |- IntoExist ?P _ _ => P end in
     fail "iExistDestruct: cannot destruct" P|];
    let name := lazymatch goal with
                | |- let _ := (λ name, _) in _ => name
                end in
    intros _;
    let y := fresh name in
    intros y; pm_reduce;
    lazymatch goal with
    | |- False =>
      let Hx := pretty_ident Hx in
      fail "iExistDestruct:" Hx "not fresh"
    | _ => revert y; intros x
    end.

Tactic Notation "iModIntro" uconstr(sel) :=
  iStartProof;
  notypeclasses refine (tac_modal_intro _ _ sel _ _ _ _ _ _ _ _ _ _ _ _ _ _);
    [tc_solve ||
     fail "iModIntro: the goal is not a modality"
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalIntuitionisticEnv _ _ _ ?s => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: intuitionistic context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: intuitionistic context is non-empty"
     end
    |tc_solve ||
     let s := lazymatch goal with |- IntoModalSpatialEnv _ _ _ ?s _ => s end in
     lazymatch eval hnf in s with
     | MIEnvForall ?C => fail "iModIntro: spatial context does not satisfy" C
     | MIEnvIsEmpty => fail "iModIntro: spatial context is non-empty"
     end
    |pm_reduce; tc_solve ||
     fail "iModIntro: cannot filter spatial context when goal is not absorbing"
    |iSolveSideCondition
    |pm_prettify
      ].
Tactic Notation "iModIntro" := iModIntro _.

Tactic Notation "iModCore" constr(H) "as" constr(H') :=
  eapply tac_modal_elim with H H' _ _ _ _ _ _;
    [pm_reflexivity || fail "iMod:" H "not found"
    |tc_solve ||
     let P := match goal with |- ElimModal _ _ _ ?P _ _ _ => P end in
     let Q := match goal with |- ElimModal _ _ _ _ _ ?Q _ => Q end in
     fail "iMod: cannot eliminate modality" P "in" Q
    |iSolveSideCondition
    |pm_reduce;
     lazymatch goal with
     | |- False =>
       let H' := pretty_ident H' in
       fail "iMod:" H' "not fresh"
     | _ => pm_prettify
     end].

Ltac _ident_for_pat pat :=
  lazymatch pat with
  | IIdent ?x => x
  | _ => let x := iFresh in x
  end.

Ltac _ident_for_pat_default pat default :=
  lazymatch pat with
  | IIdent ?x => x
  | _ =>
    lazymatch default with
    | IAnon _ => default
    | _ => let x := iFresh in x
    end
  end.

Ltac _iDestructHypGo Hz pat0 pat :=
  lazymatch pat with
  | IFresh =>
     lazymatch Hz with
     | IAnon _ => idtac
     | INamed ?Hz => let Hz' := iFresh in iRename Hz into Hz'
     end
  | IDrop => _iClearHyp Hz
  | IFrame => iFrame Hz
  | IIdent Hz => idtac
  | IIdent ?y => iRename Hz into y
  | IList [[]] => iExFalso; iExact Hz

  | IList [[?pat1; IDrop]] =>
     let x := _ident_for_pat_default pat1 Hz in
     _iAndDestructChoice Hz Left x;
     _iDestructHypGo x pat0 pat1
  | IList [[IDrop; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iAndDestructChoice Hz Right x;
     _iDestructHypGo x pat0 pat2

  | IList [[IPure IGallinaAnon; ?pat2]] =>
     let x := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as ? x; _iDestructHypGo x pat0 pat2
  | IList [[IPure (IGallinaNamed ?s); ?pat2]] =>
     let x := fresh in
     let y := _ident_for_pat_default pat2 Hz in
     _iExistDestruct Hz as x y;
     rename_by_string x s;
     _iDestructHypGo y pat0 pat2
  | IList [[?pat1; ?pat2]] =>

     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat pat2 in
     _iAndDestruct Hz x1 x2;
     _iDestructHypGo x1 pat0 pat1; _iDestructHypGo x2 pat0 pat2
  | IList [_ :: _ :: _] => fail "iDestruct:" pat0 "has too many conjuncts"
  | IList [[_]] => fail "iDestruct:" pat0 "has just a single conjunct"

  | IList [[?pat1];[?pat2]] =>
     let x1 := _ident_for_pat_default pat1 Hz in
     let x2 := _ident_for_pat_default pat2 Hz in
     iOrDestruct Hz as x1 x2;
     [_iDestructHypGo x1 pat0 pat1|_iDestructHypGo x2 pat0 pat2]

  | IList (_ :: _ :: _ :: _) => fail "iDestruct:" pat0 "has too many disjuncts"

  | IList [_;_] => fail "iDestruct: in" pat0 "a disjunct has multiple patterns"

  | IPure IGallinaAnon => iPure Hz as ?
  | IPure (IGallinaNamed ?s) =>
     let x := fresh in
     iPure Hz as x;
     rename_by_string x s
  | IRewrite Right => iPure Hz as ->
  | IRewrite Left => iPure Hz as <-
  | IIntuitionistic ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iIntuitionistic Hz x; _iDestructHypGo x pat0 pat
  | ISpatial ?pat =>
    let x := _ident_for_pat_default pat Hz in
    _iSpatial Hz x; _iDestructHypGo x pat0 pat
  | IModalElim ?pat =>
    let x := _ident_for_pat_default pat Hz in
    iModCore Hz as x; _iDestructHypGo x pat0 pat
  | _ => fail "iDestruct:" pat0 "is not supported due to" pat
  end.
Ltac _iDestructHypFindPat Hgo pat found pats :=
  lazymatch pats with
  | [] =>
    lazymatch found with
    | true => pm_prettify
    | false => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
    end
  | ISimpl :: ?pats => simpl; _iDestructHypFindPat Hgo pat found pats
  | IClear ?H :: ?pats => iClear H; _iDestructHypFindPat Hgo pat found pats
  | IClearFrame ?H :: ?pats => iFrame H; _iDestructHypFindPat Hgo pat found pats
  | ?pat1 :: ?pats =>
     lazymatch found with
     | false => _iDestructHypGo Hgo pat pat1; _iDestructHypFindPat Hgo pat true pats
     | true => fail "iDestruct:" pat "should contain exactly one proper introduction pattern"
     end
  end.

Ltac _iDestructHyp0 H pat :=
  let pats := intro_pat.parse pat in
  _iDestructHypFindPat H pat false pats.
Ltac _iDestructHyp H xs pat :=
  ltac1_list_iter ltac:(fun x => _iExistDestruct H as x H) xs;
  _iDestructHyp0 H pat.

Tactic Notation "iDestructHyp" constr(H) "as" constr(pat) :=
  _iDestructHyp0 H pat.

Ltac _iIntros_go pats startproof :=
  lazymatch pats with
  | [] =>
    lazymatch startproof with
    | true => iStartProof
    | false => idtac
    end

  | IPure (IGallinaNamed ?s) :: ?pats =>
     let i := fresh in
     _iIntro (i);
     rename_by_string i s;
     _iIntros_go pats startproof
  | IPure IGallinaAnon :: ?pats => _iIntro (?); _iIntros_go pats startproof
  | IIntuitionistic (IIdent ?H) :: ?pats => _iIntroPersistent H; _iIntros_go pats false
  | IDrop :: ?pats => _iIntroDrop; _iIntros_go pats startproof
  | IIdent ?H :: ?pats => _iIntroSpatial H; _iIntros_go pats startproof

  | IPureIntro :: ?pats => iPureIntro; _iIntros_go pats false
  | IModalIntro :: ?pats => iModIntro; _iIntros_go pats false
  | IForall :: ?pats => repeat _iIntroForall; _iIntros_go pats startproof
  | IAll :: ?pats => repeat (_iIntroForall || _iIntro); _iIntros_go pats startproof

  | ISimpl :: ?pats => simpl; _iIntros_go pats startproof
  | IClear ?H :: ?pats => iClear H; _iIntros_go pats false
  | IClearFrame ?H :: ?pats => iFrame H; _iIntros_go pats false
  | IDone :: ?pats => try done; _iIntros_go pats startproof

  | IIntuitionistic ?pat :: ?pats =>
     let H := iFresh in _iIntroPersistent H; iDestructHyp H as pat; _iIntros_go pats false
  | ?pat :: ?pats =>
     let H := iFresh in _iIntroSpatial H; iDestructHyp H as pat; _iIntros_go pats false
  end.

Ltac _iIntros0 pat :=
  let pats := intro_pat.parse pat in

  lazymatch pats with
  | [] => idtac
  | _ => _iIntros_go pats true
  end.
Ltac _iIntros xs pat :=
  ltac1_list_iter ltac:(fun x => _iIntro (x)) xs;
  _iIntros0 pat.
Tactic Notation "iIntros" "(" ne_simple_intropattern_list(xs) ")" :=
  _iIntros xs "".

Tactic Notation "iDestructCore" open_constr(lem) "as" constr(p) tactic3(tac) :=
  let intro_destruct n :=
    let rec go n' :=
      lazymatch n' with
      | 0 => fail "iDestruct: cannot introduce" n "hypotheses"
      | 1 => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; tac H
      | S ?n' => repeat _iIntroForall; let H := iFresh in _iIntroSpatial H; go n'
      end in
    intros; go n in
  lazymatch type of lem with
  | nat => intro_destruct lem
  | Z =>

     let n := eval cbv in (Z.to_nat lem) in intro_destruct n
  | ident => tac lem
  | string => tac constr:(INamed lem)
  | _ => iPoseProofCore lem as p tac
  end.
Tactic Notation "iMod" open_constr(lem) "as" "(" ne_simple_intropattern_list(xs) ")"
    constr(pat) :=
  iDestructCore lem as false (fun H => iModCore H as H; last _iDestructHyp H xs pat).

Section class_instances.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance as_emp_valid_emp_valid d P : AsEmpValid0 d (⊢ P) P | 0.
Admitted.

Global Instance into_sep_sep P Q : IntoSep (P ∗ Q) P Q.
Admitted.

Global Instance into_exist_exist {A} (Φ : A → PROP) name :
  AsIdentName Φ name → IntoExist (bi_exist Φ) Φ name.
Admitted.
End class_instances.
Global Instance elim_modal_bupd_fupd
    `{!BiBUpd PROP, !BiFUpd PROP, !BiBUpdFUpd PROP} p E1 E2 P Q :
  ElimModal True p false (|==> P) P (|={E1,E2}=> Q) (|={E1,E2}=> Q) | 10.
Admitted.

Section class_instances_frame.
Context {PROP : bi}.
Implicit Types P Q R : PROP.
Global Instance frame_here p R : Frame p R R emp | 1.
Admitted.
Global Instance frame_sep_l R P1 P2 Q Q' :
  Frame false R P1 Q → MakeSep Q P2 Q' → Frame false R (P1 ∗ P2) Q' | 9.
Admitted.

Inductive GatherEvarsEq {A} (x : A) : A → Prop :=
  GatherEvarsEq_refl : GatherEvarsEq x x.

#[projections(primitive)] Class FrameExistRequirements
    (p : bool) (R : PROP) {A} (Φ : A → PROP) (a' : A) (G' : PROP) := {
  frame_exist_witness : A;
  frame_exist_resource : PROP;
  frame_exist_proof : Frame p R (Φ frame_exist_witness) frame_exist_resource;
  frame_exist_witness_eq : GatherEvarsEq frame_exist_witness a';
  frame_exist_resource_eq : TCEq frame_exist_resource G'
}.
Global Existing Instance Build_FrameExistRequirements.

Inductive TCCbnTele {A} (x : A) : A → Prop :=
  TCCbnTele_refl : TCCbnTele x x.

Global Instance frame_exist {A} p R (Φ : A → PROP)
    (TT : tele) (g : TT → A) (Ψ : TT → PROP) Q :
  FrameInstantiateExistEnabled →
  (∀ c, FrameExistRequirements p R Φ (g c) (Ψ c)) →
  TCCbnTele (∃.. c, Ψ c)%I Q →
  Frame p R (∃ a, Φ a) Q.
Admitted.
Global Instance frame_fupd `{!BiFUpd PROP} p E1 E2 R P Q :
  Frame p R P Q → Frame p R (|={E1,E2}=> P) (|={E1,E2}=> Q) | 2.
Admitted.
End class_instances_frame.

Ltac solve_gather_evars_eq :=
  lazymatch goal with
  | |- GatherEvarsEq ?a (?g ?c) =>
    let rec retcon_tele T arg :=

      match a with
      | context [?term] =>
        is_evar term;
        let X := type of term in
        lazymatch X with
        | tele => fail
        | _ => idtac
        end;
        let T' := open_constr:(_) in
        unify T (TeleS (λ _ : X, T'));

        unify term (tele_arg_head (λ _ : X, T') arg);

        retcon_tele T' (tele_arg_tail (λ _ : X, T') arg)

      | _ =>

        unify T TeleO
      end
    in
    let T' := lazymatch (type of c) with tele_arg ?T => T end in
    retcon_tele T' c;
    exact (GatherEvarsEq_refl _)
  end.

Global Hint Extern 0 (GatherEvarsEq _ _) =>
  solve_gather_evars_eq : typeclass_instances.

Global Hint Extern 0 (TCCbnTele _ _) =>
  cbn [bi_texist tele_fold tele_bind tele_arg_head tele_arg_tail];
  exact (TCCbnTele_refl _) : typeclass_instances.

Section class_instances_make.
Context {PROP : bi}.
Implicit Types P Q R : PROP.

Global Instance make_sep_emp_l P : KnownLMakeSep emp P P.
Admitted.
End class_instances_make.

Record agree (A : Type) : Type := {
  agree_car : list A;
  agree_not_nil : bool_decide (agree_car = []) = false
}.
Global Arguments agree_car {_} _.

Section agree.
Context {SI : sidx} {A : ofe}.
Local Instance agree_dist : Dist (agree A).
Admitted.
Local Instance agree_equiv : Equiv (agree A).
Admitted.

Definition agree_ofe_mixin : OfeMixin (agree A).
Admitted.
Canonical Structure agreeO := Ofe (agree A) agree_ofe_mixin.
Local Instance agree_validN_instance : ValidN (agree A).
Admitted.
Local Instance agree_valid_instance : Valid (agree A).
Admitted.

Local Program Instance agree_op_instance : Op (agree A) := λ x y,
  {| agree_car := agree_car x ++ agree_car y |}.
Admit Obligations.
Local Instance agree_pcore_instance : PCore (agree A).
Admitted.

Definition agree_cmra_mixin : CmraMixin (agree A).
Admitted.
Canonical Structure agreeR : cmra.
exact (Cmra (agree A) agree_cmra_mixin).
Defined.

End agree.
Global Arguments agreeR {_} _.

Record uPred (M : ucmra) : Type := UPred {
  uPred_holds : nat → M → Prop;

  uPred_mono n1 n2 x1 x2 :
    uPred_holds n1 x1 → x1 ≼{n2} x2 → n2 ≤ n1 → uPred_holds n2 x2
}.

Local Coercion uPred_holds : uPred >-> Funclass.

Section cofe.
  Context {M : ucmra}.
Local Instance uPred_equiv : Equiv (uPred M).
Admitted.
Local Instance uPred_dist : Dist (uPred M).
Admitted.
  Definition uPred_ofe_mixin : OfeMixin (uPred M).
Admitted.
Canonical Structure uPredO : ofe.
exact (Ofe (uPred M) uPred_ofe_mixin).
Defined.

  Program Definition uPred_compl : Compl uPredO := λ c,
    {| uPred_holds n x := ∀ n', n' ≤ n → ✓{n'} x → c n' n' x |}.
Admit Obligations.
  Global Program Instance uPred_cofe : Cofe uPredO := cofe_finite uPred_compl _.
Admit Obligations.
End cofe.
Global Arguments uPredO : clear implicits.

Inductive uPred_entails {M} (P Q : uPred M) : Prop :=
  { uPred_in_entails : ∀ n x, ✓{n} x → P n x → Q n x }.
Global Hint Resolve uPred_mono : uPred_def.

Local Program Definition uPred_pure_def {M} (φ : Prop) : uPred M :=
  {| uPred_holds n x := φ |}.
Solve Obligations with done.
Local Definition uPred_pure_aux : seal (@uPred_pure_def).
Admitted.
Definition uPred_pure := uPred_pure_aux.(unseal).
Global Arguments uPred_pure {M}.

Local Program Definition uPred_and_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∧ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_and_aux : seal (@uPred_and_def).
Admitted.
Definition uPred_and := uPred_and_aux.(unseal).
Global Arguments uPred_and {M}.

Local Program Definition uPred_or_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := P n x ∨ Q n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_or_aux : seal (@uPred_or_def).
Admitted.
Definition uPred_or := uPred_or_aux.(unseal).
Global Arguments uPred_or {M}.

Local Program Definition uPred_impl_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       x ≼ x' → n' ≤ n → ✓{n'} x' → P n' x' → Q n' x' |}.
Admit Obligations.
Local Definition uPred_impl_aux : seal (@uPred_impl_def).
Admitted.
Definition uPred_impl := uPred_impl_aux.(unseal).
Global Arguments uPred_impl {M}.

Local Program Definition uPred_forall_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∀ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_forall_aux : seal (@uPred_forall_def).
Admitted.
Definition uPred_forall := uPred_forall_aux.(unseal).

Local Program Definition uPred_exist_def {M A} (Ψ : A → uPred M) : uPred M :=
  {| uPred_holds n x := ∃ a, Ψ a n x |}.
Solve Obligations with naive_solver eauto 2 with uPred_def.
Local Definition uPred_exist_aux : seal (@uPred_exist_def).
Admitted.
Definition uPred_exist := uPred_exist_aux.(unseal).

Local Program Definition uPred_sep_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∃ x1 x2, x ≡{n}≡ x1 ⋅ x2 ∧ P n x1 ∧ Q n x2 |}.
Admit Obligations.
Local Definition uPred_sep_aux : seal (@uPred_sep_def).
Admitted.
Definition uPred_sep := uPred_sep_aux.(unseal).
Global Arguments uPred_sep {M}.

Local Program Definition uPred_wand_def {M} (P Q : uPred M) : uPred M :=
  {| uPred_holds n x := ∀ n' x',
       n' ≤ n → ✓{n'} (x ⋅ x') → P n' x' → Q n' (x ⋅ x') |}.
Admit Obligations.
Local Definition uPred_wand_aux : seal (@uPred_wand_def).
Admitted.
Definition uPred_wand := uPred_wand_aux.(unseal).
Global Arguments uPred_wand {M}.

Local Program Definition uPred_plainly_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n ε |}.
Solve Obligations with naive_solver eauto using uPred_mono, ucmra_unit_validN.

Local Program Definition uPred_persistently_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := P n (core x) |}.
Solve Obligations with naive_solver eauto using uPred_mono, cmra_core_monoN.
Local Definition uPred_persistently_aux : seal (@uPred_persistently_def).
Admitted.
Definition uPred_persistently := uPred_persistently_aux.(unseal).
Global Arguments uPred_persistently {M}.

Local Program Definition uPred_later_def {M} (P : uPred M) : uPred M :=
  {| uPred_holds n x := match n return _ with 0 => True | S n' => P n' x end |}.
Admit Obligations.
Local Definition uPred_later_aux : seal (@uPred_later_def).
Admitted.
Definition uPred_later := uPred_later_aux.(unseal).
Global Arguments uPred_later {M}.
Definition uPred_emp {M} : uPred M.
Admitted.

Lemma uPred_bi_mixin (M : ucmra) :
  BiMixin
    uPred_entails uPred_emp uPred_pure uPred_and uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_wand.
Admitted.

Lemma uPred_bi_persistently_mixin (M : ucmra) :
  BiPersistentlyMixin
    uPred_entails uPred_emp uPred_and
    (@uPred_exist M) uPred_sep uPred_persistently.
Admitted.

Lemma uPred_bi_later_mixin (M : ucmra) :
  BiLaterMixin
    uPred_entails uPred_pure uPred_or uPred_impl
    (@uPred_forall M) (@uPred_exist M) uPred_sep uPred_persistently uPred_later.
Admitted.
Canonical Structure uPredI (M : ucmra) : bi.
exact ({| bi_ofe_mixin := ofe_mixin_of (uPred M);
     bi_bi_mixin := uPred_bi_mixin M;
     bi_bi_later_mixin := uPred_bi_later_mixin M;
     bi_bi_persistently_mixin := uPred_bi_persistently_mixin M |}).
Defined.
Global Instance uPred_bi_bupd M : BiBUpd (uPredI M).
Admitted.

Notation frac := Qp (only parsing).
  Canonical Structure fracO := leibnizO frac.
Local Instance frac_valid_instance : Valid frac.
Admitted.
Local Instance frac_pcore_instance : PCore frac.
Admitted.
Local Instance frac_op_instance : Op frac.
Admitted.

  Definition frac_ra_mixin : RAMixin frac.
Admitted.
  Canonical Structure fracR := discreteR frac frac_ra_mixin.
Definition gmap_viewR {SI : sidx} (K : Type) `{Countable K} (V : cmra) : cmra.
Admitted.
Definition authR {SI : sidx} (A : ucmra) : cmra.
Admitted.

Structure gFunctor := GFunctor {
  gFunctor_F :> rFunctor;
  gFunctor_map_contractive : rFunctorContractive gFunctor_F;
}.

Record gFunctors := GFunctors {
  gFunctors_len : nat;
  gFunctors_lookup : fin gFunctors_len → gFunctor
}.

Definition gid (Σ : gFunctors) := fin (gFunctors_len Σ).

Definition gname := positive.
Definition iResUR (Σ : gFunctors) : ucmra.
Admitted.
  Notation iProp Σ := (uPred (iResUR Σ)).
  Notation iPropO Σ := (uPredO (iResUR Σ)).

Class inG (Σ : gFunctors) (A : cmra) := InG {
  inG_id : gid Σ;
  inG_apply := rFunctor_apply (gFunctors_lookup Σ inG_id);
  inG_prf : A = inG_apply (iPropO Σ) _;
}.
Local Definition own_def `{!inG Σ A} (γ : gname) (a : A) : iProp Σ.
Admitted.
Local Definition own_aux : seal (@own_def).
Admitted.
Definition own := own_aux.(unseal).
Global Arguments own {Σ A _} γ a.
Local Instance nat_valid_instance : Valid nat.
Admitted.
Local Instance nat_pcore_instance : PCore nat.
Admitted.
Local Instance nat_op_instance : Op nat.
Admitted.
  Lemma nat_ra_mixin : RAMixin nat.
Admitted.
Canonical Structure natR : cmra.
exact (discreteR nat nat_ra_mixin).
Defined.
Local Instance nat_unit_instance : Unit nat.
Admitted.
  Lemma nat_ucmra_mixin : UcmraMixin nat.
Admitted.
Canonical Structure natUR : ucmra.
exact (Ucmra nat nat_ucmra_mixin).
Defined.

Class lcGS (Σ : gFunctors) := LcGS {
  #[local] lcGS_inG :: inG Σ (authR natUR);
  lcGS_name : gname;
}.

Inductive coPset_disj :=
  | CoPset : coPset → coPset_disj
  | CoPsetInvalid : coPset_disj.
  Canonical Structure coPset_disjO := leibnizO coPset_disj.
Local Instance coPset_disj_valid_instance : Valid coPset_disj.
Admitted.
Local Instance coPset_disj_op_instance : Op coPset_disj.
Admitted.
Local Instance coPset_disj_pcore_instance : PCore coPset_disj.
Admitted.

  Lemma coPset_disj_ra_mixin : RAMixin coPset_disj.
Admitted.
  Canonical Structure coPset_disjR := discreteR coPset_disj coPset_disj_ra_mixin.
  Class wsatGpreS (Σ : gFunctors) : Set := WsatGpreS {
    wsatGpreS_inv : inG Σ (gmap_viewR positive (agreeR $ laterO (iPropO Σ)));
    wsatGpreS_enabled : inG Σ coPset_disjR;
    wsatGpreS_disabled : inG Σ (gset_disjR positive);
  }.

  Class wsatGS (Σ : gFunctors) : Set := WsatG {
    wsat_inG : wsatGpreS Σ;
    invariant_name : gname;
    enabled_name : gname;
    disabled_name : gname;
  }.

Inductive has_lc := HasLc | HasNoLc.

Class invGS_gen (hlc : has_lc) (Σ : gFunctors) : Set := InvG {
  #[global] invGS_wsat :: wsatGS Σ;
  #[global] invGS_lc :: lcGS Σ;
}.
Global Instance uPred_bi_fupd `{!invGS_gen hlc Σ} : BiFUpd (uPredI (iResUR Σ)).
Admitted.

Global Instance uPred_bi_bupd_fupd `{!invGS_gen hlc Σ} : BiBUpdFUpd (uPredI (iResUR Σ)).
Admitted.

Class cinvG Σ := {
  #[local] cinv_inG :: inG Σ (prodR (optionR (exclR unitO)) (optionR fracR)) ;
}.

Section defs.
  Context `{!invGS_gen hlc Σ, !cinvG Σ}.
Definition cinv_own (γ : gname) (p : frac) : iProp Σ.
Admitted.
  Definition cinv_excl γ : iProp Σ := own γ (Some (Excl ()), None).
Definition cinv (N : namespace) (γ : gname) (P : iProp Σ) : iProp Σ.
Admitted.

  Lemma cinv_own_excl_alloc P :
    pred_infinite P → ⊢ |==> ∃ γ, ⌜P γ⌝ ∗ cinv_excl γ ∗ cinv_own γ 1.
Admitted.

  Lemma cinv_alloc_strong (I : gname → Prop) E N :
    pred_infinite I →
    ⊢ |={E}=> ∃ γ, ⌜ I γ ⌝ ∗ cinv_own γ 1 ∗ ∀ P, ▷ P ={E}=∗ cinv N γ P.
  Proof.
    iIntros (?).
iMod cinv_own_excl_alloc as (γ) "[$ [Hexcl $]]"; first done.
🛠️ Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted) (truncated to 6.0KiB; full 173KiB file on GitHub Actions Artifacts under tmp.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "-notation-overridden" "-w" "-redundant-canonical-projection" "-w" "-notation-incompatible-prefix" "-w" "-deprecated-from-Coq" "-w" "-deprecated-dirpath-Coq" "-w" "-deprecated-native-compiler-option" "-native-compiler" "ondemand" "-coqlib" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq//" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris" "iris" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang" "iris.heap_lang" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable" "iris.unstable" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated" "iris.deprecated" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/Autosubst" "Autosubst" "-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" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq///user-contrib/stdpp" "stdpp" "-top" "Top.bug_01") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 204 lines to 32 lines, then from 45 lines to 651 lines, then from 657 lines to 31 lines, then from 44 lines to 706 lines, then from 712 lines to 58 lines, then from 71 lines to 654 lines, then from 660 lines to 77 lines, then from 90 lines to 482 lines, then from 488 lines to 104 lines, then from 117 lines to 987 lines, then from 990 lines to 132 lines, then from 145 lines to 702 lines, then from 708 lines to 148 lines, then from 161 lines to 1079 lines, then from 1085 lines to 175 lines, then from 188 lines to 735 lines, then from 736 lines to 195 lines, then from 208 lines to 591 lines, then from 597 lines to 197 lines, then from 210 lines to 923 lines, then from 929 lines to 201 lines, then from 214 lines to 587 lines, then from 593 lines to 206 lines, then from 219 lines to 899 lines, then from 905 lines to 219 lines, then from 232 lines to 1231 lines, then from 1237 lines to 236 lines, then from 249 lines to 1215 lines, then from 1221 lines to 248 lines, then from 261 lines to 791 lines, then from 797 lines to 261 lines, then from 274 lines to 586 lines, then from 592 lines to 539 lines, then from 547 lines to 146 lines, then from 159 lines to 826 lines, then from 832 lines to 186 lines, then from 199 lines to 1392 lines, then from 1397 lines to 319 lines, then from 332 lines to 845 lines, then from 851 lines to 321 lines, then from 334 lines to 940 lines, then from 946 lines to 372 lines, then from 385 lines to 753 lines, then from 759 lines to 387 lines, then from 400 lines to 882 lines, then from 888 lines to 398 lines, then from 411 lines to 1223 lines, then from 1229 lines to 476 lines, then from 489 lines to 1045 lines, then from 1051 lines to 488 lines, then from 501 lines to 2017 lines, then from 2023 lines to 506 lines, then from 519 lines to 3085 lines, then from 3090 lines to 1575 lines, then from 1588 lines to 1874 lines, then from 1880 lines to 1637 lines, then from 1650 lines to 1881 lines, then from 1887 lines to 1646 lines, then from 1659 lines to 2056 lines, then from 2062 lines to 1838 lines, then from 1847 lines to 1582 lines, then from 1595 lines to 2082 lines, then from 2088 lines to 1737 lines, then from 1750 lines to 2091 lines, then from 2097 lines to 1774 lines, then from 1787 lines to 2175 lines, then from 2181 lines to 1877 lines, then from 1890 lines to 2291 lines, then from 2297 lines to 1926 lines, then from 1939 lines to 2311 lines, then from 2317 lines to 1928 lines, then from 1941 lines to 3575 lines, then from 3581 lines to 2352 lines, then from 2365 lines to 2805 lines, then from 2811 lines to 2358 lines, then from 2371 lines to 2758 lines, then from 2764 lines to 2381 lines, then from 2394 lines to 2799 lines, then from 2805 lines to 2444 lines, then from 2457 lines to 3620 lines, then from 3626 lines to 2610 lines, then from 2623 lines to 3023 lines, then from 3029 lines to 2612 lines, then from 2625 lines to 3639 lines, then from 3644 lines to 3038 lines, then from 3034 lines to 2591 lines, then from 2604 lines to 2735 lines, then from 2741 lines to 2612 lines, then from 2625 lines to 3086 lines, then from 3092 lines to 2663 lines, then from 2676 lines to 2732 lines, then from 2738 lines to 2681 lines, then from 2694 lines to 2724 lines, then from 2730 lines to 2694 lines, then from 2707 lines to 2743 lines, then from 2749 lines to 2706 lines, then from 2719 lines to 2750 lines, then from 2756 lines to 2717 lines, then from 2730 lines to 3394 lines, then from 3401 lines to 2731 lines, then from 2745 lines to 2868 lines, then from 2874 lines to 2746 lines, then from 2760 lines to 2816 lines, then from 2823 lines to 2751 lines, then from 2765 lines to 3567 lines, then from 3574 lines to 2766 lines, then from 2780 lines to 3375 lines, then from 3382 lines to 2771 lines, then from 2785 lines to 3275 lines, then from 3282 lines to 3100 lines, then from 3107 lines to 2756 lines, then from 2769 lines to 3160 lines, then from 3167 lines to 2770 lines, then from 2784 lines to 3082 lines, then from 3089 lines to 2783 lines, then from 2797 lines to 3468 lines, then from 3475 lines to 2785 lines, then from 2799 lines to 3753 lines, then from 3760 lines to 2851 lines, then from 2865 lines to 3684 lines, then from 3691 lines to 2871 lines, then from 2885 lines to 3846 lines, then from 3853 lines to 2873 lines, then from 2887 lines to 3477 lines, then from 3484 lines to 2876 lines, then from 2890 lines to 3327 lines, then from 3334 lines to 2925 lines, then from 2944 lines to 2856 lines, then from 2871 lines to 2858 lines, then from 2872 lines to 2856 lines, then from 2869 lines to 6474 lines, then from 6481 lines to 2873 lines, then from 2882 lines to 2863 lines, then from 2876 lines to 3627 lines, then from 3634 lines to 2872 lines, then from 2886 lines to 4897 lines, then from 4904 lines to 2904 lines, then from 2918 lines to 3219 lines, then from 3226 lines to 2919 lines, th
🛠️ 📜 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 6.4MiB file on GitHub Actions Artifacts under build.log)
LIB 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]
iris/program_logic/lifting.vo (real: 3.00, user: 2.86, sys: 0.14, mem: 597672 ko)
COQNATIVE iris/program_logic/lifting.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/program_logic/total_weakestpre.v", line 106, characters 68-80:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/lifting.vo.native (real: 0.50, user: 0.38, sys: 0.11, mem: 157068 ko)
COQTEST [ref ignored] tests/algebra.v (ref: tests/algebra.ref)
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]
tests/algebra.vo (real: 1.29, user: 1.17, sys: 0.12, mem: 590256 ko)
ROCQ compile iris/base_logic/lib/cancelable_invariants.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////rocq
MINIMIZER_DEBUG_EXTRA: original invocation: compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q iris iris -Q iris_heap_lang iris.heap_lang -Q iris_unstable iris.unstable -Q iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.v 
MINIMIZER_DEBUG_EXTRA: new invocation: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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/iris
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/rocq.orig compile -q -w -notation-overridden -w -redundant-canonical-projection -w -notation-incompatible-prefix -w -deprecated-from-Coq -w -deprecated-dirpath-Coq -w -deprecated-native-compiler-option -native-compiler ondemand -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris iris -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_heap_lang iris.heap_lang -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_unstable iris.unstable -Q /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris_deprecated iris.deprecated iris/base_logic/lib/cancelable_invariants.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.X1Zxa7pU32
MINIMIZER_DEBUG: files:  iris/base_logic/lib/cancelable_invariants.v /github/workspace/builds/coq/coq-failing/_build_ci/iris/iris/base_logic/lib/cancelable_invariants.v
Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]Warning, feedback message received but no listener to handle it!
Warning: Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Warning: Deprecated environment variable COQCORELIB,
use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
File "./iris/base_logic/lib/cancelable_invariants.v", line 90, characters 17-65:
Error: Tactic failure: iFrame: cannot frame ⌜?Goal γ⌝%I.

Command exited with non-zero status 1
iris/base_logic/lib/cancelable_invariants.vo (real: 1.52, user: 1.35, sys: 0.16, mem: 583928 ko)
make[2]: *** [Makefile.coq:813: iris/base_logic/lib/cancelable_invariants.vo] Error 1
make[2]: *** [iris/base_logic/lib/cancelable_invariants.vo] Deleting file 'iris/base_logic/lib/cancelable_invariants.glob'
make[2]: *** Waiting for unfinished jobs....
File "./iris/program_logic/total_weakestpre.v", line 274, characters 78-90:
Warning: In term, tolerating this expression at a higher level than expected.
This tolerance will be eventually removed. Insert parentheses or try to lower
the level at which the top symbol of this expression is parsed.
[level-tolerance,deprecated-since-9.2,deprecated,parsing,default]
iris/program_logic/total_weakestpre.vo (real: 6.31, user: 6.16, sys: 0.15, mem: 636160 ko)
COQNATIVE iris/program_logic/total_weakestpre.vo
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!
Deprecated environment variable COQLIB, use ROCQLIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
Deprecated environment variable COQCORELIB, use ROCQRUNTIMELIB instead.
[deprecated-coq-env-var,deprecated-since-9.0,deprecated,default]
iris/program_logic/total_weakestpre.vo.native (real: 0.60, user: 0.47, sys: 0.13, mem: 152068 ko)
make[1]: *** [Makefile.coq:411: all] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/iris'
make: *** [Makefile:3: all] Error 2
+ code=2
+ printf '\n%s exit code: %s\n' iris 2
+ '[' iris '!=' stdlib_test ']'
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real iris.log
    Time |  Peak Mem | File Name                                    
--------------------------------------------------------------------
0m20.29s | 636160 ko | Total Time / Peak Mem                        
--------------------------------------------------------------------
0m06.31s | 636160 ko | iris/program_logic/total_weakestpre.vo       
0m03.94s | 607372 ko | iris/program_logic/adequacy.vo               
0m03.00s | 597672 ko | iris/program_logic/lifting.vo                
0m02.00s | 598508 ko | iris/program_logic/atomic.vo                 
0m01.52s | 583928 ko | iris/base_logic/lib/cancelable_invariants.vo 
0m01.29s | 590256 ko | tests/algebra.vo                             
0m00.60s | 152068 ko | iris/program_logic/total_weakestpre.vo.native
0m00.57s | 157764 ko | iris/program_logic/atomic.vo.native          
0m00.56s | 166248 ko | iris/program_logic/adequacy.vo.native        
0m00.50s | 157068 ko | iris/program_logic/lifting.vo.native         
+ '[' '' ']'
+ exit 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 90MiB file on GitHub Actions Artifacts under bug.log)
e 143, characters 10-18:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 732, characters 10-18:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 733, characters 10-18:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1375, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1494, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1506, characters 0-37:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope stdpp_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1533, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1575, characters 0-63:
Warning: Closed notations (i.e. starting and ending with a terminal symbol)
should usually be at level 0 (default).
[closed-notation-not-level-0,parsing,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1647, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1897, characters 0-29:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope Q_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1903, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1973, characters 0-31:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope Qc_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 1987, characters 0-28:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope Qp_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2092, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2120, characters 0-35:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope char_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2195, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2281, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2282, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2303, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2316, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2317, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2333, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2392, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2394, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2504, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2517, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2546, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2631, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2753, characters 0-30:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope bi_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2996, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 2999, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 3327, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 3411, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 3524, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 4154, characters 0-8:
Warning: Use of "Notation" keyword for abbreviations is deprecated, use
"Abbreviation" instead.
[notation-for-abbreviation,deprecated-since-9.2,deprecated,default]
File "/tmp/tmp9trsxnbk/Top/bug_01.v", line 4327, characters 4-15:
Error: Unbound value Char.of_int


�[93mIntermediate code not saved.�[0m

I will now attempt to remove unused definitions

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.

cc @JasonGross

@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 13, 2025
@Tragicus
Copy link
Contributor Author

Hopefully I correctly did the overlays and the elpi_test issue is not related to me and we can go on.

@Tragicus
Copy link
Contributor Author

May I ask for a CI?

@SkySkimmer
Copy link
Contributor

@coqbot run full ci

@coqbot-app coqbot-app bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 14, 2025
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Oct 14, 2025

🔴 CI failure at commit 9faf9e6 without any failure in the test-suite

✔️ Corresponding job for the base commit 034677a succeeded

❔ Ask me to try to extract a minimal test case that can be added to the test-suite

🏃 @coqbot ci minimize will minimize the following target: ci-elpi_test
  • You can also pass me a specific list of targets to minimize as arguments.

@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 17, 2025
@robbertkrebbers
Copy link
Contributor

robbertkrebbers commented Oct 19, 2025

I am trying to look into https://gitlab.mpi-sws.org/iris/iris/-/merge_requests/1152

It would be great if the new behavior, and in particular the difference between apply and exact would be documented. Could you please extend the documentation in the ref man so it reflects the changes in this PR?

I suppose this only affects legacy unification (used by apply and exact) and not evar-conv (used by refine). Does this PR make the behavior of the two unification algorithms more consistent, or does it cause the two to diverge even more?

@Tragicus
Copy link
Contributor Author

I will look into that, although I am not sure where this would go, as it is would not change the description of either apply or exact. The change affects both unification algorithms in the same way (modulo the fact that they may not try the same instantiations). I also need to add a changelog entry. For now, does the PR description suffice or do you want more details about something?

@Tragicus
Copy link
Contributor Author

Since the light CI is happy (and the elpi_test overlay is done), can I ask for a full CI?

@gares
Copy link
Member

gares commented Oct 20, 2025

@coqbot run full ci

@coqbot-app coqbot-app bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 20, 2025
@robbertkrebbers
Copy link
Contributor

The change affects both unification algorithms in the same way

So this also affect evar_conv, and thus refine? Do you have an example of a use of refine that failed prior to this PR but that works now?

@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 21, 2025
@Tragicus
Copy link
Contributor Author

My apologies, I can not do an overlay. The overlay has been merged anyway, so I reverted the change. Can we try again?

@robbertkrebbers
Copy link
Contributor

Note that for Iris you no longer need an overlay, an alternative fix has been merged.

@Tragicus
Copy link
Contributor Author

Tragicus commented Oct 21, 2025

This is very artificial, but

Axiom P : forall (T : Type), Prop.
Goal exists T U, forall t : T, P (U t).
Proof.
do 2 eexists.
refine (fun x => x).

fails on master and succeeds on my branch.

@Tragicus
Copy link
Contributor Author

May I have a CI?

@ppedrot
Copy link
Member

ppedrot commented Oct 21, 2025

@coqbot run full ci

@coqbot-app coqbot-app bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 21, 2025
@Tragicus
Copy link
Contributor Author

I do not understand the stdlib_doc issue. Should I worry about it?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants