What is missing is a string data type that binds to the notation "..." ; the String module contains this notation and data type, but you must tell Coq to use this notation with Open Scope string_scope. However, there is also no Case implementation that will be displayed only after fixing the problem line. All this is provided to you in the Induction.v file inside the Tar file of the Download, but it is not included in the output of Induction.html , possibly due to a typo in the .v file. The corresponding code, which will be the second paragraph of the " Case Names" section (immediately after "... but the best way is to use Case tactics" and right before "Here is an example of using Case ..."):
(* [Case] is not built into Coq: we need to define it ourselves. There is no need to understand how it works -- you can just skip over the definition to the example that follows. It uses some facilities of Coq that we have not discussed -- the string library (just for the concrete syntax of quoted strings) and the [Ltac] command, which allows us to declare custom tactics. Kudos to Aaron Bohannon for this nice hack! *) Require String. Open Scope string_scope. Ltac move_to_top x := match reverse goal with | H : _ |- _ => try move x after H end. Tactic Notation "assert_eq" ident(x) constr(v) := let H := fresh in assert (x = v) as H by reflexivity; clear H. Tactic Notation "Case_aux" ident(x) constr(name) := first [ set (x := name); move_to_top x | assert_eq x name; move_to_top x | fail 1 "because we are working on a different case" ]. Tactic Notation "Case" constr(name) := Case_aux Case name. Tactic Notation "SCase" constr(name) := Case_aux SCase name. Tactic Notation "SSCase" constr(name) := Case_aux SSCase name. Tactic Notation "SSSCase" constr(name) := Case_aux SSSCase name. Tactic Notation "SSSSCase" constr(name) := Case_aux SSSSCase name. Tactic Notation "SSSSSCase" constr(name) := Case_aux SSSSSCase name. Tactic Notation "SSSSSSCase" constr(name) := Case_aux SSSSSSCase name. Tactic Notation "SSSSSSSCase" constr(name) := Case_aux SSSSSSSCase name.
(Note: When I worked through Software Foundations, I found that I provided the .v files as my working material is very useful. You do not need to worry about the code released, you do not need to repeat the definitions, and all problems are here. Your mileage may vary , of course.)
Antal spector-zabusky
source share