Repository navigation
Param_vector/Param_lemmas: repair make std and make hott on Rocq dev - #93
Open
JasonGross wants to merge 2 commits into
Open
JasonGross wants to merge 2 commits into
JasonGross wants to merge 2 commits into
Conversation
Rocq 9.3 no longer lets Asymmetric Patterns disable implicit arguments in patterns, so "cons _ a _" was read as the constructor applied to three explicit arguments and rejected. Writing the patterns as @COns _ _ a _ makes the number of arguments explicit and works under either convention. This only showed up in the std build because HoTT's Basics/Settings.v sets the compatibility flag globally. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9BGQT7XUuubV6C619DW4b
Destructing the record with move=> [R mR msR] now leaves let-bindings for the projections in the goal, and rewrite's keyed matching looks through the let head symbol, so it could not find e (e^-1 x). Running cbv zeta first substitutes them away and both rewrites apply again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9BGQT7XUuubV6C619DW4b
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make stdandmake hottare both red on the Rocq development branch. Two errors, in two files, both in the library rather than in the elpi code:What the change does
Two files, 7 lines.
generic/Param_vector.v— fiveconspatterns become@conspatterns, e.g.| cons _ a _ => a→| @cons _ _ a _ => a. HoTT'sVector.tnow elaboratescons's arguments differently in pattern position; writing the pattern with@fixes the arity explicitly and is version-independent.hott/Param_lemmas.v— tworewrite !equiv_invK/rewrite !equiv_funKcalls get acbv zetafirst. The goal at those points carries let-bindings that the rewrite's LHS pattern now has to see through;cbv zetaclears them and the existing rewrite goes through unchanged.Measured
Cold builds of pristine
master@a36529e6, and of the same tree with only those two files replaced:make stdmake hott.voErrorlinesmaster@a36529e6The patched tree was staged from
git archiveof the pristine commit with exactly those two files copied over;examples/std/flt3_step.vwas asserted byte-identical to upstream first, and the tree had 0.vobefore the build. 62 is the count on disk (25hott/, 24std/, 13generic/) —generic/is compiled once under each target, so the log shows more compile actions than there are files.examples/stdis red before and after, and this PR does not fix itEvery file under
examples/stdfails at its import line, on both the pristine and the patched tree:Line 15 is
From Trocq Require Import Stdlib Trocq.; the sibling files get the_ / _at level 40 variant. It is a notation-level clash between current mathcomp and Trocq's ownHoTTNotations, it hits all eight files in that directory, and nothing here addresses it.make -C examples/hottis exit 0 throughout.Open PRs
Seven are open. I intersected each one's changed-file list against this branch's two files; the intersection is empty in all seven cases, so nothing here needs to be sequenced behind anything. Two are worth naming because they sit next to work this branch deliberately leaves alone:
examples/std/{flt3_step,int_to_Zp,square_and_cube_mod7}.v— exactly the directory whose import error is described above. Nothing here touches those files.coq-trocq.opam,coq-trocq-dev.opam,coq-trocq-hott.opam, the nix config and a workflow. Those are yours to sequence; this PR changes no.opamfile, nometa.ymland no workflow, so it cannot conflict with it.Separately, and only if it is useful to you: I have an order-independent version of #84's two
flt3_stepgoal-selection changes —try (by …)in place of choosingfirstorlast, so it does not depend on which mathcomp is in use and does not needUnset SsrOldRewriteGoalsOrder.. I have deliberately left it out of this PR because I could not compile it:examples/stdnever gets past the import error above, so I have no measurement to offer for it, and #84 already owns that file.Environment
Rocq
9.4+alpha(OCaml 4.14.2), coq-hottdev@b52bd4e9, mathcompdev@d5507bef.Two provenance notes, since neither is pristine upstream:
rocq-prover/rocqmaster plus 34 commits and minus 17. The fork's substantive addition is a kernel module-subtyping performance fix. It cannot turn a compile error into a success, and independently the cone here has no module subtyping to speed up —IncludeandModule Typeare both 0 acrossgeneric/,std/andhott/(23 plainModule X.wrappers, 0 functor applications).rocq-elpiistheorem-labs/coq-elpi, branchdev+fixes, at4bc69c6cwhen this was built: LPCIC/coq-elpi@270b753e plus two commits adding explicit relevance APIs. It is diverged fromLPCIC/coq-elpimaster, not simply ahead of it. Neither error above is elpi output — both are in hand-written source — but the build around them did run against that elpi, so I cannot claim these numbers reproduce exactly on pristine upstream elpi.Not claimed
Compilation of
stdandhottonly. No test suite was run,examples/stddoes not build for the reason above, and nothing downstream of Trocq was built.