From f6e1acbbe00aeb479fde229c3941e3a6a2d53068 Mon Sep 17 00:00:00 2001 From: herbelin Date: Mon, 26 Dec 2005 13:59:13 +0000 Subject: Suppression des fichiers .v en ancienne syntaxe git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7733 85f007b7-540e-0410-9357-904b9bb8a0f7 --- contrib7/ring/ArithRing.v | 81 ----------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 contrib7/ring/ArithRing.v (limited to 'contrib7/ring/ArithRing.v') diff --git a/contrib7/ring/ArithRing.v b/contrib7/ring/ArithRing.v deleted file mode 100644 index c613aa9b5..000000000 --- a/contrib7/ring/ArithRing.v +++ /dev/null @@ -1,81 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* true - | (S n') (S m') => (nateq n' m') - | _ _ => false - end. - -Lemma nateq_prop : (n,m:nat)(Is_true (nateq n m))->n==m. -Proof. - Induction n; Induction m; Intros; Try Contradiction. - Trivial. - Unfold Is_true in H1. - Rewrite (H n1 H1). - Trivial. -Save. - -Hints Resolve nateq_prop eq2eqT : arithring. - -Definition NatTheory : (Semi_Ring_Theory plus mult (1) (0) nateq). - Split; Intros; Auto with arith arithring. - Apply eq2eqT; Apply simpl_plus_l with n:=n. - Apply eqT2eq; Trivial. -Defined. - - -Add Semi Ring nat plus mult (1) (0) nateq NatTheory [O S]. - -Goal (n:nat)(S n)=(plus (S O) n). -Intro; Reflexivity. -Save S_to_plus_one. - -(* Replace all occurrences of (S exp) by (plus (S O) exp), except when - exp is already O and only for those occurrences than can be reached by going - down plus and mult operations *) -Recursive Meta Definition S_to_plus t := - Match t With - | [(S O)] -> '(S O) - | [(S ?1)] -> Let t1 = (S_to_plus ?1) In - '(plus (S O) t1) - | [(plus ?1 ?2)] -> Let t1 = (S_to_plus ?1) - And t2 = (S_to_plus ?2) In - '(plus t1 t2) - | [(mult ?1 ?2)] -> Let t1 = (S_to_plus ?1) - And t2 = (S_to_plus ?2) In - '(mult t1 t2) - | [?] -> 't. - -(* Apply S_to_plus on both sides of an equality *) -Tactic Definition S_to_plus_eq := - Match Context With - | [ |- ?1 = ?2 ] -> - (**) Try (**) - Let t1 = (S_to_plus ?1) - And t2 = (S_to_plus ?2) In - Change t1=t2 - | [ |- ?1 == ?2 ] -> - (**) Try (**) - Let t1 = (S_to_plus ?1) - And t2 = (S_to_plus ?2) In - Change (t1==t2). - -Tactic Definition NatRing := S_to_plus_eq;Ring. -- cgit v1.2.3