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

Merge branch 'list-filter-app' into 'master'

Add filter_app lemma

See merge request !147
parents afa23fd2 85b891cb
No related branches found
No related tags found
1 merge request!147Add filter_app lemma
Pipeline #26791 passed
......@@ -1656,6 +1656,13 @@ Section filter.
Lemma filter_cons_False x l : ¬P x filter P (x :: l) = filter P l.
Proof. intros. by rewrite filter_cons, decide_False. Qed.
Lemma filter_app l1 l2 : filter P (l1 ++ l2) = filter P l1 ++ filter P l2.
Proof.
induction l1 as [|x l1 IH]; simpl; [done| ].
case_decide; [|done].
by rewrite IH.
Qed.
Lemma elem_of_list_filter l x : x filter P l P x x l.
Proof.
induction l; simpl; repeat case_decide;
......
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