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
b8535f49
Commit
b8535f49
authored
Jul 26, 2012
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes while hacking on coqdoc
parent
20175fa1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
Coinductive.v
src/Coinductive.v
+1
-1
Equality.v
src/Equality.v
+1
-1
Large.v
src/Large.v
+3
-3
Universes.v
src/Universes.v
+2
-2
No files found.
src/Coinductive.v
View file @
b8535f49
...
...
@@ -447,7 +447,7 @@ Theorem ones_eq''' : stream_eq ones ones'.
Qed
.
(
*
end
thide
*
)
(
**
Let
us
put
[
stream_eq_ind
]
through
its
paces
a
bit
more
,
considering
two
different
ways
to
compute
infinite
streams
of
all
factorial
values
.
First
,
we
import
the
[
fact
]
factorial
function
from
the
standard
library
.
*
)
(
**
Let
us
put
[
stream_eq_
co
ind
]
through
its
paces
a
bit
more
,
considering
two
different
ways
to
compute
infinite
streams
of
all
factorial
values
.
First
,
we
import
the
[
fact
]
factorial
function
from
the
standard
library
.
*
)
Require
Import
Arith
.
Print
fact
.
...
...
src/Equality.v
View file @
b8535f49
...
...
@@ -23,7 +23,7 @@ Set Implicit Arguments.
(
**
*
The
Definitional
Equality
*
)
(
**
We
have
seen
many
examples
so
far
where
proof
goals
follow
"by computation."
That
is
,
we
apply
computational
reduction
rules
to
reduce
the
goal
to
a
normal
form
,
at
which
point
it
follows
trivially
.
Exactly
when
this
works
and
when
it
does
not
depends
on
the
details
of
Coq
'
s
%
\
index
{
definitional
equality
}%
_
definitional
equality_
.
This
is
an
untyped
binary
relation
appearing
in
the
formal
metatheory
of
CIC
.
CIC
contains
a
typing
rule
allowing
the
conclusion
$
E
:
T
$
from
the
premise
$
E
:
T
'
$
and
a
proof
that
$
T
$
and
$
T
'
$
are
definitionally
equal
.
(
**
We
have
seen
many
examples
so
far
where
proof
goals
follow
"by computation."
That
is
,
we
apply
computational
reduction
rules
to
reduce
the
goal
to
a
normal
form
,
at
which
point
it
follows
trivially
.
Exactly
when
this
works
and
when
it
does
not
depends
on
the
details
of
Coq
'
s
%
\
index
{
definitional
equality
}%
_
definitional
equality_
.
This
is
an
untyped
binary
relation
appearing
in
the
formal
metatheory
of
CIC
.
CIC
contains
a
typing
rule
allowing
the
conclusion
[
E
:
T
]
from
the
premise
[
E
:
T
'
]
and
a
proof
that
[
T
]
and
[
T
'
]
are
definitionally
equal
.
The
%
\
index
{
tactics
!
cbv
}%
[
cbv
]
tactic
will
help
us
illustrate
the
rules
of
Coq
'
s
definitional
equality
.
We
redefine
the
natural
number
predecessor
function
in
a
somewhat
convoluted
way
and
construct
a
manual
proof
that
it
returns
[
0
]
when
applied
to
[
1
]
.
*
)
...
...
src/Large.v
View file @
b8535f49
...
...
@@ -773,7 +773,7 @@ End Client.
(
**
As
in
software
development
,
large
Coq
projects
are
much
more
manageable
when
split
across
multiple
files
and
when
decomposed
into
libraries
.
Coq
and
Proof
General
provide
very
good
support
for
these
activities
.
Consider
a
library
that
we
will
name
[
Lib
]
,
housed
in
directory
<<
LIB
>>
and
split
between
files
<<
A
.
v
>>,
<<
B
.
v
>>,
and
<<
C
.
v
>>.
A
simple
%
\
index
{
Makefile
}%
Makefile
will
compile
the
library
,
relying
on
the
standard
Coq
tool
%
\
index
{
coq
\
_
makefile
}
\
texttt
{%
#
<
tt
>
#
coq_makefile
#
</
tt
>
#
%}%
to
do
the
hard
work
.
Consider
a
library
that
we
will
name
[
Lib
]
,
housed
in
directory
<<
LIB
>>
and
split
between
files
<<
A
.
v
>>,
<<
B
.
v
>>,
and
<<
C
.
v
>>.
A
simple
%
\
index
{
Makefile
}%
Makefile
will
compile
the
library
,
relying
on
the
standard
Coq
tool
%
\
index
{
coq
\
_
makefile
}
%<<
coq_makefile
>>
to
do
the
hard
work
.
<<
MODULES
:=
A
B
C
...
...
@@ -792,7 +792,7 @@ clean:: Makefile.coq
rm
-
f
Makefile
.
coq
>>
The
Makefile
begins
by
defining
a
variable
<<
VS
>>
holding
the
list
of
filenames
to
be
included
in
the
project
.
The
primary
target
is
<<
coq
>>,
which
depends
on
the
construction
of
an
auxiliary
Makefile
called
<<
Makefile
.
coq
>>.
Another
rule
explains
how
to
build
that
file
.
We
call
%
\
texttt
{%
#
<
tt
>
#
coq_makefile
#
</
tt
>
#
%}%
,
using
the
<<-
R
>>
flag
to
specify
that
files
in
the
current
directory
should
be
considered
to
belong
to
the
library
[
Lib
]
.
This
Makefile
will
build
a
compiled
version
of
each
module
,
such
that
<<
X
.
v
>>
is
compiled
into
<<
X
.
vo
>>.
The
Makefile
begins
by
defining
a
variable
<<
VS
>>
holding
the
list
of
filenames
to
be
included
in
the
project
.
The
primary
target
is
<<
coq
>>,
which
depends
on
the
construction
of
an
auxiliary
Makefile
called
<<
Makefile
.
coq
>>.
Another
rule
explains
how
to
build
that
file
.
We
call
<<
coq_makefile
>>
,
using
the
<<-
R
>>
flag
to
specify
that
files
in
the
current
directory
should
be
considered
to
belong
to
the
library
[
Lib
]
.
This
Makefile
will
build
a
compiled
version
of
each
module
,
such
that
<<
X
.
v
>>
is
compiled
into
<<
X
.
vo
>>.
Now
code
in
<<
B
.
v
>>
may
refer
to
definitions
in
<<
A
.
v
>>
after
running
[[
...
...
@@ -821,7 +821,7 @@ clean:: Makefile.coq
rm
-
f
Makefile
.
coq
>>
We
change
the
%
\
texttt
{%
#
<
tt
>
#
coq_makefile
#
</
tt
>
#
%}%
call
to
indicate
where
the
library
[
Lib
]
is
found
.
Now
<<
D
.
v
>>
and
<<
E
.
v
>>
can
refer
to
definitions
from
[
Lib
]
module
[
A
]
after
running
We
change
the
<<
coq_makefile
>>
call
to
indicate
where
the
library
[
Lib
]
is
found
.
Now
<<
D
.
v
>>
and
<<
E
.
v
>>
can
refer
to
definitions
from
[
Lib
]
module
[
A
]
after
running
[[
Require
Import
Lib
.
A
.
]]
...
...
src/Universes.v
View file @
b8535f49
...
...
@@ -412,7 +412,7 @@ Qed.
Unset
Printing
All
.
Theorem
ex_symmetry
:
(
exists
x
,
x
=
0
)
->
(
exists
x
,
0
=
x
)
.
e
constructor
.
e
exists
.
(
**
%
\
vspace
{-
.15
in
}%
[[
H
:
exists
x
:
nat
,
x
=
0
============================
...
...
@@ -529,7 +529,7 @@ Extraction sym_ex.
let
sym_ex
=
__
>>
In
this
example
,
the
[
ex
]
type
itself
is
in
[
Prop
]
,
so
whole
[
ex
]
packages
are
erased
.
Coq
extracts
every
proposition
as
the
(
Coq
-
specific
)
type
%
\
texttt
{
\
_
\
_
}%
#
<
tt
>
__
</
tt
>
#
,
whose
single
constructor
is
%
\
texttt
{
\
_
\
_
}%
#
<
tt
>
__
</
tt
>
#
.
Not
only
are
proofs
replaced
by
[
__
]
,
but
proof
arguments
to
functions
are
also
removed
completely
,
as
we
see
here
.
In
this
example
,
the
[
ex
]
type
itself
is
in
[
Prop
]
,
so
whole
[
ex
]
packages
are
erased
.
Coq
extracts
every
proposition
as
the
(
Coq
-
specific
)
type
<<
__
>>,
whose
single
constructor
is
<<
__
>>
.
Not
only
are
proofs
replaced
by
[
__
]
,
but
proof
arguments
to
functions
are
also
removed
completely
,
as
we
see
here
.
Extraction
is
very
helpful
as
an
optimization
over
programs
that
contain
proofs
.
In
languages
like
Haskell
,
advanced
features
make
it
possible
to
program
with
proofs
,
as
a
way
of
convincing
the
type
checker
to
accept
particular
definitions
.
Unfortunately
,
when
proofs
are
encoded
as
values
in
GADTs
%~
\
cite
{
GADT
}%,
these
proofs
exist
at
runtime
and
consume
resources
.
In
contrast
,
with
Coq
,
as
long
as
all
proofs
are
kept
within
[
Prop
]
,
extraction
is
guaranteed
to
erase
them
.
...
...
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