From 1e0b3352390e4bbc3be4206e9c49e7c7fba3df45 Mon Sep 17 00:00:00 2001 From: jforest Date: Tue, 22 Aug 2006 08:54:29 +0000 Subject: + Changing "in " to "in " (no at, no InValue and no InType) for "replace with " and "replace c1" and partially for "autorewrite". + Adding a "by tactic" optional argument to "setoid_replace". + Fixing bug #1207 + Add new test files for syntax change and updating doc. + Moving argument tactic extensions from extratactics to extraargs git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9073 85f007b7-540e-0410-9357-904b9bb8a0f7 --- test-suite/failure/autorewritein.v | 15 +++++++++++++++ test-suite/success/autorewritein.v | 9 +++++++++ test-suite/success/replace.v | 24 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 test-suite/failure/autorewritein.v create mode 100644 test-suite/success/replace.v (limited to 'test-suite') diff --git a/test-suite/failure/autorewritein.v b/test-suite/failure/autorewritein.v new file mode 100644 index 0000000000..dc17742a7d --- /dev/null +++ b/test-suite/failure/autorewritein.v @@ -0,0 +1,15 @@ +Variable Ack : nat -> nat -> nat. + +Axiom Ack0 : forall m : nat, Ack 0 m = S m. +Axiom Ack1 : forall n : nat, Ack (S n) 0 = Ack n 1. +Axiom Ack2 : forall n m : nat, Ack (S n) (S m) = Ack n (Ack (S n) m). + +Hint Rewrite Ack0 Ack1 Ack2 : base0. + +Lemma ResAck2 : forall H:(Ack 2 2 = 7 -> False), H=H -> False. +Proof. + intros. + autorewrite with base0 in * using try (apply H1;reflexivity). + + + diff --git a/test-suite/success/autorewritein.v b/test-suite/success/autorewritein.v index 8126e9e4ba..2f7d86dae1 100644 --- a/test-suite/success/autorewritein.v +++ b/test-suite/success/autorewritein.v @@ -18,3 +18,12 @@ Proof. autorewrite with base0 in H using try (apply H1; reflexivity). Qed. +Lemma ResAck2 : forall H:(Ack 2 2 = 7 -> False), H=H -> False. +Proof. + intros. + autorewrite with base0 in *; + apply H1;reflexivity. +Qed. + + + diff --git a/test-suite/success/replace.v b/test-suite/success/replace.v new file mode 100644 index 0000000000..94b75c7f0f --- /dev/null +++ b/test-suite/success/replace.v @@ -0,0 +1,24 @@ +Goal forall x, x = 0 -> S x = 7 -> x = 22 . +Proof. +replace 0 with 33. +Undo. +intros x H H0. +replace x with 0. +Undo. +replace x with 0 in |- *. +Undo. +replace x with 1 in *. +Undo. +replace x with 0 in *|- *. +Undo. +replace x with 0 in *|-. +Undo. +replace x with 0 in H0 . +Undo. +replace x with 0 in H0 |- * . +Undo. + +replace x with 0 in H,H0 |- * . +Undo. +Admitted. + -- cgit v1.2.3