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
Gaëtan Gilbert
Iris
Commits
bd60eade
Commit
bd60eade
authored
6 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Move generic `IsOp` instances to `algebra/proofmode_classes.v`.
parent
3cfa392b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/algebra/proofmode_classes.v
+22
-1
22 additions, 1 deletion
theories/algebra/proofmode_classes.v
theories/base_logic/base_logic.v
+0
-21
0 additions, 21 deletions
theories/base_logic/base_logic.v
with
22 additions
and
22 deletions
theories/algebra/proofmode_classes.v
+
22
−
1
View file @
bd60eade
...
...
@@ -30,4 +30,25 @@ Class IsOp'LR {A : cmraT} (a b1 b2 : A) := is_op_lr : IsOp a b1 b2.
Existing
Instance
is_op_lr
|
0
.
Hint
Mode
IsOp'LR
+
!
-
-
:
typeclass_instances
.
Instance
is_op_lr_op
{
A
:
cmraT
}
(
a
b
:
A
)
:
IsOp'LR
(
a
⋅
b
)
a
b
|
0
.
Proof
.
by
rewrite
/
IsOp'LR
/
IsOp
.
Qed
.
\ No newline at end of file
Proof
.
by
rewrite
/
IsOp'LR
/
IsOp
.
Qed
.
(* FromOp *)
(* TODO: Worst case there could be a lot of backtracking on these instances,
try to refactor. *)
Global
Instance
is_op_pair
{
A
B
:
cmraT
}
(
a
b1
b2
:
A
)
(
a'
b1'
b2'
:
B
)
:
IsOp
a
b1
b2
→
IsOp
a'
b1'
b2'
→
IsOp'
(
a
,
a'
)
(
b1
,
b1'
)
(
b2
,
b2'
)
.
Proof
.
by
constructor
.
Qed
.
Global
Instance
is_op_pair_core_id_l
{
A
B
:
cmraT
}
(
a
:
A
)
(
a'
b1'
b2'
:
B
)
:
CoreId
a
→
IsOp
a'
b1'
b2'
→
IsOp'
(
a
,
a'
)
(
a
,
b1'
)
(
a
,
b2'
)
.
Proof
.
constructor
=>
//=.
by
rewrite
-
core_id_dup
.
Qed
.
Global
Instance
is_op_pair_core_id_r
{
A
B
:
cmraT
}
(
a
b1
b2
:
A
)
(
a'
:
B
)
:
CoreId
a'
→
IsOp
a
b1
b2
→
IsOp'
(
a
,
a'
)
(
b1
,
a'
)
(
b2
,
a'
)
.
Proof
.
constructor
=>
//=.
by
rewrite
-
core_id_dup
.
Qed
.
Global
Instance
is_op_Some
{
A
:
cmraT
}
(
a
:
A
)
b1
b2
:
IsOp
a
b1
b2
→
IsOp'
(
Some
a
)
(
Some
b1
)
(
Some
b2
)
.
Proof
.
by
constructor
.
Qed
.
(* This one has a higher precendence than [is_op_op] so we get a [+] instead of
an [⋅]. *)
Global
Instance
is_op_plus
(
n1
n2
:
nat
)
:
IsOp
(
n1
+
n2
)
n1
n2
.
Proof
.
done
.
Qed
.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
theories/base_logic/base_logic.v
+
0
−
21
View file @
bd60eade
...
...
@@ -37,27 +37,6 @@ Proof.
rewrite
-
cmra_valid_intro
//.
by
apply
pure_intro
.
Qed
.
(* FromOp *)
(* TODO: Worst case there could be a lot of backtracking on these instances,
try to refactor. *)
Global
Instance
is_op_pair
{
A
B
:
cmraT
}
(
a
b1
b2
:
A
)
(
a'
b1'
b2'
:
B
)
:
IsOp
a
b1
b2
→
IsOp
a'
b1'
b2'
→
IsOp'
(
a
,
a'
)
(
b1
,
b1'
)
(
b2
,
b2'
)
.
Proof
.
by
constructor
.
Qed
.
Global
Instance
is_op_pair_core_id_l
{
A
B
:
cmraT
}
(
a
:
A
)
(
a'
b1'
b2'
:
B
)
:
CoreId
a
→
IsOp
a'
b1'
b2'
→
IsOp'
(
a
,
a'
)
(
a
,
b1'
)
(
a
,
b2'
)
.
Proof
.
constructor
=>
//=.
by
rewrite
-
core_id_dup
.
Qed
.
Global
Instance
is_op_pair_core_id_r
{
A
B
:
cmraT
}
(
a
b1
b2
:
A
)
(
a'
:
B
)
:
CoreId
a'
→
IsOp
a
b1
b2
→
IsOp'
(
a
,
a'
)
(
b1
,
a'
)
(
b2
,
a'
)
.
Proof
.
constructor
=>
//=.
by
rewrite
-
core_id_dup
.
Qed
.
Global
Instance
is_op_Some
{
A
:
cmraT
}
(
a
:
A
)
b1
b2
:
IsOp
a
b1
b2
→
IsOp'
(
Some
a
)
(
Some
b1
)
(
Some
b2
)
.
Proof
.
by
constructor
.
Qed
.
(* This one has a higher precendence than [is_op_op] so we get a [+] instead of
an [⋅]. *)
Global
Instance
is_op_plus
(
n1
n2
:
nat
)
:
IsOp
(
n1
+
n2
)
n1
n2
.
Proof
.
done
.
Qed
.
Global
Instance
from_sep_ownM
(
a
b1
b2
:
M
)
:
IsOp
a
b1
b2
→
FromSep
(
uPred_ownM
a
)
(
uPred_ownM
b1
)
(
uPred_ownM
b2
)
.
...
...
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