Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Paolo G. Giarrusso
iris
Commits
396b8c73
Unverified
Commit
396b8c73
authored
Mar 01, 2022
by
Paolo G. Giarrusso
Browse files
Use new style for `inG` instances in docs as well
parent
d2a3e929
Pipeline
#62759
canceled with stage
in 7 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/proof_guide.md
View file @
396b8c73
...
...
@@ -99,9 +99,10 @@ for further details on `libG` classes). For example, the STS library is
parameterized by an STS and assumes that the STS state space is inhabited:
```
coq
Class
stsG
Σ
(
sts
:
stsT
)
:
=
{
sts_inG
:
>
inG
Σ
(
stsR
sts
)
;
sts_inG
:
inG
Σ
(
stsR
sts
)
;
sts_inhabited
:
>
Inhabited
(
sts
.
state
sts
)
;
}.
Local
Existing
Instance
sts_inG
.
```
In this case, the
`Instance`
for this
`libG`
class has more than just a
`subG`
assumption:
...
...
docs/resource_algebras.md
View file @
396b8c73
...
...
@@ -14,7 +14,8 @@ Libraries typically bundle the `inG` they need in a `libG` typeclass, so they do
not have to expose to clients what exactly their resource algebras are. For
example, in the
[
one-shot example
](
../tests/one_shot.v
)
, we have:
```
coq
Class
one_shotG
Σ
:
=
{
one_shot_inG
:
>
inG
Σ
one_shotR
}.
Class
one_shotG
Σ
:
=
{
one_shot_inG
:
inG
Σ
one_shotR
}.
Local
Existing
Instance
one_shot_inG
.
```
The
`:>`
means that the projection
`one_shot_inG`
is automatically registered as
an instance for type-class resolution. If you need several resource algebras,
...
...
@@ -273,8 +274,9 @@ Putting it all together, the `libG` typeclass and `libΣ` list of functors for
your example would look as follows:
```
coq
Class
libG
Σ
:
=
{
lib_inG
:
>
inG
Σ
(
gmapR
K
(
agreeR
(
prodO
natO
(
laterO
(
iPropO
Σ
)))))
}.
Class
libG
Σ
:
=
{
lib_inG
:
inG
Σ
(
gmapR
K
(
agreeR
(
prodO
natO
(
laterO
(
iPropO
Σ
)))))
}.
Definition
lib
Σ
:
gFunctors
:
=
#[
GFunctor
(
gmapRF
K
(
agreeRF
(
natO
*
▶
∙
)))].
Local
Existing
Instance
lib_inG
.
Instance
subG_lib
Σ
{
Σ
}
:
subG
lib
Σ
Σ
→
libG
Σ
.
Proof
.
solve_inG
.
Qed
.
```
...
...
Write
Preview
Supports
Markdown
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