X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Flibrary%2Fnat%2Flt_arith.ma;h=f0fdbdbd6d6cf9aeecba4b23c6b96d9ea270a735;hb=72e7d9c9d410ded571b9d3c396197b26181c1e2a;hp=6635a8b0da4f5dc1f22191dbba8bf75b966a7aaf;hpb=04e27500136c94e4f2ac072a5e4d330b75da35f0;p=helm.git diff --git a/matita/library/nat/lt_arith.ma b/matita/library/nat/lt_arith.ma index 6635a8b0d..f0fdbdbd6 100644 --- a/matita/library/nat/lt_arith.ma +++ b/matita/library/nat/lt_arith.ma @@ -111,6 +111,28 @@ assumption. apply (ltn_to_ltO p q H2). qed. +theorem lt_times_r1: +\forall n,m,p. O < n \to m < p \to n*m < n*p. +intros. +elim H;apply lt_times_r;assumption. +qed. + +theorem lt_times_l1: +\forall n,m,p. O < n \to m < p \to m*n < p*n. +intros. +elim H;apply lt_times_l;assumption. +qed. + +theorem lt_to_le_to_lt_times : +\forall n,n1,m,m1. n < n1 \to m \le m1 \to O < m1 \to n*m < n1*m1. +intros. +apply (le_to_lt_to_lt ? (n*m1)) + [apply le_times_r.assumption + |apply lt_times_l1 + [assumption|assumption] + ] +qed. + theorem lt_times_to_lt_l: \forall n,p,q:nat. p*(S n) < q*(S n) \to p < q. intros. @@ -126,6 +148,15 @@ assumption. exact (decidable_lt p q). qed. +theorem lt_times_n_to_lt: +\forall n,p,q:nat. O < n \to p*n < q*n \to p < q. +intro. +apply (nat_case n) + [intros.apply False_ind.apply (not_le_Sn_n ? H) + |intros 4.apply lt_times_to_lt_l + ] +qed. + theorem lt_times_to_lt_r: \forall n,p,q:nat. (S n)*p < (S n)*q \to lt p q. intros. @@ -135,6 +166,15 @@ rewrite < (sym_times (S n)). assumption. qed. +theorem lt_times_n_to_lt_r: +\forall n,p,q:nat. O < n \to n*p < n*q \to lt p q. +intro. +apply (nat_case n) + [intros.apply False_ind.apply (not_le_Sn_n ? H) + |intros 4.apply lt_times_to_lt_r + ] +qed. + theorem nat_compare_times_l : \forall n,p,q:nat. nat_compare p q = nat_compare ((S n) * p) ((S n) * q). intros.apply nat_compare_elim.intro.