Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
cpdt
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
research
cpdt
Commits
3e3f0249
Commit
3e3f0249
authored
Feb 09, 2013
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass through Chapter 11
parent
d22609d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
Generic.v
src/Generic.v
+6
-9
No files found.
src/Generic.v
View file @
3e3f0249
...
...
@@ -87,26 +87,23 @@ Section denote.
End
denote
.
(
*
end
thide
*
)
(
**
Some
example
pieces
of
evidence
should
help
clarify
the
convention
.
First
,
we
define
some
helpful
notations
,
providing
different
ways
of
writing
constructor
denotations
.
There
is
really
just
one
notation
,
but
we
need
several
versions
of
it
to
cover
different
choices
of
which
variables
will
be
used
in
the
body
of
a
definition
.
%
The
ASCII
\
texttt
{
\
textasciitilde
{}>}
from
the
notation
will
be
rendered
later
as
$
\
leadsto
$
.%
*
)
(
**
Some
example
pieces
of
evidence
should
help
clarify
the
convention
.
First
,
we
define
a
helpful
notation
for
constructor
denotations
.
%
The
ASCII
\
texttt
{
\
textasciitilde
{}>}
from
the
notation
will
be
rendered
later
as
$
\
leadsto
$
.%
*
)
Notation
"[ ! , ! ~> x ]"
:=
((
fun
_
_
=>
x
)
:
constructorDenote
_
(
Con
_
_
))
.
Notation
"[ v , ! ~> x ]"
:=
((
fun
v
_
=>
x
)
:
constructorDenote
_
(
Con
_
_
))
.
Notation
"[ ! , r ~> x ]"
:=
((
fun
_
r
=>
x
)
:
constructorDenote
_
(
Con
_
_
))
.
Notation
"[ v , r ~> x ]"
:=
((
fun
v
r
=>
x
)
:
constructorDenote
_
(
Con
_
_
))
.
(
*
begin
thide
*
)
Definition
Empty_set_den
:
datatypeDenote
Empty_set
Empty_set_dt
:=
HNil
.
Definition
unit_den
:
datatypeDenote
unit
unit_dt
:=
[
!,
!
~>
tt
]
:::
HNil
.
[
_
,
_
~>
tt
]
:::
HNil
.
Definition
bool_den
:
datatypeDenote
bool
bool_dt
:=
[
!,
!
~>
true
]
:::
[
!,
!
~>
false
]
:::
HNil
.
[
_
,
_
~>
true
]
:::
[
_
,
_
~>
false
]
:::
HNil
.
Definition
nat_den
:
datatypeDenote
nat
nat_dt
:=
[
!,
!
~>
O
]
:::
[
!
,
r
~>
S
(
hd
r
)]
:::
HNil
.
[
_
,
_
~>
O
]
:::
[
_
,
r
~>
S
(
hd
r
)]
:::
HNil
.
Definition
list_den
(
A
:
Type
)
:
datatypeDenote
(
list
A
)
(
list_dt
A
)
:=
[
!,
!
~>
nil
]
:::
[
x
,
r
~>
x
::
hd
r
]
:::
HNil
.
[
_
,
_
~>
nil
]
:::
[
x
,
r
~>
x
::
hd
r
]
:::
HNil
.
Definition
tree_den
(
A
:
Type
)
:
datatypeDenote
(
tree
A
)
(
tree_dt
A
)
:=
[
v
,
!
~>
Leaf
v
]
:::
[
!
,
r
~>
Node
(
hd
r
)
(
hd
(
tl
r
))]
:::
HNil
.
[
v
,
_
~>
Leaf
v
]
:::
[
_
,
r
~>
Node
(
hd
r
)
(
hd
(
tl
r
))]
:::
HNil
.
(
*
end
thide
*
)
(
**
Recall
that
the
[
hd
]
and
[
tl
]
calls
above
operate
on
richly
typed
lists
,
where
type
indices
tell
us
the
lengths
of
lists
,
guaranteeing
the
safety
of
operations
like
[
hd
]
.
The
type
annotation
attached
to
each
definition
provides
enough
information
for
Coq
to
infer
list
lengths
at
appropriate
points
.
*
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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