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
Yixuan Chen
Iris
Commits
1109ca07
Commit
1109ca07
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Move DRA validity instances into section to avoid ambiguity.
parent
fabb3ff9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
algebra/dra.v
+15
-18
15 additions, 18 deletions
algebra/dra.v
with
15 additions
and
18 deletions
algebra/dra.v
+
15
−
18
View file @
1109ca07
...
...
@@ -12,22 +12,6 @@ Arguments validity_is_valid {_ _} _.
Definition
to_validity
{
A
}
{
P
:
A
→
Prop
}
(
x
:
A
)
:
validity
P
:=
Validity
x
(
P
x
)
id
.
Instance
validity_valid
{
A
}
(
P
:
A
→
Prop
)
:
Valid
(
validity
P
)
:=
validity_is_valid
.
Instance
validity_equiv
`{
Equiv
A
}
(
P
:
A
→
Prop
)
:
Equiv
(
validity
P
)
:=
λ
x
y
,
(
valid
x
↔
valid
y
)
∧
(
valid
x
→
validity_car
x
≡
validity_car
y
)
.
Instance
validity_equivalence
`{
Equiv
A
,
!
Equivalence
((
≡
)
:
relation
A
)}
P
:
Equivalence
((
≡
)
:
relation
(
validity
P
))
.
Proof
.
split
;
unfold
equiv
,
validity_equiv
.
*
by
intros
[
x
px
?];
simpl
.
*
intros
[
x
px
?]
[
y
py
?];
naive_solver
.
*
intros
[
x
px
?]
[
y
py
?]
[
z
pz
?]
[?
Hxy
]
[?
Hyz
];
simpl
in
*.
split
;
[|
intros
;
transitivity
y
];
tauto
.
Qed
.
Instance
validity_valid_proper
`{
Equiv
A
}
(
P
:
A
→
Prop
)
:
Proper
((
≡
)
==>
iff
)
(
valid
:
validity
P
→
Prop
)
.
Proof
.
intros
??
[??];
naive_solver
.
Qed
.
Definition
dra_included
`{
Equiv
A
,
Valid
A
,
Disjoint
A
,
Op
A
}
:=
λ
x
y
,
∃
z
,
y
≡
x
⋅
z
∧
✓
z
∧
x
⊥
z
.
...
...
@@ -64,6 +48,20 @@ Context A `{DRA A}.
Arguments
valid
_
_
!
_
/.
Hint
Immediate
dra_op_proper
:
typeclass_instances
.
Notation
T
:=
(
validity
(
valid
:
A
→
Prop
))
.
Instance
validity_valid
:
Valid
T
:=
validity_is_valid
.
Instance
validity_equiv
:
Equiv
T
:=
λ
x
y
,
(
valid
x
↔
valid
y
)
∧
(
valid
x
→
validity_car
x
≡
validity_car
y
)
.
Instance
validity_equivalence
:
Equivalence
((
≡
)
:
relation
T
)
.
Proof
.
split
;
unfold
equiv
,
validity_equiv
.
*
by
intros
[
x
px
?];
simpl
.
*
intros
[
x
px
?]
[
y
py
?];
naive_solver
.
*
intros
[
x
px
?]
[
y
py
?]
[
z
pz
?]
[?
Hxy
]
[?
Hyz
];
simpl
in
*.
split
;
[|
intros
;
transitivity
y
];
tauto
.
Qed
.
Instance
:
Proper
((
≡
)
==>
(
≡
)
==>
iff
)
(
⊥
)
.
Proof
.
intros
x1
x2
Hx
y1
y2
Hy
;
split
.
...
...
@@ -83,7 +81,6 @@ Qed.
Hint
Immediate
dra_disjoint_move_l
dra_disjoint_move_r
.
Hint
Unfold
dra_included
.
Notation
T
:=
(
validity
(
valid
:
A
→
Prop
))
.
Lemma
validity_valid_car_valid
(
z
:
T
)
:
✓
z
→
✓
validity_car
z
.
Proof
.
apply
validity_prf
.
Qed
.
Hint
Resolve
validity_valid_car_valid
.
...
...
@@ -106,7 +103,7 @@ Proof.
split
;
intros
(?
&
?
&
?);
split_ands'
;
first
[
rewrite
?Heq
;
tauto
|
rewrite
-
?Heq
;
tauto
|
tauto
]
.
*
by
intros
??
[?
Heq
];
split
;
[
done
|];
simpl
;
intros
?;
rewrite
Heq
.
*
by
intros
??
->
?
.
*
intros
??
[??];
naive_solver
.
*
intros
x1
x2
[?
Hx
]
y1
y2
[?
Hy
];
split
;
simpl
;
[|
by
intros
(?
&
?
&
?);
rewrite
Hx
//
Hy
]
.
split
;
intros
(?
&
?
&
z
&
?
&
?);
split_ands'
;
try
tauto
.
...
...
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