Unifying the syntax of Definition, Theorem, Fixpoint and CoFixpoint (CEP #42) - #19301
Closed
herbelin wants to merge 9 commits into
Closed
Unifying the syntax of Definition, Theorem, Fixpoint and CoFixpoint (CEP #42)#19301herbelin wants to merge 9 commits into
herbelin wants to merge 9 commits into
Conversation
herbelin
force-pushed
the
master+ceps42-unify-definition-theorem
branch
from
July 2, 2024 07:14
614575e to
5b1e836
Compare
herbelin
force-pushed
the
master+ceps42-unify-definition-theorem
branch
from
July 2, 2024 12:31
5b1e836 to
2a209f4
Compare
herbelin
marked this pull request as draft
July 10, 2024 06:36
herbelin
force-pushed
the
master+ceps42-unify-definition-theorem
branch
from
July 10, 2024 06:53
2a209f4 to
a08fd86
Compare
4 tasks
herbelin
added a commit
to herbelin/github-coq
that referenced
this pull request
Sep 30, 2024
…transparent. The main changes are: - "opaque" is now part of the Declare.CInfo.t (one per component of the proof) - at Qed/Defined time, a check is done to determine if there is an attribute which takes precedence over the Qed/Defined keyword; - for non-interactive declaration, Definition is transparent by default and (assuming the syntax provided as in rocq-prover#19301) Theorem requires an explicit attribute.
herbelin
force-pushed
the
master+ceps42-unify-definition-theorem
branch
from
September 30, 2024 19:44
a08fd86 to
389592a
Compare
herbelin
force-pushed
the
master+ceps42-unify-definition-theorem
branch
from
September 30, 2024 19:57
389592a to
34eed0c
Compare
1 task
herbelin
force-pushed
the
master+ceps42-unify-definition-theorem
branch
from
October 26, 2024 15:11
fd1f178 to
46c8918
Compare
…int. Also adding some missing supported attributes.
herbelin
added a commit
to herbelin/github-coq
that referenced
this pull request
Oct 27, 2024
…transparent. The main changes are: - "opaque" is now part of the Declare.CInfo.t (one per component of the proof) - at Qed/Defined time, a check is done to determine if there is an attribute which takes precedence over the Qed/Defined keyword; - for non-interactive declaration, Definition is transparent by default and (assuming the syntax provided as in rocq-prover#19301) Theorem requires an explicit attribute. - the attribute can be set both globally (before the command name) and locally (just before the names declared by the command)
herbelin
force-pushed
the
master+ceps42-unify-definition-theorem
branch
from
October 27, 2024 09:35
46c8918 to
0aff711
Compare
Contributor
|
🔴 CI failure at commit 0aff711 without any failure in the test-suite ✔️ Corresponding job for the base commit aa08d5a succeeded ❔ Ask me to try to extract a minimal test case that can be added to the test-suite 🏃
|
This goes in the direction of CEP rocq-prover#42. In particular, we can now do "Theorem thm : True := I.".
The reading of decl_ident is "declaration's identifier".
Maybe related to unifying the treatment of Definition and Fixpoint in Stm.process_transaction, VtSideff case (at least, that's one of the visible change I see).
herbelin
force-pushed
the
master+ceps42-unify-definition-theorem
branch
from
October 27, 2024 13:07
0aff711 to
f42a304
Compare
Contributor
|
The "needs: rebase" label was set more than 30 days ago. If the PR is not rebased in 30 days, it will be automatically closed. |
Contributor
|
This PR was not rebased after 30 days despite the warning, it is now closed. |
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.
This PR is a first attempt at implementing rocq-prover/rfcs#42. It parses all of
Definition/Theorem/Fixpoint/CoFixpointusing the same grammar, and, in particular, it supports:Theorem foo : True := I.or even:
The interpretation is still dispatched into a few commands:
ComDefinition.do_definition_interactiveDeclare.Proof.start_definitionComDefinition.do_definitionwhich itself splits into:Declare.Obls.add_definition(Programmode)Declare.declare_definition(regular mode)ComFixpoint.do_mutually_recursivewhich itself splits into:Declare.Proof.start_mutual_definitions(interactive)Declare.Obls.add_mutual_definitions(Programmode)Declare.declare_mutual_definitions(regular mode)which could be merged further. For instance, the recursivity might just be a flag to a regular definition (as in
let recvsletin OCaml).The
vtmodifyprogram/vtopenproofdispatch is done in a rather heavy way which should be simplified.The PR is complementary to #19029 which implements attributes
sealed/unsealed.A choice of default opacity for
Theorem :=is easy to do, it is in functionComDefinition.opacity_of_logical_kind.Coercion f n {struct n} := match n with 0 => 0 | S n => S (f n) end., or mutual coercions, orInstance f n {struct n} := match n with 0 => 0 | S n => S (f n) end.?{measure ...},{struct ...}and{wf ...}so that they can also be used as variable namesIncidentally fixes #19593.
Depends on:
Synchronous overlays: