From 8fd63ce4a8bca37f98d7e9044d2b0ffc0278f2e1 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Fri, 8 Mar 2019 19:17:48 -0500 Subject: Add Forall2_map_map_iff --- src/Util/ListUtil/Forall.v | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Util') diff --git a/src/Util/ListUtil/Forall.v b/src/Util/ListUtil/Forall.v index ffc6ca9e9..d9adfffa6 100644 --- a/src/Util/ListUtil/Forall.v +++ b/src/Util/ListUtil/Forall.v @@ -79,6 +79,13 @@ Proof using Type. revert ls2; induction ls1 as [|l ls IHls], ls2 as [|l' ls']; t_Forall2. Qed. +Lemma Forall2_map_map_iff {A A' B B' R f g ls1 ls2} + : @List.Forall2 A' B' R (List.map f ls1) (List.map g ls2) + <-> @List.Forall2 A B (fun x y => R (f x) (g y)) ls1 ls2. +Proof using Type. + revert ls2; induction ls1 as [|l ls IHls], ls2 as [|l' ls']; + t_Forall2. +Qed. Lemma Forall2_Forall {A R ls} : @List.Forall2 A A R ls ls <-> @List.Forall A (Proper R) ls. -- cgit v1.2.3