Skip to content
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

Support for weak cbv #18190

Merged
merged 6 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions dev/ci/user-overlays/18190-herbelin-master+weak-cbv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
overlay elpi https://github.com/herbelin/coq-elpi coq-master+adapt-coq-pr18190-whd-cbv 18190 master+weak-cbv
overlay equations https://github.com/herbelin/Coq-Equations master+adapt-coq-pr18190-whd-cbv 18190 master+weak-cbv
7 changes: 4 additions & 3 deletions doc/changelog/04-tactics/17503-redexpr.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- **Added:**
:tacn:`lazy`, :tacn:`simpl` and :tacn:`cbn` and the associated :cmd:`Eval` and :tacn:`eval` reductions
learnt to do head reduction when given flag `head`
:tacn:`lazy`, :tacn:`simpl`, :tacn:`cbn` and :tacn:`cbv` and the associated :cmd:`Eval`
and :tacn:`eval` reductions learned to do head reduction when given flag `head`
(eg `Eval lazy head in (fun x => Some ((fun y => y) x)) 0` produces `Some ((fun y => y) 0)`)
(`#17503 <https://github.com/coq/coq/pull/17503>`_,
by Gaëtan Gilbert).
by Gaëtan Gilbert; :tacn:`cbv` case added in `#18190 <https://github.com/coq/coq/pull/18190>`_,
by Hugo Herbelin).
8 changes: 4 additions & 4 deletions doc/sphinx/proofs/writing-proofs/equality.rst
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,9 @@ which reduction engine to use. See :ref:`type-cast`.) For example:
.. prodn::
reductions ::= {+ @reduction }
| {? head } @delta_reductions
reduction ::= beta
reduction ::= head
| beta
| delta {? @delta_reductions }
| head
| match
| fix
| cofix
Expand All @@ -508,8 +508,8 @@ which reduction engine to use. See :ref:`type-cast`.) For example:
then only the named reductions are applied. The reductions include:

`head`
Do only head reduction, without going under binders. Only
supported by :tacn:`simpl`, :tacn:`cbn` and :tacn:`lazy`.
Do only head reduction, without going under binders.
Supported by :tacn:`simpl`, :tacn:`cbv`, :tacn:`cbn` and :tacn:`lazy`.
If this is the only specified reduction, all other reductions are applied.
SkySkimmer marked this conversation as resolved.
Show resolved Hide resolved

`beta`
Expand Down
2 changes: 1 addition & 1 deletion doc/tools/docgram/orderedGrammar
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,9 @@ reductions: [
]

reduction: [
| "head"
| "beta"
| "delta" OPT delta_reductions
| "head"
| "match"
| "fix"
| "cofix"
Expand Down
2 changes: 1 addition & 1 deletion plugins/funind/functional_principles_proofs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ let prove_princ_for_struct (evd : Evd.evar_map ref) interactive_proof fun_num
match body.Declarations.const_body with
| Def body ->
let sigma = Evd.from_env env in
Tacred.cbv_norm_flags
Tacred.cbv_norm_flags ~strong:true
(RedFlags.mkflags [RedFlags.fZETA])
env sigma (EConstr.of_constr body)
| Undef _ | Primitive _ | OpaqueDef _ -> user_err Pp.(str "Cannot define a principle over an axiom ")
Expand Down
2 changes: 1 addition & 1 deletion plugins/funind/gen_principle.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ let get_funs_constant mp =
match body.Declarations.const_body with
| Def body ->
let body =
Tacred.cbv_norm_flags
Tacred.cbv_norm_flags ~strong:true
(RedFlags.mkflags [RedFlags.fZETA])
env
(Evd.from_env env)
Expand Down