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

Rename `seq_S_snoc` into `seq_S` to be consistent with Coq's stdlib.

parent 523920d1
No related branches found
No related tags found
1 merge request!212Rename `seq_S_snoc` into `seq_S` to be consistent with Coq's stdlib
Pipeline #40314 failed
......@@ -40,7 +40,8 @@ Coq 8.8 and 8.9 are no longer supported.
returns `"0"` for `N`, `Z`, and `nat`.
- Remove duplicate `map_fmap_empty` of `fmap_empty`, and rename
`map_fmap_empty_inv` into `fmap_empty_inv` for consistency's sake.
- Rename `seq_S_end_app` to `seq_S_snoc`.
- Rename `seq_S_end_app` to `seq_S`. (The lemma `seq_S` is also in Coq's stdlib
since Coq 8.12.)
The following `sed` script should perform most of the renaming
(on macOS, replace `sed` by `gsed`, installed via e.g. `brew install gnu-sed`):
......@@ -57,7 +58,7 @@ s/\bQp_mult_plus_distr_l\b/Qp_mul_add_distr_r/g
s/\bQp_mult_plus_distr_r\b/Qp_mul_add_distr_l/g
s/\bmap_fmap_empty\b/fmap_empty/g
s/\bmap_fmap_empty_inv\b/fmap_empty_inv/g
s/\bseq_S_end_app\b/seq_S_snoc/g
s/\bseq_S_end_app\b/seq_S/g
' $(find theories -name "*.v")
```
......
......@@ -67,9 +67,10 @@ Section seq.
Qed.
Lemma NoDup_seq j n : NoDup (seq j n).
Proof. apply NoDup_ListNoDup, seq_NoDup. Qed.
Lemma seq_S_snoc j n : seq j (S n) = seq j n ++ [j + n].
(* FIXME: This lemma is in the stdlib since Coq 8.12 *)
Lemma seq_S n j : seq j (S n) = seq j n ++ [j + n].
Proof.
revert j. induction n as [|n IH]; intros j; simpl in *; f_equal; [done |].
revert j. induction n as [|n IH]; intros j; f_equal/=; [done |].
by rewrite IH, Nat.add_succ_r.
Qed.
......
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