X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Fnat%2Fexp.ma;h=25c81c0697bdd167b48883261e1fa5af5c62c0aa;hb=10f29fdd78ee089a9a94446207b543d33d6c851c;hp=49efe8525504d4f431e81de36ea702f7c9d46f76;hpb=6db38e3d8e4083765f2fce40c7845c9827b9afd0;p=helm.git diff --git a/helm/software/matita/library/nat/exp.ma b/helm/software/matita/library/nat/exp.ma index 49efe8525..25c81c069 100644 --- a/helm/software/matita/library/nat/exp.ma +++ b/helm/software/matita/library/nat/exp.ma @@ -40,6 +40,13 @@ theorem exp_n_SO : \forall n:nat. n = n \sup (S O). intro.simplify.rewrite < times_n_SO.reflexivity. qed. +theorem exp_SO_n : \forall n:nat. S O = (S O) \sup n. +intro.elim n + [reflexivity + |simplify.rewrite < plus_n_O.assumption + ] +qed. + theorem exp_SSO: \forall n. exp n (S(S O)) = n*n. intro.simplify. rewrite < times_n_SO. @@ -146,6 +153,15 @@ apply nat_elim2 ] qed. +theorem lt_exp1: \forall n,m,p:nat. O < p \to n < m \to exp n p < exp m p. +intros. +elim H + [rewrite < exp_n_SO.rewrite < exp_n_SO.assumption + |simplify. + apply lt_times;assumption + ] +qed. + theorem le_exp_to_le: \forall a,n,m. S O < a \to exp a n \le exp a m \to n \le m. intro. @@ -170,6 +186,11 @@ apply nat_elim2;intros ] qed. +theorem le_exp_to_le1 : \forall n,m,p.O < p \to exp n p \leq exp m p \to n \leq m. +intros;apply not_lt_to_le;intro;apply (lt_to_not_le ? ? ? H1); +apply lt_exp1;assumption. +qed. + theorem lt_exp_to_lt: \forall a,n,m. S O < a \to exp a n < exp a m \to n < m. intros. @@ -187,6 +208,30 @@ elim (le_to_or_lt_eq n m) ] qed. - +theorem times_exp: +\forall n,m,p. exp n p * exp m p = exp (n*m) p. +intros.elim p + [simplify.reflexivity + |simplify. + rewrite > assoc_times. + rewrite < assoc_times in ⊢ (? ? (? ? %) ?). + rewrite < sym_times in ⊢ (? ? (? ? (? % ?)) ?). + rewrite > assoc_times in ⊢ (? ? (? ? %) ?). + rewrite < assoc_times. + rewrite < H. + reflexivity + ] +qed. + +theorem monotonic_exp1: \forall n. +monotonic nat le (\lambda x.(exp x n)). +unfold monotonic. intros. +simplify.elim n + [apply le_n + |simplify. + apply le_times;assumption + ] +qed. + \ No newline at end of file