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
a39a0883
Commit
a39a0883
authored
Oct 04, 2011
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change some template annotations
parent
5ce22dc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
LogicProg.v
src/LogicProg.v
+2
-0
Match.v
src/Match.v
+6
-0
No files found.
src/LogicProg.v
View file @
a39a0883
...
...
@@ -576,6 +576,7 @@ subgoal 4 is:
End
autorewrite
.
(
*
begin
thide
*
)
(
**
*
Exercises
*
)
(
**
printing
*
$
\
cdot
$
*
)
...
...
@@ -645,3 +646,4 @@ Hint Extern 100 (_ = _) =>
I
also
proved
a
few
hint
lemmas
tailored
to
particular
theorems
,
but
which
do
not
give
common
algebraic
simplification
rules
.
You
will
probably
want
to
use
some
,
too
,
in
cases
where
[
eauto
]
does
not
find
a
proof
within
a
reasonable
amount
of
time
.
In
total
,
beside
the
main
theorems
to
be
proved
,
my
sample
solution
includes
6
lemmas
,
with
a
mix
of
the
two
kinds
of
lemmas
.
You
may
use
more
in
your
solution
,
but
I
suggest
trying
to
minimize
the
number
.
#
</
ol
>
#
%
\
end
{
enumerate
}%
*
)
(
*
end
thide
*
)
src/Match.v
View file @
a39a0883
...
...
@@ -437,6 +437,7 @@ Abort.
(
**
One
other
gotcha
shows
up
when
we
want
to
debug
our
Ltac
functional
programs
.
We
might
expect
the
following
code
to
work
,
to
give
us
a
version
of
[
length
]
that
prints
a
debug
trace
of
the
arguments
it
is
called
with
.
*
)
(
*
begin
thide
*
)
(
*
begin
hide
*
)
Reset
length
.
(
*
end
hide
*
)
...
...
@@ -481,9 +482,11 @@ Ltac length ls k :=
|
nil
=>
k
O
|
_
::
?
ls
'
=>
length
ls
'
ltac
:
(
fun
n
=>
k
(
S
n
))
end
.
(
*
end
thide
*
)
(
**
The
new
[
length
]
takes
a
new
input
:
a
%
\
emph
{%
#
<
i
>
#
continuation
#
</
i
>
#
%}%
[
k
]
,
which
is
a
function
to
be
called
to
continue
whatever
proving
process
we
were
in
the
middle
of
when
we
called
[
length
]
.
The
argument
passed
to
[
k
]
may
be
thought
of
as
the
return
value
of
[
length
]
.
*
)
(
*
begin
thide
*
)
Goal
False
.
length
(
1
::
2
::
3
::
nil
)
ltac
:
(
fun
n
=>
pose
n
)
.
(
**
[[
...
...
@@ -494,6 +497,7 @@ nil
]]
*
)
Abort
.
(
*
end
thide
*
)
(
**
We
see
exactly
the
trace
of
function
arguments
that
we
expected
initially
,
and
an
examination
of
the
proof
state
afterward
would
show
that
variable
[
n
]
has
been
added
with
value
[
3
]
.
*
)
...
...
@@ -998,6 +1002,7 @@ Theorem t9 : exists p : nat * nat, fst p = 3.
Qed
.
(
*
begin
thide
*
)
(
**
*
Exercises
*
)
(
**
%
\
begin
{
enumerate
}%
#
<
ol
>
#
...
...
@@ -1165,3 +1170,4 @@ In the body of the case analysis, [lemma] will be bound to the first lemma, and
There
are
different
kinds
of
backtracking
,
corresponding
to
different
sorts
of
decisions
to
be
made
.
The
examples
considered
above
can
be
handled
with
backtracking
that
only
reconsiders
decisions
about
the
order
in
which
to
apply
rewriting
lemmas
.
A
full
-
credit
solution
need
only
handle
that
kind
of
backtracking
,
considering
all
rewriting
sequences
up
to
the
length
bound
passed
to
your
tactic
.
A
good
test
of
this
level
of
applicability
is
to
prove
both
[
test1
]
and
[
test2
]
above
.
However
,
some
theorems
could
only
be
proved
using
a
smarter
tactic
that
considers
not
only
order
of
rewriting
lemma
uses
,
but
also
choice
of
arguments
to
the
lemmas
.
That
is
,
at
some
points
in
a
proof
,
the
same
lemma
may
apply
at
multiple
places
within
the
goal
formula
,
and
some
choices
may
lead
to
stuck
proof
states
while
others
lead
to
success
.
For
an
extra
challenge
(
without
any
impact
on
the
grade
for
the
problem
)
,
you
might
try
beefing
up
your
tactic
to
do
backtracking
on
argument
choice
,
too
.
#
</
li
>
#
#
</
ol
>
#
%
\
end
{
enumerate
}%
*
)
(
*
end
thide
*
)
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