From c4b5c7ebd6f316bb53e1a53f94c367f4f0129dae Mon Sep 17 00:00:00 2001 From: letouzey Date: Tue, 9 Feb 2010 17:45:06 +0000 Subject: Numbers: properties of min/max with respect to 0,S,P,add,sub,mul With these properties, we can kill Arith/MinMax, NArith/Nminmax, and leave ZArith/Zminmax as a compatibility file only. Now the instanciations NPeano.Nat, NBinary.N, ZBinary.Z, BigZ, BigN contains all theses facts. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12718 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/Numbers/Natural/Abstract/NMaxMin.v | 135 ++++++++++++++++++++++++ theories/Numbers/Natural/Abstract/NProperties.v | 6 +- theories/Numbers/Natural/Abstract/NSub.v | 11 ++ 3 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 theories/Numbers/Natural/Abstract/NMaxMin.v (limited to 'theories/Numbers/Natural/Abstract') diff --git a/theories/Numbers/Natural/Abstract/NMaxMin.v b/theories/Numbers/Natural/Abstract/NMaxMin.v new file mode 100644 index 0000000000..9406bce221 --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NMaxMin.v @@ -0,0 +1,135 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* n-p <= m-p. +Proof. + intros. rewrite le_sub_le_add_r. transitivity m. assumption. apply sub_add_le. +Qed. + +Lemma sub_le_mono_l : forall n m p, n <= m -> p-m <= p-n. +Proof. + intros. rewrite le_sub_le_add_r. + transitivity (p-n+n); [ apply sub_add_le | now apply add_le_mono_l]. +Qed. + (** Sub and mul *) Theorem mul_pred_r : forall n m, n * (P m) == n * m - n. -- cgit v1.2.3