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
4df29af7
Commit
4df29af7
authored
2 years ago
by
Simon Friis Vindum
Browse files
Options
Downloads
Patches
Plain Diff
Add Fractional and AsFractional instance for embed
parent
11b16c7a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
iris/bi/lib/fractional.v
+8
-0
8 additions, 0 deletions
iris/bi/lib/fractional.v
tests/proofmode_monpred.v
+8
-1
8 additions, 1 deletion
tests/proofmode_monpred.v
with
18 additions
and
1 deletion
CHANGELOG.md
+
2
−
0
View file @
4df29af7
...
...
@@ -103,6 +103,8 @@ and Tej Chajed. Thanks a lot to everyone involved!
*
Rename
`laterN_plus`
into
`laterN_add`
.
*
Remove
`make_laterable`
from atomic updates. This relies on Iris now having
support for later credits (see below).
*
Add
`Fractional`
and
`AsFractional`
instances for
`embed`
such that the
embedding of something fractional is also fractional. (by Simon Friis Vindum).
**Changes in `proofmode`:**
...
...
This diff is collapsed.
Click to expand it.
iris/bi/lib/fractional.v
+
8
−
0
View file @
4df29af7
...
...
@@ -87,6 +87,14 @@ Section fractional.
rewrite
!
assoc
.
f_equiv
.
by
rewrite
comm
.
Qed
.
Global
Instance
fractional_embed
`{
!
BiEmbed
PROP
PROP'
}
Φ
:
Fractional
Φ
→
Fractional
(
λ
q
,
⎡
Φ
q
⎤
:
PROP'
)
%
I
.
Proof
.
intros
???
.
by
rewrite
fractional
embed_sep
.
Qed
.
Global
Instance
as_fractional_embed
`{
!
BiEmbed
PROP
PROP'
}
P
Φ
q
:
AsFractional
P
Φ
q
→
AsFractional
(
⎡
P
⎤
)
(
λ
q
,
⎡
Φ
q
⎤
)
%
I
q
.
Proof
.
split
;
[
by
rewrite
->!
as_fractional
|
apply
_]
.
Qed
.
Global
Instance
fractional_big_sepL
{
A
}
(
l
:
list
A
)
Ψ
:
(
∀
k
x
,
Fractional
(
Ψ
k
x
))
→
Fractional
(
PROP
:=
PROP
)
(
λ
q
,
[
∗
list
]
k
↦
x
∈
l
,
Ψ
k
x
q
)
%
I
.
...
...
This diff is collapsed.
Click to expand it.
tests/proofmode_monpred.v
+
8
−
1
View file @
4df29af7
From
iris
.
bi
.
lib
Require
Import
fractional
.
From
iris
.
proofmode
Require
Import
tactics
monpred
.
From
iris
.
base_logic
.
lib
Require
Import
invariants
.
From
iris
.
base_logic
.
lib
Require
Import
invariants
ghost_var
.
From
iris
.
prelude
Require
Import
options
.
Unset
Mangle
Names
.
...
...
@@ -183,6 +184,7 @@ Section tests_iprop.
Context
{
I
:
biIndex
}
`{
!
invGS_gen
hlc
Σ
}
.
Local
Notation
monPred
:=
(
monPred
I
(
iPropI
Σ
))
.
Local
Notation
monPredI
:=
(
monPredI
I
(
iPropI
Σ
))
.
Implicit
Types
P
Q
R
:
monPred
.
Implicit
Types
𝓟
𝓠
𝓡
:
iProp
Σ
.
...
...
@@ -210,4 +212,9 @@ Section tests_iprop.
iPoseProof
(
own_update
with
"Hγ"
)
as
"H"
;
first
done
.
by
iMod
"H"
.
Qed
.
Lemma
test_embed_fractional
`{
!
ghost_varG
Σ
A
}
γ
q
(
a
:
A
)
:
⎡
ghost_var
γ
q
a
⎤
⊢@
{
monPredI
}
⎡
ghost_var
γ
(
q
/
2
)
a
⎤
∗
⎡
ghost_var
γ
(
q
/
2
)
a
⎤.
Proof
.
iIntros
"[$ $]"
.
Qed
.
End
tests_iprop
.
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