Skip to content

Conversation

@Tragicus
Copy link
Contributor

@Tragicus Tragicus commented Nov 9, 2024

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. There are two cases where we can easily solve the problem, namely the one where the variable appears in a beta-redex, as in (fun _ => t) x, and the one where the variable appears in an argument of an evar, e.g. ?b x, since we can instantiate the evar 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.
This PR adds these cases in pretyping/evarsolve.

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 November 9, 2024 10:47
@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 Nov 9, 2024
@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 Nov 9, 2024
@SkySkimmer SkySkimmer added needs: test-suite update Test case should be added to / updated in the test-suite. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. labels Nov 9, 2024
@ppedrot
Copy link
Member

ppedrot commented Nov 12, 2024

@coqbot ci minimize

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Nov 12, 2024

I have initiated minimization at commit f592551 for the suggested targets ci-argosy, ci-elpi_test, ci-fiat_parsers, ci-hott, ci-iris, ci-perennial, ci-rewriter, ci-unimath as requested.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Nov 12, 2024

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

build log (truncated to last 26KiB; full 8.0MiB file on GitHub Actions Artifacts under build.log)
flambda/lib/elpi/util -I /root/.opamcache/4.14.1+flambda/lib/findlib -I /root/.opamcache/4.14.1+flambda/lib/menhirLib -I /root/.opamcache/4.14.1+flambda/lib/ocaml -I /root/.opamcache/4.14.1+flambda/lib/ocaml/threads -I /root/.opamcache/4.14.1+flambda/lib/ppx_deriving/runtime -I /root/.opamcache/4.14.1+flambda/lib/re -I /root/.opamcache/4.14.1+flambda/lib/re/str -I /root/.opamcache/4.14.1+flambda/lib/seq -I /root/.opamcache/4.14.1+flambda/lib/stdlib-shims -I /root/.opamcache/4.14.1+flambda/lib/zarith -I src -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/btauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/cc -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/cc_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/derive -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/extraction -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/firstorder -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/firstorder_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/funind -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ltac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ltac2 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ltac2_ltac1 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/micromega -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/micromega_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/nsatz -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/nsatz_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/number_string_notation -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ring -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/rtauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ssreflect -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ssrmatching -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tutorial/p0 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tutorial/p1 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tutorial/p2 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tutorial/p3 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/zify -R /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/theories Coq -Q elpi elpi_elpi -Q theories elpi -R tests elpi.tests tests/test_API2.v)
Query assignments:
  X1 = «x1»
  X2 = «x2»
  X3 = «x3»
Query assignments:
  M = [[mode-ground], [mode-input]]
1
1
1.000000
1.2
Query assignments:
  C1 = «Nat.add»
  C2 = «times»
  X1 = tt
  X2 = ff
Query assignments:
  C1 = «x»
Query assignments:
  XX = «elpi.tests.test_API2.xx»
Query assignments:
  C1 = «x»
  M = «elpi.tests.test_API2.xx»
Query assignments:
  XX = «elpi.tests.test_API2.xx2»
Query assignments:
  C1 = «x»
  M = «elpi.tests.test_API2.xx2»
Query assignments:
  C1 = «x»
  M = «elpi.tests.test_API2.xx3»
Query assignments:
  _uvk_1_ = X0
  _uvk_2_ = X1
Syntactic constraints:
 evar (X1) (X2) (X1)  /* suspended on X1 */
 evar X3 (sort (typ «elpi.tests.test_API2.28»)) (X2)  /* suspended on X3, X2 */
 evar (X0) (X4) (X0)  /* suspended on X0 */
 evar X5 (sort (typ «elpi.tests.test_API2.27»)) (X4)  /* suspended on X5, X4 */
Universe constraints:
UNIVERSES:
 {elpi.tests.test_API2.28 elpi.tests.test_API2.27} |= 
ALGEBRAIC UNIVERSES:
 {}
FLEXIBLE UNIVERSES:
 
SORTS:
 α4
 α5
WEAK CONSTRAINTS:
 

Non-discriminated database
Unfoldable variable definitions: all
Unfoldable constant definitions: all
Unfoldable projection definitions: all
Cut: emp
For any goal ->   
For xeq ->   exact xxx (cost 0, pattern 0 = _, id 0)

Query assignments:
  _uvk_19_ = «T.T.u0»
Query assignments:
  Spilled_1 = «elpi.tests.test_API2.T»
Query assignments:
  GR = const const EXN PRINTING: Not_found
Query assignments:
  Spilled_1 = «elpi.tests.test_API2.F»
  Spilled_2 = «elpi.tests.test_API2.X»
«elpi.tests.test_API2.G»
Query assignments:
  G = «elpi.tests.test_API2.G»
Module G : Sig Definition id : X.T -> X.T. End := (F X)
Query assignments:
  Spilled_1 = «elpi.tests.test_API2.F»
  Spilled_2 = «elpi.tests.test_API2.X»
«elpi.tests.test_API2.H»
Query assignments:
  H = «elpi.tests.test_API2.H»
Module H : Sig Definition id : nat -> nat. End := (F X)
Query assignments:
  Spilled_1 = «elpi.tests.test_API2.T»
Query assignments:
  GR = const const EXN PRINTING: Not_found
Module Type FT = Funsig (P:T) Sig Parameter idT : P.T -> P.T. End
Query assignments:
  Spilled_1 = «elpi.tests.test_API2.FT»
  Spilled_2 = «elpi.tests.test_API2.X»
«elpi.tests.test_API2.GT»
Query assignments:
  G = «elpi.tests.test_API2.GT»
Module Type GT = Sig Parameter idT : X.T -> X.T. End
Query assignments:
  Spilled_1 = «elpi.tests.test_API2.FT»
  Spilled_2 = «elpi.tests.test_API2.X»
«elpi.tests.test_API2.HT»
Query assignments:
  H = «elpi.tests.test_API2.HT»
Module Type HT = Sig Parameter idT : nat -> nat. End
Query assignments:
  L = [«elpi.tests.test_API2.34», «elpi.tests.test_API2.35»]
  S = {{ elpi.tests.test_API2.34; elpi.tests.test_API2.35;  }}
  U = «elpi.tests.test_API2.34»
  UV = «elpi.tests.test_API2.34»
  V = «elpi.tests.test_API2.35»
  VV = «elpi.tests.test_API2.35»
Universe constraints:
UNIVERSES:
 {elpi.tests.test_API2.35 elpi.tests.test_API2.34} |= 
ALGEBRAIC UNIVERSES:
 {elpi.tests.test_API2.35 elpi.tests.test_API2.34}
FLEXIBLE UNIVERSES:
 elpi.tests.test_API2.35
 elpi.tests.test_API2.34
SORTS:
 
WEAK CONSTRAINTS:
 

Query assignments:
  _uvk_20_ = X0
  _uvk_21_ = X0
  _uvk_22_ = X1
  _uvk_23_ = X2
  _uvk_24_ = c0 \
X3 c0
  _uvk_25_ = X4
  _uvk_26_ = c0 \
X5 c0
  _uvk_27_ = X4
  _uvk_28_ = c0 \
X5 c0
  _uvk_29_ = X6
  _uvk_30_ = c0 \
X7 c0
  _uvk_31_ = c0 \ c1 \
X8 c0 c1
  _uvk_32_ = X9
  _uvk_33_ = c0 \
X10 c0
  _uvk_34_ = c0 \ c1 \
X11 c0 c1
  _uvk_35_ = X12
  _uvk_36_ = c0 \
X13 c0
  _uvk_37_ = c0 \ c1 \
X14 c0 c1
  _uvk_38_ = X12
Syntactic constraints:
 evar X12 (sort (typ «elpi.tests.test_API2.51»)) X12  /* suspended on X12 */
 evar X12 (sort (typ «elpi.tests.test_API2.54»)) X12  /* suspended on X12 */
 {c0 c1} : decl c1 `x` (X13 c0), decl c0 `z` X12
   ?- evar (X14 c0 c1) (sort (typ «elpi.tests.test_API2.53»)) (X14 c0 c1)  /* suspended on X14 */
 {c0} : decl c0 `z` X12
   ?- evar (X13 c0) (sort (typ «elpi.tests.test_API2.52»)) (X13 c0)  /* suspended on X13 */
 {c0 c1} : decl c1 `x` (X10 c0), decl c0 `z` X9
   ?- evar (X11 c0 c1) (sort (typ «elpi.tests.test_API2.50»)) (X11 c0 c1)  /* suspended on X11 */
 {c0} : decl c0 `z` X9
   ?- evar (X10 c0) (sort (typ «elpi.tests.test_API2.49»)) (X10 c0)  /* suspended on X10 */
 evar (X9) (sort (typ «elpi.tests.test_API2.48»)) (X9)  /* suspended on X9 */
 {c0 c1} : decl c1 `x` (X7 c0), decl c0 `z` X6
   ?- evar (X8 c0 c1) (sort (typ «elpi.tests.test_API2.47»)) (X8 c0 c1)  /* suspended on X8 */
 {c0} : decl c0 `z` X6
   ?- evar (X7 c0) (sort (typ «elpi.tests.test_API2.46»)) (X7 c0)  /* suspended on X7 */
 evar (X6) (sort (typ «elpi.tests.test_API2.45»)) (X6)  /* suspended on X6 */
 evar X4 (sort (typ «elpi.tests.test_API2.41»)) X4  /* suspended on X4 */
 evar X4 (sort (typ «elpi.tests.test_API2.43»)) X4  /* suspended on X4 */
 {c0} : decl c0 `x` X4
   ?- evar (X5 c0) (sort (typ «elpi.tests.test_API2.42»)) (X5 c0)  /* suspended on X5 */
 {c0} : decl c0 `x` X4
   ?- evar (X5 c0) (sort (typ «elpi.tests.test_API2.44»)) (X5 c0)  /* suspended on X5 */
 {c0} : decl c0 `x` X2
   ?- evar (X3 c0) (sort (typ «elpi.tests.test_API2.40»)) (X3 c0)  /* suspended on X3 */
 evar (X2) (sort (typ «elpi.tests.test_API2.39»)) (X2)  /* suspended on X2 */
 evar (X1) (sort (typ «elpi.tests.test_API2.38»)) (X1)  /* suspended on X1 */
 evar X0 (sort (typ «elpi.tests.test_API2.36»)) X0  /* suspended on X0 */
 evar X0 (sort (typ «elpi.tests.test_API2.37»)) X0  /* suspended on X0 */
Universe constraints:
UNIVERSES:
 {elpi.tests.test_API2.54 elpi.tests.test_API2.53 elpi.tests.test_API2.52
  elpi.tests.test_API2.51 elpi.tests.test_API2.50 elpi.tests.test_API2.49
  elpi.tests.test_API2.48 elpi.tests.test_API2.47 elpi.tests.test_API2.46
  elpi.tests.test_API2.45 elpi.tests.test_API2.44 elpi.tests.test_API2.43
  elpi.tests.test_API2.42 elpi.tests.test_API2.41 elpi.tests.test_API2.40
  elpi.tests.test_API2.39 elpi.tests.test_API2.38 elpi.tests.test_API2.37
  elpi.tests.test_API2.36} |= 
ALGEBRAIC UNIVERSES:
 {}
FLEXIBLE UNIVERSES:
 
SORTS:
 α6
 α7
 α8
 α9
 α10
 α11
 α12
 α13
 α14
 α15
 α16
 α17
 α18
 α19
 α20
 α21
 α22
 α23
 α24
WEAK CONSTRAINTS:
 

MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig -q -w -deprecated-native-compiler-option -native-output-dir . -native-compiler on -nI /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/kernel -nI elpi -nI tests -nI theories -boot -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/boot -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/clib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/config -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/engine -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/gramlib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/interp -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/kernel -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/lib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/library -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/parsing -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/perf -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/pretyping -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/printing -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/proofs -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/tactics -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/vernac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/vm -I /root/.opamcache/4.14.1+flambda/lib/elpi -I /root/.opamcache/4.14.1+flambda/lib/elpi/lexer_config -I /root/.opamcache/4.14.1+flambda/lib/elpi/parser -I /root/.opamcache/4.14.1+flambda/lib/elpi/trace/runtime -I /root/.opamcache/4.14.1+flambda/lib/elpi/util -I /root/.opamcache/4.14.1+flambda/lib/findlib -I /root/.opamcache/4.14.1+flambda/lib/menhirLib -I /root/.opamcache/4.14.1+flambda/lib/ocaml -I /root/.opamcache/4.14.1+flambda/lib/ocaml/threads -I /root/.opamcache/4.14.1+flambda/lib/ppx_deriving/runtime -I /root/.opamcache/4.14.1+flambda/lib/re -I /root/.opamcache/4.14.1+flambda/lib/re/str -I /root/.opamcache/4.14.1+flambda/lib/seq -I /root/.opamcache/4.14.1+flambda/lib/stdlib-shims -I /root/.opamcache/4.14.1+flambda/lib/zarith -I /github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default/src -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/btauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/cc -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/cc_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/derive -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/extraction -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/firstorder -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/firstorder_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/funind -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac2 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac2_ltac1 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/micromega -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/micromega_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/nsatz -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/nsatz_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/number_string_notation -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ring -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/rtauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ssreflect -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ssrmatching -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tutorial/p0 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tutorial/p1 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tutorial/p2 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tutorial/p3 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/zify -R /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/theories Coq -Q /github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default/elpi elpi_elpi -Q /github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default/theories elpi -R /github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default/tests elpi.tests tests/test_API2.v 
MINIMIZER_DEBUG: info: /tmp/build_1e9f6b_dune/tmp-coqbot-minimizer.DtdICkDq94
MINIMIZER_DEBUG: files:  tests/test_API2.v
File "./tests/test_API2.v", line 83, characters 0-41:
Warning: "From Coq" has been replaced by "From Stdlib".
[deprecated-from-Coq,deprecated-since-9.0,deprecated,default]
File "./tests/test_API2.v", line 127, characters 0-16:
Warning: Option Foo Bar is deprecated. elpi
[deprecated-option,deprecated,default]
File "./tests/test_API2.v", line 135, characters 0-14:
Warning: Option Foo Bar is deprecated. elpi
[deprecated-option,deprecated,default]
File "./tests/test_API2.v", line 373, characters 3-201:
Warning: constant test has no declared type. [elpi.typecheck,elpi,default]
(cd _build/default && /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc -q -w -deprecated-native-compiler-option -native-output-dir . -native-compiler on -nI /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/kernel -nI elpi -nI tests -nI theories -boot -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/boot -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/clib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/config -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/engine -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/gramlib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/interp -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/kernel -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/lib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/library -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/parsing -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/perf -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/pretyping -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/printing -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/proofs -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/tactics -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/vernac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/vm -I /root/.opamcache/4.14.1+flambda/lib/elpi -I /root/.opamcache/4.14.1+flambda/lib/elpi/lexer_config -I /root/.opamcache/4.14.1+flambda/lib/elpi/parser -I /root/.opamcache/4.14.1+flambda/lib/elpi/trace/runtime -I /root/.opamcache/4.14.1+flambda/lib/elpi/util -I /root/.opamcache/4.14.1+flambda/lib/findlib -I /root/.opamcache/4.14.1+flambda/lib/menhirLib -I /root/.opamcache/4.14.1+flambda/lib/ocaml -I /root/.opamcache/4.14.1+flambda/lib/ocaml/threads -I /root/.opamcache/4.14.1+flambda/lib/ppx_deriving/runtime -I /root/.opamcache/4.14.1+flambda/lib/re -I /root/.opamcache/4.14.1+flambda/lib/re/str -I /root/.opamcache/4.14.1+flambda/lib/seq -I /root/.opamcache/4.14.1+flambda/lib/stdlib-shims -I /root/.opamcache/4.14.1+flambda/lib/zarith -I src -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/btauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/cc -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/cc_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/derive -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/extraction -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/firstorder -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/firstorder_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/funind -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ltac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ltac2 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ltac2_ltac1 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/micromega -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/micromega_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/nsatz -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/nsatz_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/number_string_notation -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ring -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/rtauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ssreflect -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/ssrmatching -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tutorial/p0 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tutorial/p1 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tutorial/p2 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/tutorial/p3 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/../coq-core/plugins/zify -R /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/theories Coq -Q elpi elpi_elpi -Q theories elpi -R tests elpi.tests tests/test_require_bad_order.v)
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig -q -w -deprecated-native-compiler-option -native-output-dir . -native-compiler on -nI /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/kernel -nI elpi -nI tests -nI theories -boot -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/boot -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/clib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/config -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/engine -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/gramlib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/interp -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/kernel -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/lib -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/library -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/parsing -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/perf -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/pretyping -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/printing -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/proofs -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/tactics -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/vernac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/vm -I /root/.opamcache/4.14.1+flambda/lib/elpi -I /root/.opamcache/4.14.1+flambda/lib/elpi/lexer_config -I /root/.opamcache/4.14.1+flambda/lib/elpi/parser -I /root/.opamcache/4.14.1+flambda/lib/elpi/trace/runtime -I /root/.opamcache/4.14.1+flambda/lib/elpi/util -I /root/.opamcache/4.14.1+flambda/lib/findlib -I /root/.opamcache/4.14.1+flambda/lib/menhirLib -I /root/.opamcache/4.14.1+flambda/lib/ocaml -I /root/.opamcache/4.14.1+flambda/lib/ocaml/threads -I /root/.opamcache/4.14.1+flambda/lib/ppx_deriving/runtime -I /root/.opamcache/4.14.1+flambda/lib/re -I /root/.opamcache/4.14.1+flambda/lib/re/str -I /root/.opamcache/4.14.1+flambda/lib/seq -I /root/.opamcache/4.14.1+flambda/lib/stdlib-shims -I /root/.opamcache/4.14.1+flambda/lib/zarith -I /github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default/src -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/btauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/cc -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/cc_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/derive -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/extraction -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/firstorder -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/firstorder_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/funind -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac2 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ltac2_ltac1 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/micromega -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/micromega_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/nsatz -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/nsatz_core -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/number_string_notation -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ring -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/rtauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ssreflect -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/ssrmatching -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tauto -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tutorial/p0 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tutorial/p1 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tutorial/p2 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/tutorial/p3 -I /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq-core/plugins/zify -R /github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/theories Coq -Q /github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default/elpi elpi_elpi -Q /github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default/theories elpi -R /github/workspace/builds/coq/coq-failing/_build_ci/elpi/_build/default/tests elpi.tests tests/test_require_bad_order.v 
MINIMIZER_DEBUG: info: /tmp/build_1e9f6b_dune/tmp-coqbot-minimizer.tQFBzn03jE
MINIMIZER_DEBUG: files:  tests/test_require_bad_order.v
make[1]: *** [Makefile:21: test-core] Error 1
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/elpi'
+ code=2
+ printf '\n%s exit code: %s\n' elpi_test 2
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real elpi_test.log
No timing data
+ '[' '' ']'
+ exit 2
make: *** [Makefile.ci:192: ci-elpi_test] Error 2
/github/workspace/builds/coq /github/workspace
::endgroup::
minimizer log

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

@coqbot-app

This comment was marked as outdated.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Nov 12, 2024

Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/argosy/src/Examples/ReplicatedDisk/ReplicatedDiskImpl.v (from ci-argosy) (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" "-w" "-deprecated-native-compiler-option,-native-compiler-disabled" "-native-compiler" "ondemand" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/src" "RecoveryRefinement" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/classes/src" "Classes" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/array/src" "Array" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/tactical/src" "Tactical" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2" "Ltac2" "-top" "RecoveryRefinement.Examples.ReplicatedDisk.ReplicatedDiskImpl") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 1103 lines to 98 lines, then from 111 lines to 305 lines, then from 310 lines to 129 lines, then from 142 lines to 260 lines, then from 264 lines to 134 lines, then from 147 lines to 207 lines, then from 212 lines to 137 lines, then from 150 lines to 357 lines, then from 362 lines to 156 lines, then from 169 lines to 657 lines, then from 661 lines to 162 lines, then from 175 lines to 665 lines, then from 668 lines to 227 lines, then from 240 lines to 379 lines, then from 384 lines to 271 lines, then from 284 lines to 1243 lines, then from 1247 lines to 302 lines, then from 315 lines to 413 lines, then from 416 lines to 311 lines, then from 324 lines to 862 lines, then from 867 lines to 320 lines, then from 333 lines to 440 lines, then from 445 lines to 322 lines, then from 327 lines to 323 lines *)
(* coqc version 9.0+alpha compiled with OCaml 4.09.0
   coqtop version runner-wbcqh1i1-project-4504-concurrent-0:/builds/coq/coq/_build/default,(HEAD detached at c04db99c8cfb) (c04db99c8cfbe3fa002bf604971eb5b0e09656d4)
   Expected coqc runtime on this file: 0.122 sec *)

Axiom proof_admitted : False.
Tactic Notation "admit" := abstract case proof_admitted.

Set Implicit Arguments.
Definition maybe_holds T (p:T -> Prop) : option T -> Prop.
Admitted.

Notation "m ?|= F" := (maybe_holds F m) (at level 20, F at level 50).

Section Array.
  Context (A:Type).
  Notation list := (list A).
  Implicit Types (l:list) (n:nat) (x:A).
Fixpoint assign l n x' : list.
Admitted.
Fixpoint index l n : option A.
Admitted.

End Array.

Axiom bytes : nat -> Type.

Definition blockbytes := 1024.

Definition block := bytes blockbytes.

Definition disk := list block.
Definition addr := nat.

Section OutputRelations.

  Definition relation A B T := A -> B -> T -> Prop.
Definition and_then {A B C} {T1 T2}
             (r1: relation A B T1)
             (r2: T1 -> relation B C T2) :
    relation A C T2.
Admitted.
Definition pure A T (o0:T) : relation A A T.
Admitted.
Definition rel_or A B T (r1 r2: relation A B T) : relation A B T.
Admitted.

  Definition rimpl {A B} {T} (r1 r2: relation A B T) :=
    forall x y o, r1 x y o -> r2 x y o.

End OutputRelations.

  Delimit Scope relation_scope with rel.
  Open Scope relation_scope.
  Notation "r1 ---> r2" := (rimpl r1 r2)
                             (at level 60, no associativity,
                              format "'[hv' r1  '/' ---> '/'  r2 ']'")
                           : relation_scope.
  Infix "+" := rel_or : relation_scope.

  Notation "p1 ;; p2" := (and_then p1 (fun _ => p2))
                           (at level 54, right associativity)
  : relation_scope.

  Notation "x <- p1 ; p2" := (and_then p1 (fun x => p2))
                              (at level 54, right associativity,
                               format "'[' x  <-  '[v    ' p1 ']' ; ']'  '/' p2")
                             : relation_scope.
Global Generalizable Variables T R Op State.

Inductive proc (Op: Type -> Type) (T : Type) : Type :=
| Call (op : Op T)
| Ret (v : T)
| Bind (T1 : Type) (p1 : proc Op T1) (p2 : T1 -> proc Op T).
Arguments Call {Op T}.
Arguments Ret {Op T} v.

Definition OpSemantics Op State := forall T, Op T -> relation State State T.
Definition CrashSemantics State := relation State State unit.

Record Dynamics Op State :=
  { step: OpSemantics Op State;
    crash_step: CrashSemantics State; }.

Section Dynamics.

  Context `(sem: Dynamics Op State).
  Notation proc := (proc Op).
  Notation step := sem.(step).
  Notation crash_step := sem.(crash_step).

  Fixpoint exec {T} (p: proc T) : relation State State T :=
    match p with
    | Ret v => pure v
    | Call op => step op
    | Bind p p' => v <- exec p; exec (p' v)
    end.

  Fixpoint exec_crash {T} (p: proc T) : relation State State unit :=
    match p with
    | Ret v => crash_step
    | Call op => crash_step + (step op;; crash_step)
    | Bind p p' =>
      exec_crash p +
      (v <- exec p;
         exec_crash (p' v))
    end.
Definition rexec {T R} (p: proc T) (rec: proc R) : relation State State R.
Admitted.

End Dynamics.

Record SpecProps T R State :=
  { pre: Prop;
    post: State -> T -> Prop;
    alternate: State -> R -> Prop; }.

Definition Specification T R State := State -> SpecProps T R State.
Definition spec_exec T R State (spec: Specification T R State) :
  relation State State T.
Admitted.
Definition spec_aexec T R State (spec: Specification T R State) :
  relation State State R.
Admitted.

Section Hoare.
  Context `(sem: Dynamics Op State).
  Notation proc := (proc Op).
  Notation exec := (exec sem).
  Notation exec_crash := (exec_crash sem).
  Notation rexec := (rexec sem).

  Definition proc_rspec T R
             (p: proc T) (rec: proc R)
             (spec: Specification T R State) :=
    exec p ---> spec_exec spec /\
    rexec p rec ---> spec_aexec spec.

  Definition proc_hspec T
             (p: proc T)
             (spec: Specification T unit State) :=
    exec p ---> spec_exec spec /\
    exec_crash p ---> spec_aexec spec.

  Definition idempotent A T R `(spec: A -> Specification T R State) :=
    forall a state,
      pre (spec a state) ->
      forall v state', alternate (spec a state) state' v ->
               exists a', pre (spec a' state') /\
                    forall rv state'', post (spec a' state') state'' rv ->
                                  post (spec a state) state'' rv.

  Theorem proc_hspec_to_rspec A' T R (p_hspec: Specification T unit State)
          `(rec_hspec: A' -> Specification R unit State)
          `(p_rspec: Specification T R State)
          `(p: proc T) `(rec: proc R):
    proc_hspec p p_hspec ->
    (forall a, proc_hspec rec (rec_hspec a)) ->
    idempotent rec_hspec ->
    (forall s, (p_rspec s).(pre) -> (p_hspec s).(pre) /\
               (forall s' v, (p_hspec s).(post) s' v ->
                             (p_rspec s).(post) s' v)) ->

    (forall state state' v,
        pre (p_hspec state) ->
        alternate (p_hspec state) state' v ->
        exists a, pre (rec_hspec a state')) ->

    (forall a s sc, (p_rspec s).(pre) ->
                    (forall sfin rv, (rec_hspec a sc).(post) sfin rv ->
                                     (p_rspec s).(alternate) sfin rv)) ->
    proc_rspec p rec p_rspec.
Admitted.

End Hoare.
Module Export Layer.

Record Layer Op :=
  { State: Type;
    sem: Dynamics Op State;
    initP: State -> Prop }.

Coercion sem : Layer >-> Dynamics.

Section Abstraction.
  Context (AState CState:Type).
  Context (absr: relation AState CState unit).
Definition refine_spec T R (spec: Specification T R AState)
    : AState -> Specification T R CState.
exact (fun s cs =>
      {| pre := absr s cs tt /\
                (spec s).(pre);
         post := fun cs' r =>
                   exists s', absr s' cs' tt /\
                         (spec s).(post) s' r;
         alternate := fun cs' r =>
                        exists s', absr s' cs' tt /\
                              (spec s).(alternate) s' r; |}).
Defined.

End Abstraction.
Module Export OneDiskAPI.

Module Export D.

  Definition State := disk.

End D.
Definition read_spec (a : addr) : Specification block unit D.State.
Admitted.
  Inductive diskId :=
  | d0
  | d1.

  Inductive DiskResult T :=
  | Working (v:T)
  | Failed.
Definition disk0 (state:State) : option disk.
Admitted.
Definition disk1 (state:State) : option disk.
Admitted.

  Inductive Op : Type -> Type :=
  | op_read (i : diskId) (a : addr) : Op (DiskResult block)
  | op_write (i : diskId) (a : addr) (b : block) : Op (DiskResult unit)
  | op_size (i : diskId) : Op (DiskResult nat).
Definition TDBaseDynamics : Dynamics Op State.
Admitted.

  Definition td_init (s: State) :=
    exists d_0' d_1',
      disk0 s ?|= eq d_0' /\
      disk1 s ?|= eq d_1'.
Definition TDLayer : Layer Op.
exact ({| Layer.State := State; sem := TDBaseDynamics; initP := td_init |}).
Defined.
Definition read (a:addr) : proc Op block.
Admitted.

  Theorem read_int_ok : forall a d,
      proc_hspec TDLayer
        (read a)
        (fun state =>
           {|
             pre := disk0 state ?|= eq d /\
                    disk1 state ?|= eq d;
             post :=
               fun state' r =>
                 index d a ?|= eq r /\
                 disk0 state' ?|= eq d /\
                 disk1 state' ?|= eq d;
             alternate :=
               fun state' _ =>
                 disk0 state' ?|= eq d /\
                 disk1 state' ?|= eq d;
           |}).
Admitted.

  Global Hint Resolve read_int_ok : core.
Definition Recover : proc Op unit.
Admitted.

  Inductive DiskStatus :=
  | FullySynced
  | OutOfSync (a:addr) (b:block).

  Definition Recover_spec : _ -> _ -> Specification unit unit State :=
    fun d s state =>
      {|
        pre :=
          match s with
          | FullySynced => disk0 state ?|= eq d /\
                          disk1 state ?|= eq d
          | OutOfSync a b => disk0 state ?|= eq (assign d a b) /\
                             disk1 state ?|= eq d
          end;
        post :=
          fun state' (_:unit) =>
            match s with
            | FullySynced => disk0 state' ?|= eq d /\
                            disk1 state' ?|= eq d
            | OutOfSync a b =>
              (disk0 state' ?|= eq d /\
               disk1 state' ?|= eq d) \/
              (disk0 state' ?|= eq (assign d a b) /\
               disk1 state' ?|= eq (assign d a b))
            end;
        alternate :=
          fun state' (_:unit) =>
            match s with
            | FullySynced => disk0 state' ?|= eq d /\
                            disk1 state' ?|= eq d
            | OutOfSync a b =>
              (disk0 state' ?|= eq d /\
               disk1 state' ?|= eq d) \/
              (disk0 state' ?|= eq (assign d a b) /\
               disk1 state' ?|= eq d) \/
              (disk0 state' ?|= eq (assign d a b) /\
               disk1 state' ?|= eq (assign d a b))
            end;
      |}.

  Theorem Recover_rok1 d s :
    proc_hspec TDLayer
      (Recover)
      (Recover_spec d s).
Admitted.

  Theorem Recover_spec_idempotent1 d :
    idempotent (fun (t : unit) => Recover_spec d (FullySynced)).
Admitted.
Definition rd_abstraction (d:D.State) (state: State) (u: unit) : Prop.
admit.
Defined.

  Theorem read_rec_ok :
    forall a d, proc_rspec TDLayer (read a) Recover
                           (refine_spec rd_abstraction (OneDiskAPI.read_spec a) d).
  Proof.
    intros a d.
    eapply proc_hspec_to_rspec; eauto using Recover_spec_idempotent1;
      unfold refine_spec, rd_abstraction in *.
    -
 intros [].
eapply Recover_rok1.
🛠️ 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)
'[' -z x ']'
+ command make
+ make
make[1]: Entering directory '/builds/coq/coq/_build_ci/argosy'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/builds/coq/coq/_build_ci/argosy'
+ code=0
+ printf '\n%s exit code: %s\n' argosy 0
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real argosy.log
No timing data
+ '[' '' ']'
+ exit 0
/github/workspace/builds/coq /github/workspace
::endgroup::
::group::make ci-argosy (failing)
/builds/coq/coq /github/workspace/builds/coq /github/workspace
./dev/ci/ci-wrapper.sh argosy
+ CI_NAME=argosy
+ CI_SCRIPT=ci-argosy.sh
+++ dirname ./dev/ci/ci-wrapper.sh
++ cd ./dev/ci
++ pwd
+ DIR=/github/workspace/builds/coq/coq-failing/dev/ci
+ cd /github/workspace/builds/coq/coq-failing/dev/ci/../..
+ export TIMED=1
+ TIMED=1
+ '[' '' ']'
+ '[' -t 1 ']'
+ '[' '' ']'
+ COQ_CI_COLOR=
+ export GIT_PAGER=
+ GIT_PAGER=
+ '[' '' = 1 ']'
+ '[' '' = 1 ']'
+ bash /github/workspace/builds/coq/coq-failing/dev/ci/ci-argosy.sh
+ tee argosy.log
++ : 2
++ export NJOBS
++ which cygpath
++ OCAMLFINDSEP=:
++ '[' -n 1 ']'
++ export COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin
++ COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin
++ export OCAMLPATH=/github/workspace/builds/coq/coq-failing/_install_ci/lib:
++ OCAMLPATH=/github/workspace/builds/coq/coq-failing/_install_ci/lib:
++ export PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.09.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.09.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ CI_INSTALL_DIR=/github/workspace/builds/coq/coq-failing/_install_ci
++ export CI_BRANCH=
++ CI_BRANCH=
++ [[ '' =~ ^[0-9]*$ ]]
++ export CI_PULL_REQUEST=
++ CI_PULL_REQUEST=
++ export PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.09.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.09.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ export COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin/
++ COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin/
++ ls -l /github/workspace/builds/coq/coq-failing/_install_ci/bin/
total 301852
-rwxr-xr-x 1 root root     2136 Nov 12 13:15 coq-tex
-rwxr-xr-x 1 root root  2068456 Nov 12 13:15 coq-tex.orig
-rwxr-xr-x 1 root root  3828176 Nov  9 10:57 coq_makefile
-rwxr-xr-x 1 root root     2133 Nov 12 13:15 coqc
-rwxr-xr-x 1 root root     2138 Nov 12 13:15 coqc.byte
-rwxr-xr-x 1 root root 36685276 Nov 12 13:15 coqc.byte.orig
-rwxr-xr-x 1 root root 27822136 Nov 12 13:15 coqc.orig
-rwxr-xr-x 1 root root 10245096 Nov  9 10:57 coqchk
-rwxr-xr-x 1 root root  4274464 Nov  9 10:57 coqdep
-rwxr-xr-x 1 root root     2135 Nov 12 13:15 coqdoc
-rwxr-xr-x 1 root root  4075000 Nov 12 13:15 coqdoc.orig
-rwxr-xr-x 1 root root     2135 Nov 12 13:15 coqide
-rwxr-xr-x 1 root root 12105584 Nov 12 13:15 coqide.orig
-rwxr-xr-x 1 root root     2143 Nov 12 13:15 coqidetop.byte
-rwxr-xr-x 1 root root 37204626 Nov 12 13:15 coqidetop.byte.orig
-rwxr-xr-x 1 root root     2142 Nov 12 13:15 coqidetop.opt
-rwxr-xr-x 1 root root 28279824 Nov 12 13:15 coqidetop.opt.orig
-rwxr-xr-x 1 root root     2138 Nov 12 13:15 coqnative
-rwxr-xr-x 1 root root 10402184 Nov 12 13:15 coqnative.orig
-rwxr-xr-x 1 root root     2134 Nov 12 13:15 coqpp
-rwxr-xr-x 1 root root  2522120 Nov 12 13:15 coqpp.orig
-rwxr-xr-x 1 root root     2144 Nov 12 13:15 coqtimelog2html
-rwxr-xr-x 1 root root  2940568 Nov 12 13:15 coqtimelog2html.orig
-rwxr-xr-x 1 root root     2135 Nov 12 13:15 coqtop
-rwxr-xr-x 1 root root     2140 Nov 12 13:15 coqtop.byte
-rwxr-xr-x 1 root root 56957355 Nov 12 13:15 coqtop.byte.orig
-rwxr-xr-x 1 root root 27822104 Nov 12 13:15 coqtop.orig
-rwxr-xr-x 1 root root     2134 Nov 12 13:15 coqwc
-rwxr-xr-x 1 root root  1789656 Nov 12 13:15 coqwc.orig
-rwxr-xr-x 1 root root     2142 Nov 12 13:15 coqworker.opt
-rwxr-xr-x 1 root root 27824232 Nov 12 13:15 coqworker.opt.orig
-rwxr-xr-x 1 root root     2139 Nov 12 13:15 coqworkmgr
-rwxr-xr-x 1 root root  2378168 Nov 12 13:15 coqworkmgr.orig
-rwxr-xr-x 1 root root     2137 Nov 12 13:15 csdpcert
-rwxr-xr-x 1 root root  3562704 Nov 12 13:15 csdpcert.orig
-rwxr-xr-x 1 root root     2140 Nov 12 13:15 ocamllibdep
-rwxr-xr-x 1 root root  2353864 Nov 12 13:15 ocamllibdep.orig
-rwxr-xr-x 1 root root     2135 Nov 12 13:15 votour
-rwxr-xr-x 1 root root  3845376 Nov 12 13:15 votour.orig
++ CI_BUILD_DIR=/github/workspace/builds/coq/coq-failing/_build_ci
++ ls -l /github/workspace/builds/coq/coq-failing/_build_ci
total 4
drwxr-xr-x 8 root root 4096 Nov  9 11:05 argosy
++ declare -A overlays
++ set +x
+ WITH_SUBMODULES=1
+ git_download argosy
+ local project=argosy
+ local dest=/github/workspace/builds/coq/coq-failing/_build_ci/argosy
+ local giturl_var=argosy_CI_GITURL
+ local giturl=https://github.com/mit-pdos/argosy
+ local ref_var=argosy_CI_REF
+ local ref=master
+ local parent_project_var=argosy_CI_PARENT_PROJECT
+ local parent_project=
+ local submodule_folder_var=argosy_CI_SUBMODULE_FOLDER
+ local submodule_folder=
+ local ov_url=
+ local ov_ref=
++ dirname /github/workspace/builds/coq/coq-failing/_build_ci/argosy
+ local dest_prefix=/github/workspace/builds/coq/coq-failing/_build_ci/
+ '[' '' = '' ']'
+ local parent_project_dest=/github/workspace/builds/coq/coq-failing/_build_ci/
+ local parent_project_relative_dest=
+ '[' -d /github/workspace/builds/coq/coq-failing/_build_ci/argosy ']'
+ echo 'Warning: download and unpacking of argosy skipped because /github/workspace/builds/coq/coq-failing/_build_ci/argosy already exists.'
Warning: download and unpacking of argosy skipped because /github/workspace/builds/coq/coq-failing/_build_ci/argosy already exists.
+ '[' '' ']'
+ cd /github/workspace/builds/coq/coq-failing/_build_ci/argosy
+ make
+ '[' -z x ']'
+ command make
+ make
make[1]: Entering directory '/github/workspace/builds/coq/coq-failing/_build_ci/argosy'
COQC src/Examples/ReplicatedDisk/ReplicatedDiskImpl.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/argosy
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig -R /github/workspace/builds/coq/coq-failing/_build_ci/argosy/src RecoveryRefinement -R /github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/classes/src Classes -R /github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/array/src Array -R /github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/tactical/src Tactical src/Examples/ReplicatedDisk/ReplicatedDiskImpl.v -o /github/workspace/builds/coq/coq-failing/_build_ci/argosy/src/Examples/ReplicatedDisk/ReplicatedDiskImpl.vo 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.xrmRYiSilL
MINIMIZER_DEBUG: files:  src/Examples/ReplicatedDisk/ReplicatedDiskImpl.v
File "./src/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 799, characters 8-44:
Warning:
"auto with *" was used through the default "intuition_solver" tactic.
This will be replaced by just "auto" in the future.
[intuition-auto-with-star,deprecated-since-8.17,deprecated,default]
File "./src/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 967, characters 24-36:
Error: Applied theorem does not have enough premises.

make[1]: *** [Makefile:36: src/Examples/ReplicatedDisk/ReplicatedDiskImpl.vo] Error 1
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/argosy'
+ code=2
+ printf '\n%s exit code: %s\n' argosy 2
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real argosy.log
No timing data
+ '[' '' ']'
+ exit 2
make: *** [Makefile.ci:192: ci-argosy] Error 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 405KiB file on GitHub Actions Artifacts under bug.log)
fined.
�[92m
Admitting Qeds successful.�[0m
Failed to do everything at once; trying one at a time.
Admitting Qeds unsuccessful.
No successful changes.

I will now attempt to remove goals ending in [Abort.]
�[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

Non-fatal error: Failed to remove definitions and preserve the error.  
The new error was:
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 57, characters 2-40:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope relation_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 274, characters 12-25:
Error: Unknown constructor: OutOfSync.


�[93mIntermediate code not saved.�[0m

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

Non-fatal error: Failed to remove non-instance definitions and preserve the error.  
The new error was:
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 57, characters 2-40:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope relation_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 274, characters 12-25:
Error: Unknown constructor: OutOfSync.


�[93mIntermediate code not saved.�[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 admit [abstract ...]s
�[92m
Admitting [abstract ...] successful.�[0m
�[92m
Admitting [abstract ...] successful.�[0m
Admitting [abstract ...] unsuccessful.
Admitting [abstract ...] 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

Non-fatal error: Failed to remove definitions and preserve the error.  
The new error was:
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 57, characters 2-40:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope relation_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 274, characters 12-25:
Error: Unknown constructor: OutOfSync.


�[93mIntermediate code not saved.�[0m

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

Non-fatal error: Failed to remove non-instance definitions and preserve the error.  
The new error was:
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 57, characters 2-40:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope relation_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 274, characters 12-25:
Error: Unknown constructor: OutOfSync.


�[93mIntermediate code not saved.�[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 replace Obligation with Admit Obligations
�[92m
Admitting Obligations successful.�[0m
Failed to do everything at once; trying one at a time.
Admitting Obligations unsuccessful.
No successful changes.

I will now attempt to admit lemmas with Admitted
�[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 Admitted

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
File "/tmp/tmp76dp3_r6/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 57, characters 2-40:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope relation_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp76dp3_r6/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 239, characters 26-31:
Error:
In environment
a : addr
d : ?T
state : Layer.State TDLayer
The term "state" has type "Layer.State TDLayer"
while it is expected to have type "State".


�[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
�[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

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
File "/tmp/tmpx44c4rv2/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 57, characters 2-40:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope relation_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpx44c4rv2/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 241, characters 26-31:
Error:
In environment
a : addr
d : ?T
state : Layer.State TDLayer
The term "state" has type "Layer.State TDLayer"
while it is expected to have type "State".


�[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 export modules
Module exportation unsuccessful.

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

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

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

I will now attempt to remove goals ending in [Abort.]
�[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

Non-fatal error: Failed to remove definitions and preserve the error.  
The new error was:
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 57, characters 2-40:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope relation_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 274, characters 12-25:
Error: Unknown constructor: OutOfSync.


�[93mIntermediate code not saved.�[0m

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

Non-fatal error: Failed to remove non-instance definitions and preserve the error.  
The new error was:
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 57, characters 2-40:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope relation_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp89pr2f4v/RecoveryRefinement/Examples/ReplicatedDisk/ReplicatedDiskImpl.v", line 274, characters 12-25:
Error: Unknown constructor: OutOfSync.


�[93mIntermediate code not saved.�[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 empty sections

No empty sections to remove.

Now, I will attempt to strip repeated newlines and trailing spaces from this file...
�[92m
Succeeded in stripping newlines and spaces.�[0m

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 Nov 12, 2024

Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/hott/theories/Algebra/Groups/FreeProduct.v (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" "-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.FreeProduct") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 731 lines to 61 lines, then from 74 lines to 1249 lines, then from 1253 lines to 83 lines, then from 96 lines to 774 lines, then from 776 lines to 103 lines, then from 116 lines to 628 lines, then from 631 lines to 131 lines, then from 144 lines to 587 lines, then from 592 lines to 168 lines, then from 181 lines to 866 lines, then from 866 lines to 250 lines, then from 263 lines to 2527 lines, then from 2530 lines to 293 lines, then from 306 lines to 1165 lines, then from 1166 lines to 315 lines, then from 328 lines to 940 lines, then from 944 lines to 316 lines, then from 329 lines to 886 lines, then from 891 lines to 316 lines, then from 329 lines to 712 lines, then from 717 lines to 317 lines, then from 330 lines to 369 lines, then from 374 lines to 319 lines, then from 332 lines to 900 lines, then from 905 lines to 353 lines, then from 366 lines to 504 lines, then from 506 lines to 428 lines, then from 441 lines to 483 lines, then from 488 lines to 438 lines, then from 451 lines to 715 lines, then from 720 lines to 466 lines, then from 479 lines to 717 lines, then from 722 lines to 525 lines, then from 538 lines to 1221 lines, then from 1223 lines to 576 lines, then from 589 lines to 1371 lines, then from 1375 lines to 657 lines, then from 670 lines to 760 lines, then from 765 lines to 666 lines, then from 679 lines to 989 lines, then from 991 lines to 681 lines, then from 686 lines to 681 lines *)
(* coqc version 9.0+alpha compiled with OCaml 4.09.0
   coqtop version runner-wbcqh1i1-project-4504-concurrent-0:/builds/coq/coq/_build/default,(HEAD detached at c04db99c8cfb) (c04db99c8cfbe3fa002bf604971eb5b0e09656d4)
   Expected coqc runtime on this file: 0.181 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 50, left associativity).
Reserved Notation "x * y" (at level 40, left associativity).
Reserved Notation "f == g" (at level 70, no associativity).
Reserved Notation "g 'o' f" (at level 40, left associativity).
Delimit Scope function_scope with function.
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".

Declare ML Module "number_string_notation_plugin:coq-core.plugins.number_string_notation".

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.

Inductive option (A : Type) : Type :=
| Some : A -> option A
| None : option A.

Register option as core.option.type.

Inductive sum (A B : Type) : Type :=
| inl : A -> sum A B
| inr : B -> sum A B.

Notation "x + y" := (sum x y) : type_scope.

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

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

Notation Type0 := Set.

Notation idmap := (fun x => x).

Record sig {A} (P : A -> Type) := exist {
  proj1 : A ;
  proj2 : P proj1 ;
}.

Notation compose := (fun g f x => g (f x)).

Notation "g 'o' f" := (compose g%function f%function) : function_scope.

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.
Definition ap {A B : Type} (f : A -> B) {x y : A} (p : x = y) : f x = f y.
Admitted.

Definition pointwise_paths A (P : A -> Type) (f g : forall x, P x)
  := forall x, f x = g x.

Global Arguments pointwise_paths {A}%_type_scope {P} (f g)%_function_scope.

Notation "f == g" := (pointwise_paths f g) : type_scope.

Class IsEquiv {A B : Type} (f : A -> B) := {
  equiv_inv : B -> A ;
  eisretr : f o equiv_inv == idmap ;
  eissect : equiv_inv o f == idmap ;
  eisadj : forall x : A, eisretr (f x) = ap f (eissect x) ;
}.

Monomorphic Axiom Funext : Type0.
Existing Class Funext.

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).

Existing Class IsTrunc_internal.

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

Inductive nat : Type0 :=
| O : nat
| S : nat -> nat.

Inductive Unit : Type0 := tt : Unit.

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 "srefine" uconstr(term) := simple refine term.

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

Tactic Notation "rapply" uconstr(term)
  := do_with_holes ltac:(fun x => refine x) term.

Tactic Notation "srapply" uconstr(term)
  := do_with_holes ltac:(fun x => srefine x) term.

Tactic Notation "snrapply" uconstr(term)
  := do_with_holes ltac:(fun x => snrefine x) term.
Module Export Decimal.

Inductive uint : Type0 :=
 | Nil
 | D0 (_:uint)
 | D1 (_:uint)
 | D2 (_:uint)
 | D3 (_:uint)
 | D4 (_:uint)
 | D5 (_:uint)
 | D6 (_:uint)
 | D7 (_:uint)
 | D8 (_:uint)
 | D9 (_:uint).

Notation zero := (D0 Nil).

Variant int : Type0 := Pos (d:uint) | Neg (d:uint).

Variant decimal : Type0 :=
 | Decimal (i:int) (f:uint)
 | DecimalExp (i:int) (f:uint) (e:int).

Register uint as num.uint.type.
Register int as num.int.type.
Register decimal as num.decimal.type.

Fixpoint revapp (d d' : uint) :=
  match d with
  | Nil => d'
  | D0 d => revapp d (D0 d')
  | D1 d => revapp d (D1 d')
  | D2 d => revapp d (D2 d')
  | D3 d => revapp d (D3 d')
  | D4 d => revapp d (D4 d')
  | D5 d => revapp d (D5 d')
  | D6 d => revapp d (D6 d')
  | D7 d => revapp d (D7 d')
  | D8 d => revapp d (D8 d')
  | D9 d => revapp d (D9 d')
  end.

Definition rev d := revapp d Nil.

Module Export Little.

Fixpoint succ d :=
  match d with
  | Nil => D1 Nil
  | D0 d => D1 d
  | D1 d => D2 d
  | D2 d => D3 d
  | D3 d => D4 d
  | D4 d => D5 d
  | D5 d => D6 d
  | D6 d => D7 d
  | D7 d => D8 d
  | D8 d => D9 d
  | D9 d => D0 (succ d)
  end.
Module Export Hexadecimal.

Inductive uint : Type0 :=
 | Nil
 | D0 (_:uint)
 | D1 (_:uint)
 | D2 (_:uint)
 | D3 (_:uint)
 | D4 (_:uint)
 | D5 (_:uint)
 | D6 (_:uint)
 | D7 (_:uint)
 | D8 (_:uint)
 | D9 (_:uint)
 | Da (_:uint)
 | Db (_:uint)
 | Dc (_:uint)
 | Dd (_:uint)
 | De (_:uint)
 | Df (_:uint).

Variant hexadecimal : Type0 :=
 | Hexadecimal (i:int) (f:uint)
 | HexadecimalExp (i:int) (f:uint) (e:Decimal.int).

Register uint as num.hexadecimal_uint.type.
Register int as num.hexadecimal_int.type.
Register hexadecimal as num.hexadecimal.type.
Module Export Numeral.

Variant uint : Type0 := UIntDec (u:Decimal.uint) | UIntHex (u:Hexadecimal.uint).

Variant numeral : Type0 := Dec (d:Decimal.decimal) | Hex (h:Hexadecimal.hexadecimal).

Register uint as num.num_uint.type.
Register int as num.num_int.type.
Register numeral as num.number.type.

Fixpoint tail_add n m :=
  match n with
    | O => m
    | S n => tail_add n (S m)
  end.

Fixpoint tail_addmul r n m :=
  match n with
    | O => r
    | S n => tail_addmul (tail_add m r) n m
  end.

Definition tail_mul n m := tail_addmul O n m.

Local Notation ten := (S (S (S (S (S (S (S (S (S (S O)))))))))).

Fixpoint of_uint_acc (d:Decimal.uint)(acc:nat) :=
  match d with
  | Decimal.Nil => acc
  | Decimal.D0 d => of_uint_acc d (tail_mul ten acc)
  | Decimal.D1 d => of_uint_acc d (S (tail_mul ten acc))
  | Decimal.D2 d => of_uint_acc d (S (S (tail_mul ten acc)))
  | Decimal.D3 d => of_uint_acc d (S (S (S (tail_mul ten acc))))
  | Decimal.D4 d => of_uint_acc d (S (S (S (S (tail_mul ten acc)))))
  | Decimal.D5 d => of_uint_acc d (S (S (S (S (S (tail_mul ten acc))))))
  | Decimal.D6 d => of_uint_acc d (S (S (S (S (S (S (tail_mul ten acc)))))))
  | Decimal.D7 d => of_uint_acc d (S (S (S (S (S (S (S (tail_mul ten acc))))))))
  | Decimal.D8 d => of_uint_acc d (S (S (S (S (S (S (S (S (tail_mul ten acc)))))))))
  | Decimal.D9 d => of_uint_acc d (S (S (S (S (S (S (S (S (S (tail_mul ten acc))))))))))
  end.

Definition of_uint (d:Decimal.uint) := of_uint_acc d O.

Local Notation sixteen := (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))).

Fixpoint of_hex_uint_acc (d:Hexadecimal.uint)(acc:nat) :=
  match d with
  | Hexadecimal.Nil => acc
  | Hexadecimal.D0 d => of_hex_uint_acc d (tail_mul sixteen acc)
  | Hexadecimal.D1 d => of_hex_uint_acc d (S (tail_mul sixteen acc))
  | Hexadecimal.D2 d => of_hex_uint_acc d (S (S (tail_mul sixteen acc)))
  | Hexadecimal.D3 d => of_hex_uint_acc d (S (S (S (tail_mul sixteen acc))))
  | Hexadecimal.D4 d => of_hex_uint_acc d (S (S (S (S (tail_mul sixteen acc)))))
  | Hexadecimal.D5 d => of_hex_uint_acc d (S (S (S (S (S (tail_mul sixteen acc))))))
  | Hexadecimal.D6 d => of_hex_uint_acc d (S (S (S (S (S (S (tail_mul sixteen acc)))))))
  | Hexadecimal.D7 d => of_hex_uint_acc d (S (S (S (S (S (S (S (tail_mul sixteen acc))))))))
  | Hexadecimal.D8 d => of_hex_uint_acc d (S (S (S (S (S (S (S (S (tail_mul sixteen acc)))))))))
  | Hexadecimal.D9 d => of_hex_uint_acc d (S (S (S (S (S (S (S (S (S (tail_mul sixteen acc))))))))))
  | Hexadecimal.Da d => of_hex_uint_acc d (S (S (S (S (S (S (S (S (S (S (tail_mul sixteen acc)))))))))))
  | Hexadecimal.Db d => of_hex_uint_acc d (S (S (S (S (S (S (S (S (S (S (S (tail_mul sixteen acc))))))))))))
  | Hexadecimal.Dc d => of_hex_uint_acc d (S (S (S (S (S (S (S (S (S (S (S (S (tail_mul sixteen acc)))))))))))))
  | Hexadecimal.Dd d => of_hex_uint_acc d (S (S (S (S (S (S (S (S (S (S (S (S (S (tail_mul sixteen acc))))))))))))))
  | Hexadecimal.De d => of_hex_uint_acc d (S (S (S (S (S (S (S (S (S (S (S (S (S (S (tail_mul sixteen acc)))))))))))))))
  | Hexadecimal.Df d => of_hex_uint_acc d (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (tail_mul sixteen acc))))))))))))))))
  end.

Definition of_hex_uint (d:Hexadecimal.uint) := of_hex_uint_acc d O.

Definition of_num_uint (d:Numeral.uint) :=
  match d with
  | Numeral.UIntDec d => of_uint d
  | Numeral.UIntHex d => of_hex_uint d
  end.

Fixpoint to_little_uint n acc :=
  match n with
  | O => acc
  | S n => to_little_uint n (Decimal.Little.succ acc)
  end.

Definition to_uint n :=
  Decimal.rev (to_little_uint n Decimal.zero).

Definition to_num_uint n := Numeral.UIntDec (to_uint n).

Number Notation nat of_num_uint to_num_uint (abstract after 5001) : nat_scope.

Module Export HoTT_DOT_Basics_DOT_Trunc_WRAPPED.
Module Export Trunc.
Generalizable Variables A B m n f.
Fixpoint trunc_index_inc@{} (k : trunc_index) (n : nat)
  : trunc_index.
exact (match n with
      | O => k
      | S m => (trunc_index_inc k m).+1
    end).
Defined.
Definition nat_to_trunc_index@{} (n : nat) : trunc_index.
exact ((trunc_index_inc minus_two n).+2).
Defined.

Coercion nat_to_trunc_index : nat >-> trunc_index.

Global Instance istrunc_paths' {n : trunc_index} {A : Type} `{IsTrunc n A}
  : forall x y : A, IsTrunc n (x = y) | 1000.
Admitted.

Definition istrunc_isequiv_istrunc A {B} (f : A -> B)
  `{IsTrunc n A} `{IsEquiv A B f}
  : IsTrunc n B.
Admitted.

Global Instance ishprop_istrunc `{Funext} (n : trunc_index) (A : Type)
  : IsHProp (IsTrunc n A) | 0.
Admitted.

End Trunc.

End HoTT_DOT_Basics_DOT_Trunc_WRAPPED.
Definition Coeq@{i j u} {B : Type@{i}} {A : Type@{j}} (f g : B -> A) : Type@{u}.
Admitted.

Local Open Scope nat_scope.

  Definition ExtensionAlong@{a b p m} {A : Type@{a}} {B : Type@{b}} (f : A -> B)
             (P : B -> Type@{p}) (d : forall x:A, P (f x))
    :=
       sig@{m m} (fun (s : forall y:B, P y) => forall x:A, s (f x) = d x).

  Fixpoint ExtendableAlong@{i j k l}
           (n : nat) {A : Type@{i}} {B : Type@{j}}
           (f : A -> B) (C : B -> Type@{k}) : Type@{l}
    := match n with
         | 0 => Unit
         | S n => (forall (g : forall a, C (f a)),
                     ExtensionAlong@{i j k l} f C g) *
                  forall (h k : forall b, C b),
                    ExtendableAlong n f (fun b => h b = k b)
       end.
Definition ooExtendableAlong@{i j k l}
             {A : Type@{i}} {B : Type@{j}}
             (f : A -> B) (C : B -> Type@{k}) : Type@{l}.
exact (forall n : nat, ExtendableAlong@{i j k l} n f C).
Defined.

Record Subuniverse@{i} :=
{
  In_internal : Type@{i} -> Type@{i} ;
  hprop_inO_internal : Funext -> forall (T : Type@{i}),
      IsHProp (In_internal T) ;
  inO_equiv_inO_internal : forall (T U : Type@{i}) (T_inO : In_internal T)
                                  (f : T -> U) {feq : IsEquiv f},
      In_internal U ;
}.

Class In (O : Subuniverse) (T : Type) := in_internal : In_internal O T.

Class PreReflects@{i} (O : Subuniverse@{i}) (T : Type@{i}) :=
{
  O_reflector : Type@{i} ;
  O_inO : In O O_reflector ;
  to : T -> O_reflector ;
}.

Arguments O_reflector O T {_}.
Arguments to O T {_}.

Class Reflects@{i} (O : Subuniverse@{i}) (T : Type@{i})
      `{PreReflects@{i} O T} :=
{
  extendable_to_O : forall {Q : Type@{i}} {Q_inO : In O Q},
      ooExtendableAlong (to O T) (fun _ => Q)
}.

Record ReflectiveSubuniverse@{i} :=
{
  rsu_subuniv : Subuniverse@{i} ;
  rsu_prereflects : forall (T : Type@{i}), PreReflects rsu_subuniv T ;
  rsu_reflects : forall (T : Type@{i}), Reflects rsu_subuniv T ;
}.

Coercion rsu_subuniv : ReflectiveSubuniverse >-> Subuniverse.
Global Existing Instance rsu_prereflects.
Definition rsu_reflector (O : ReflectiveSubuniverse) (T : Type) : Type.
exact (O_reflector O T).
Defined.

Coercion rsu_reflector : ReflectiveSubuniverse >-> Funclass.

Class ReflectsD@{i} (O' O : Subuniverse@{i}) (T : Type@{i})
      `{PreReflects@{i} O' T} :=
{
  extendable_to_OO :
    forall (Q : O_reflector O' T -> Type@{i}) {Q_inO : forall x, In O (Q x)},
      ooExtendableAlong (to O' T) Q
}.

Definition reflectsD_from_OO_ind@{i} {O' O : Subuniverse@{i}}
           {A : Type@{i}} `{PreReflects O' A}
           (OO_ind' : forall (B : O_reflector O' A -> Type@{i})
                             (B_inO : forall oa, In O (B oa))
                             (f : forall a, B (to O' A a))
                             oa, B oa)
           (OO_ind_beta' : forall (B : O_reflector O' A -> Type@{i})
                             (B_inO : forall oa, In O (B oa))
                             (f : forall a, B (to O' A a))
                             a, OO_ind' B B_inO f (to O' A a) = f a)
           (inO_paths' : forall (B : Type@{i}) (B_inO : In O B)
                      (z z' : B), In O (z = z'))
  : ReflectsD O' O A.
Admitted.

Record Modality@{i} := Build_Modality'
{
  modality_subuniv : Subuniverse@{i} ;
  modality_prereflects : forall (T : Type@{i}),
      PreReflects modality_subuniv T ;
  modality_reflectsD : forall (T : Type@{i}),
      ReflectsD modality_subuniv modality_subuniv T ;
}.

Global Existing Instance modality_reflectsD.

Definition modality_to_reflective_subuniverse (O : Modality@{i})
  : ReflectiveSubuniverse@{i}.
Proof.
  refine (Build_ReflectiveSubuniverse
            (modality_subuniv O) (modality_prereflects O) _).
  intros T; constructor.
  intros Q Q_inO.
  srapply extendable_to_OO.
Defined.

Coercion modality_to_reflective_subuniverse : Modality >-> ReflectiveSubuniverse.

Definition Build_Modality
           (In' : Type -> Type)
           (hprop_inO' : Funext -> forall T : Type, IsHProp (In' T))
           (inO_equiv_inO' : forall T U : Type,
               In' T -> forall f : T -> U, IsEquiv f -> In' U)
           (O_reflector' : Type -> Type)
           (O_inO' : forall T, In' (O_reflector' T))
           (to' : forall T, T -> O_reflector' T)
           (O_ind' : forall (A : Type) (B : O_reflector' A -> Type)
                            (B_inO : forall oa, In' (B oa))
                            (f : forall a, B (to' A a))
                            (z : O_reflector' A),
               B z)
           (O_ind_beta' : forall (A : Type) (B : O_reflector' A -> Type)
                                 (B_inO : forall oa, In' (B oa))
                                 (f : forall a, B (to' A a)) (a : A),
               O_ind' A B B_inO f (to' A a) = f a)
           (inO_paths' : forall (A : Type) (A_inO : In' A) (z z' : A),
               In' (z = z'))
  : Modality.
Proof.
  pose (O := Build_Subuniverse In' hprop_inO' inO_equiv_inO').
  simple refine (Build_Modality' O _ _); intros T.
  -
 exact (Build_PreReflects O T (O_reflector' T) (O_inO' T) (to' T)).
  -
 srapply reflectsD_from_OO_ind.
    +
 rapply O_ind'.
    +
 rapply O_ind_beta'.
    +
 rapply inO_paths'.
Defined.

Module Export Trunc.

  Cumulative Private Inductive Trunc (n : trunc_index) (A :Type) : Type :=
    tr : A -> Trunc n A.
  Arguments tr {n A} a.

  Global Instance istrunc_truncation (n : trunc_index) (A : Type@{i})
    : IsTrunc@{j} n (Trunc@{i} n A).
  Admitted.
Definition Trunc_ind {n A}
    (P : Trunc n A -> Type) {Pt : forall aa, IsTrunc n (P aa)}
    : (forall a, P (tr a)) -> (forall aa, P aa).
exact (fun f aa => match aa with tr a => fun _ => f a end Pt).
Defined.

End Trunc.

Definition Tr (n : trunc_index) : Modality.
Proof.
  srapply (Build_Modality (fun A => IsTrunc n A)); cbn.
  -
 intros A B ? f ?; rapply (istrunc_isequiv_istrunc A f).
  -
 exact (Trunc n).
  -
 intros; apply istrunc_truncation.
  -
 intros A; apply tr.
  -
 intros A B ? f oa; cbn in *.
    exact (Trunc_ind B f oa).
  -
 intros; reflexivity.
  -
 exact (@istrunc_paths' n).
Defined.

Declare Scope mc_scope.
Global Open Scope mc_scope.

Class SgOp A := sg_op: A -> A -> A.
Class MonUnit A := mon_unit: A.
Class Negate A := negate: A -> A.
Infix "*" := sg_op : mc_mult_scope.
Notation "(.*.)" := sg_op (only parsing) : mc_mult_scope.
Notation "(-)" := negate (only parsing) : mc_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} {Anegate : Negate A} :=
    { group_monoid : @IsMonoid (.*.) Aunit
    ; negate_l : LeftInverse (.*.) (-) mon_unit
    ; negate_r : RightInverse (.*.) (-) mon_unit }.

End upper_classes.

  Section sgmorphism_classes.
  Context {A B : Type} {Aop : SgOp A} {Bop : SgOp B}
    {Aunit : MonUnit A} {Bunit : MonUnit B}.

  Local Open Scope mc_mult_scope.

  Class IsSemiGroupPreserving (f : A -> B) :=
    preserves_sg_op : forall x y, f (x * y) = f x * f y.
  End sgmorphism_classes.

Record Group := {
  group_type :> Type;
  group_sgop :: SgOp group_type;
  group_unit :: MonUnit group_type;
  group_inverse :: Negate group_type;
  group_isgroup :: IsGroup group_type;
}.

Record GroupHomomorphism (G H : Group) := Build_GroupHomomorphism {
  grp_homo_map :> group_type G -> group_type H;
  issemigrouppreserving_grp_homo :: IsSemiGroupPreserving grp_homo_map;
}.

Section FreeProduct.

  Context (G H K : Group)
    (f : GroupHomomorphism G H) (g : GroupHomomorphism G K).
Local Definition Words : Type.
Admitted.
Local Definition pc1 : Type.
Admitted.
Local Definition pc2 : Type.
Admitted.
Local Definition pc3 : Type.
Admitted.
Local Definition pc4 : Type.
Admitted.
Local Definition pc5 : Type.
Admitted.

  Local Definition map1 : pc1 + pc2 + pc3 + pc4 + pc5 -> Words.
Admitted.

  Local Definition map2 : pc1 + pc2 + pc3 + pc4 + pc5 -> Words.
Admitted.
Definition amal_type : Type.
exact (Tr 0 (Coeq map1 map2)).
Defined.

  Global Instance sgop_amal_type : SgOp amal_type.
Admitted.

  Global Instance monunit_amal_type : MonUnit amal_type.
Admitted.

  Global Instance negate_amal_type : Negate amal_type.
Admitted.

  Global Instance associative_sgop_m : Associative sg_op.
Admitted.

  Global Instance leftidentity_sgop_amal_type : LeftIdentity sg_op mon_unit.
Admitted.

  Global Instance rightidentity_sgop_amal_type : RightIdentity sg_op mon_unit.
Admitted.

  Global Instance leftinverse_sgop_amal_type : LeftInverse sg_op negate mon_unit.
Admitted.

  Global Instance rightinverse_sgop_amal_type : RightInverse sg_op negate mon_unit.
Admitted.

  Definition AmalgamatedFreeProduct : Group.
  Proof.
    snrapply (Build_Group amal_type); repeat split; exact _.
🛠️ 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 3.1MiB file on GitHub Actions Artifacts under build.log)
space/builds/coq/coq-failing/_build_ci/hott/test HoTT.Tests -R /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories HoTT theories/Pointed/pSusp.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.e7zupljwzH
MINIMIZER_DEBUG: files:  theories/Pointed/pSusp.v
theories/Pointed/pSusp.vo (real: 1.05, user: 0.96, sys: 0.08, mem: 365760 ko)
COQC theories/Pointed.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
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/coqc.orig -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Pointed.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/Pointed.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.FlUHeNKAqf
MINIMIZER_DEBUG: files:  theories/Pointed.v
theories/Pointed.vo (real: 0.15, user: 0.08, sys: 0.07, mem: 145960 ko)
COQC theories/Algebra/Groups/Image.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
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/coqc.orig -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Algebra/Groups/Image.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/Image.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.D9ir5vZC5W
MINIMIZER_DEBUG: files:  theories/Algebra/Groups/Image.v
theories/Algebra/Groups/Image.vo (real: 0.35, user: 0.24, sys: 0.11, mem: 350012 ko)
COQC theories/Algebra/Groups/Kernel.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
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/coqc.orig -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Algebra/Groups/Kernel.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/Kernel.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.OSmvZGDdqx
MINIMIZER_DEBUG: files:  theories/Algebra/Groups/Kernel.v
theories/Algebra/Groups/Kernel.vo (real: 0.27, user: 0.18, sys: 0.09, mem: 328956 ko)
COQC theories/Spaces/Finite/Finite.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
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/coqc.orig -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Spaces/Finite/Finite.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/Spaces/Finite/Finite.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.WAAG86RNWz
MINIMIZER_DEBUG: files:  theories/Spaces/Finite/Finite.v
theories/Spaces/Finite/Finite.vo (real: 1.46, user: 1.35, sys: 0.11, mem: 343464 ko)
COQC theories/Algebra/Groups/QuotientGroup.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
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/coqc.orig -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Algebra/Groups/QuotientGroup.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/QuotientGroup.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.XhmygExVY8
MINIMIZER_DEBUG: files:  theories/Algebra/Groups/QuotientGroup.v
theories/Algebra/Groups/QuotientGroup.vo (real: 0.77, user: 0.69, sys: 0.08, mem: 359608 ko)
COQC theories/Algebra/Groups/FreeProduct.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin/////coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
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/coqc.orig -time-file /github/workspace/builds/coq/coq-failing/_build_ci/hott/theories/Algebra/Groups/FreeProduct.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/FreeProduct.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.qyG0sRXRqq
MINIMIZER_DEBUG: files:  theories/Algebra/Groups/FreeProduct.v
File "./theories/Algebra/Groups/FreeProduct.v", line 522, characters 58-59:
Error: Could not find an instance for "Associative sg_op" in
environment:
G : Group
H : Group
K : Group
f : GroupHomomorphism G H
g : GroupHomomorphism G K


Command exited with non-zero status 1
theories/Algebra/Groups/FreeProduct.vo (real: 1.28, user: 1.15, sys: 0.12, mem: 368652 ko)
make[3]: *** [Makefile.coq:804: theories/Algebra/Groups/FreeProduct.vo] Error 1
make[2]: *** [Makefile.coq:417: all] Error 2
make[1]: *** [Makefile:21: invoke-coqmakefile] Error 2
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/hott'
+ code=2
+ printf '\n%s exit code: %s\n' hott 2
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real hott.log
    Time |  Peak Mem | File Name                      
------------------------------------------------------
0m09.99s | 368652 ko | Total Time / Peak Mem          
------------------------------------------------------
0m01.46s | 343464 ko | Spaces/Finite/Finite.vo        
0m01.28s | 368652 ko | Algebra/Groups/FreeProduct.vo  
0m01.09s | 359736 ko | Pointed/Loops.vo               
0m01.05s | 365760 ko | Pointed/pSusp.vo               
0m01.00s | 361644 ko | Homotopy/BlakersMassey.vo      
0m00.95s | 353540 ko | Homotopy/Join/Core.vo          
0m00.83s | 358020 ko | Pointed/pFiber.vo              
0m00.77s | 359608 ko | Algebra/Groups/QuotientGroup.vo
0m00.40s | 346292 ko | Pointed/pTrunc.vo              
0m00.35s | 350012 ko | Algebra/Groups/Image.vo        
0m00.27s | 328956 ko | Algebra/Groups/Kernel.vo       
0m00.27s | 307076 ko | Homotopy/Freudenthal.vo        
0m00.15s | 145960 ko | Pointed.vo                     
0m00.12s |  99544 ko | Truncations.vo                 
+ '[' '' ']'
+ exit 2
make: *** [Makefile.ci:192: ci-hott] Error 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 721KiB file on GitHub Actions Artifacts under bug.log)
, non-canonical structure definitions

Non-fatal error: Failed to remove non-instance definitions and preserve the error.  
The new error was:
File "/tmp/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 22, characters 0-43:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope function_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 23, 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/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 343, characters 0-78:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope nat_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 571, characters 0-35:
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/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 680, characters 58-59:
Error: Could not find an instance for "Associative sg_op".



�[93mIntermediate code not saved.�[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 replace Obligation with Admit Obligations
�[92m
Admitting Obligations successful.�[0m
Failed to do everything at once; trying one at a time.
Admitting Obligations unsuccessful.
No successful changes.

I will now attempt to admit lemmas with Admitted
�[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 Admitted

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
File "/tmp/tmpw6vmmvzk/HoTT/Algebra/Groups/FreeProduct.v", line 22, characters 0-43:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope function_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpw6vmmvzk/HoTT/Algebra/Groups/FreeProduct.v", line 23, 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/tmpw6vmmvzk/HoTT/Algebra/Groups/FreeProduct.v", line 343, characters 0-78:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope nat_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpw6vmmvzk/HoTT/Algebra/Groups/FreeProduct.v", line 419, characters 0-198:
Error:
Universe
HoTT.Algebra.Groups.FreeProduct.228 (File "/tmp/tmpw6vmmvzk/HoTT/Algebra/Groups/FreeProduct.v", line 423, characters 6-23)
is unbound.


�[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
�[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

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
File "/tmp/tmpip0ek_gl/HoTT/Algebra/Groups/FreeProduct.v", line 22, characters 0-43:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope function_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpip0ek_gl/HoTT/Algebra/Groups/FreeProduct.v", line 23, 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/tmpip0ek_gl/HoTT/Algebra/Groups/FreeProduct.v", line 343, characters 0-78:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope nat_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpip0ek_gl/HoTT/Algebra/Groups/FreeProduct.v", line 351, characters 0-8:
Error:  (in proof trunc_index_inc): 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 export modules
Module exportation unsuccessful.

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

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

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

I will now attempt to remove goals ending in [Abort.]
�[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

Non-fatal error: Failed to remove definitions and preserve the error.  
The new error was:
File "/tmp/tmp5v6ohin1/HoTT/Algebra/Groups/FreeProduct.v", line 22, characters 0-43:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope function_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp5v6ohin1/HoTT/Algebra/Groups/FreeProduct.v", line 23, 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/tmp5v6ohin1/HoTT/Algebra/Groups/FreeProduct.v", line 343, characters 0-78:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope nat_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp5v6ohin1/HoTT/Algebra/Groups/FreeProduct.v", line 545, characters 1-17:
Error: No product even after head-reduction.


�[93mIntermediate code not saved.�[0m

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

Non-fatal error: Failed to remove non-instance definitions and preserve the error.  
The new error was:
File "/tmp/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 22, characters 0-43:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope function_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 23, 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/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 343, characters 0-78:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope nat_scope.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 571, characters 0-35:
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/tmp_8pkwo_6/HoTT/Algebra/Groups/FreeProduct.v", line 680, characters 58-59:
Error: Could not find an instance for "Associative sg_op".



�[93mIntermediate code not saved.�[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 empty sections

No empty sections to remove.

Now, I will attempt to strip repeated newlines and trailing spaces from this file...
�[92m
Succeeded in stripping newlines and spaces.�[0m

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 Nov 12, 2024

Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/FMapExtensions/LiftRelationInstances.v (from ci-fiat_parsers) (full log on GitHub Actions - verbose log)

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

🌟 Minimized Coq File (consider adding this file to the test-suite)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-compat" "8.4" "-w" "unsupported-attributes" "-w" "-deprecated-native-compiler-option" "-native-compiler" "no" "-w" "-deprecated-appcontext -notation-overridden" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src" "Fiat" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock" "Bedrock" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2" "Ltac2" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics" "-I" "/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers" "-top" "Fiat.Common.FMapExtensions.LiftRelationInstances") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 891 lines to 51 lines, then from 64 lines to 185 lines, then from 190 lines to 52 lines, then from 65 lines to 2346 lines, then from 2343 lines to 74 lines, then from 87 lines to 1906 lines, then from 1906 lines to 76 lines, then from 89 lines to 247 lines, then from 252 lines to 170 lines, then from 183 lines to 236 lines, then from 241 lines to 185 lines, then from 190 lines to 186 lines *)
(* coqc version 9.0+alpha compiled with OCaml 4.09.0
   coqtop version runner-wbcqh1i1-project-4504-concurrent-0:/builds/coq/coq/_build/default,(HEAD detached at c04db99c8cfb) (c04db99c8cfbe3fa002bf604971eb5b0e09656d4)
   Expected coqc runtime on this file: 0.738 sec *)

Require Stdlib.FSets.FMapFacts.

Ltac split_in_context_by ident funl funr tac :=
  repeat match goal with
         | [ H : context p [ident] |- _ ] =>
           let H0 := context p[funl] in let H0' := eval simpl in H0 in assert H0' by (tac H);
                                          let H1 := context p[funr] in let H1' := eval simpl in H1 in assert H1' by (tac H);
                                                                         clear H
         end.
Ltac split_in_context ident funl funr :=
  split_in_context_by ident funl funr ltac:(fun H => apply H).

Ltac split_and' :=
  repeat match goal with
         | [ H : ?a /\ ?b |- _ ] => let H0 := fresh in let H1 := fresh in
                                                       assert (H0 := fst H); assert (H1 := snd H); clear H
         end.
Ltac split_and := split_and'; split_in_context and (fun a b : Type => a) (fun a b : Type => b).

Ltac set_match_refl v' only_when :=
  lazymatch goal with
  | [ |- context G[match ?e with _ => _ end eq_refl] ]
    => only_when e;
       let T := fresh in
       evar (T : Type); evar (v' : T);
       subst T;
       let vv := (eval cbv delta [v'] in v') in
       let G' := context G[vv] in
       let G''' := context G[v'] in
       lazymatch goal with |- ?G'' => unify G' G'' end;
       change G'''
  end.
Ltac set_match_refl_hyp v' only_when :=
  lazymatch goal with
  | [ H : context G[match ?e with _ => _ end eq_refl] |- _ ]
    => only_when e;
       let T := fresh in
       evar (T : Type); evar (v' : T);
       subst T;
       let vv := (eval cbv delta [v'] in v') in
       let G' := context G[vv] in
       let G''' := context G[v'] in
       let G'' := type of H in
       unify G' G'';
       change G''' in H
  end.
Ltac destruct_by_existing_equation match_refl_hyp :=
  let v := (eval cbv delta [match_refl_hyp] in match_refl_hyp) in
  lazymatch v with
  | match ?e with _ => _ end (@eq_refl ?T ?e)
    => let H := fresh in
       let e' := fresh in
       pose e as e';
       change e with e' in (value of match_refl_hyp) at 1;
       first [ pose (@eq_refl T e : e = e') as H;
               change (@eq_refl T e) with H in (value of match_refl_hyp);
               clearbody H e'
             | pose (@eq_refl T e : e' = e) as H;
               change (@eq_refl T e) with H in (value of match_refl_hyp);
               clearbody H e' ];
       destruct e'; subst match_refl_hyp
  end.
Ltac destruct_rewrite_sumbool e :=
  let H := fresh in
  destruct e as [H|H];
  try lazymatch type of H with
      | ?LHS = ?RHS
        => lazymatch RHS with
           | context[LHS] => fail
           | _ => idtac
           end;
           rewrite ?H; rewrite ?H in *;
           repeat match goal with
                  | [ |- context G[LHS] ]
                    => let LHS' := fresh in
                       pose LHS as LHS';
                       let G' := context G[LHS'] in
                       change G';
                       replace LHS' with RHS by (subst LHS'; symmetry; apply H);
                       subst LHS'
                  end
      end.
Ltac break_match_step only_when :=
  match goal with
  | [ |- context[match ?e with _ => _ end] ]
    => only_when e; is_var e; destruct e
  | [ |- context[match ?e with _ => _ end] ]
    => only_when e;
       match type of e with
       | sumbool _ _ => destruct_rewrite_sumbool e
       end
  | [ |- context[if ?e then _ else _] ]
    => only_when e; destruct e eqn:?
  | [ |- context[match ?e with _ => _ end] ]
    => only_when e; destruct e eqn:?
  | _ => let v := fresh in set_match_refl v only_when; destruct_by_existing_equation v
  end.
Ltac break_match_hyps_step only_when :=
  match goal with
  | [ H : context[match ?e with _ => _ end] |- _ ]
    => only_when e; is_var e; destruct e
  | [ H : context[match ?e with _ => _ end] |- _ ]
    => only_when e;
       match type of e with
       | sumbool _ _ => destruct_rewrite_sumbool e
       end
  | [ H : context[if ?e then _ else _] |- _ ]
    => only_when e; destruct e eqn:?
  | [ H : context[match ?e with _ => _ end] |- _ ]
    => only_when e; destruct e eqn:?
  | _ => let v := fresh in set_match_refl_hyp v only_when; destruct_by_existing_equation v
  end.
Ltac break_match := repeat break_match_step ltac:(fun _ => idtac).
Ltac break_match_hyps := repeat break_match_hyps_step ltac:(fun _ => idtac).
Export Coq.FSets.FMapInterface.

Module FMapExtensions_fun (E: DecidableType) (Import M: WSfun E).
Definition lift_relation_gen_hetero {A B P}
             (and : P -> P -> P) (True : P)
             (R : A -> B -> P) (defaultA : A) (defaultB : B)
    : t A -> t B -> P.
Admitted.

  Lemma lift_relation_gen_hetero_iff {A B P} and True' (Q : P -> Prop) R defaultA defaultB (m1 : t A) (m2 : t B)
        (QTrue_or_key : Q True' \/ exists k, find k m1 = None /\ find k m2 = None)
        (Qand : forall x y, Q (and x y) <-> Q x /\ Q y)
    : Q (lift_relation_gen_hetero and True' R defaultA defaultB m1 m2)
      <-> forall k, Q (match find k m1, find k m2 with
                       | Some x1, Some x2 => R x1 x2
                       | Some x, None => R x defaultB
                       | None, Some x => R defaultA x
                       | None, None => True'
                       end).
Admitted.

End FMapExtensions_fun.

Class pull_forall_able (iffR : Prop -> Prop -> Prop)
  := pull_forall_iffR : forall A P Q, (forall x : A, iffR (P x) (Q x)) -> iffR (forall x, P x) (forall x, Q x).

Module FMapExtensionsLiftRelationInstances_fun (E: DecidableType) (Import M: WSfun E).
  Module BasicExtensions := FMapExtensions_fun E M.
  Include BasicExtensions.

    Section rel.
    Context {P} {Q : P -> Prop} {and True'}
            (HTrue' : Q True')
            (Hand : forall x y, Q (and x y) <-> Q x /\ Q y)
            (iffP : P -> P -> Prop)
            (iffP_iff : forall x y, iffP x y <-> (Q x <-> Q y))
            {A} {default : A}.

    Local Coercion Q : P >-> Sortclass.

    Local Notation lift R := (@lift_relation_gen_hetero A A P and True' R default default).

    Local Ltac t :=
      repeat ((rewrite lift_relation_gen_hetero_iff by auto) || intro);
      repeat match goal with
             | [ H : forall k : key, _, k' : key |- _ ] => specialize (H k')
             | [ |- ?R (forall _, _) (forall _, _) ] => apply pull_forall_iffR; intro
             end;
      try solve [ break_match; break_match_hyps; eauto ].
      Context {R : A -> A -> P}.
        Context {R1 R2 : A -> A -> P}
                {R1_Reflexive : Reflexive R1}
                {R2_Reflexive : Reflexive R2}
                {R1_subrelation : subrelation R1 R}
                {R2_subrelation : subrelation R2 R}.

        Global Instance lift_relation_gen_hetero_homo_Proper_Proper_subrelation_iffR
               {iffR}
               {iffR_Proper : Proper (iff ==> iff ==> flip impl) iffR}
               {iffR_pull : pull_forall_able iffR}
               {R_Proper : Proper (R1 ==> R2 ==> iffR) R}
          : Proper (lift R1 ==> lift R2 ==> iffR) (lift R) | 2.
        Proof.
          pose proof (R1_Reflexive default).
          pose proof (R2_Reflexive default).
          t; compute in * |- ; split_and; break_match; try split;
            try solve [ eauto 3
                      | eapply iffR_Proper; [ | | eauto ]; [ | eauto ]; eauto ].
        Qed.
🛠️ 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 3.2MiB file on GitHub Actions Artifacts under build.log)
script like: for f in
$(find . -name '*.v'); do sed '/Arguments/ s/%/%_/g' -i $f ; done
[argument-scope-delimiter,deprecated-since-8.19,deprecated,default]
COQC src/ADTRefinement/BuildADTSetoidMorphisms.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin///coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig -q -compat 8.4 -w unsupported-attributes -w -deprecated-native-compiler-option -native-compiler no -w -deprecated-appcontext\ -notation-overridden -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src Fiat -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock Bedrock src/ADTRefinement/BuildADTSetoidMorphisms.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.yVfBYPx0A2
MINIMIZER_DEBUG: files:  src/ADTRefinement/BuildADTSetoidMorphisms.v
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
File "./src/ADTRefinement/BuildADTSetoidMorphisms.v", line 1, characters 0-128:
Warning: Notations "Def Constructor0 _ : rep := _" defined at level 94
and "Def ADT { rep := _ , _ , .. , _ ,, _ , .. , _ }" defined at level 96
have incompatible prefixes. One of them will likely not work.
[notation-incompatible-prefix,parsing,default]
COQC src/ADTRefinement/GeneralBuildADTRefinements.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin///coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig -q -compat 8.4 -w unsupported-attributes -w -deprecated-native-compiler-option -native-compiler no -w -deprecated-appcontext\ -notation-overridden -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src Fiat -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock Bedrock src/ADTRefinement/GeneralBuildADTRefinements.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.aNXXBY9kGE
MINIMIZER_DEBUG: files:  src/ADTRefinement/GeneralBuildADTRefinements.v
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
File "./src/ADTRefinement/GeneralBuildADTRefinements.v", line 1, characters 15-29:
Warning: Coq.Lists.List has been replaced by Stdlib.Lists.List.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "./src/ADTRefinement/GeneralBuildADTRefinements.v", line 1, characters 30-45:
Warning: Coq.Arith.Arith has been replaced by Stdlib.Arith.Arith.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "./src/ADTRefinement/GeneralBuildADTRefinements.v", line 1, characters 0-577:
Warning: Notations "Def Constructor0 _ : rep := _" defined at level 94
and "Def ADT { rep := _ , _ , .. , _ ,, _ , .. , _ }" defined at level 96
have incompatible prefixes. One of them will likely not work.
[notation-incompatible-prefix,parsing,default]
File "./src/ADTRefinement/GeneralBuildADTRefinements.v", line 19, characters 17-35:
Warning: Coq.Strings.String has been replaced by Stdlib.Strings.String.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "./src/ADTRefinement/GeneralBuildADTRefinements.v", line 19, characters 2-36:
Warning: Use of “Require” inside a section is fragile. It is not recommended
to use this functionality in finished proof scripts.
[require-in-section,fragile,default]
File "./src/ADTRefinement/GeneralBuildADTRefinements.v", line 20, characters 2-32:
Warning: Adding and removing hints in the core database implicitly is
deprecated. Please specify a hint database.
[implicit-core-hint-db,deprecated-since-8.10,deprecated,default]
COQC src/ADTRefinement/BuildADTRefinements/HoneRepresentation.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin///coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig -q -compat 8.4 -w unsupported-attributes -w -deprecated-native-compiler-option -native-compiler no -w -deprecated-appcontext\ -notation-overridden -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src Fiat -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock Bedrock src/ADTRefinement/BuildADTRefinements/HoneRepresentation.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.yxeBmBkrKc
MINIMIZER_DEBUG: files:  src/ADTRefinement/BuildADTRefinements/HoneRepresentation.v
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
File "./src/ADTRefinement/BuildADTRefinements/HoneRepresentation.v", line 1, characters 15-29:
Warning: Coq.Lists.List has been replaced by Stdlib.Lists.List.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "./src/ADTRefinement/BuildADTRefinements/HoneRepresentation.v", line 1, characters 0-535:
Warning: Notations "Def Constructor0 _ : rep := _" defined at level 94
and "Def ADT { rep := _ , _ , .. , _ ,, _ , .. , _ }" defined at level 96
have incompatible prefixes. One of them will likely not work.
[notation-incompatible-prefix,parsing,default]
COQC src/Common/FMapExtensions/LiftRelationInstances.v
MINIMIZER_DEBUG_EXTRA: coqc: /github/workspace/builds/coq/coq-failing/_install_ci/bin///coqc
MINIMIZER_DEBUG_EXTRA: coqpath: 
MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers
MINIMIZER_DEBUG_EXTRA: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig -q -compat 8.4 -w unsupported-attributes -w -deprecated-native-compiler-option -native-compiler no -w -deprecated-appcontext\ -notation-overridden -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src/Common/Tactics -I /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/src Fiat -R /github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers/Bedrock Bedrock src/Common/FMapExtensions/LiftRelationInstances.v 
MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.AxP1ug9IHm
MINIMIZER_DEBUG: files:  src/Common/FMapExtensions/LiftRelationInstances.v
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
File "./src/Common/FMapExtensions/LiftRelationInstances.v", line 88, characters 8-12:
Error:
 (in proof lift_relation_gen_hetero_homo_Proper_Proper_subrelation_iffR): Attempt to save an incomplete proof
(there are remaining open goals).

make[1]: *** [Makefile.coq:804: src/Common/FMapExtensions/LiftRelationInstances.vo] Error 1
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/fiat_parsers'
+ code=2
+ printf '\n%s exit code: %s\n' fiat_parsers 2
+ echo 'Aggregating timing log...'
Aggregating timing log...
+ echo

+ tools/make-one-time-file.py --real fiat_parsers.log
    Time | Peak Mem | File Name            
-------------------------------------------
0m00.02s | 19332 ko | Total Time / Peak Mem
-------------------------------------------
0m00.02s | 19332 ko | conftest.cmx         
+ '[' '' ']'
+ exit 2
make: *** [Makefile.ci:192: ci-fiat_parsers] Error 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 190KiB file on GitHub Actions Artifacts under bug.log)
d/bug_01.glob

No Requires to split.

In order to efficiently manipulate the file, I have to break it into statements.  I will attempt to do this by matching on periods.
�[92m
Splitting successful.�[0m

I will now attempt to remove any lines after the line which generates the error.
�[92m
Trimming successful.  We removed all lines after 189; the error was on line 189.�[0m

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

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 replace Qed Obligation with Admit Obligations
�[92m
Admitting Qed Obligations successful.�[0m
Failed to do everything at once; trying one at a time.
Admitting Qed Obligations unsuccessful.
No successful changes.

I will now attempt to replace Qeds with Admitteds

Non-fatal error: Failed to admit Qeds and preserve the error.  
The new error was:
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
File "/tmp/tmpar46hh1z/Fiat/Common/FMapExtensions/LiftRelationInstances.v", line 123, characters 7-30:
Warning: Coq.FSets.FMapInterface has been replaced by
Stdlib.FSets.FMapInterface.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
Error: The section rel and module FMapExtensionsLiftRelationInstances_fun
need to be closed.


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

I will now attempt to replace Qeds with admit. Defined.

Non-fatal error: Failed to admit Qeds and preserve the error.  
The new error was:
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
File "/tmp/tmpy3ac0bcc/Fiat/Common/FMapExtensions/LiftRelationInstances.v", line 123, characters 7-30:
Warning: Coq.FSets.FMapInterface has been replaced by
Stdlib.FSets.FMapInterface.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpy3ac0bcc/Fiat/Common/FMapExtensions/LiftRelationInstances.v", line 186, characters 0-8:
Error:
 (in proof lift_relation_gen_hetero_homo_Proper_Proper_subrelation_iffR): 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 Qeds unsuccessful.
No successful changes.

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 admit [abstract ...]s
�[92m
Admitting [abstract ...] successful.�[0m
�[92m
Admitting [abstract ...] successful.�[0m
Admitting [abstract ...] unsuccessful.
Admitting [abstract ...] 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 replace Obligation with Admit Obligations
�[92m
Admitting Obligations successful.�[0m
Failed to do everything at once; trying one at a time.
Admitting Obligations unsuccessful.
No successful changes.

I will now attempt to admit lemmas with Admitted
�[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 Admitted

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
File "/tmp/tmpar46hh1z/Fiat/Common/FMapExtensions/LiftRelationInstances.v", line 123, characters 7-30:
Warning: Coq.FSets.FMapInterface has been replaced by
Stdlib.FSets.FMapInterface.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
Error: The section rel and module FMapExtensionsLiftRelationInstances_fun
need to be closed.


�[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
�[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

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
While loading initial state:
Warning: Did not find compatibility module Coq84 with prefix Stdlib.
[compatibility-module-not-found,filesystem,default]
File "/tmp/tmpy3ac0bcc/Fiat/Common/FMapExtensions/LiftRelationInstances.v", line 123, characters 7-30:
Warning: Coq.FSets.FMapInterface has been replaced by
Stdlib.FSets.FMapInterface.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpy3ac0bcc/Fiat/Common/FMapExtensions/LiftRelationInstances.v", line 186, characters 0-8:
Error:
 (in proof lift_relation_gen_hetero_homo_Proper_Proper_subrelation_iffR): 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 export modules
Module exportation unsuccessful.

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

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

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

I will now attempt to remove goals ending in [Abort.]
�[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 empty sections

No empty sections to remove.

Now, I will attempt to strip repeated newlines and trailing spaces from this file...
�[92m
Succeeded in stripping newlines and spaces.�[0m

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 Nov 12, 2024

Partially Minimized File /home/runner/work/run-coq-bug-minimizer/run-coq-bug-minimizer/builds/coq/coq-failing/_build_ci/unimath/UniMath/AlgebraicTheories/Combinators.v (from ci-unimath) (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!

⭐ 🏗️ Partially Minimized Coq File (could not inline Ltac2.Notations)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-noinit" "-indices-matter" "-type-in-type" "-w" "-notation-overridden" "-w" "-deprecated-native-compiler-option" "-native-compiler" "no" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/unimath/UniMath" "UniMath" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2" "Ltac2" "-top" "UniMath.AlgebraicTheories.Combinators") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 2076 lines to 53 lines, then from 66 lines to 121 lines, then from 126 lines to 67 lines, then from 80 lines to 544 lines, then from 550 lines to 81 lines, then from 95 lines to 500 lines, then from 506 lines to 96 lines, then from 110 lines to 433 lines, then from 439 lines to 155 lines, then from 169 lines to 544 lines, then from 550 lines to 170 lines, then from 184 lines to 518 lines, then from 524 lines to 204 lines, then from 218 lines to 557 lines, then from 561 lines to 267 lines, then from 281 lines to 538 lines, then from 544 lines to 291 lines, then from 305 lines to 2633 lines, then from 2603 lines to 296 lines, then from 310 lines to 2483 lines, then from 2431 lines to 306 lines, then from 319 lines to 3402 lines, then from 3274 lines to 309 lines, then from 323 lines to 1112 lines, then from 1084 lines to 313 lines, then from 327 lines to 1494 lines, then from 1486 lines to 313 lines, then from 327 lines to 1690 lines, then from 1558 lines to 312 lines, then from 326 lines to 807 lines, then from 813 lines to 326 lines, then from 340 lines to 1732 lines, then from 1637 lines to 330 lines, then from 344 lines to 4387 lines, then from 4298 lines to 368 lines, then from 382 lines to 587 lines, then from 592 lines to 416 lines, then from 430 lines to 639 lines, then from 645 lines to 464 lines, then from 470 lines to 465 lines *)
(* coqc version 9.0+alpha compiled with OCaml 4.14.1
   coqtop version runner-t7b1znuaq-project-4504-concurrent-0:/builds/coq/coq/_build/default,(HEAD detached at c04db99c8cfbe3) (c04db99c8cfbe3fa002bf604971eb5b0e09656d4)
   Modules that could not be inlined: Ltac2.Notations
   Expected coqc runtime on this file: 0.213 sec *)
Require Ltac2.Notations.

Inductive False : Prop := .
Axiom proof_admitted : False.
Tactic Notation "admit" := abstract case proof_admitted.

Export Coq.Init.Notations.

Export Stdlib.Init.Ltac.

Notation "'∏'  x .. y , P" := (forall x, .. (forall y, P) ..)
  (at level 200, x binder, y binder, right associativity) : type_scope.

Notation "'λ' x .. y , t" := (fun x => .. (fun y => t) ..)
  (at level 200, x binder, y binder, right associativity).

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

Notation "x → y" := (x -> y)
  (at level 99, y at level 200, right associativity): type_scope.

Reserved Notation "X ≃ Y" (at level 80, no associativity).

Reserved Notation "f ~ g" (at level 70, no associativity).

Reserved Notation "p @ q" (at level 60, right associativity).

Reserved Notation "A × B" (at level 75, right associativity).

Reserved Notation "a --> b" (at level 55).

Reserved Notation "! p " (at level 50, left associativity).

Reserved Notation "X ⨿ Y" (at level 50, left associativity).

Reserved Notation "x ,, y" (at level 60, right associativity).

Ltac simple_rapply p :=
  simple refine p ||
  simple refine (p _) ||
  simple refine (p _ _) ||
  simple refine (p _ _ _) ||
  simple refine (p _ _ _ _) ||
  simple refine (p _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _ _ _ _ _ _ _ _) ||
  simple refine (p _ _ _ _ _ _ _ _ _ _ _ _ _ _ _).

Tactic Notation "use" uconstr(p) := simple_rapply p.

Definition UU := Type.

Identity Coercion fromUUtoType : UU >-> Sortclass.

Inductive unit : UU :=
    tt : unit.

Inductive coprod (A B:UU) : UU :=
| ii1 : A -> coprod A B
| ii2 : B -> coprod A B.
Arguments ii1 {_ _} _.
Arguments ii2 {_ _} _.

Notation inl := ii1.

Notation inr := ii2.

Notation "X ⨿ Y" := (coprod X Y).

Inductive nat : UU :=
  | O : nat
  | S : nat -> nat.
Open Scope nat_scope.

Fixpoint add n m :=
  match n with
  | O => m
  | S p => S (p + m)
  end
where "n + m" := (add n m) : nat_scope.

Notation  "0" := (O) : nat_scope.
Notation  "1" := (S 0) : nat_scope.

Inductive paths {A:UU} (a:A) : A -> UU := paths_refl : paths a a.
Notation "a = b" := (paths a b) : type_scope.

Record total2 { T: UU } ( P: T -> UU ) := tpair { pr1 : T; pr2 : P pr1 }.

Arguments tpair {_} _ _ _.
Arguments pr1 {_ _} _.
Arguments pr2 {_ _} _.

Notation "'∑'  x .. y , P" := (total2 (λ x, .. (total2 (λ y, P)) ..))
  (at level 200, x binder, y binder, right associativity) : type_scope.

Notation "x ,, y" := (tpair _ x y).

Definition idfun (T : UU) := λ t:T, t.

Definition funcomp {X Y : UU} {Z:Y->UU} (f : X -> Y) (g : ∏ y:Y, Z y) := λ x, g (f x).

Definition dirprod (X Y : UU) := ∑ x:X, Y.

Notation "A × B" := (dirprod A B) : type_scope.
Definition make_dirprod {X Y : UU} (x:X) (y:Y) : X × Y.
Admitted.

Definition pathscomp0 {X : UU} {a b c : X} (e1 : a = b) (e2 : b = c) : a = c.
Admitted.

Notation "p @ q" := (pathscomp0 p q).

Definition pathsinv0 {X : UU} {a b : X} (e : a = b) : b = a.
Admitted.

Notation "! p " := (pathsinv0 p).

Definition maponpaths {T1 T2 : UU} (f : T1 -> T2) {t1 t2 : T1}
           (e: t1 = t2) : f t1 = f t2.
Admitted.

Definition homot {X : UU} {P : X -> UU} (f g : ∏ x : X, P x) := ∏ x : X , f x = g x.

Notation "f ~ g" := (homot f g).
Definition isweq {X Y : UU} (f : X -> Y) : UU.
Admitted.
Definition weq (X Y : UU) : UU.
exact (∑ f:X->Y, isweq f).
Defined.

Notation "X ≃ Y" := (weq X%type Y%type) : type_scope.

Definition pr1weq {X Y : UU} := pr1 : X ≃ Y -> (X -> Y).
Coercion pr1weq : weq >-> Funclass.
Fixpoint isofhlevel (n : nat) (X : UU) : UU.
Admitted.

Definition isaprop := isofhlevel 1.

Definition funextsecStatement :=
  ∏ (T:UU) (P:T -> UU) (f g :∏ t:T, P t), f ~ g -> f = g.

Definition funextfunStatement :=
  ∏ (X Y:UU) (f g : X -> Y), f ~ g -> f = g.

Theorem funextfunImplication : funextsecStatement -> funextfunStatement.
Admitted.
Definition funextsec : funextsecStatement.
Admitted.

Definition funextfun := funextfunImplication (@funextsec).

Definition hProp := total2 (λ X : UU, isaprop X).
Definition hProptoType := @pr1 _ _ : hProp -> UU.
Coercion hProptoType : hProp >-> UU.
Definition hSet : UU.
Admitted.
Definition pr1hSet : hSet -> UU.
Admitted.
Coercion pr1hSet: hSet >-> UU.
Definition natgth (n m : nat) : hProp.
Admitted.

Notation " x > y " := (natgth x y) : nat_scope.

Definition natlth (n m : nat) := m > n.

Notation " x < y " := (natlth x y) : nat_scope.

Definition stn ( n : nat ) := ∑ m, m < n.

Notation "⟦ n ⟧" := (stn n) : stn.
Definition stnweq {n : nat}
  : stn n ⨿ unit ≃ stn (1 + n).
Admitted.

Definition extend_tuple
  {T : UU}
  {n : nat}
  (f : stn n → T)
  (last : T)
  : stn (S n) → T.
Admitted.

Lemma extend_tuple_inl
  {T : UU}
  {n : nat}
  (f : stn n → T)
  (last : T)
  (i : stn n)
  : extend_tuple f last (stnweq (inl i)) = f i.
Admitted.

Lemma extend_tuple_inr
  {T : UU}
  {n : nat}
  (f : stn n → T)
  (last : T)
  (t : unit)
  : extend_tuple f last (stnweq (inr t)) = last.
Admitted.
Definition precategory_ob_mor : UU.
exact (∑ ob : UU, ob -> ob -> UU).
Defined.
Definition make_precategory_ob_mor (ob : UU)(mor : ob -> ob -> UU) :
    precategory_ob_mor.
exact (tpair _ ob mor).
Defined.
Definition ob (C : precategory_ob_mor) : UU.
exact (@pr1 _ _ C).
Defined.
Coercion ob : precategory_ob_mor >-> UU.
Definition precategory_morphisms { C : precategory_ob_mor } :
       C ->  C -> UU.
exact (pr2 C).
Defined.

Declare Scope cat.

Local Open Scope cat.

Notation "a --> b" := (precategory_morphisms a b) : cat.
Definition precategory_id_comp (C : precategory_ob_mor) : UU.
exact ((∏ c : C, c --> c)
      ×
    (∏ a b c : C, a --> b -> b --> c -> a --> c)).
Defined.
Definition precategory_data : UU.
exact (∑ C : precategory_ob_mor, precategory_id_comp C).
Defined.
Definition make_precategory_data (C : precategory_ob_mor)
    (id : ∏ c : C, c --> c)
    (comp: ∏ a b c : C, a --> b -> b --> c -> a --> c)
  : precategory_data.
exact (tpair _ C (make_dirprod id comp)).
Defined.
Definition precategory_ob_mor_from_precategory_data (C : precategory_data) :
     precategory_ob_mor.
exact (pr1 C).
Defined.
Coercion precategory_ob_mor_from_precategory_data :
  precategory_data >-> precategory_ob_mor.
Definition is_precategory (C : precategory_data) : UU.
Admitted.

Definition precategory := total2 is_precategory.
Definition make_precategory (C : precategory_data) (H : is_precategory C)
  : precategory.
exact (tpair _ C H).
Defined.
Definition precategory_data_from_precategory (C : precategory) :
       precategory_data.
exact (pr1 C).
Defined.
Coercion precategory_data_from_precategory : precategory >-> precategory_data.
Definition has_homsets (C : precategory_ob_mor) : UU.
Admitted.

Definition category := ∑ C:precategory, has_homsets C.
Definition make_category C h : category := C,,h.
Definition category_to_precategory : category -> precategory.
exact (pr1).
Defined.
Coercion category_to_precategory : category >-> precategory.

Section IndexedSetCategory.

  Context (I : UU).

  Definition indexed_set_cat
    : category.
  Proof.
    use make_category.
    -
 use make_precategory.
      +
 use make_precategory_data.
        *
 use make_precategory_ob_mor.
          --
 exact (I → hSet).
          --
 intros X Y.
            exact (∏ i, X i → Y i).
        *
 intros X i.
          apply idfun.
        *
 intros X Y Z f g i.
          exact (funcomp (f i) (g i)).
      +
 admit.
    -
 admit.
  Defined.

  End IndexedSetCategory.
Definition var_ax
    (T : indexed_set_cat nat)
    (n : nat)
    (i : stn n)
    : UU.
exact (T n).
Defined.
Definition subst_ax
    (T : indexed_set_cat nat)
    (m n : nat)
    (f : T m)
    (g : stn m → T n)
    : UU.
exact (T n).
Defined.

Declare Scope algebraic_theories.
Local Open Scope algebraic_theories.
Definition algebraic_theory_data : UU.
Admitted.
Definition algebraic_theory_data_to_function
  (T : algebraic_theory_data)
  : nat → hSet.
Admitted.

Coercion algebraic_theory_data_to_function : algebraic_theory_data >-> Funclass.
Definition var
  {T : algebraic_theory_data}
  {n : nat}
  (i : stn n)
  : var_ax T n i.
Admitted.
Definition subst
  {T : algebraic_theory_data}
  {m n : nat}
  (f : T m)
  (g : stn m → T n)
  : subst_ax T m n f g.
admit.
Defined.

Notation "f • g" :=
  (subst f g)
  (at level 35) : algebraic_theories.
Definition algebraic_theory : UU.
Admitted.
Coercion algebraic_theory_to_algebraic_theory_data (T : algebraic_theory)
  : algebraic_theory_data.
Admitted.
Definition var_subst_ax
  (T : algebraic_theory_data)
  (m n : nat)
  (i : stn m)
  (f : stn m → T n)
  : UU.
exact (var i • f = f i).
Defined.
Definition var_subst
  (T : algebraic_theory)
  {m n : nat}
  (i : stn m)
  (f : stn m → T n)
  : var_subst_ax (T : algebraic_theory_data) m n i f.
Admitted.
Definition inflate {T : algebraic_theory_data} {n : nat} (f : T n) : T (S n).
Admitted.
Definition inflate_subst (T : algebraic_theory) {m n : nat} (f : T m) (g : stn m → T n)
  : inflate (subst f g) = subst f (λ i, inflate (g i)).
Admitted.

Lemma subst_inflate (T : algebraic_theory) {m n : nat} (f : T m) (g : stn (S m) → T n)
  : subst (inflate f) g = subst f (λ i, g (stnweq (inl i))).
Admitted.
Definition app_ax
    (T : algebraic_theory)
    (n : nat)
    (f : T n)
    : UU.
exact (T (S n)).
Defined.
Definition abs_ax
    (T : algebraic_theory)
    (n : nat)
    (f : T (S n))
    : UU.
exact (T n).
Defined.
Definition lambda_theory_data : UU.
Admitted.
Coercion lambda_theory_data_to_algebraic_theory (L : lambda_theory_data)
  : algebraic_theory.
Admitted.
Definition appx {L : lambda_theory_data} {n : nat} (f : L n) : app_ax L n f.
Admitted.
Definition abs {L : lambda_theory_data} {n : nat} (f : L (S n)) : abs_ax L n f.
Admitted.
Definition lambda_theory : UU.
Admitted.
Coercion lambda_theory_to_lambda_theory_data (L : lambda_theory) : lambda_theory_data.
Admitted.
Definition subst_abs (L : lambda_theory) {m n : nat} (f : L (S m)) (g : stn m → L n)
  : subst (abs f) g = abs (subst f (extend_tuple (λ i, inflate (g i)) (var (stnweq (inr tt))))).
Admitted.
Definition app {L : lambda_theory_data} {n : nat} (f g : L n) : L n.
exact (appx f • extend_tuple var g).
Defined.

Lemma subst_app (L : lambda_theory) {m n : nat} (f g : L m) (h : stn m → L n)
  : subst (app f g) h = app (subst f h) (subst g h).
Admitted.
  Notation "( a b )" := (app a b) (only printing) : lambda_calculus.
  Notation "(λ' n , x )" := (@abs _ n x) (only printing) : lambda_calculus.

Export Ltac2.Init.
Export Ltac2.Notations.
Local Open Scope stn.
Local Open Scope lambda_calculus.
Definition compose
  {L : lambda_theory}
  {n : nat}
  (a b : L n)
  : L n.
exact (abs
    (app
      (inflate a)
      (app
        (inflate b)
        (var (stnweq (inr tt)))))).
Defined.

Notation "a ∘ b" :=
  (compose a b)
  (at level 40, left associativity)
  : lambda_calculus.

Lemma subst_compose
  (L : lambda_theory)
  {m n : nat}
  (a b : L m)
  (c : stn m → L n)
  : subst (a ∘ b) c = compose (subst a c) (subst b c).
Proof.
  refine '(subst_abs _ _ _ @ _).
  refine '(maponpaths (λ x, (abs x)) (subst_app _ _ _ _) @ _).
  refine '(maponpaths (λ x, (abs (app x _))) (subst_inflate _ _ _) @ _).
  refine '(maponpaths (λ x, (abs (app _ x))) (subst_app _ _ _ _) @ _).
  refine '(maponpaths (λ x, (abs (app _ (app x _)))) (subst_inflate _ _ _) @ _).
  refine '(maponpaths (λ x, (abs (app _ (app _ x)))) (var_subst _ _ _) @ _).
  refine '(maponpaths (λ x, (abs (app _ (app _ x)))) (extend_tuple_inr _ _ _) @ _).
  refine '(_ @ !maponpaths (λ x, (abs (app x _))) (inflate_subst _ _ _)).
  refine '(_ @ !maponpaths (λ x, (abs (app _ (app x _)))) (inflate_subst _ _ _)).
  refine '(
    maponpaths (λ x, abs (app (_ x) _)) _ @
    maponpaths (λ x, abs (app _ (app (_ x) _))) _
  );
    apply funextfun;
    intro i;
    exact (extend_tuple_inl _ _ _).
🛠️ Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted) (truncated to 6.0KiB; full 22KiB file on GitHub Actions Artifacts under tmp.v)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-noinit" "-indices-matter" "-type-in-type" "-w" "-notation-overridden" "-w" "-deprecated-native-compiler-option" "-native-compiler" "no" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_build_ci/unimath/UniMath" "UniMath" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2" "Ltac2" "-top" "UniMath.AlgebraicTheories.Combinators") -*- *)
(* File reduced by coq-bug-minimizer from original input, then from 2076 lines to 53 lines, then from 66 lines to 121 lines, then from 126 lines to 67 lines, then from 80 lines to 729 lines *)
(* coqc version 9.0+alpha compiled with OCaml 4.14.1
   coqtop version runner-t7b1znuaq-project-4504-concurrent-0:/builds/coq/coq/_build/default,(HEAD detached at c04db99c8cfbe3) (c04db99c8cfbe3fa002bf604971eb5b0e09656d4)
   Expected coqc runtime on this file: 0.000 sec *)
Require Coq.Init.Ltac.
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.
Require UniMath.AlgebraicTheories.LambdaTheories.
Require Ltac2.Init.
Require Ltac2.Bool.
Require Ltac2.Ind.
Require Ltac2.Int.
Require Ltac2.Message.
Require Ltac2.Std.
Require Ltac2.Control.
Require Ltac2.Option.
Require Ltac2.Pattern.
Require Ltac2.Array.
Require Ltac2.Constr.

Module Ltac2_DOT_Notations_WRAPPED.
Module Notations.
(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
Import Ltac2.Init.

(** Constr matching *)

Ltac2 Notation "lazy_match!" t(tactic(6)) "with" m(constr_matching) "end" :=
  Pattern.lazy_match0 t m.

Ltac2 Notation "multi_match!" t(tactic(6)) "with" m(constr_matching) "end" :=
  Pattern.multi_match0 t m.

Ltac2 Notation "match!" t(tactic(6)) "with" m(constr_matching) "end" :=
  Pattern.one_match0 t m.

(** Goal matching *)

Ltac2 Notation "lazy_match!" "goal" "with" m(goal_matching) "end" :=
  Pattern.lazy_goal_match0 false m.

Ltac2 Notation "multi_match!" "goal" "with" m(goal_matching) "end" :=
  Pattern.multi_goal_match0 false m.

Ltac2 Notation "match!" "goal" "with" m(goal_matching) "end" :=
  Pattern.one_goal_match0 false m.

Ltac2 Notation "lazy_match!" "reverse" "goal" "with" m(goal_matching) "end" :=
  Pattern.lazy_goal_match0 true m.

Ltac2 Notation "multi_match!" "reverse" "goal" "with" m(goal_matching) "end" :=
  Pattern.multi_goal_match0 true m.

Ltac2 Notation "match!" "reverse" "goal" "with" m(goal_matching) "end" :=
  Pattern.one_goal_match0 true m.

(** Tacticals *)

Ltac2 orelse t f :=
match Control.case t with
| Err e => f e
| Val ans =>
  let (x, k) := ans in
  Control.plus (fun _ => x) k
end.

Ltac2 ifcatch t s f :=
match Control.case t with
| Err e => f e
| Val ans =>
  let (x, k) := ans in
  Control.plus (fun _ => s x) (fun e => s (k e))
end.

Ltac2 fail0 (_ : unit) := Control.enter (fun _ => Control.zero (Tactic_failure None)).

Ltac2 Notation fail := fail0 ().

Ltac2 try0 t := Control.enter (fun _ => orelse t (fun _ => ())).

Ltac2 Notation try := try0.

Ltac2 rec repeat0 (t : unit -> unit) :=
  Control.enter (fun () =>
    ifcatch (fun _ => Control.progress t)
      (fun _ => Control.check_interrupt (); repeat0 t) (fun _ => ())).

Ltac2 Notation repeat := repeat0.

Ltac2 dispatch0 t (head, tail) :=
  match tail with
  | None => Control.enter (fun _ => t (); Control.dispatch head)
  | Some tacs =>
    let (def, rem) := tacs in
    Control.enter (fun _ => t (); Control.extend head def rem)
  end.

Ltac2 Notation t(thunk(self)) ">" "[" l(dispatch) "]" : 4 := dispatch0 t l.

Ltac2 do0 n t :=
  let rec aux n t := match Int.equal n 0 with
  | true => ()
  | false => t (); aux (Int.sub n 1) t
  end in
  aux (n ()) t.

Ltac2 Notation do := do0.

Ltac2 Notation once := Control.once.

Ltac2 Notation unshelve := Control.unshelve.

Ltac2 progress0 tac := Control.enter (fun _ => Control.progress tac).

Ltac2 Notation progress := progress0.

Ltac2 rec first0 tacs :=
match tacs with
| [] => Control.zero (Tactic_failure None)
| tac :: tacs => Control.enter (fun _ => orelse tac (fun _ => first0 tacs))
end.

Ltac2 Notation "first" "[" tacs(list0(thunk(tactic(6)), "|")) "]" := first0 tacs.

Ltac2 complete tac :=
  let ans := tac () in
  Control.enter (fun () => Control.zero (Tactic_failure None));
  ans.

Ltac2 rec solve0 tacs :=
match tacs with
| [] => Control.zero (Tactic_failure None)
| tac :: tacs =>
  Control.enter (fun _ => orelse (fun _ => complete tac) (fun _ => solve0 tacs))
end.

Ltac2 Notation "solve" "[" tacs(list0(thunk(tactic(6)), "|")) "]" := solve0 tacs.

Ltac2 time0 tac := Control.time None tac.

Ltac2 Notation time := time0.

Ltac2 abstract0 tac := Control.abstract None tac.

Ltac2 Notation abstract := abstract0.

(** Base tactics *)

(** Note that we redeclare notations that can be parsed as mere identifiers
    as abbreviations, so that it allows to parse them as function arguments
    without having to write them within parentheses. *)

(** Enter and check evar resolution *)
Ltac2 enter_h ev f arg :=
match ev with
| true => Control.enter (fun () => f ev (arg ()))
| false =>
  Control.enter (fun () =>
    Control.with_holes arg (fun x => f ev x))
end.

Ltac2 intros0 ev p :=
  Control.enter (fun () => Std.intros ev p).

Ltac2 Notation "intros" p(intropatterns) := intros0 false p.
Ltac2 Notation intros := intros.

Ltac2 Notation "eintros" p(intropatterns) := intros0 true p.
Ltac2 Notation eintros := eintros.

Ltac2 sp
🛠️ 📜 Intermediate Coq File log (useful for debugging if minimization did not go as far as you wanted)
File "/tmp/tmpgrj0jp8g/UniMath/AlgebraicTheories/Combinators.v", line 6, characters 8-21:
Warning: Coq.Init.Ltac has been replaced by Stdlib.Init.Ltac.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpgrj0jp8g/UniMath/AlgebraicTheories/Combinators.v", line 12, characters 7-20:
Warning: Coq.Init.Ltac has been replaced by Stdlib.Init.Ltac.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpgrj0jp8g/UniMath/AlgebraicTheories/Combinators.v", line 645, characters 28-35:
Error: The reference f_equal was not found in the current environment.
📜 Build Log (contains the Coq error message) (truncated to last 8.0KiB; full 4.3MiB file on GitHub Actions Artifacts under build.log)
oryTheory/Actegories/ConstructionOfActegoryMorphisms.vo              
 0m06.58s |  523108 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/Composition/WhiskerLaws.vo        
 0m06.32s |  463396 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/Composition/BicatLaws.vo          
 0m06.25s |  517036 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/Composition/OtherLaws.vo          
 0m06.20s |  477352 ko | UniMath/CategoryTheory/EnrichedCats/Examples/GraphEnriched.vo                     
 0m04.69s |  447784 ko | UniMath/CategoryTheory/EnrichedCats/YonedaLemma.vo                                
 0m04.05s |  413188 ko | UniMath/CategoryTheory/Monoidal/Examples/LiftPoset.vo                             
 0m04.04s |  424520 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/Composition/Unitors.vo            
 0m03.98s |  434468 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/Composition/Whiskering.vo         
 0m03.93s |  394256 ko | UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/PERConstantObjects.vo         
 0m03.25s |  419188 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/Composition/SquareComp.vo         
 0m03.18s |  466992 ko | UniMath/CategoryTheory/Monoidal/Examples/SmashProductMonoidal.vo                  
 0m02.93s |  393244 ko | UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/PERTerminal.vo                
 0m02.05s |  394144 ko | UniMath/CategoryTheory/DisplayedCats/Examples/PointedPosetStrict.vo               
 0m01.62s |  387196 ko | UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/PERInitial.vo                 
 0m01.62s |  398236 ko | UniMath/CategoryTheory/Limits/Examples/AlgebraStructuresColimits.vo               
 0m01.32s |  416024 ko | UniMath/CategoryTheory/EnrichedCats/Examples/CollageEnriched.vo                   
 0m01.22s |  399792 ko | UniMath/CategoryTheory/DisplayedCats/MonoCodomain/MonoCodRightAdjoint.vo          
 0m01.16s |  399904 ko | UniMath/CategoryTheory/Monoidal/Comonoids/Tensor.vo                               
 0m01.09s |  397464 ko | UniMath/AlgebraicTheories/Examples/ExtensionsTheory.vo                            
 0m01.03s |  401156 ko | UniMath/CategoryTheory/EnrichedCats/Limits/Examples/PosetEnrichedLimits.vo        
 0m00.98s |  394348 ko | UniMath/CategoryTheory/DisplayedCats/Examples/AlgebraStructures.vo                
 0m00.97s |  405852 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/RepresentableLaws.vo              
 0m00.93s |  396444 ko | UniMath/AlgebraicTheories/Examples/EndomorphismTheory.vo                          
 0m00.88s |  396484 ko | UniMath/CategoryTheory/Monoidal/Comonoids/Category.vo                             
 0m00.77s |  397916 ko | UniMath/CategoryTheory/EnrichedCats/Examples/SmashStructureEnriched.vo            
 0m00.73s |  391844 ko | UniMath/AlgebraicTheories/PresheafCategory.vo                                     
 0m00.66s |  398544 ko | UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/PosetEnrichedColimits.vo    
 0m00.65s |  398252 ko | UniMath/CategoryTheory/Monoidal/Comonoids/Monoidal.vo                             
 0m00.61s |  394736 ko | UniMath/CategoryTheory/EnrichedCats/Examples/PosetEnriched.vo                     
 0m00.59s |  390140 ko | UniMath/CategoryTheory/DisplayedCats/Structures/StructureLimitsAndColimits.vo     
 0m00.58s |  516460 ko | UniMath/CategoryTheory/All.vo                                                     
 0m00.56s |  392408 ko | UniMath/CategoryTheory/EnrichedCats/Examples/StructureEnriched.vo                 
 0m00.50s |  395920 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/Invertible.vo                     
 0m00.49s |  387168 ko | UniMath/CategoryTheory/DisplayedCats/MonoCodomain/MonoCodLimits.vo                
 0m00.47s |  392752 ko | UniMath/CategoryTheory/Monoidal/Comonoids/MonoidalCartesianBuilder.vo             
 0m00.44s |  389972 ko | UniMath/CategoryTheory/Actegories/Examples/SelfActionInCATElementary.vo           
 0m00.43s |  397364 ko | UniMath/CategoryTheory/Monoidal/Comonoids/Symmetric.vo                            
 0m00.42s |  392904 ko | UniMath/AlgebraicTheories/Examples/FreeMonoidTheory.vo                            
 0m00.42s |  389216 ko | UniMath/CategoryTheory/Hyperdoctrines/PartialEqRels/PERExponentials.vo            
 0m00.40s |  388804 ko | UniMath/AlgebraicTheories/AlgebraCategory.vo                                      
 0m00.40s |  389572 ko | UniMath/AlgebraicTheories/Examples/FreeObjectTheory.vo                            
 0m00.40s |  392100 ko | UniMath/CategoryTheory/EnrichedCats/Examples/QuantaleEnriched.vo                  
 0m00.40s |  391388 ko | UniMath/CategoryTheory/Monoidal/Comonoids/TransportComonoidAlongRetraction.vo     
 0m00.39s |  393508 ko | UniMath/CategoryTheory/Monoidal/Comonoids/CartesianAsComonoids.vo                 
 0m00.38s |  388816 ko | UniMath/AlgebraicTheories/AlgebraicTheoryToLawvereTheory.vo                       
 0m00.38s |  385336 ko | UniMath/AlgebraicTheories/LambdaTheoryCategory.vo                                 
 0m00.37s |  392360 ko | UniMath/CategoryTheory/Monoidal/Comonoids/CommComonoidsCartesian.vo               
 0m00.36s |  388776 ko | UniMath/CategoryTheory/DisplayedCats/Structures/StructuresSmashProduct.vo         
 0m00.33s |  361184 ko | UniMath/AlgebraicTheories/Examples/FreeTheory.vo                                  
 0m00.30s |  372332 ko | UniMath/CategoryTheory/DisplayedCats/Examples/MonadAlgebras.vo                    
 0m00.29s |  369956 ko | UniMath/CategoryTheory/DisplayedCats/Examples/PointedSetStructures.vo             
 0m00.28s |  269620 ko | UniMath/AlgebraicTheories/AlgebraicTheoryToMonoid.vo                              
 0m00.27s |  299496 ko | UniMath/AlgebraicTheories/Combinators.vo                                          
 0m00.26s |  242908 ko | UniMath/AlgebraicTheories/Algebras.vo                                             
 0m00.26s |  254212 ko | UniMath/AlgebraicTheories/LambdaTheoryMorphisms.vo                                
 0m00.26s |  315988 ko | UniMath/AlgebraicTheories/PresheafMorphisms.vo                                    
 0m00.25s |  217748 ko | UniMath/CategoryTheory/DisplayedCats/Examples/DCPOStructures.vo                   
 0m00.25s |  228496 ko | UniMath/CategoryTheory/DisplayedCats/MonoCodomain/MonoHyperdoctrine.vo            
 0m00.24s |  223344 ko | UniMath/AlgebraicTheories/AlgebraMorphisms.vo                                     
 0m00.24s |  210944 ko | UniMath/CategoryTheory/DisplayedCats/Examples/PointedDCPOStrict.vo                
 0m00.24s |  211356 ko | UniMath/OrderTheory/All.vo                                                        
 0m00.23s |  188848 ko | UniMath/CategoryTheory/DisplayedCats/Examples/PointedDCPOStructures.vo            
 0m00.23s |  240256 ko | UniMath/CategoryTheory/DisplayedCats/Examples/PosetStructures.vo                  
 0m00.23s |  209740 ko | UniMath/CategoryTheory/EnrichedCats/RezkCompletion/RezkUniversalProperty.vo       
 0m00.22s |  170520 ko | UniMath/AlgebraicTheories/Examples/ProjectionsTheory.vo                           
 0m00.22s |  178268 ko | UniMath/CategoryTheory/EnrichedCats/RezkCompletion/EnrichedRezkCompletion.vo      
 0m00.22s |  168392 ko | UniMath/CategoryTheory/Monoidal/Examples/PosetsMonoidal.vo                        
 0m00.21s |  172728 ko | UniMath/AlgebraicTheories/Examples/OnePointTheory.vo                              
 0m00.21s |  179076 ko | UniMath/AlgebraicTheories/Examples/TheoryAlgebra.vo                               
 0m00.21s |  202460 ko | UniMath/CategoryTheory/DisplayedCats/Examples/SetStructures.vo                    
 0m00.21s |  189664 ko | UniMath/CategoryTheory/EnrichedCats/Profunctors/Composition.vo                    
 0m00.21s |  189540 ko | UniMath/CategoryTheory/Hyperdoctrines/TriposToTopos.vo                            
 0m00.21s |  164876 ko | UniMath/CategoryTheory/Monoidal/Examples/StructuresMonoidal.vo                    
 0m00.20s |  197868 ko | UniMath/CategoryTheory/DisplayedCats/Examples/PointedPosetStructures.vo           
+ '[' '' ']'
+ exit 2
make: *** [Makefile.ci:192: ci-unimath] Error 2
/github/workspace/builds/coq /github/workspace
::endgroup::
📜 🔎 Minimization Log (truncated to last 8.0KiB; full 1.4MiB file on GitHub Actions Artifacts under bug.log)
tations.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 173, characters 0-38:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope stn.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 175, characters 28-33:
Error: Unknown interpretation for notation "_ + _".


�[93mIntermediate code not saved.�[0m

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

Non-fatal error: Failed to remove non-instance definitions and preserve the error.  
The new error was:
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 7, characters 7-25:
Warning: Coq.Init.Notations has been replaced by Stdlib.Init.Notations.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 173, characters 0-38:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope stn.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 175, characters 28-33:
Error: Unknown interpretation for notation "_ + _".


�[93mIntermediate code not saved.�[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 replace Obligation with Admit Obligations
�[92m
Admitting Obligations successful.�[0m
Failed to do everything at once; trying one at a time.
Admitting Obligations unsuccessful.
No successful changes.

I will now attempt to admit lemmas with Admitted

Non-fatal error: Failed to admit lemmas and preserve the error.  
The new error was:
File "/tmp/tmpyxrglxlc/UniMath/AlgebraicTheories/Combinators.v", line 7, characters 7-25:
Warning: Coq.Init.Notations has been replaced by Stdlib.Init.Notations.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpyxrglxlc/UniMath/AlgebraicTheories/Combinators.v", line 180, characters 0-38:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope stn.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpyxrglxlc/UniMath/AlgebraicTheories/Combinators.v", line 416, characters 2-68:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope lambda_calculus.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]

�[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 Admitted

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
File "/tmp/tmp0bzzhfx2/UniMath/AlgebraicTheories/Combinators.v", line 7, characters 7-25:
Warning: Coq.Init.Notations has been replaced by Stdlib.Init.Notations.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmp0bzzhfx2/UniMath/AlgebraicTheories/Combinators.v", line 140, characters 32-35:
Error:
In environment
X : UU
Y : UU
The term "pr1" has type "(∑ y, ?P y) → ?T" while it is expected to have type
 "X ≃ Y → X → Y".


�[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

Non-fatal error: Failed to admit lemmas and preserve the error.  
The new error was:
File "/tmp/tmpg4aem7sm/UniMath/AlgebraicTheories/Combinators.v", line 7, characters 7-25:
Warning: Coq.Init.Notations has been replaced by Stdlib.Init.Notations.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpg4aem7sm/UniMath/AlgebraicTheories/Combinators.v", line 180, characters 0-38:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope stn.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpg4aem7sm/UniMath/AlgebraicTheories/Combinators.v", line 416, characters 2-68:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope lambda_calculus.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpg4aem7sm/UniMath/AlgebraicTheories/Combinators.v", line 448, characters 0-8:
Error:  (in proof subst_compose): 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

Non-fatal error: Failed to admit definitions and preserve the error.  
The new error was:
File "/tmp/tmpm0u0i1zp/UniMath/AlgebraicTheories/Combinators.v", line 7, characters 7-25:
Warning: Coq.Init.Notations has been replaced by Stdlib.Init.Notations.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpm0u0i1zp/UniMath/AlgebraicTheories/Combinators.v", line 141, characters 32-35:
Error:
In environment
X : UU
Y : UU
The term "pr1" has type "(∑ y, ?P y) → ?T" while it is expected to have type
 "X ≃ Y → X → Y".


�[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 export modules
Module exportation unsuccessful.

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

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

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

I will now attempt to remove goals ending in [Abort.]
�[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

Non-fatal error: Failed to remove definitions and preserve the error.  
The new error was:
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 7, characters 7-25:
Warning: Coq.Init.Notations has been replaced by Stdlib.Init.Notations.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 173, characters 0-38:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope stn.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 175, characters 28-33:
Error: Unknown interpretation for notation "_ + _".


�[93mIntermediate code not saved.�[0m

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

Non-fatal error: Failed to remove non-instance definitions and preserve the error.  
The new error was:
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 7, characters 7-25:
Warning: Coq.Init.Notations has been replaced by Stdlib.Init.Notations.
[deprecated-dirpath-Coq,deprecated-since-9.0,deprecated,default]
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 173, characters 0-38:
Warning: Declaring a scope implicitly is deprecated; use in advance an
explicit "Declare Scope stn.".
[undeclared-scope,deprecated-since-8.10,deprecated,default]
File "/tmp/tmpbcqwg86h/UniMath/AlgebraicTheories/Combinators.v", line 175, characters 28-33:
Error: Unknown interpretation for notation "_ + _".


�[93mIntermediate code not saved.�[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 empty sections

No empty sections to remove.

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

No strippable newlines or spaces.

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

cc @JasonGross

@ppedrot
Copy link
Member

ppedrot commented Nov 12, 2024

@Tragicus could you assess whether the minimized examples are legitimate changes in unification after your patch? Thanks.

@coqbot-app

This comment was marked as outdated.

@coqbot-app

This comment was marked as outdated.

@coqbot-app

This comment was marked as outdated.

@coqbot-app

This comment was marked as outdated.

@coqbot-app

This comment was marked as outdated.

@coqbot-app

This comment was marked as outdated.

@JasonGross
Copy link
Member

bug minimizer should work on ci-iris now with rocq-community/run-coq-bug-minimizer@5b6d818: @coqbot ci minimize ci-iris

@coqbot-app

This comment was marked as outdated.

@coqbot-app

This comment was marked as outdated.

@JasonGross

This comment was marked as outdated.

@coqbot-app

This comment was marked as outdated.

@coqbot-app

This comment was marked as outdated.

JasonGross added a commit to rocq-community/run-coq-bug-minimizer that referenced this pull request Nov 13, 2024
@JasonGross
Copy link
Member

hopefully third time's the charm: @coqbot ci minimize ci-iris

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Nov 13, 2024

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

@Tragicus
Copy link
Contributor Author

It does not work either.

@SkySkimmer
Copy link
Contributor

It seems that the iris issue is caused by ?x == ?y a being solved by ?x := ?y a instead of ?y := ?x, where the later would inherit_evar_flags but the new behaviour doesn't. ?x is shelved prealably and the lack of evar aliasing info means ?y doesn't end up shelved.

@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 Dec 6, 2024
@Tragicus
Copy link
Contributor Author

Tragicus commented Dec 6, 2024

I added something in evarsolve/instantiate_evar to shelve the new variable when we instantiate on old shelved variable with it. However, this feels like it was doing the right thing and it is just that we should instantiate the new variable with the old one and not the converse.

@JasonGross
Copy link
Member

I added something in evarsolve/instantiate_evar to shelve the new variable when we instantiate on old shelved variable with it.

This seems wrong (as you say?)? If we have (untested)

Goal forall A : Prop, (exists x : A, True) /\ A.
simple refine (fun A => conj _ ?[a]).
epose _ as x.
exists x.
instantiate (1:=?a) in (value of x).

the final line should not shelve the second goal. This should probably be true whether we go through instantiate or unification, though I'm not 100% sure about that.

@github-actions github-actions bot added the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Dec 10, 2024
@coqbot-app coqbot-app bot removed the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Dec 17, 2024
@Tragicus
Copy link
Contributor Author

I unconvinced myself that this is wrong, because I only shelve when I instantiate an evar with an (applied) evar. @JasonGross In your example, the final line does not shelve the second goal.

@Tragicus
Copy link
Contributor Author

Can I see the rest of the CI?

@JasonGross
Copy link
Member

@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 Dec 17, 2024
@ppedrot ppedrot added the needs: progress Work in progress: awaiting action from the author. label May 14, 2025
@SkySkimmer
Copy link
Contributor

You can reopen if you can make progress

@Tragicus
Copy link
Contributor Author

Tragicus commented Oct 9, 2025

Things should be better now that #19987 is merged. Can we reopen (I do not seem to have the right to do it myself)?

@ppedrot
Copy link
Member

ppedrot commented Oct 9, 2025

I can't do that either, it's a github limitation. Seemingly you cannot reopen a PR if the branch has been pushed to another commit in the meantime. You should probably reopen a fresh one.

@Tragicus
Copy link
Contributor Author

Tragicus commented Oct 9, 2025

I see, thank you.

@JasonGross
Copy link
Member

If you force-push bbabba0 to the branch, you might then be able to reopen

@Tragicus
Copy link
Contributor Author

I reopened, we are losing a bit of discussion but this is not that much of a problem. But thank you anyway.

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

Labels

needs: progress Work in progress: awaiting action from the author. needs: test-suite update Test case should be added to / updated in the test-suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants