diff options
author | 2015-09-14 17:46:52 -0400 | |
---|---|---|
committer | 2015-09-30 09:21:54 +0200 | |
commit | a478947e33bcca34291ec36487876443a694c6bf (patch) | |
tree | 4d179450c1f0e3bb9f644a35592e60ab9fe557ed /theories/Compat | |
parent | b248c23b84a96ef692e4a3ded6668733820e1a77 (diff) |
Add compatibility files (feature 4319)
Diffstat (limited to 'theories/Compat')
-rw-r--r-- | theories/Compat/Coq84.v | 56 | ||||
-rw-r--r-- | theories/Compat/Coq85.v | 9 | ||||
-rw-r--r-- | theories/Compat/vo.itarget | 2 |
3 files changed, 67 insertions, 0 deletions
diff --git a/theories/Compat/Coq84.v b/theories/Compat/Coq84.v new file mode 100644 index 000000000..83016976e --- /dev/null +++ b/theories/Compat/Coq84.v @@ -0,0 +1,56 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2015 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(** Compatibility file for making Coq act similar to Coq v8.4 *) +(** See https://coq.inria.fr/bugs/show_bug.cgi?id=4319 for updates *) +(** This is required in Coq 8.5 to use the [omega] tactic; in Coq 8.4, it's automatically available. But ZArith_base puts infix ~ at level 7, and we don't want that, so we don't [Import] it. *) +Require Coq.omega.Omega. +Ltac omega := Coq.omega.Omega.omega. + +(** The number of arguments given in [match] statements has changed from 8.4 to 8.5. *) +Global Set Asymmetric Patterns. + +(** See bug 3545 *) +Global Set Universal Lemma Under Conjunction. + +(** In 8.4, [admit] created a new axiom; in 8.5, it just shelves the goal. *) +Axiom proof_admitted : False. +Ltac admit := clear; abstract case proof_admitted. + +(** In 8.5, [refine] leaves over dependent subgoals. *) +Tactic Notation "refine" uconstr(term) := refine term; shelve_unifiable. + +(** In 8.4, [constructor (tac)] allowed backtracking across the use of [constructor]; it has been subsumed by [constructor; tac]. *) +Ltac constructor_84 := constructor. +Ltac constructor_84_n n := constructor n. +Ltac constructor_84_tac tac := once (constructor; tac). + +Tactic Notation "constructor" := constructor_84. +Tactic Notation "constructor" int_or_var(n) := constructor_84_n n. +Tactic Notation "constructor" "(" tactic(tac) ")" := constructor_84_tac tac. + +Global Set Regular Subst Tactic. + +(** Some names have changed in the standard library, so we add aliases. *) +Require Coq.ZArith.Int. +Module Export Coq. + Module Export ZArith. + Module Int. + Module Z_as_Int. + Include Coq.ZArith.Int.Z_as_Int. + (* FIXME: Should these get a (compat "8.4")? Or be moved to Z_as_Int, probably? *) + Notation plus := Coq.ZArith.Int.Z_as_Int.add (only parsing). + Notation minus := Coq.ZArith.Int.Z_as_Int.sub (only parsing). + Notation mult := Coq.ZArith.Int.Z_as_Int.mul (only parsing). + End Z_as_Int. + End Int. + End ZArith. +End Coq. + +(** Many things now import [PeanoNat] rather than [NPeano], so we require it so that the old absolute names in [NPeano.Nat] are available. *) +Require Coq.Numbers.Natural.Peano.NPeano. diff --git a/theories/Compat/Coq85.v b/theories/Compat/Coq85.v new file mode 100644 index 000000000..1622f2aed --- /dev/null +++ b/theories/Compat/Coq85.v @@ -0,0 +1,9 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2015 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(** Compatibility file for making Coq act similar to Coq v8.5 *) diff --git a/theories/Compat/vo.itarget b/theories/Compat/vo.itarget new file mode 100644 index 000000000..c0c40ab1c --- /dev/null +++ b/theories/Compat/vo.itarget @@ -0,0 +1,2 @@ +Coq84.vo +Coq85.vo |