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

Add `map_seq_proper`.

parent abee55c9
No related branches found
No related tags found
No related merge requests found
Pipeline #45031 passed
...@@ -2417,6 +2417,15 @@ Section map_seq. ...@@ -2417,6 +2417,15 @@ Section map_seq.
Implicit Types x : A. Implicit Types x : A.
Implicit Types xs : list A. Implicit Types xs : list A.
Global Instance map_seq_proper `{Equiv A} start :
Proper (() ==> ()) (map_seq (M:=M A) start).
Proof.
intros l1 l2 Hl. revert start.
induction Hl as [|x1 x2 l1 l2 ?? IH]; intros start; simpl.
- intros ?. rewrite lookup_empty; constructor.
- repeat (done || f_equiv).
Qed.
Lemma lookup_map_seq start xs i : Lemma lookup_map_seq start xs i :
map_seq (M:=M A) start xs !! i = guard (start i); xs !! (i - start). map_seq (M:=M A) start xs !! i = guard (start i); xs !! (i - start).
Proof. Proof.
......
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