(**************************************************************************)
(*        Changes in 6.3.1 with respect to 6.3            11/11/99        *)
(**************************************************************************)

Summary of changes
==================

Tactic engine:

- Drastic performance improvement in batch compilation of tactics.
  Less verification done during the application of tactics that are
  known to work improves drastically performances for batch
  compilation. In interactive mode, to avoid type-checking errors (in
  uncautious tactics) that are detected only at Save/Qed time, you
  should add the "-tac-debug" option to "coqtop -opt"
- The tactics Cut/LApply/Generalize, introduce constants in proofs 
  instead of beta redexes (LET/LAPP and a specialised lemma for generalize)

Gallina:

- More type synthesis, especially in Cases, for term typable with
  simple types (ML typing algorithm without polymorphism)
- Some mysterious "?" in Goal should now display the corresponding
  instantiation when it exists.
- Old .vo files are incompatible and should be recompiled

Bug repaired:

- Tauto has been unable for a time to deal with hypotheses with 2
  imbricated implications. Now it should work.
- Intuition now removes true, and therefore useless, hypotheses.
- Cofixpoint: a hole in the guardness condition when a cofixpoint
  refers to another one has been corrected.
  WARNING: the new criterion may refuse some olderly accepted
  Cofixpoint definitions which actually are valid but for a reason
  difficult to detect automatically.
- Extraction: a bug was limiting the number of propositional singleton
  inductive types (such has "eq") for which elimination towards Set is
  valid.

For developers:

- Tactic dImp has now a correct semantic
- Error messages have an extra arg: sigma
- New tclTHENS which generalizes the various variants of the tclTHEN family
- New explicit type "type_judgement" for pairs (type, sort) in order
  to replace the use of DOP2(Cast,t,DOP0(Sort s)). This has
  consequences mainly on the type of environment

  All functions in mach.ml or trad.ml are splitted into a variant
  returning the 3-level judgement of any term and a variant restricted
  to typing of type and returning a 2-level type_judgement. Thus, no
  more "is_ass", but every typing/checking function has a variant with
  suffix "_type" (e.g. fexemeta_type).

  "env"'s are now of type "environment"="(type_judgement, type_judgement) env"
  "sign"'s are now of type "context" = "type_judgement signature".
   Especially, functions previously referring to "constr assumptions"
   or "constr signature", now refer to "environment" or "context"

  "pf_hyps" forks into itself and the variant "pf_untyped_hyps"


- vAL, tYP, kIND renamed to _VAL, _TYP, _KIND

=======
Theories
--------

  The definition of derivative in the library Reals has been changed (to prove
more properties).


(**************************************************************************)
(*        Changes in 6.3 with respect to 6.2.4            26/07/99        *)
(**************************************************************************)

Summary of changes
==================

  Vernacular commands
  -------------------

  Any vernacular command (including invocation of tactics) can be
  prefixed by the word "Time"; then the time spent is printed after
  having executed the command. For example : "Time Save." "Time Omega."

  The "Focus" command now accepts an optional numeric argument.
  You can type "Focus 3." to focus on the 3rd subgoal (when this subgoal 
  is solved, the message subtree proved is printed out and all the remaining 
  subgoals are printed out. 

  It is possible to reduce a term before giving it a name (this is sometimes 
  useful in order to get a good extracted term).
  The syntax is :
	Definition name := Eval reduction_function in term.


  Tacticals
  ---------

  This new version brings 2 tacticals :

  - First [ tac1 | ... | tacn ] tries the tactic tac1; if it fails, it tries
     the second tactic, and so on. It fails if all tactics fail.

  - Solve [ tac1 | ... | tacn ] is similar to Fisrt, but it attempts so solve
     completely the goal (no remaining subgoals) with each tactic.
     It fails if all tactics fail or did not solve the goal.

 
  Tactics
  -------
  - AutoRewrite: a new tactic for automatic rewriting, see the reference manual

  - a new vernac command "Print HintDb" to print the contents of
 	a hint database

  - with "Hint Constructors", one can declare at once all constructors of
    an inductive type. For example :

    Hint c_le : arith := Constructors le.

    is equivalent to:

    Hints Resolve le_n le_S : arith.

    These hints allow Auto to solve automatically a goal like (le (3) (14)).

  - A "user-friendly" extension of "Induction": it now works on
    hypotheses of the goal and generalizes automatically above the other
    hypotheses dependent on the original hypothesis. It does not duplicate
    any longer the name of the hypothesis to which it applies. It should
    advantageously replaces "Elim" on an hypothesis or a typical sequence
    "Generalize" followed by "Induction" on the generalized variable.

  - Move: this allows to reorder the hypotheses in the local context

  - Quote: this  new tactic does automatic inversion of interpretation
    function for people using Barendregt's so-called `2-level approach'.
    See examples in theories/DEMOS/DemoQuote.v

  - It is now possible to change the type of an hypothesis to a convertible
    type with the tactic Change ... in ... .

  - The behavior of Intro (and its variants, except Intros) has
    changed. Now, Intro makes head-reduction (Red), when the goal is not a
    product, until Intro can be applied or the goal is not reducible.

  - Intro after: allows to tell the place where an hypothesis is
    introduced in the context

  - Naming conventions:

    The variables quantified in a goal have now names distinct from
    the names in the local context.

    More introduction names are now based on the first letter of their type.

  Type inference
  --------------
  The inference of ? has been improved and may be used in products. Typical
  examples that can be solved now include (see theories/TESTS/Inference.v)

    (x:?) x = O                -->  (x:nat)x=(0)
    [x] x==True                -->  [x:Prop]x==True
    (x:?) x = [y](S (S y))     -->  (x:(nat->nat))x=([y:nat](S (S y)))

    [a,b]Cases a b of
        O nil => true
      | _ (cons x _) => x
      | _ _ => false
    end.

  The main limitation is that dependent products cannot be inferred in the
  general case. The default behaviour is to infer non dependent products:

    [x](x O)=true     --> [x:(nat->bool)](x (0))=true

  but the type of x could be a dependent product such as:

    (n:nat) Cases n of O => bool | _ => nat end

  However, examples such as the following (assuming P has type
  (n:nat)(le n n))

    (y:?)y==P   -->  (y:((n:nat)(le n n)))y==P

  are solved because there is only one possible type for y.


  Bug-fixes
  ---------
  - fixed Sylvain Boulme's bug with universes.

  - an occur-check was introduced in the unification algorithm (Trad), to
    avoid looping on some terms such as [x](x x).

  - Rewrite ... in now accepts products and tries to solve some of them by
    unification as Rewrite.

  - a name capture bug (due to eta-expansion on the fly) in the extraction
    has been fixed.

  Syntax
  ------
  - A more convenient syntax to define functions :

	"Definition x [x,y:nat; z: foo] : bool := t"

	is a synonymous for "Definition x := [x,y:nat; z:foo](t :: bool)"

	The return type of the function (here "bool") may be omitted.

  - Pretty-printing of large arithmetic (ZARITH) expressions improved (some
    break spaces added for binary or ternary operators).

  Theories
  --------

  The theories/DEMOS directory has grown a bit: it contains significant
  examples of new tactics and features.

  REALS has also grown and obeys to the same naming convention than
  ARITH and ZARITH: addition is Rplus, theorems stating commutativity are
  postfixed by _sym like plus_sym, Rmult_sym, etc. Ring has been
  instantiated on the reals; one can use it to normalize polynomial
  expressions over the reals. 

  The library Reals has been completed by a definition of limit, derivative
  and by others properties and functions.
  
  Documentation
  -------------

  The documentation includes an index of error messages, useful if you
  don't understand Coq output.


   Incompatibilities with 6.2.4
   ----------------------------

   * In the library ZArith, "Zinv" has been renamed as "Zopp", in order to be
   coherent with the Reals library. Theorems whose name includes "Zinv" have
   been renamed too. A global search-and-replace of "Zinv" by
   "Zopp" should be sufficient to update user's developments.

   * In the library Reals, some names has been changed. 
   In the file README of the library, there is a script which can be
   used to update user's developments.

   * The change in naming conventions (see above). Typically, a
   "Generalize n; Induction n" should become a "Generalize n; Induction n0",
   or better, simply "Induction n" since Induction now works with
   hypotheses of the context and generalizes automatically.

   * The definition of Exists has changed in LISTS/Streams.v

   Known problems
   --------------

   If you get a Fixpoint definition refused where it should be
   accepted, then make clean in theories/INIT and recompile.

(**************************************************************************)
(*        Changes in 6.2.4 with respect to 6.2.3          27/01/99        *)
(**************************************************************************)

Version 6.2.4 is the version from the January 99 INRIA Softwares CD-ROM

The changes from V6.2.3 are
  - "Trivial with *" now works
  - New options to control optimization when extracting towards O'caml 
    or Caml-Light
  - Function fold_left now really folds left in Polylist.v
  - Function fold_right has now its arguments in standard order in Polylist.v

Sources of incompatibilities
  - The new definitions of fold_left and fold_right in Polylist.v

(**************************************************************************)
(*        Changes in 6.2.3 with respect to 6.2.2          15/12/98        *)
(**************************************************************************)

Summary of changes
=================
  Tactics
  -------
  - More proof techniques and more parametricity to use Auto (see below)
  - "Intro x" now fails if "x" already exists in hypothesis (this may
    force to rewrite the tactic scripts which use this tolerance)

  LoadPath
  --------
  Thanks to D. Delahaye, there are two new commands "AddRecPath"
  and "Add Rec ML Path" to add a directory and all its subdirectories
  to the load path. There is also an option -R to coqtop and coqc with
  the same semantics

  Theories
  -------
  - A new theory : REALS, about axiomatised real numbers
  - the SORTING theory now works on polymorphic lists and trees
  - A new development LISTS/ListSet.v for finite sets implemented as lists.

  Directives
  ----------
  - Compiled ML file loading without Ocaml toplevel under Coq (bytecode only).

  Bug-fixes
  ---------
  - Bug-fixes about pretty-print and universes

  Tools
  -----
  - do_Makefile : new entries "gallinatex" and "gallinahtml" to pretty-print
  in LaTeX or HTML the vernacular files in the makefiles generated by
  do_Makefile

  - tools/dev/coqpath.el : one can use the Emacs tags to browse the Coq
   sources. To enable that functionality, the user must :
     1) have a environment variable $COQTOP that points to the coq sources
     2) do : "make tags" in the $COQTOP directory
     3) Load coqpath.el under Emacs
	
     Then try "M-." and "C-u M-." !

Summary of incompatibilities
============================
  - New syntax for Hint and Auto (there is a conversion script, see below)
  - "Intro x" and "Intros x y z" less tolerant (generally few scripts
    are concerned, they must be changed at hand)

=========================================================================
Special sections on the new Auto and Hint
=========================================

Changes of Auto
===============

- The Hint Extern command now accept bindings. Let us see an example :

Hint eqdecide : core :=
    Extern 4 {?1=?2}+{~?1=?2} Generalize ?1 ?2; Decide Equality.

The meaning of the previous hint is the following : if the conclusion
of goal matches the pattern {?1=?2}+{~?1=?2}, then the meta-variables
?1 ?2 will be replaced by their value in the tactic expression before
Auto tries this tactic to solve the goal. For example if the
conclusion is

	{(f x)=if foo then (bar h) else z}+{~(f x)=if foo then (bar h) else z}

Then the tactic "Generalize (f x) (if foo then (bar h) else z); Decide
Equality" will be tried. The number given before the pattern is a cost: 
hints with lower cost will be tried first.

- Reorganisation of the Hints : several users prompted for a more control
over the hint database for the Auto tactic. On the other hand, several 
improvements to Auto will be made in the 6.3, available as options.
To satisfy both needs, the management of Hints has been reorganised. Hints 
are stocked in several databases. The new syntax of Auto is :

----------------------------+------------------------------------------------
Syntax                      |  Meaning
----------------------------+------------------------------------------------
Auto.                       | uses only the hints database "core"
Auto num.                   | idem, with search depth num 
Auto with db1 .. dbn        | uses the hints databases core, db1, ..., dbn 
Auto 12 with db1 .. dbn     | idem, with search depth num 
Auto with *                 | uses all existing hints databases, except "v62"
Auto 15 with *              | idem, with search depth num 
Trivial with db1 .. dbn     | Try only the hints of cost 0 in the 
                            | databases "core", db1, ... , dbn
Trivial with *              | Try the hints of cost 0 in all databases,
                            | except "v62"
-----------------------------------------------------------------------------

(and the same thing for EAuto)

The general syntax for the Hint command is now :

Hint name : db1 db2 ... dbn := <hint expression>

Where "name" is the name of the Hint, and "db1", ... "dbn" are the databases
where to add the hint. This way, a hint can be added to several databases at 
the same time.

If no database name is given (if the list "db1 ... dbn" is empty) the hint 
will be added to the "core" database.

The interaction of Hint commands with the Section mechanism is the same as 
before : when closing a section, all Hint commands of this section will be
thrown. So it is useless to give databases names for a Hint command inside
a section. We recommend to give the no database name for Hint commands inside
a section : the hints will be added to the "core" database, and removed when
closing the section.

The syntax for hint expressions is currently :

----------------------------+-----------------------------------------------
Syntax                      |  Meaning
----------------------------+-----------------------------------------------
Resolve <term>.             | Like the old "Hint <term>" command
Immediate <term>.           | Like the old "Immediate <term>" command
Unfold <ident>.             | Like the old "Hint Unfold <ident>" command
Constructors <ident>        | If <ident> stands for an inductive type, 
                            | Put all constructors of this type as Hint Resolve
Extern <num> <pattern> <ast> | See the example above
----------------------------------------------------------------------------

This will be probably extended in further releases.

Shortcuts :
===========

They are shortcuts to define several hints at once.

"Hints Resolve i1 ... in : db1 ... dbn" when i1, ... in, d1, ... dbm are
identifiers is a shortcut for :


	Hint i1 : db1 ... dbm := Resolve i1.
	Hint i2 : db1 ... dbm := Resolve i2.
	...
	Hint in : db1 ... dbm := Resolve in.


Two other shortcuts "Hints Unfold" and "Hints Immediate" are defined with the 
same meaning, mutatis mutandis.

Pre-defined Hint databases :
============================

The database "core" is intended to contain the basic lemmas, which are needed
every time we call Auto, regardless to the kind of theory we are working on.
Remember this database is designed to be used by each call of Auto.
It contains lemmas proven mainly in the theories/INIT and theories/LOGIC
directories.

The database "arith" contains all lemmas about Peano's arithmetic
proven in the directories INIT and ARITH.

The database "zarith" contains the arithmetic lemmas proven in the 
theories/ZARITH and tactics/contrib/Omega directory. It contains also
a hint with a high cost that calls Omega.

The database "bool" contains lemmas about booleans.

The database "datatypes" contains lemmas about lists, trees, streams etc. that 
are proven in LISTS, TREES, and GRAPH subdirectories.

The database "sets" contains lemmas about sets and relations from the 
directory SETS and RELATIONS.

The "v62" Compatibility Hint database :
=======================================

There is also a special database called "v62". It contains all things that are
currently hinted in the 6.2.3 release. It will not be extended later. It is
not included in the hint databases list used in the "Auto with *" tactic.

The only purpose of the database "v62" is to ensure compatibility for
old developments with further versions of Coq. 
If you have a development that used to compile with 6.2.2 and that not
compiles with 6.2.3, try to replace "Auto" with "Auto with v62" using the
script documented below. This will ensure your development will compile
will further releases of Coq.

To write a new development, or to update a development not finished yet, 
you are strongly advised NOT to use this database, but the pre-defined
databases. Furthermore, you are advised not to put your own Hints in the
"core" database, but use one or several databases specific to your
development.

The automatic conversion script :
=================================

The classic syntax of Hints is no more accepted.

But there is a script in the tools/dev subdirectory of the sources calles 
"h_convert" that updates automatically the sources. 

After having compiled it with the "make" command , type : 

	h_convert -help

to have a quick help

We used it successfully for 47000 lines of vernacular source.

Is it possible to remove a hint from a given database ?
=======================================================

Currently, not, but it would be very easy to add such a vernacular command.
Normally, the database mechanism gives a sufficient control to the user.
If there is an strong user demand, we can do that. 

(**************************************************************************)
(* Changes in 6.2.2 with respect to 6.2.1        07/09/98                 *)
(**************************************************************************)

6.2.2 is a bug-fix release. However, some features were added to fulfill
some users requirements.

- Tactics Rewrite and Rewrite in now accept bindings, as Apply and Elim.
- Rewrite now fails if no rewriting can be done. Use "Try Rewrite" instead
  of Rewrite to keep the old behavior.
- A new tactic "Conditional tac Rewrite c [in hyp]" which does the "Rewrite c"
  and applies the tactic tac to subgoals generated by the rewriting.

- The tactic Correctness to establish the correctness and termination of
  imperative programs is now available, and documented in the Reference
  Manual (chapter 18).

(**************************************************************************)
(* Changes in 6.2.1 with respect to 6.2          22/07/98                 *)
(**************************************************************************)

6.2.1 is mainly a bug-fix release. Several important bugs have been 
corrected, and minor speed improvements (in typing or extraction) were
realized. The changes are : 

- Bug-fixes in the Omega and Ring tactics
- more precise syntax of integer expressions. For example  
  `(Zinv 1)` is printed as is and no more `-1` : this avoid confusion.
  (Zinv x) is still printed `-x`.  
- Extraction now generates less universes and is more efficient
- the tactic Auto is somewhat faster. "Print Hint" has a new meaning : it
  displays the hints that apply to the current goal. "Print Hint *" has
  replaced the old command "Print Hint" and prints all hints.
- Programs has been much debugged, but it is still in beta-test. It is
  now included in the documentation
- "if then else" and "let in" expressions are now printed as they are
  parsed
- several error messages are now more explicit
- Bug-fixes in unification and in Program
- Printing of tactic scripts is nicer
- "make install" now allowed with do_Makefile
- new commands "Set Printing Depth/Print Printing Depth"
- Improvements of the chapter "Writing you own tactics" of the doc



(**************************************************************************)
(*   Changes in V6.2 with respect to the release V6.2.beta 1/05/98        *)
(**************************************************************************)

- a tactical Abstract to save an intermediate goal as a theorem
- extension of the Intros tactic to give names to

(**************************************************************************)
(*   Changes in V6.2 with respect to the release V6.1 24/12/97            *)
(**************************************************************************)

New library:
------------
o Binary integers, with user friendly syntax

o Syntax for first order quantifiers ex, ex2, all, exT exT2, allT
  (EX x | P & Q)


New Tools:
----------
o SearchIsos: a tool to search through the current environment of a Coq
  toplevel or a Coq library


Changes in Tools:
-----------------
o The Omega tactic is now available in native code (coqtop/coqc -full)

o The "Locate" command allows to locate a library in the load path or 
  a definition in the currently loaded modules.


Changes in parsing:
-------------------
o Parsing uses the Camlp4 system, and is 6/7 times faster !

o Errors are correctly located (line and characters)

o In the Grammar command, the entries are typed (AST or AST lists)

o The notations for ASTs changed

Changes in Require
------------------
o Require in Coq V6.1 was not conformed to the Reference Manual, the included 
modules were opened. This is no longer the case. You maybe will 
have to replace some of the ``Require'' by the command ``Require Export''.


Changes in pretty-printing:
---------------------------
o The Syntax command was redesigned to be more symmetric with Grammar

o Definition by cases are now written with the Cases syntax (the Case
  notation becomes obsolete)


Changes in Extraction:
----------------------
o Extraction to Gofer has been replaced by an extraction to Haskell (the
  syntax is still the same) since Gofer has disappeared.


(*************************************************************************)
(*   Changes in V6.1 with respect to the release V5.10.15 14/02/96       *)
(*************************************************************************)

New Tools and Tactics:
----------------------
o Natural: package allowing to print proofs in natural language.

o Omega: package to solve goals in Presburger Arithmetic (i.e. universally 
  quantified formula made of equations and inequations).

o ACDSimpl: package to decide problems in the theory of abelian rings.
  (If you want some documentation about this package please ask for it
   to the coqdev list.)
  
o There is a new tactic EAuto to deal with existential variables.

o There is a macro Cases that allows to write (non-dependent) case expressions 
  using patterns.


Changes in tools:
-----------------
o The do_Makefile utility for generating Makefiles has changed. It is
  now much more powerful, but incompatible with the previous one. Just
  type "do_Makefile --help" for a summary of options.


Changes in Tactics:
------------------
o The tactic Intuition seems to have changed the behaviour and performs some
  Intros.

o The tactics Rewrite and Dependent Rewrite raise a failure message whenever 
  they don't modify the goal.

o The inversion tactics work now on goals of type Type.
 

Changes in Syntax:
------------------
o There is some new implicit syntax that avoids writing <>. Now we can write:

      Case _ of _ end, 
      Match _ with _ end, 
      let _ = _ in _, 
      if _ then _ else _

  The argument for <> is synthetised whenever the destructuration is 
  non-dependent and on an object of an inductive type of arity 0.
  Warning: we have noticed in a case that the names generated by the tactic 
  Program were different when it was used with implicit Match and 
  with <>Match.

o The algorithm for synthetising arguments has changed. Now there is an 
  automatic mode to declare implicit arguments of constants.

o Infix has changed.

o The syntax        "Use Inversion" <hyp> <invlemma> 
  has changed for : "Inversion" <hyp> "using"  <invlemma>


Changes in the source:
----------------------
o The ast concerned in proof scripts and cases of errors are now 
  "reglobalised"  (i.e. the terms of the form (Var _) are transformed 
  into constants) so to be able to use printing rules for constants.



(* $Id: CHANGES,v 1.67 1999/12/01 12:43:46 herbelin Exp $ *)
