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
Model registry
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
Iris
stdpp
Commits
bcc9161a
Verified
Commit
bcc9161a
authored
2 years ago
by
Dan Frumin
Committed by
Paolo G. Giarrusso
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Apply some sugguestions from Robbert and Paolo
parent
13c3510c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!406
Introduce `set_bind` and associated lemmas + set_bind theory: revise setoid rewriting
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/fin_sets.v
+17
-19
17 additions, 19 deletions
theories/fin_sets.v
with
17 additions
and
19 deletions
theories/fin_sets.v
+
17
−
19
View file @
bcc9161a
...
...
@@ -443,29 +443,18 @@ End map.
(** * Bind *)
Section
set_bind
.
Context
`{
FinSet
A
SA
,
FinSet
B
SB
}
.
Context
`{
FinSet
B
SB
}
.
Local
Notation
set_bind
:=
(
set_bind
(
A
:=
A
)
(
SA
:=
SA
)
(
SB
:=
SB
))
.
Local
Notation
set_bind
:=
(
set_bind
(
A
:=
A
)
(
SA
:=
C
)
(
SB
:=
SB
))
.
Lemma
set_bind_ext
(
f
g
:
A
→
SB
)
(
X
Y
:
SA
)
:
(
∀
x
,
f
x
≡
g
x
)
→
X
≡
Y
→
set_bind
f
X
≡
set_bind
g
Y
.
Proof
.
intros
Hfg
HXY
b
.
unfold
set_bind
.
rewrite
!
elem_of_union_list
.
set_unfold
.
setoid_rewrite
elem_of_elements
.
naive_solver
.
Qed
.
Global
Instance
set_bind_proper
:
Proper
(
pointwise_relation
_
(
≡
)
==>
(
≡
)
==>
(
≡
))
set_bind
.
Proof
.
intros
f1
f2
Hf
X1
X2
HX
.
by
apply
set_bind_ext
.
Qed
.
Lemma
elem_of_set_bind
(
f
:
A
→
SB
)
(
X
:
SA
)
y
:
Lemma
elem_of_set_bind
(
f
:
A
→
SB
)
(
X
:
C
)
y
:
y
∈
set_bind
f
X
↔
∃
x
,
x
∈
X
∧
y
∈
f
x
.
Proof
.
unfold
set_bind
.
rewrite
!
elem_of_union_list
.
set_unfold
.
setoid_rewrite
elem_of_elements
.
naive_solver
.
unfold
set_bind
.
rewrite
!
elem_of_union_list
.
set_solver
.
Qed
.
Global
Instance
set_unfold_set_bind
(
f
:
A
→
SB
)
(
X
:
SA
)
y
(
P
:
A
→
B
→
Prop
)
(
Q
:
A
→
Prop
)
:
Global
Instance
set_unfold_set_bind
(
f
:
A
→
SB
)
(
X
:
C
)
(
y
:
B
)
(
P
:
A
→
B
→
Prop
)
(
Q
:
A
→
Prop
)
:
(
∀
x
y
,
SetUnfoldElemOf
y
(
f
x
)
(
P
x
y
))
→
(
∀
x
,
SetUnfoldElemOf
x
X
(
Q
x
))
→
SetUnfoldElemOf
y
(
set_bind
f
X
)
(
∃
x
,
Q
x
∧
P
x
y
)
.
...
...
@@ -474,6 +463,15 @@ Section set_bind.
rewrite
elem_of_set_bind
.
set_solver
.
Qed
.
Lemma
set_bind_ext
(
f
g
:
A
→
SB
)
(
X
Y
:
C
)
:
(
∀
x
,
x
∈
X
→
x
∈
Y
→
f
x
≡
g
x
)
→
X
≡
Y
→
set_bind
f
X
≡
set_bind
g
Y
.
Proof
.
intros
Hfg
HXY
b
.
rewrite
!
elem_of_set_bind
.
set_solver
.
Qed
.
Global
Instance
set_bind_proper
:
Proper
(
pointwise_relation
_
(
≡
)
==>
(
≡
)
==>
(
≡
))
set_bind
.
Proof
.
intros
f1
f2
Hf
X1
X2
HX
.
by
apply
set_bind_ext
.
Qed
.
Global
Instance
set_bind_subset
f
:
Proper
((
⊆
)
==>
(
⊆
))
(
set_bind
f
)
.
Proof
.
intros
X
Y
HXY
.
set_solver
.
Qed
.
...
...
@@ -482,10 +480,10 @@ Section set_bind.
Lemma
set_bind_singleton_L
`{
!
LeibnizEquiv
SB
}
f
x
:
set_bind
f
{[
x
]}
=
f
x
.
Proof
.
unfold_leibniz
.
apply
set_bind_singleton
.
Qed
.
Lemma
set_bind_disj_union
f
(
X
Y
:
SA
)
:
Lemma
set_bind_disj_union
f
(
X
Y
:
C
)
:
X
##
Y
→
set_bind
f
(
X
∪
Y
)
≡
set_bind
f
X
∪
set_bind
f
Y
.
Proof
.
set_solver
.
Qed
.
Lemma
set_bind_disj_union_L
`{
!
LeibnizEquiv
SB
}
f
(
X
Y
:
SA
)
:
Lemma
set_bind_disj_union_L
`{
!
LeibnizEquiv
SB
}
f
(
X
Y
:
C
)
:
X
##
Y
→
set_bind
f
(
X
∪
Y
)
=
set_bind
f
X
∪
set_bind
f
Y
.
Proof
.
unfold_leibniz
.
apply
set_bind_disj_union
.
Qed
.
End
set_bind
.
...
...
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