Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Iris
Commits
5ffa64f9
Commit
5ffa64f9
authored
Jan 22, 2017
by
Jacques-Henri Jourdan
Browse files
(CM)RA structure for positive.
parent
7a17a440
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/algebra/cmra.v
View file @
5ffa64f9
...
...
@@ -933,6 +933,32 @@ Section mnat.
Proof
.
by
constructor
.
Qed
.
End
mnat
.
(** ** Positive integers. *)
Section
positive
.
Instance
pos_valid
:
Valid
positive
:
=
λ
x
,
True
.
Instance
pos_validN
:
ValidN
positive
:
=
λ
n
x
,
True
.
Instance
pos_pcore
:
PCore
positive
:
=
λ
x
,
None
.
Instance
pos_op
:
Op
positive
:
=
Pos
.
add
.
Definition
pos_op_plus
x
y
:
x
⋅
y
=
(
x
+
y
)%
positive
:
=
eq_refl
.
Lemma
pos_included
(
x
y
:
positive
)
:
x
≼
y
↔
(
x
<
y
)%
positive
.
Proof
.
split
.
-
intros
[
z
->]
;
unfold
op
,
pos_op
.
lia
.
-
exists
(
y
-
x
)%
positive
.
symmetry
.
apply
Pplus_minus
.
lia
.
Qed
.
Lemma
pos_ra_mixin
:
RAMixin
positive
.
Proof
.
split
;
try
by
eauto
.
-
by
intros
???
->.
-
intros
???.
apply
Pos
.
add_assoc
.
-
intros
??.
apply
Pos
.
add_comm
.
Qed
.
Canonical
Structure
posR
:
cmraT
:
=
discreteR
positive
pos_ra_mixin
.
Global
Instance
pos_cmra_discrete
:
CMRADiscrete
posR
.
Proof
.
constructor
;
apply
_
||
done
.
Qed
.
End
positive
.
(** ** Product *)
Section
prod
.
Context
{
A
B
:
cmraT
}.
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment