Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simon Spies
stdpp
Commits
89217996
Commit
89217996
authored
Jun 27, 2019
by
Simon Spies
Browse files
simplify proof of seqZ_cons
parent
7393911a
Pipeline
#18024
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
theories/list.v
theories/list.v
+4
-6
No files found.
theories/list.v
View file @
89217996
...
...
@@ -3351,12 +3351,10 @@ Section seqZ.
Proof. by destruct n. Qed.
Lemma seqZ_cons m n: n > 0 → seqZ m n = m :: seqZ (Z.succ m) (Z.pred n).
Proof.
intros H. unfold seqZ.
replace (Z.to_nat n) with (S (Z.to_nat (n - 1))) by
(rewrite <-Z2Nat.inj_succ; [f_equal|]; lia).
simpl; f_equal.
erewrite <-fmap_seq, map_map, map_ext; eauto.
intros; lia.
intros H. unfold seqZ. replace n with (Z.succ (Z.pred n)) at 1 by lia.
rewrite Z2Nat.inj_succ by lia. f_equal/=.
rewrite <-fmap_seq, <-list_fmap_compose.
apply map_ext; naive_solver lia.
Qed.
Lemma seqZ_length m n: length (seqZ m n) = Z.to_nat n.
Proof. unfold seqZ; by rewrite fmap_length, seq_length. Qed.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment