diff options
Diffstat (limited to 'src/Util/ListUtil.v')
-rw-r--r-- | src/Util/ListUtil.v | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Util/ListUtil.v b/src/Util/ListUtil.v index 50927c2a4..b4285aad0 100644 --- a/src/Util/ListUtil.v +++ b/src/Util/ListUtil.v @@ -926,3 +926,12 @@ Proof. rewrite <-!app_comm_cons, !map2_cons. rewrite IHls1; auto. Qed. + +Require Import Coq.Lists.SetoidList. +Global Instance Proper_nth_default : forall A eq, + Proper (eq==>eqlistA eq==>Logic.eq==>eq) (nth_default (A:=A)). +Proof. + do 5 intro; subst; induction 1. + + repeat intro; rewrite !nth_default_nil; assumption. + + repeat intro; subst; destruct y0; rewrite ?nth_default_cons, ?nth_default_cons_S; auto. +Qed. |