X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Flibrary%2Fnat%2Frelevant_equations.ma;h=f4cf43775058d9cfdd550c68f2cb959f00fba512;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=fee1fd4071a600027e5301d68979d2f15bf2bbff;hpb=5c6b8eec9db4119a87eb4fd4055f1ac31a713d90;p=helm.git diff --git a/helm/matita/library/nat/relevant_equations.ma b/helm/matita/library/nat/relevant_equations.ma index fee1fd407..f4cf43775 100644 --- a/helm/matita/library/nat/relevant_equations.ma +++ b/helm/matita/library/nat/relevant_equations.ma @@ -15,22 +15,34 @@ set "baseuri" "cic:/matita/nat/relevant_equations.ma". include "nat/times.ma". +include "nat/minus.ma". theorem times_plus_l: \forall n,m,p:nat. (n+m)*p = n*p + m*p. intros. -apply trans_eq ? ? (p*(n+m)). +apply (trans_eq ? ? (p*(n+m))). apply sym_times. -apply trans_eq ? ? (p*n+p*m). +apply (trans_eq ? ? (p*n+p*m)). apply distr_times_plus. apply eq_f2. apply sym_times. apply sym_times. qed. +theorem times_minus_l: \forall n,m,p:nat. (n-m)*p = n*p - m*p. +intros. +apply (trans_eq ? ? (p*(n-m))). +apply sym_times. +apply (trans_eq ? ? (p*n-p*m)). +apply distr_times_minus. +apply eq_f2. +apply sym_times. +apply sym_times. +qed. + theorem times_plus_plus: \forall n,m,p,q:nat. (n + m)*(p + q) = n*p + n*q + m*p + m*q. intros. -apply trans_eq nat ? ((n*(p+q) + m*(p+q))). +apply (trans_eq nat ? ((n*(p+q) + m*(p+q)))). apply times_plus_l. rewrite > distr_times_plus. rewrite > distr_times_plus.