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
c109dae0
Commit
c109dae0
authored
Jan 02, 2009
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes while reading student solutions
parent
2c41bcee
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Coinductive.v
src/Coinductive.v
+1
-1
Extensional.v
src/Extensional.v
+1
-1
Tactics.v
src/Tactics.v
+2
-2
No files found.
src/Coinductive.v
View file @
c109dae0
...
...
@@ -467,7 +467,7 @@ Print constFold_ok.
%
\
item
%
#
<
li
>
#
Define
a
function
[
map
]
for
building
an
output
tree
out
of
two
input
trees
by
traversing
them
in
parallel
and
applying
a
two
-
argument
function
to
their
corresponding
data
values
.
#
</
li
>
#
%
\
item
%
#
<
li
>
#
Define
a
tree
[
falses
]
where
every
node
has
the
value
[
false
]
.
#
</
li
>
#
%
\
item
%
#
<
li
>
#
Define
a
tree
[
true_false
]
where
the
root
node
has
value
[
true
]
,
its
children
have
value
[
false
]
,
all
nodes
at
the
next
have
the
value
[
true
]
,
and
so
on
,
alternating
boolean
values
from
level
to
level
.
#
</
li
>
#
%
\
item
%
#
<
li
>
#
Prove
that
[
true_false
s
]
is
equal
to
the
result
of
mapping
the
boolean
"or"
function
[
orb
]
over
[
true_false
]
and
[
falses
]
.
You
can
make
[
orb
]
available
with
[
Require
Import
Bool
.
]
.
You
may
find
the
lemma
[
orb_false_r
]
from
the
same
module
helpful
.
Your
proof
here
should
not
be
about
the
standard
equality
[
=
]
,
but
rather
about
some
new
equality
relation
that
you
define
.
#
</
li
>
#
%
\
item
%
#
<
li
>
#
Prove
that
[
true_false
]
is
equal
to
the
result
of
mapping
the
boolean
"or"
function
[
orb
]
over
[
true_false
]
and
[
falses
]
.
You
can
make
[
orb
]
available
with
[
Require
Import
Bool
.
]
.
You
may
find
the
lemma
[
orb_false_r
]
from
the
same
module
helpful
.
Your
proof
here
should
not
be
about
the
standard
equality
[
=
]
,
but
rather
about
some
new
equality
relation
that
you
define
.
#
</
li
>
#
#
</
ol
>
#
%
\
end
{
enumerate
}%
#
</
li
>
#
#
</
ol
>
#
%
\
end
{
enumerate
}%
*
)
src/Extensional.v
View file @
c109dae0
...
...
@@ -1013,7 +1013,7 @@ End PatMatch.
It
might
also
seem
that
beta
reduction
is
a
lost
cause
because
we
have
no
effective
way
of
substituting
in
the
[
exp
]
type
;
we
only
managed
to
write
a
substitution
function
for
the
parametric
[
Exp
]
type
.
This
is
not
as
big
of
a
problem
as
it
seems
.
For
instance
,
for
the
language
we
built
by
extending
simply
-
typed
lambda
calculus
with
products
and
sums
,
it
also
appears
that
we
need
substitution
for
simplifying
[
case
]
expressions
whose
discriminees
are
known
to
be
[
inl
]
or
[
inr
]
,
but
the
function
is
still
implementable
.
For
this
exercise
,
extend
the
products
and
sums
constant
folder
from
the
last
chapter
so
that
it
simplifies
[
case
]
expressions
as
well
,
by
checking
if
the
discriminee
is
a
known
[
inl
]
or
known
[
inr
]
.
Also
extend
the
correctness
theorem
to
apply
to
your
new
definition
.
You
will
probably
want
to
assert
an
axiom
relating
to
an
expression
equivalence
relation
like
the
one
defined
in
this
chapter
.
For
this
exercise
,
extend
the
products
and
sums
constant
folder
from
the
last
chapter
so
that
it
simplifies
[
case
]
expressions
as
well
,
by
checking
if
the
discriminee
is
a
known
[
inl
]
or
known
[
inr
]
.
Also
extend
the
correctness
theorem
to
apply
to
your
new
definition
.
You
will
probably
want
to
assert
an
axiom
relating
to
an
expression
equivalence
relation
like
the
one
defined
in
this
chapter
.
Any
such
axiom
should
only
mention
syntax
;
it
should
not
mention
any
compilation
or
denotation
functions
.
Following
the
format
of
the
axiom
from
the
last
chapter
is
the
safest
bet
to
avoid
proving
a
worthless
theorem
.
#
</
li
>
#
#
</
ol
>
#
%
\
end
{
enumerate
}%
*
)
src/Tactics.v
View file @
c109dae0
...
...
@@ -137,13 +137,13 @@ Ltac crush' lemmas invOne :=
Ltac
crush
:=
crush
'
false
fail
.
Theorem
dep_destruct
:
forall
(
T
:
Type
)
(
T
'
:
T
->
Type
)
x
(
v
:
T
'
x
)
(
P
:
T
'
x
->
Prop
)
,
Theorem
dep_destruct
:
forall
(
T
:
Type
)
(
T
'
:
T
->
Type
)
x
(
v
:
T
'
x
)
(
P
:
T
'
x
->
Type
)
,
(
forall
x
'
(
v
'
:
T
'
x
'
)
(
Heq
:
x
'
=
x
)
,
P
(
match
Heq
in
(
_
=
x
)
return
(
T
'
x
)
with
|
refl_equal
=>
v
'
end
))
->
P
v
.
intros
.
generalize
(
H
_
v
(
refl_equal
_
))
;
trivial
.
generalize
(
X
_
v
(
refl_equal
_
))
;
trivial
.
Qed
.
Ltac
dep_destruct
E
:=
...
...
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