Proving with Computer Assistance
Teacher
Location and Time
Prerequisites
Material
Weekly Schedule
Assignments
Examination
Useful links
Teacher
Herman Geuvers: home page
Room number HG 6.88 (only on Thursdays) For contact, use the e-mail address herman at cs dot ru dot nl
Location and time
Pav.J17 [until March 31], then in AUD 12
Thursday, hour 1 and 2: 08.45--10.30
Prerequisites
We assume that you are familiar with a bit of logic, especially natural deduction and (untyped) lambda calculus.
- For those not familiar with untyped lambda calculus:
I will do a short recapitulation in hour 2 of the Lecture 1. Furthermore, read "Introduction to Lambda Calculus" of
Barendregt and Barendsen, Chapter 1, Chapter 4 pp. 22-26, Chapter 2
pp. 12-14 (read = as beta-equality =_{\beta})
As exercises you may try 2.5 -- 2.10.
Material
Systems we will use
We will be using the Proof
Assistants Coq and PVS in this course. You can download
and install Coq locally, but you can also use it through the ProofWeb
webinterface
at http://prover.cs.ru.nl. For ProofWeb:
- Get a login, by sending a mail consisting of one line
LoginName,password,Name Student
to the teacher and he wil create one for you. Note: Don't use spaces, because a space surrounding "password" will become part of your password.
- Go to http://prover.cs.ru.nl
- Login to "Proving with Computer Assistance 2011"
- Load one of the files (preferably start with the examples.v file)
- You can now type in tactics to create proofs in natural deduction. You can also select these from the Templates menu.
- Check "Fitch style natural deduction" in the Display menu, to see the proofs in Fitch style.
- If you don't know what to do, load the file examples.v and "play" the proofs that are given there.
- If you want to refresh your natural deduction, download
the manual and start
playing the "prop" and "pred" files. These have special tactics for
doing basic Fitch style natural deduction. You will probably only be
needing
the Proof
Web Fitch style commands plus
this special
info in case you get stuck with the insert command.
The course by week (Schedule may change)
- 3/2 Lecture 1 Overview and Introduction: Proof Assistants,
Verification, Logic, Type Theory, Formulas-as-types, Coq/PVS.
Short recapitulation of lambda calculus.
- 10/2 Lecture 2 Simple Type theory and
"Formulas-as-Types" for propositional logic.
- 17/2 Lecture 3 The Curry variant of Simple Type Theory:
principal type algorithm.
- Here are the slides of the lecture.
- The first three pages of this document describe the principal type algorithm in detail.
- Make the exercises.
- NB Here are
some answers
to the exercises.
- 24/2 Lecture 4 Polymorphic Types: ML style and full
polymorphism
- 3/3 Lecture 5 Dependent Type Theory.
- 10/3 No class (carnaval holiday week).
- 17/3 Lecture 6 Answers to exercises + Natural Deduction (proposition logic) in Coq, using ProofWeb.
Be sure to bring a laptop
with wireless internet connection
- Here is the file with the Coq
exercises of the lecture. Complete this at home and send it to the
teacher by March 23. You can do this by loading it into
the ProofWeb system and do them
with Coq.
- In the lecture, we have shown a bit of another Coq file with exercises. You
can see it
in html
format. If you want to make the exercises, here is the
file CoqLab.v.
- 24/3 Lecture 7 Natural Deduction (predicate logic) in Coq, using ProofWeb.
Be sure to bring a laptop
with wireless internet connection
- Here is a page with a list of simple useful tactics
- Here is a Coq file with exercises on predicate logic. Please deliver by mail by March 30.
- 31/3 Lecture 8 Inductive Types.
- Here are the
slides
- Here are three files that have been shown at the lecture and you
can load into Coq/Prover:
- Do the files coq_nat_03.v up to coq_nat_10.v on prover (and coq_nat_11.v if you want a challenge). Here is the worked out version of coq_nat_11.v, where you can also see the use of the omega tactic.
- 7/4 and 14/4 No class (Exam weeks)
- 21/4 Lecture 9 More Coq exercises: Inductive types, recursion. Be sure to bring a laptop
with wireless internet connection
- Do the exercises on lists coq_list_03.v up to coq_list_06.v on prover.
- Here is an example file, showing how to do the first exercise on
trees in Coq, with a long proof script and a very short
one. Look here for the htm-ized file and look here
for the Coq source file. (Paste it into Proofweb and see how it works.)
- Do the exercises on trees coq_tree_02.v up to coq_tree_04.v on prover.
- Presentation of the Coq assignment
Here is a page with assignment suggestions
- 28/4 Lecture 10 Higher order logic, Calculus of
Constructions, Pure Type Systems
- 5/5 No class
- 12/5 Lecture 11 Answers to exercises + Work on Coq
assignment. Be sure to bring a laptop.
-
Here is a page where an earlier example assignment has been worked out. It has been created from a coq .v file .
- We have uses the Proviola system (by Carst Tankink) to produce this documented page.
- 19/5 Lecture 12 Introduction to
PVS. Lecture
notes (by Adam Koprowski) and
PVS pvs_intro.pvs. Here
is
a quick
reference card for basic PVS commands.
- 26/5 Lecture 13 Presentation of the PVS assignment
- 2/6 No Class
- 9/6 Lecture 14 Work on Coq assignment or PVS assignment.
- 16/6 Lecture 15 Treatment of the exam of July 2010. Work on Coq
assignment or PVS assignment
Assignments
Both Coq and PVS assignment: Delivery date: June 22; deliver your assignment by mail to the teacher.
Coq assignment
Here is a list
of assignment suggestions,
but you can also come up with an idea
yourself. (Look here
for some additional comments regarding the use of lists.) Options:
To complete the Coq assignment follow these steps:
- Choose the exercise from the list of assignment suggestions or invent one yourself. (In the latter case: discuss it with the teacher!)
- Register for the final assignment by sending an email
to H. Geuvers. The email should
contain your name and student number and
your choice of the assignment.
- Solve the assignment and write a report (more on that below).
- Deliver your solution (Report + separate Coq .v files) via mail.
A couple of remarks concerning the report:
- Do not make it too long. 15 pages is the absolute maximum but normally it
should be much shorter. Keep in mind that longer does not mean better!
- What you should write:
- Name and student number.
- Explanation of the problem and your approach to it.
- Description of the main problems you encountered and solutions you used.
If you had some alternative ideas to solve those problems describe them
and explain your choice for the solution to this problem.
- Write about your experience with the prover. What did you like, what you
did not like etc.
- Possibly add the Coq code as an appendix. (But note that you should deliver the Coq .v files separately anyway.)
- What you should not write
- Do not unnecessarily repeat the code. Refer to appendix and quote the
code only to illustrate something.
- Do not write obvious things! Description of the proofs of the shape:
"the goal is as follows so we apply this tactic and that is what we
get..." are useless.
PVS assignment
To be delivered
by mail to the teacher, mention as subject "PVS assignment",
individually. Proceed as follows:
- Make the exercises
in pvs_intro.pvs, but you may leave aside the parts "Squares" and "StampsTutorial".
- Make the exercises
in KnasterTarski.pvs. This amounts to proving the famous "Knaster Tarski fixed piont
theorem" for monotone functions over a complete lattice. (In the file
we just take a powerset with the subset relation for the complete
lattice.)
- Deliver
the .prf files of pvs_intro.pvs and of KnasterTarski.pvs. (That are
the files that PVS has created while you are doing the proof.) Deliver
them via mail, individually and
don't forget to give the files your own name.
Examination
The mark for the course is determined by the 3
marks you will get for the three items listed below.
Final mark =
PVS Assignment mark * ((Written Exam mark + Coq Assignment mark)/2),
where the
PVS Assignment mark is 1 (pass) or 0 (fail).
Note that you don't receive a mark if you
haven't completed all parts of the course.
- Written exam Tuesday, June 28, 2010, 14.00 -- 17.00.
- The written exam will consist of questions comparable to the ones that were given during the lectures: see above for the pdf files.
- It is an open book exam, so you can bring any paper material you want
- Older exams:
- The exam of July 2010.
- Here is the exam of 2008. (NB: the original version, which may still be at the Gewis website, contained a mistake; this is the corrected version.)
For the second chance ("Hertentamen"), all guidelines above apply with the following dates/deadlines:
- Written exam: Thursday 18-08-2010, 09:00-12:00
- Coq assignment deadline: Wednesday 17-08-2010 .
- PVS assignment deadline: Wednesday 17-08-2010.
Useful links
herman at cs dot ru dot nl