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
Pierre Roux
Iris
Commits
9f3ec031
Commit
9f3ec031
authored
3 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add non-expansive instances for `curry` and friends.
parent
26ebf1ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris/algebra/ofe.v
+31
-4
31 additions, 4 deletions
iris/algebra/ofe.v
with
31 additions
and
4 deletions
iris/algebra/ofe.v
+
31
−
4
View file @
9f3ec031
...
...
@@ -660,10 +660,7 @@ Section product.
Context
{
A
B
:
ofe
}
.
Local
Instance
prod_dist
:
Dist
(
A
*
B
)
:=
λ
n
,
prod_relation
(
dist
n
)
(
dist
n
)
.
Global
Instance
pair_ne
:
NonExpansive2
(
@
pair
A
B
)
:=
_
.
Global
Instance
fst_ne
:
NonExpansive
(
@
fst
A
B
)
:=
_
.
Global
Instance
snd_ne
:
NonExpansive
(
@
snd
A
B
)
:=
_
.
Definition
prod_ofe_mixin
:
OfeMixin
(
A
*
B
)
.
Proof
.
split
.
...
...
@@ -691,6 +688,36 @@ Section product.
End
product
.
Global
Arguments
prodO
:
clear
implicits
.
(** Below we make [prod_dist] type class opaque, so we first lift all
instances *)
Global
Instance
pair_ne
{
A
B
:
ofe
}
:
NonExpansive2
(
@
pair
A
B
)
:=
_
.
Global
Instance
pair_dist_inj
{
A
B
:
ofe
}
n
:
Inj2
(
≡
{
n
}
≡
)
(
≡
{
n
}
≡
)
(
≡
{
n
}
≡
)
(
@
pair
A
B
)
:=
_
.
Global
Instance
fst_ne
{
A
B
:
ofe
}
:
NonExpansive
(
@
fst
A
B
)
:=
_
.
Global
Instance
snd_ne
{
A
B
:
ofe
}
:
NonExpansive
(
@
snd
A
B
)
:=
_
.
Global
Instance
curry_ne
{
A
B
C
:
ofe
}
n
:
Proper
(((
≡
{
n
}
@
{
A
*
B
}
≡
)
==>
(
≡
{
n
}
@
{
C
}
≡
))
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
))
curry
:=
_
.
Global
Instance
uncurry_ne
{
A
B
C
:
ofe
}
n
:
Proper
(((
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
))
==>
(
≡
{
n
}
@
{
A
*
B
}
≡
)
==>
(
≡
{
n
}
@
{
C
}
≡
))
uncurry
:=
_
.
Global
Instance
curry3_ne
{
A
B
C
D
:
ofe
}
n
:
Proper
(((
≡
{
n
}
@
{
A
*
B
*
C
}
≡
)
==>
(
≡
{
n
}
@
{
D
}
≡
))
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
))
curry3
:=
_
.
Global
Instance
uncurry3_ne
{
A
B
C
D
:
ofe
}
n
:
Proper
(((
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
))
==>
(
≡
{
n
}
@
{
A
*
B
*
C
}
≡
)
==>
(
≡
{
n
}
@
{
D
}
≡
))
uncurry3
:=
_
.
Global
Instance
curry4_ne
{
A
B
C
D
E
:
ofe
}
n
:
Proper
(((
≡
{
n
}
@
{
A
*
B
*
C
*
D
}
≡
)
==>
(
≡
{
n
}
@
{
E
}
≡
))
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
))
curry4
:=
_
.
Global
Instance
uncurry4_ne
{
A
B
C
D
E
:
ofe
}
n
:
Proper
(((
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
)
==>
(
≡
{
n
}
≡
))
==>
(
≡
{
n
}
@
{
A
*
B
*
C
*
D
}
≡
)
==>
(
≡
{
n
}
@
{
E
}
≡
))
uncurry4
:=
_
.
Typeclasses
Opaque
prod_dist
.
Global
Instance
prod_map_ne
{
A
A'
B
B'
:
ofe
}
n
:
...
...
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