Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Monitor
Incidents
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
Tej Chajed
iris
Commits
19cca411
Commit
19cca411
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Owning a monoid element.
parent
d6456080
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/logic.v
+27
-1
27 additions, 1 deletion
iris/logic.v
with
27 additions
and
1 deletion
iris/logic.v
+
27
−
1
View file @
19cca411
...
@@ -137,6 +137,17 @@ Next Obligation.
...
@@ -137,6 +137,17 @@ Next Obligation.
auto
using
ra_unit_preserving
,
cmra_unit_valid
.
auto
using
ra_unit_preserving
,
cmra_unit_valid
.
Qed
.
Qed
.
Program
Definition
iprop_own
{
A
:
cmraT
}
(
a
:
A
)
:
iProp
A
:=
{|
iprop_holds
n
x
:=
∃
a'
,
x
=
{
n
}
=
a
⋅
a'
|}
.
Next
Obligation
.
by
intros
A
a
x1
x2
n
[
a'
Hx
]
?;
exists
a'
;
rewrite
<-
Hx
.
Qed
.
Next
Obligation
.
intros
A
a
x1
x
n1
n2
;
rewrite
ra_included_spec
;
intros
[
x2
Hx
]
??
[
a'
Hx1
]
.
exists
(
a'
⋅
x2
)
.
by
rewrite
(
associative
op
),
<-
(
dist_le
_
_
_
_
Hx1
),
Hx
.
Qed
.
Program
Definition
iprop_valid
{
A
:
cmraT
}
(
a
:
A
)
:
iProp
A
:=
{|
iprop_holds
n
x
:=
validN
n
a
|}
.
Solve
Obligations
with
naive_solver
eauto
2
using
cmra_valid_le
.
Definition
iprop_fixpoint
{
A
}
(
P
:
iProp
A
→
iProp
A
)
Definition
iprop_fixpoint
{
A
}
(
P
:
iProp
A
→
iProp
A
)
`{
!
Contractive
P
}
:
iProp
A
:=
fixpoint
P
(
iprop_const
True
)
.
`{
!
Contractive
P
}
:
iProp
A
:=
fixpoint
P
(
iprop_const
True
)
.
...
@@ -402,9 +413,24 @@ Proof.
...
@@ -402,9 +413,24 @@ Proof.
by
rewrite
ra_unit_l
,
ra_unit_idempotent
.
by
rewrite
ra_unit_l
,
ra_unit_idempotent
.
Qed
.
Qed
.
(* Own *)
Lemma
iprop_own_op
(
a1
a2
:
A
)
:
iprop_own
(
a1
⋅
a2
)
≡
(
iprop_own
a1
★
iprop_own
a2
)
%
I
.
Proof
.
intros
x
n
?;
split
.
*
intros
[
z
?];
exists
a1
,
(
a2
⋅
z
);
split
;
[
by
rewrite
(
associative
op
)|]
.
split
.
by
exists
(
unit
a1
);
rewrite
ra_unit_r
.
by
exists
z
.
*
intros
(
y1
&
y2
&
Hx
&
[
z1
Hy1
]
&
[
z2
Hy2
]);
exists
(
z1
⋅
z2
)
.
rewrite
(
associative
op
),
<-
(
commutative
op
z1
),
<-!
(
associative
op
),
<-
Hy2
.
by
rewrite
(
associative
op
),
(
commutative
op
z1
),
<-
Hy1
.
Qed
.
Lemma
iprop_own_valid
(
a
:
A
)
:
iprop_own
a
⊆
iprop_valid
a
.
Proof
.
intros
x
n
Hv
[
a'
Hx
];
simpl
;
rewrite
Hx
in
Hv
;
eauto
using
cmra_valid_op_l
.
Qed
.
(* Fix *)
(* Fix *)
Lemma
iprop_fixpoint_unfold
(
P
:
iProp
A
→
iProp
A
)
`{
!
Contractive
P
}
:
Lemma
iprop_fixpoint_unfold
(
P
:
iProp
A
→
iProp
A
)
`{
!
Contractive
P
}
:
iprop_fixpoint
P
≡
P
(
iprop_fixpoint
P
)
.
iprop_fixpoint
P
≡
P
(
iprop_fixpoint
P
)
.
Proof
.
apply
fixpoint_unfold
.
Qed
.
Proof
.
apply
fixpoint_unfold
.
Qed
.
End
logic
.
End
logic
.
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