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
998df552
Commit
998df552
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
implement dec_agree (no lemmas about it yet)
parent
d3700ebd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_CoqProject
+1
-0
1 addition, 0 deletions
_CoqProject
algebra/dec_agree.v
+49
-0
49 additions, 0 deletions
algebra/dec_agree.v
with
50 additions
and
0 deletions
_CoqProject
+
1
−
0
View file @
998df552
...
@@ -47,6 +47,7 @@ algebra/base.v
...
@@ -47,6 +47,7 @@ algebra/base.v
algebra/dra.v
algebra/dra.v
algebra/cofe_solver.v
algebra/cofe_solver.v
algebra/agree.v
algebra/agree.v
algebra/dec_agree.v
algebra/excl.v
algebra/excl.v
algebra/iprod.v
algebra/iprod.v
algebra/functor.v
algebra/functor.v
...
...
This diff is collapsed.
Click to expand it.
algebra/dec_agree.v
0 → 100644
+
49
−
0
View file @
998df552
From
algebra
Require
Export
cmra
.
From
algebra
Require
Import
functor
upred
.
Local
Arguments
validN
_
_
_
!
_
/.
Local
Arguments
valid
_
_
!
_
/.
Local
Arguments
op
_
_
_
!
_
/.
Local
Arguments
unit
_
_
!
_
/.
(* This is isomorphic to optiob, but has a very different RA structure. *)
Inductive
dec_agree
(
A
:
Type
)
:
Type
:=
|
DecAgree
:
A
→
dec_agree
A
|
DecAgreeBot
:
dec_agree
A
.
Arguments
DecAgree
{_}
_
.
Arguments
DecAgreeBot
{_}
.
Section
dec_agree
.
Context
{
A
:
Type
}
`{
∀
x
y
:
A
,
Decision
(
x
=
y
)}
.
Instance
dec_agree_valid
:
Valid
(
dec_agree
A
)
:=
λ
x
,
if
x
is
DecAgree
_
then
True
else
False
.
Instance
dec_agree_equiv
:
Equiv
(
dec_agree
A
)
:=
equivL
.
Canonical
Structure
dec_agreeC
:
cofeT
:=
leibnizC
(
dec_agree
A
)
.
Instance
dec_agree_op
:
Op
(
dec_agree
A
)
:=
λ
x
y
,
match
x
,
y
with
|
DecAgree
a
,
DecAgree
b
=>
if
decide
(
a
=
b
)
then
DecAgree
a
else
DecAgreeBot
|
_,
_
=>
DecAgreeBot
end
.
Instance
dec_agree_unit
:
Unit
(
dec_agree
A
)
:=
id
.
Instance
dec_agree_minus
:
Minus
(
dec_agree
A
)
:=
λ
x
y
,
x
.
Definition
dec_agree_ra
:
RA
(
dec_agree
A
)
.
Proof
.
split
.
-
apply
_
.
-
apply
_
.
-
apply
_
.
-
apply
_
.
-
intros
[?|]
[?|]
[?|];
simpl
;
repeat
(
case_match
;
simpl
);
subst
;
congruence
.
-
intros
[?|]
[?|];
simpl
;
repeat
(
case_match
;
simpl
);
try
subst
;
congruence
.
-
intros
[?|];
simpl
;
repeat
(
case_match
;
simpl
);
try
subst
;
congruence
.
-
intros
[?|];
simpl
;
repeat
(
case_match
;
simpl
);
try
subst
;
congruence
.
-
intros
[?|]
[?|]
?;
simpl
;
done
.
-
intros
[?|]
[?|]
?;
simpl
;
done
.
-
intros
[?|]
[?|]
[[?|]];
simpl
;
repeat
(
case_match
;
simpl
);
subst
;
try
congruence
;
[]
.
case
=>
EQ
.
destruct
EQ
.
done
.
Qed
.
Canonical
Structure
dec_agreeRA
:
cmraT
:=
discreteRA
dec_agree_ra
.
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