Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
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
Dan Frumin
iris-coq
Commits
677aae22
Commit
677aae22
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Rename cofeMor → cofe_mor and cofe_mor → cofe_morC for consistency.
parent
51eea32e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
algebra/cofe.v
+19
-19
19 additions, 19 deletions
algebra/cofe.v
with
19 additions
and
19 deletions
algebra/cofe.v
+
19
−
19
View file @
677aae22
...
...
@@ -207,13 +207,13 @@ Section fixpoint.
Proof
.
setoid_rewrite
equiv_dist
;
naive_solver
eauto
using
fixpoint_ne
.
Qed
.
End
fixpoint
.
(
**
F
unction
space
*
)
Record
cofe
M
or
(
A
B
:
cofeT
)
:
Type
:=
CofeMor
{
(
**
Non
-
expansive
f
unction
space
*
)
Record
cofe
_m
or
(
A
B
:
cofeT
)
:
Type
:=
CofeMor
{
cofe_mor_car
:>
A
→
B
;
cofe_mor_ne
n
:
Proper
(
dist
n
==>
dist
n
)
cofe_mor_car
}
.
Arguments
CofeMor
{
_
_
}
_
{
_
}
.
Add
Printing
Constructor
cofe
M
or
.
Add
Printing
Constructor
cofe
_m
or
.
Existing
Instance
cofe_mor_ne
.
Notation
"'λne' x .. y , t"
:=
...
...
@@ -222,20 +222,20 @@ Notation "'λne' x .. y , t" :=
Section
cofe_mor
.
Context
{
A
B
:
cofeT
}
.
Global
Instance
cofe_mor_proper
(
f
:
cofe
M
or
A
B
)
:
Proper
((
≡
)
==>
(
≡
))
f
.
Global
Instance
cofe_mor_proper
(
f
:
cofe
_m
or
A
B
)
:
Proper
((
≡
)
==>
(
≡
))
f
.
Proof
.
apply
ne_proper
,
cofe_mor_ne
.
Qed
.
Instance
cofe_mor_equiv
:
Equiv
(
cofe
M
or
A
B
)
:=
λ
f
g
,
∀
x
,
f
x
≡
g
x
.
Instance
cofe_mor_dist
:
Dist
(
cofe
M
or
A
B
)
:=
λ
n
f
g
,
∀
x
,
f
x
≡
{
n
}
≡
g
x
.
Program
Definition
fun
_chain
`
(
c
:
chain
(
cofe
M
or
A
B
))
(
x
:
A
)
:
chain
B
:=
{|
chain_car
n
:=
c
n
x
|}
.
Instance
cofe_mor_equiv
:
Equiv
(
cofe
_m
or
A
B
)
:=
λ
f
g
,
∀
x
,
f
x
≡
g
x
.
Instance
cofe_mor_dist
:
Dist
(
cofe
_m
or
A
B
)
:=
λ
n
f
g
,
∀
x
,
f
x
≡
{
n
}
≡
g
x
.
Program
Definition
cofe_mor
_chain
`
(
c
:
chain
(
cofe
_m
or
A
B
))
(
x
:
A
)
:
chain
B
:=
{|
chain_car
n
:=
c
n
x
|}
.
Next
Obligation
.
intros
c
x
n
i
?
.
by
apply
(
chain_cauchy
c
).
Qed
.
Program
Instance
cofe_mor_compl
:
Compl
(
cofe
M
or
A
B
)
:=
λ
c
,
{|
cofe_mor_car
x
:=
compl
(
fun
_chain
c
x
)
|}
.
Program
Instance
cofe_mor_compl
:
Compl
(
cofe
_m
or
A
B
)
:=
λ
c
,
{|
cofe_mor_car
x
:=
compl
(
cofe_mor
_chain
c
x
)
|}
.
Next
Obligation
.
intros
c
n
x
y
Hx
.
by
rewrite
(
conv_compl
n
(
fun
_chain
c
x
))
(
conv_compl
n
(
fun
_chain
c
y
))
/=
Hx
.
intros
c
n
x
y
Hx
.
by
rewrite
(
conv_compl
n
(
cofe_mor
_chain
c
x
))
(
conv_compl
n
(
cofe_mor
_chain
c
y
))
/=
Hx
.
Qed
.
Definition
cofe_mor_cofe_mixin
:
CofeMixin
(
cofe
M
or
A
B
).
Definition
cofe_mor_cofe_mixin
:
CofeMixin
(
cofe
_m
or
A
B
).
Proof
.
split
.
-
intros
f
g
;
split
;
[
intros
Hfg
n
k
;
apply
equiv_dist
,
Hfg
|
].
...
...
@@ -246,22 +246,22 @@ Section cofe_mor.
+
by
intros
f
g
h
??
x
;
trans
(
g
x
).
-
by
intros
n
f
g
?
x
;
apply
dist_S
.
-
intros
n
c
x
;
simpl
.
by
rewrite
(
conv_compl
n
(
fun
_chain
c
x
))
/=
.
by
rewrite
(
conv_compl
n
(
cofe_mor
_chain
c
x
))
/=
.
Qed
.
Canonical
Structure
cofe_mor
:
cofeT
:=
CofeT
(
cofe
M
or
A
B
)
cofe_mor_cofe_mixin
.
Canonical
Structure
cofe_mor
C
:=
CofeT
(
cofe
_m
or
A
B
)
cofe_mor_cofe_mixin
.
Global
Instance
cofe_mor_car_ne
n
:
Proper
(
dist
n
==>
dist
n
==>
dist
n
)
(
@
cofe_mor_car
A
B
).
Proof
.
intros
f
g
Hfg
x
y
Hx
;
rewrite
Hx
;
apply
Hfg
.
Qed
.
Global
Instance
cofe_mor_car_proper
:
Proper
((
≡
)
==>
(
≡
)
==>
(
≡
))
(
@
cofe_mor_car
A
B
)
:=
ne_proper_2
_.
Lemma
cofe_mor_ext
(
f
g
:
cofe
M
or
A
B
)
:
f
≡
g
↔
∀
x
,
f
x
≡
g
x
.
Lemma
cofe_mor_ext
(
f
g
:
cofe
_m
or
A
B
)
:
f
≡
g
↔
∀
x
,
f
x
≡
g
x
.
Proof
.
done
.
Qed
.
End
cofe_mor
.
Arguments
cofe_mor
:
clear
implicits
.
Arguments
cofe_mor
C
:
clear
implicits
.
Notation
"A -n> B"
:=
(
cofe_mor
A
B
)
(
at
level
99
,
B
at
level
200
,
right
associativity
).
(
cofe_mor
C
A
B
)
(
at
level
99
,
B
at
level
200
,
right
associativity
).
Instance
cofe_mor_inhabited
{
A
B
:
cofeT
}
`
{
Inhabited
B
}
:
Inhabited
(
A
-
n
>
B
)
:=
populate
(
λ
ne
_
,
inhabitant
).
...
...
@@ -407,7 +407,7 @@ Proof.
Qed
.
Program
Definition
cofe_morCF
(
F1
F2
:
cFunctor
)
:
cFunctor
:=
{|
cFunctor_car
A
B
:=
cofe_mor
(
cFunctor_car
F1
B
A
)
(
cFunctor_car
F2
A
B
)
;
cFunctor_car
A
B
:=
cFunctor_car
F1
B
A
-
n
>
cFunctor_car
F2
A
B
;
cFunctor_map
A1
A2
B1
B2
fg
:=
cofe_morC_map
(
cFunctor_map
F1
(
fg
.2
,
fg
.1
))
(
cFunctor_map
F2
fg
)
|}
.
...
...
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