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
Adam
stdpp
Commits
2c0bedd5
Commit
2c0bedd5
authored
5 years ago
by
Michael Sammler
Browse files
Options
Downloads
Patches
Plain Diff
added two proper instance with permutations
parent
9407e8cc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/list.v
+10
-0
10 additions, 0 deletions
theories/list.v
with
10 additions
and
0 deletions
theories/list.v
+
10
−
0
View file @
2c0bedd5
...
@@ -2245,6 +2245,9 @@ Proof. split; firstorder. Qed.
...
@@ -2245,6 +2245,9 @@ Proof. split; firstorder. Qed.
Lemma
list_subseteq_nil
l
:
[]
⊆
l
.
Lemma
list_subseteq_nil
l
:
[]
⊆
l
.
Proof
.
intros
x
.
by
rewrite
elem_of_nil
.
Qed
.
Proof
.
intros
x
.
by
rewrite
elem_of_nil
.
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
.
(** ** Properties of the [Forall] and [Exists] predicate *)
(** ** Properties of the [Forall] and [Exists] predicate *)
Lemma
Forall_Exists_dec
(
P
Q
:
A
→
Prop
)
(
dec
:
∀
x
,
{
P
x
}
+
{
Q
x
})
:
Lemma
Forall_Exists_dec
(
P
Q
:
A
→
Prop
)
(
dec
:
∀
x
,
{
P
x
}
+
{
Q
x
})
:
∀
l
,
{
Forall
P
l
}
+
{
Exists
Q
l
}
.
∀
l
,
{
Forall
P
l
}
+
{
Exists
Q
l
}
.
...
@@ -2400,6 +2403,10 @@ Section Forall_Exists.
...
@@ -2400,6 +2403,10 @@ Section Forall_Exists.
intros
??
l
.
induction
l
using
rev_ind
;
auto
.
intros
??
l
.
induction
l
using
rev_ind
;
auto
.
rewrite
Forall_app
,
Forall_singleton
;
intros
[??];
auto
.
rewrite
Forall_app
,
Forall_singleton
;
intros
[??];
auto
.
Qed
.
Qed
.
Global
Instance
Forall_Permutation
:
Proper
((
≡
ₚ
)
==>
(
↔
))
(
Forall
P
)
.
Proof
.
intros
l1
l2
Hl
.
rewrite
!
Forall_forall
.
by
setoid_rewrite
Hl
.
Qed
.
Lemma
Exists_exists
l
:
Exists
P
l
↔
∃
x
,
x
∈
l
∧
P
x
.
Lemma
Exists_exists
l
:
Exists
P
l
↔
∃
x
,
x
∈
l
∧
P
x
.
Proof
.
Proof
.
split
.
split
.
...
@@ -2419,6 +2426,9 @@ Section Forall_Exists.
...
@@ -2419,6 +2426,9 @@ Section Forall_Exists.
Exists
P
l
→
(
∀
x
,
P
x
→
Q
x
)
→
Exists
Q
l
.
Exists
P
l
→
(
∀
x
,
P
x
→
Q
x
)
→
Exists
Q
l
.
Proof
.
intros
H
?
.
induction
H
;
auto
.
Defined
.
Proof
.
intros
H
?
.
induction
H
;
auto
.
Defined
.
Global
Instance
Exists_Permutation
:
Proper
((
≡
ₚ
)
==>
(
↔
))
(
Exists
P
)
.
Proof
.
intros
l1
l2
Hl
.
rewrite
!
Exists_exists
.
by
setoid_rewrite
Hl
.
Qed
.
Lemma
Exists_not_Forall
l
:
Exists
(
not
∘
P
)
l
→
¬
Forall
P
l
.
Lemma
Exists_not_Forall
l
:
Exists
(
not
∘
P
)
l
→
¬
Forall
P
l
.
Proof
.
induction
1
;
inversion_clear
1
;
contradiction
.
Qed
.
Proof
.
induction
1
;
inversion_clear
1
;
contradiction
.
Qed
.
Lemma
Forall_not_Exists
l
:
Forall
(
not
∘
P
)
l
→
¬
Exists
P
l
.
Lemma
Forall_not_Exists
l
:
Forall
(
not
∘
P
)
l
→
¬
Exists
P
l
.
...
...
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