Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
122
Issues
122
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
4426f8a3
Commit
4426f8a3
authored
Nov 07, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ci/robbert/hintmode_inG' into 'master'
Set `Hint Mode` for `inG`. See merge request
iris/iris!330
parents
eb2dfc72
c68b49e8
Pipeline
#20996
passed with stage
in 22 minutes and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
theories/base_logic/lib/own.v
theories/base_logic/lib/own.v
+9
-5
No files found.
theories/base_logic/lib/own.v
View file @
4426f8a3
...
...
@@ -11,6 +11,10 @@ higher-order unification problems. *)
Class
inG
(
Σ
:
gFunctors
)
(
A
:
cmraT
)
:
=
InG
{
inG_id
:
gid
Σ
;
inG_prf
:
A
=
gFunctors_lookup
Σ
inG_id
(
iPrePropO
Σ
)
_
}.
Arguments
inG_id
{
_
_
}
_
.
(** We use the mode [-] for [Σ] since there is always a unique [Σ]. We use the
mode [!] for [A] since we can have multiple [inG]s for different [A]s, so we do
not want Coq to pick one arbitrarily. *)
Hint
Mode
inG
-
!
:
typeclass_instances
.
Lemma
subG_inG
Σ
(
F
:
gFunctor
)
:
subG
F
Σ
→
inG
Σ
(
F
(
iPrePropO
Σ
)
_
).
Proof
.
move
=>
/(
_
0
%
fin
)
/=
[
j
->].
by
exists
j
.
Qed
.
...
...
@@ -90,7 +94,7 @@ Proof. intros a1 a2. apply own_mono. Qed.
Lemma
own_valid
γ
a
:
own
γ
a
⊢
✓
a
.
Proof
.
rewrite
!
own_eq
/
own_def
ownM_valid
/
iRes_singleton
.
rewrite
discrete_fun_validI
(
forall_elim
(
inG_id
_
))
discrete_fun_lookup_singleton
.
rewrite
discrete_fun_validI
(
forall_elim
(
inG_id
Hin
))
discrete_fun_lookup_singleton
.
rewrite
gmap_validI
(
forall_elim
γ
)
lookup_singleton
option_validI
.
(* implicit arguments differ a bit *)
by
trans
(
✓
cmra_transport
inG_prf
a
:
iProp
Σ
)%
I
;
last
destruct
inG_prf
.
...
...
@@ -113,7 +117,7 @@ Lemma later_own γ a : ▷ own γ a -∗ ◇ (∃ b, own γ b ∧ ▷ (a ≡ b))
Proof
.
rewrite
own_eq
/
own_def
later_ownM
.
apply
exist_elim
=>
r
.
assert
(
NonExpansive
(
λ
r
:
iResUR
Σ
,
r
(
inG_id
Hin
)
!!
γ
)).
{
intros
n
r1
r2
Hr
.
f_equiv
.
by
specialize
(
Hr
(
inG_id
_
)).
}
{
intros
n
r1
r2
Hr
.
f_equiv
.
by
specialize
(
Hr
(
inG_id
Hin
)).
}
rewrite
(
f_equiv
(
λ
r
:
iResUR
Σ
,
r
(
inG_id
Hin
)
!!
γ
)
_
r
).
rewrite
{
1
}/
iRes_singleton
discrete_fun_lookup_singleton
lookup_singleton
.
rewrite
option_equivI
.
case
Hb
:
(
r
(
inG_id
_
)
!!
γ
)=>
[
b
|]
;
last
first
.
...
...
@@ -126,7 +130,7 @@ Proof.
apply
ownM_mono
=>
/=.
exists
(
discrete_fun_insert
(
inG_id
_
)
(
delete
γ
(
r
(
inG_id
Hin
)))
r
).
intros
i'
.
rewrite
discrete_fun_lookup_op
.
destruct
(
decide
(
i'
=
inG_id
_
))
as
[->|?].
destruct
(
decide
(
i'
=
inG_id
Hin
))
as
[->|?].
+
rewrite
discrete_fun_lookup_insert
discrete_fun_lookup_singleton
.
intros
γ
'
.
rewrite
lookup_op
.
destruct
(
decide
(
γ
'
=
γ
))
as
[->|?].
*
by
rewrite
lookup_singleton
lookup_delete
Hb
.
...
...
@@ -149,7 +153,7 @@ Proof.
intros
HP
Ha
.
rewrite
-(
bupd_mono
(
∃
m
,
⌜
∃
γ
,
P
γ
∧
m
=
iRes_singleton
γ
a
⌝
∧
uPred_ownM
m
)%
I
).
-
rewrite
/
uPred_valid
/
bi_emp_valid
(
ownM_unit
emp
).
eapply
bupd_ownM_updateP
,
(
discrete_fun_singleton_updateP_empty
(
inG_id
_
))
;
eapply
bupd_ownM_updateP
,
(
discrete_fun_singleton_updateP_empty
(
inG_id
Hin
))
;
first
(
eapply
alloc_updateP_strong'
,
cmra_transport_valid
,
Ha
)
;
naive_solver
.
-
apply
exist_elim
=>
m
;
apply
pure_elim_l
=>-[
γ
[
Hfresh
->]].
...
...
@@ -205,7 +209,7 @@ Arguments own_update {_ _} [_] _ _ _ _.
Arguments
own_update_2
{
_
_
}
[
_
]
_
_
_
_
_
.
Arguments
own_update_3
{
_
_
}
[
_
]
_
_
_
_
_
_
.
Lemma
own_unit
A
`
{!
inG
Σ
(
A
:
ucmraT
)}
γ
:
(|==>
own
γ
ε
)%
I
.
Lemma
own_unit
A
`
{!
inG
Σ
(
A
:
ucmraT
)}
γ
:
(|==>
own
γ
(
ε
:
A
)
)%
I
.
Proof
.
rewrite
/
uPred_valid
/
bi_emp_valid
(
ownM_unit
emp
)
!
own_eq
/
own_def
.
apply
bupd_ownM_update
,
discrete_fun_singleton_update_empty
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment