Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thibaut Pérami
stdpp
Commits
80bc3965
Commit
80bc3965
authored
3 years ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Added some useful lemmas about [list_subseteq]
parent
f23a05c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/list.v
+20
-0
20 additions, 0 deletions
theories/list.v
with
20 additions
and
0 deletions
theories/list.v
+
20
−
0
View file @
80bc3965
...
...
@@ -2743,6 +2743,26 @@ Proof.
rewrite
<-
(
elem_of_nil
x
)
.
apply
Hl
,
elem_of_cons
.
by
left
.
Qed
.
Lemma
list_subseteq_cons
x
l1
l2
:
l1
⊆
l2
→
x
::
l1
⊆
x
::
l2
.
Proof
.
intros
Hin
y
Hy
%
elem_of_cons
.
destruct
Hy
as
[
->
|
Hy
];
[
by
left
|]
.
right
.
by
apply
Hin
.
Qed
.
Lemma
list_subseteq_cons_r
x
l1
l2
:
l1
⊆
l2
→
l1
⊆
x
::
l2
.
Proof
.
intros
Hin
y
Hy
.
right
.
by
apply
Hin
.
Qed
.
Lemma
list_delete_subseteq
i
l
:
delete
i
l
⊆
l
.
Proof
.
revert
i
.
induction
l
as
[|
x
l
IHl
];
intros
i
;
[
done
|]
.
destruct
i
as
[|
i
];
[
by
apply
list_subseteq_cons_r
|
by
apply
list_subseteq_cons
]
.
Qed
.
Lemma
filter_subseteq
P
`{
!
∀
x
:
A
,
Decision
(
P
x
)}
l
:
filter
P
l
⊆
l
.
Proof
.
induction
l
as
[|
x
l
IHl
];
[
done
|]
.
rewrite
filter_cons
.
destruct
(
decide
(
P
x
));
[
by
apply
list_subseteq_cons
|
by
apply
list_subseteq_cons_r
]
.
Qed
.
Global
Instance
list_subseteq_Permutation
:
Proper
((
≡
ₚ
)
==>
(
≡
ₚ
)
==>
(
↔
))
(
⊆@
{
list
A
})
.
Proof
.
intros
l1
l2
Hl
k1
k2
Hk
.
apply
forall_proper
;
intros
x
.
by
rewrite
Hl
,
Hk
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment