diff options
| author | herbelin | 2003-11-29 17:28:49 +0000 |
|---|---|---|
| committer | herbelin | 2003-11-29 17:28:49 +0000 |
| commit | 9a6e3fe764dc2543dfa94de20fe5eec42d6be705 (patch) | |
| tree | 77c0021911e3696a8c98e35a51840800db4be2a9 /contrib/ring/ZArithRing.v | |
| parent | 9058fb97426307536f56c3e7447be2f70798e081 (diff) | |
Remplacement des fichiers .v ancienne syntaxe de theories, contrib et states par les fichiers nouvelle syntaxe
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5027 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/ring/ZArithRing.v')
| -rw-r--r-- | contrib/ring/ZArithRing.v | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/contrib/ring/ZArithRing.v b/contrib/ring/ZArithRing.v index cf5e18c5ea..e6a7bf2af7 100644 --- a/contrib/ring/ZArithRing.v +++ b/contrib/ring/ZArithRing.v @@ -12,24 +12,25 @@ Require Export ArithRing. Require Export ZArith_base. -Require Eqdep_dec. +Require Import Eqdep_dec. -Definition Zeq := [x,y:Z] - Cases `x ?= y ` of - EGAL => true +Definition Zeq (x y:Z) := + match (x ?= y)%Z with + | Datatypes.Eq => true | _ => false end. -Lemma Zeq_prop : (x,y:Z)(Is_true (Zeq x y)) -> x==y. - Intros x y H; Unfold Zeq in H. - Apply Zcompare_EGAL_eq. - NewDestruct (Zcompare x y); [Reflexivity | Contradiction | Contradiction ]. -Save. +Lemma Zeq_prop : forall x y:Z, Is_true (Zeq x y) -> x = y. + intros x y H; unfold Zeq in H. + apply Zcompare_Eq_eq. + destruct (x ?= y)%Z; [ reflexivity | contradiction | contradiction ]. +Qed. -Definition ZTheory : (Ring_Theory Zplus Zmult `1` `0` Zopp Zeq). - Split; Intros; Apply eq2eqT; EAuto with zarith. - Apply eqT2eq; Apply Zeq_prop; Assumption. -Save. +Definition ZTheory : Ring_Theory Zplus Zmult 1%Z 0%Z Zopp Zeq. + split; intros; apply eq2eqT; eauto with zarith. + apply eqT2eq; apply Zeq_prop; assumption. +Qed. (* NatConstants and NatTheory are defined in Ring_theory.v *) -Add Ring Z Zplus Zmult `1` `0` Zopp Zeq ZTheory [POS NEG ZERO xO xI xH]. +Add Ring Z Zplus Zmult 1%Z 0%Z Zopp Zeq ZTheory + [ Zpos Zneg 0%Z xO xI 1%positive ].
\ No newline at end of file |
