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

Also add a test for `map_Forall`.

parent 6bb1fc01
No related branches found
No related tags found
1 merge request!575Enable `map_Forall2` to be used in nested inductive relations
Pipeline #107962 passed
......@@ -440,8 +440,13 @@ Fixpoint gtest_imap `{Countable K} (j : K) (t : gtest K) : gtest K :=
let '(GTest ts) := t in
GTest (map_imap (λ i t, guard (i = j);; Some (gtest_imap j t)) ts).
(** Test that [map_Forall2] can be used in an inductive definition without
(** Test that [map_Forall P] and [map_Forall2 P] can be used in an inductive
definition with a recursive occurence in the predicate/relation [P] without
bothering the positivity checker. *)
Inductive gtest_pred `{Countable K} : gtest K Prop :=
| GTest_pred ts :
map_Forall (λ _, gtest_pred) ts gtest_pred (GTest ts).
Inductive gtest_rel `{Countable K} : relation (gtest K) :=
| GTest_rel ts1 ts2 :
map_Forall2 (λ _, gtest_rel) ts1 ts2 gtest_rel (GTest ts1) (GTest ts2).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment