Merge branch 'master' of github.com:achlipala/frap

This commit is contained in:
Adam Chlipala 2020-02-12 08:01:22 -05:00
commit fbf211bad2
11 changed files with 14 additions and 12 deletions

View file

@ -40,7 +40,7 @@ Inductive cmd :=
Coercion Const : nat >-> arith. Coercion Const : nat >-> arith.
Coercion Var : var >-> arith. Coercion Var : var >-> arith.
Declare Scope arith_scope. (*Declare Scope arith_scope.*)
Infix "+" := Plus : arith_scope. Infix "+" := Plus : arith_scope.
Infix "-" := Minus : arith_scope. Infix "-" := Minus : arith_scope.
Infix "*" := Times : arith_scope. Infix "*" := Times : arith_scope.

View file

@ -26,7 +26,7 @@ Inductive cmd :=
Coercion Const : nat >-> arith. Coercion Const : nat >-> arith.
Coercion Var : var >-> arith. Coercion Var : var >-> arith.
Declare Scope arith_scope. (*Declare Scope arith_scope.*)
Infix "+" := Plus : arith_scope. Infix "+" := Plus : arith_scope.
Infix "-" := Minus : arith_scope. Infix "-" := Minus : arith_scope.
Infix "*" := Times : arith_scope. Infix "*" := Times : arith_scope.

View file

@ -101,7 +101,7 @@ Ltac instantiate_obviouses :=
(** * Interlude: special notations and induction principle for [N] *) (** * Interlude: special notations and induction principle for [N] *)
(* Note: recurse is an identifier, but we will always use the name "recurse" by convention *) (* Note: recurse is an identifier, but we will always use the name "recurse" by convention *)
Declare Scope N_recursion_scope. (*Declare Scope N_recursion_scope.*)
Notation "recurse 'by' 'cases' | 0 => A | n + 1 => B 'end'" := Notation "recurse 'by' 'cases' | 0 => A | n + 1 => B 'end'" :=
(N.recursion A (fun n recurse => B)) (N.recursion A (fun n recurse => B))
(at level 11, A at level 200, n at level 0, B at level 200, (at level 11, A at level 200, n at level 0, B at level 200,

View file

@ -170,7 +170,7 @@ Qed.
(* BEGIN syntax macros that won't be explained *) (* BEGIN syntax macros that won't be explained *)
Coercion Const : nat >-> exp. Coercion Const : nat >-> exp.
Coercion Var : string >-> exp. Coercion Var : string >-> exp.
Declare Scope cmd_scope. (*Declare Scope cmd_scope.*)
Notation "*[ e ]" := (Read e) : cmd_scope. Notation "*[ e ]" := (Read e) : cmd_scope.
Infix "+" := Plus : cmd_scope. Infix "+" := Plus : cmd_scope.
Infix "-" := Minus : cmd_scope. Infix "-" := Minus : cmd_scope.
@ -190,7 +190,7 @@ Notation "{{ I }} 'while' b 'loop' body 'done'" := (While_ I b body) (at level 7
Notation "'assert' {{ I }}" := (Assert I) (at level 75). Notation "'assert' {{ I }}" := (Assert I) (at level 75).
Delimit Scope cmd_scope with cmd. Delimit Scope cmd_scope with cmd.
Declare Scope reset_scope. (*Declare Scope reset_scope.*)
Infix "+" := plus : reset_scope. Infix "+" := plus : reset_scope.
Infix "-" := Init.Nat.sub : reset_scope. Infix "-" := Init.Nat.sub : reset_scope.
Infix "*" := mult : reset_scope. Infix "*" := mult : reset_scope.

2
Imp.v
View file

@ -19,7 +19,7 @@ Inductive cmd :=
Coercion Const : nat >-> arith. Coercion Const : nat >-> arith.
Coercion Var : var >-> arith. Coercion Var : var >-> arith.
Declare Scope arith_scope. (*Declare Scope arith_scope.*)
Infix "+" := Plus : arith_scope. Infix "+" := Plus : arith_scope.
Infix "-" := Minus : arith_scope. Infix "-" := Minus : arith_scope.
Infix "*" := Times : arith_scope. Infix "*" := Times : arith_scope.

View file

@ -97,7 +97,8 @@ Proof.
equality. equality.
linear_arithmetic. rewrite IHe1, IHe2.
ring.
Qed. Qed.
(* Well, that's a relief! ;-) *) (* Well, that's a relief! ;-) *)
@ -309,7 +310,7 @@ Example factorial_ugly :=
* them from our examples. *) * them from our examples. *)
Coercion Const : nat >-> arith. Coercion Const : nat >-> arith.
Coercion Var : var >-> arith. Coercion Var : var >-> arith.
Declare Scope arith_scope. (*Declare Scope arith_scope.*)
Infix "+" := Plus : arith_scope. Infix "+" := Plus : arith_scope.
Infix "-" := Minus : arith_scope. Infix "-" := Minus : arith_scope.
Infix "*" := Times : arith_scope. Infix "*" := Times : arith_scope.

View file

@ -249,7 +249,7 @@ Example factorial_ugly :=
* them from our examples. *) * them from our examples. *)
Coercion Const : nat >-> arith. Coercion Const : nat >-> arith.
Coercion Var : var >-> arith. Coercion Var : var >-> arith.
Declare Scope arith_scope. (*Declare Scope arith_scope.*)
Infix "+" := Plus : arith_scope. Infix "+" := Plus : arith_scope.
Infix "-" := Minus : arith_scope. Infix "-" := Minus : arith_scope.
Infix "*" := Times : arith_scope. Infix "*" := Times : arith_scope.

View file

@ -448,7 +448,7 @@ Inductive statement : Set :=
* almost-natural-looking embedded programs in Coq. *) * almost-natural-looking embedded programs in Coq. *)
Coercion Const : nat >-> expression. Coercion Const : nat >-> expression.
Coercion Var : string >-> expression. Coercion Var : string >-> expression.
Declare Scope embedded_scope. (*Declare Scope embedded_scope.*)
Infix "+" := Plus : embedded_scope. Infix "+" := Plus : embedded_scope.
Infix "-" := Minus : embedded_scope. Infix "-" := Minus : embedded_scope.
Infix "*" := Times : embedded_scope. Infix "*" := Times : embedded_scope.

View file

@ -291,7 +291,7 @@ Inductive statement : Set :=
* almost-natural-looking embedded programs in Coq. *) * almost-natural-looking embedded programs in Coq. *)
Coercion Const : nat >-> expression. Coercion Const : nat >-> expression.
Coercion Var : string >-> expression. Coercion Var : string >-> expression.
Declare Scope embedded_scope. (*Declare Scope embedded_scope.*)
Infix "+" := Plus : embedded_scope. Infix "+" := Plus : embedded_scope.
Infix "-" := Minus : embedded_scope. Infix "-" := Minus : embedded_scope.
Infix "*" := Times : embedded_scope. Infix "*" := Times : embedded_scope.

View file

@ -1,4 +1,5 @@
-R . Frap -R . Frap
-arg -w -arg -undeclared-scope
Map.v Map.v
Var.v Var.v
Sets.v Sets.v

View file

@ -5461,7 +5461,7 @@ The project home page is:
\begin{center} \begin{center}
\url{https://coq.inria.fr/} \url{https://coq.inria.fr/}
\end{center} \end{center}
The code associated with this book is designed to work with Coq versions 8.10 and higher. The code associated with this book is designed to work with Coq versions 8.9 and higher.
The project Web site makes a number of versions available, and versions are also available in popular OS package distributions, along with binaries for platforms where open-source package systems are less common. The project Web site makes a number of versions available, and versions are also available in popular OS package distributions, along with binaries for platforms where open-source package systems are less common.
We assume that readers have installed Coq by one of those means or another. We assume that readers have installed Coq by one of those means or another.
It will also be almost essential to use some graphical interface for Coq editing. It will also be almost essential to use some graphical interface for Coq editing.