diff options
author | jadep <jade.philipoom@gmail.com> | 2016-06-14 15:21:35 -0400 |
---|---|---|
committer | jadep <jade.philipoom@gmail.com> | 2016-06-14 15:21:35 -0400 |
commit | 44a9f78bb082dbc5275f7d4ae07501dc7cba8a07 (patch) | |
tree | c6290bd96185d97a7727e239606c68cf0f08951f /src/Util/ListUtil.v | |
parent | 7def727b8acdf6e65df0fca13802970f8c416832 (diff) |
Finished admits for canonicalization proofs.
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 cbd7bd58c..9a9ce9a06 100644 --- a/src/Util/ListUtil.v +++ b/src/Util/ListUtil.v @@ -616,3 +616,12 @@ Proof. apply IHxs. omega. Qed. + +Lemma set_nth_nth_default : forall {A} (d:A) n x l i, (0 <= i < length l)%nat -> + nth_default d (set_nth n x l) i = + if (eq_nat_dec i n) then x else nth_default d l i. +Proof. + induction n; (destruct l; [intros; simpl in *; omega | ]); simpl; + destruct i; break_if; try omega; intros; try apply nth_default_cons; + rewrite !nth_default_cons_S, ?IHn; try break_if; omega || reflexivity. +Qed.
\ No newline at end of file |