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
S
stdpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Simon Spies
stdpp
Commits
97ab0949
Commit
97ab0949
authored
Jul 07, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prove list_find_fmap
parent
5f2a6b77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
theories/list.v
theories/list.v
+9
-0
No files found.
theories/list.v
View file @
97ab0949
...
@@ -907,6 +907,15 @@ Section find.
...
@@ -907,6 +907,15 @@ Section find.
induction 1 as [|x y l ? IH]; intros; simplify_option_eq; eauto.
induction 1 as [|x y l ? IH]; intros; simplify_option_eq; eauto.
by destruct IH as [[i x'] ->]; [|exists (S i, x')].
by destruct IH as [[i x'] ->]; [|exists (S i, x')].
Qed.
Qed.
Lemma list_find_fmap {B : Type} (f : B → A) (l : list B) :
list_find P (f <$> l) = prod_map id f <$> list_find (P ∘ f) l.
Proof.
induction l as [|x y IH]; [done|]. simpl.
case_decide; [done|].
change (list_fmap B A f y) with (f <$> y). (* FIXME it simplified too much *)
rewrite IH. by destruct (list_find (P ∘ f) y).
Qed.
End find.
End find.
(** ** Properties of the [reverse] function *)
(** ** Properties of the [reverse] function *)
...
...
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