Skip to content
Snippets Groups Projects
Commit ce00f184 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Tweak comments and CHANGELOG.

parent 3c517fd8
No related branches found
No related tags found
1 merge request!561Allow `map_imap` to be used in nested recursive fixpoints.
Pipeline #105951 passed
...@@ -13,7 +13,8 @@ API-breaking change is listed. ...@@ -13,7 +13,8 @@ API-breaking change is listed.
- Make the build script compatible with BSD systems. (by Yiyun Liu) - Make the build script compatible with BSD systems. (by Yiyun Liu)
- Rename lemmas `X_length` into `length_X`, see the sed script below for an - Rename lemmas `X_length` into `length_X`, see the sed script below for an
overview. This follows https://github.com/coq/coq/pull/18564. overview. This follows https://github.com/coq/coq/pull/18564.
- Redefine `map_imap` so it can be used in nested recursive `Fixpoint`s. - Redefine `map_imap` so its closure argument can contain recursive
occurrences of a `Fixpoint`.
The following `sed` script should perform most of the renaming The following `sed` script should perform most of the renaming
(on macOS, replace `sed` by `gsed`, installed via e.g. `brew install gnu-sed`). (on macOS, replace `sed` by `gsed`, installed via e.g. `brew install gnu-sed`).
......
...@@ -435,7 +435,8 @@ Proof. discriminate. Qed. ...@@ -435,7 +435,8 @@ Proof. discriminate. Qed.
Goal GTest {[ GTest {[ 1 := GTest ]} := GTest ]} ≠@{gtest (gtest nat)} GTest ∅. Goal GTest {[ GTest {[ 1 := GTest ]} := GTest ]} ≠@{gtest (gtest nat)} GTest ∅.
Proof. discriminate. Qed. Proof. discriminate. Qed.
(* Test that [map_imap] can be used in nested recursive fixpoints. *) (* Test that a fixpoint can be recursively invoked in the closure argument
of [map_imap]. *)
Fixpoint gtest_imap `{Countable K} (j : K) (t : gtest K) : gtest K := Fixpoint gtest_imap `{Countable K} (j : K) (t : gtest K) : gtest K :=
let '(GTest ts) := t in let '(GTest ts) := t in
GTest (map_imap (λ i t, guard (i = j);; Some (gtest_imap j t)) ts). GTest (map_imap (λ i t, guard (i = j);; Some (gtest_imap j t)) ts).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment