Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
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
Gaëtan Gilbert
Iris
Commits
fa438702
Commit
fa438702
authored
5 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add `NonExpansive` instances for `!!!` on maps and lists.
parent
739cc004
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/algebra/gmap.v
+4
-1
4 additions, 1 deletion
theories/algebra/gmap.v
theories/algebra/list.v
+3
-0
3 additions, 0 deletions
theories/algebra/list.v
with
7 additions
and
1 deletion
theories/algebra/gmap.v
+
4
−
1
View file @
fa438702
...
@@ -45,7 +45,10 @@ Global Instance gmapO_leibniz: LeibnizEquiv A → LeibnizEquiv gmapO.
...
@@ -45,7 +45,10 @@ Global Instance gmapO_leibniz: LeibnizEquiv A → LeibnizEquiv gmapO.
Proof
.
intros
;
change
(
LeibnizEquiv
(
gmap
K
A
));
apply
_
.
Qed
.
Proof
.
intros
;
change
(
LeibnizEquiv
(
gmap
K
A
));
apply
_
.
Qed
.
Global
Instance
lookup_ne
k
:
NonExpansive
(
lookup
k
:
gmap
K
A
→
option
A
)
.
Global
Instance
lookup_ne
k
:
NonExpansive
(
lookup
k
:
gmap
K
A
→
option
A
)
.
Proof
.
by
intros
m1
m2
.
Qed
.
Proof
.
by
intros
n
m1
m2
.
Qed
.
Global
Instance
lookup_total_ne
`{
!
Inhabited
A
}
k
:
NonExpansive
(
lookup_total
k
:
gmap
K
A
→
A
)
.
Proof
.
intros
n
m1
m2
.
rewrite
!
lookup_total_alt
.
by
intros
->
.
Qed
.
Global
Instance
partial_alter_ne
n
:
Global
Instance
partial_alter_ne
n
:
Proper
((
dist
n
==>
dist
n
)
==>
(
=
)
==>
dist
n
==>
dist
n
)
Proper
((
dist
n
==>
dist
n
)
==>
(
=
)
==>
dist
n
==>
dist
n
)
(
partial_alter
(
M
:=
gmap
K
A
))
.
(
partial_alter
(
M
:=
gmap
K
A
))
.
...
...
This diff is collapsed.
Click to expand it.
theories/algebra/list.v
+
3
−
0
View file @
fa438702
...
@@ -23,6 +23,9 @@ Global Instance head_ne : NonExpansive (head (A:=A)).
...
@@ -23,6 +23,9 @@ Global Instance head_ne : NonExpansive (head (A:=A)).
Proof
.
destruct
1
;
by
constructor
.
Qed
.
Proof
.
destruct
1
;
by
constructor
.
Qed
.
Global
Instance
list_lookup_ne
i
:
NonExpansive
(
lookup
(
M
:=
list
A
)
i
)
.
Global
Instance
list_lookup_ne
i
:
NonExpansive
(
lookup
(
M
:=
list
A
)
i
)
.
Proof
.
intros
????
.
by
apply
dist_option_Forall2
,
Forall2_lookup
.
Qed
.
Proof
.
intros
????
.
by
apply
dist_option_Forall2
,
Forall2_lookup
.
Qed
.
Global
Instance
list_lookup_total_ne
`{
!
Inhabited
A
}
i
:
NonExpansive
(
lookup_total
(
M
:=
list
A
)
i
)
.
Proof
.
intros
???
.
rewrite
!
list_lookup_total_alt
.
by
intros
->
.
Qed
.
Global
Instance
list_alter_ne
n
f
i
:
Global
Instance
list_alter_ne
n
f
i
:
Proper
(
dist
n
==>
dist
n
)
f
→
Proper
(
dist
n
==>
dist
n
)
f
→
Proper
(
dist
n
==>
dist
n
)
(
alter
(
M
:=
list
A
)
f
i
)
:=
_
.
Proper
(
dist
n
==>
dist
n
)
(
alter
(
M
:=
list
A
)
f
i
)
:=
_
.
...
...
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