Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Paolo G. Giarrusso
iris
Commits
2a3a493f
Commit
2a3a493f
authored
1 year ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
AsFractional comment
parent
ba2286c0
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
iris/bi/lib/fractional.v
+13
-2
13 additions, 2 deletions
iris/bi/lib/fractional.v
with
13 additions
and
2 deletions
iris/bi/lib/fractional.v
+
13
−
2
View file @
2a3a493f
...
...
@@ -5,15 +5,26 @@ From iris.prelude Require Import options.
Class
Fractional
{
PROP
:
bi
}
(
Φ
:
Qp
→
PROP
)
:=
fractional
p
q
:
Φ
(
p
+
q
)
%
Qp
⊣⊢
Φ
p
∗
Φ
q
.
Global
Arguments
Fractional
{_}
_
%
I
:
simpl
never
.
Global
Arguments
fractional
{_
_
_}
_
_
.
(** The [AsFractional] typeclass eta-expands a proposition [P] into [Φ q] such
that [Φ] is a fractional predicate. This is needed because higher-order
unification cannot be relied upon to guess the right [Φ].
[AsFractional] should generally be used in APIs that work with fractional
predicates (instead of [Fractional]): when the user provides the original
resource [P], have a premise [AsFractional P Φ 1] to convert that into some
fractional predicate.
The equivalence in [as_fractional] should hold definitionally; various typeclass
instances assume that [Φ q] will un-do the eta-expansion performed by
[AsFractional]. *)
Class
AsFractional
{
PROP
:
bi
}
(
P
:
PROP
)
(
Φ
:
Qp
→
PROP
)
(
q
:
Qp
)
:=
{
as_fractional
:
P
⊣⊢
Φ
q
;
as_fractional_fractional
:
Fractional
Φ
}
.
Global
Arguments
AsFractional
{_}
_
%
I
_
%
I
_
%
Qp
.
Global
Arguments
fractional
{_
_
_}
_
_
.
Global
Hint
Mode
AsFractional
-
!
-
-
:
typeclass_instances
.
Section
fractional
.
...
...
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