-
Notifications
You must be signed in to change notification settings - Fork 760
Better integration of Derive in declare.ml + fix of #18951 #19092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bc812cc
c11b5a5
1806319
8be33f0
687bc06
3e37060
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| - **Fixed:** | ||
| :cmd:`Derive` now supports :cmd:`Admitted` | ||
| (`#19092 <https://github.com/coq/coq/pull/19092>`_, | ||
| fixes `#18951 <https://github.com/coq/coq/issues/18951>`_, | ||
| by Hugo Herbelin). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ let classify_derive_command _ = Vernacextend.(VtStartProof (Doesn'tGuaranteeOpac | |
| } | ||
|
|
||
| VERNAC COMMAND EXTEND Derive CLASSIFIED BY { classify_derive_command } STATE open_proof | ||
| | [ "Derive" identref(f) "SuchThat" constr(suchthat) "As" identref(lemma) ] -> | ||
| { Derive.start_deriving f.CAst.v suchthat lemma.CAst.v } | ||
| | #[ atts = Vernacentries.DefAttributes.def_attributes; ] | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't that the way to support attributes? When I try, say,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vernacentries.DefAttributes.def_attributes uses the default value
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. So, let's keep it as it is, until a dischargeable variant of |
||
| [ "Derive" identref(f) "SuchThat" constr(suchthat) "As" identref(lemma) ] -> | ||
| { Derive.start_deriving ~atts f suchthat lemma.CAst.v } | ||
| END | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Require Import Derive. | ||
| Derive b SuchThat b As spec. | ||
| Unshelve. | ||
| 2:exact Type. | ||
| unfold b. | ||
| exact Type. | ||
| Defined. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Require Import Derive. | ||
|
|
||
| (* Tests when x is refined by typechecking *) | ||
| Derive x SuchThat (eq_refl x = eq_refl 0) As x_ok. | ||
| reflexivity. | ||
| Qed. | ||
|
|
||
| Derive s SuchThat (forall z, eq_refl (s z) = eq_refl (S z)) As s_ok. | ||
| reflexivity. | ||
| Qed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clearbody is not useful as we're non Discharge
unless you want to add some sort of
Let DeriveI guessUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say that the question is the same as for e.g.
Definition. It supports theclearbodyflag even if it does not have an effect.