Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simon Spies
stdpp
Commits
05bf88b7
Commit
05bf88b7
authored
Jul 07, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prove list_find_proper
parent
97ab0949
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
theories/list.v
theories/list.v
+8
-0
No files found.
theories/list.v
View file @
05bf88b7
...
...
@@ -916,6 +916,14 @@ Section find.
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.
Lemma list_find_proper (Q : A → Prop) `{∀ x, Decision (Q x)} l :
(∀ x, P x ↔ Q x) →
list_find P l = list_find Q l.
Proof.
intros HPQ. induction l as [|x y IH]; [done|]. simpl.
erewrite decide_iff by done. by rewrite IH.
Qed.
End find.
(** ** 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