]> matita.cs.unibo.it Git - helm.git/blob - matita/library/nat/relevant_equations.ma
removed a pointless call to auto
[helm.git] / matita / library / nat / relevant_equations.ma
1 (**************************************************************************)
2 (*       __                                                               *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||       A.Asperti, C.Sacerdoti Coen,                          *)
8 (*      ||A||       E.Tassi, S.Zacchiroli                                 *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU Lesser General Public License Version 2.1         *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 set "baseuri" "cic:/matita/nat/relevant_equations.ma".
16
17 include "nat/times.ma".
18 include "nat/minus.ma".
19
20 theorem times_plus_l: \forall n,m,p:nat. (n+m)*p = n*p + m*p.
21 intros.
22 apply (trans_eq ? ? (p*(n+m))).
23 apply sym_times.
24 apply (trans_eq ? ? (p*n+p*m)).
25 apply distr_times_plus.
26 apply eq_f2.
27 apply sym_times.
28 apply sym_times.
29 qed.
30
31 theorem times_minus_l: \forall n,m,p:nat. (n-m)*p = n*p - m*p.
32 intros.
33 apply (trans_eq ? ? (p*(n-m))).
34 apply sym_times.
35 apply (trans_eq ? ? (p*n-p*m)).
36 apply distr_times_minus.
37 apply eq_f2.
38 apply sym_times.
39 apply sym_times.
40 qed.
41
42 theorem times_plus_plus: \forall n,m,p,q:nat. (n + m)*(p + q) =
43 n*p + n*q + m*p + m*q.
44 intros.
45 apply (trans_eq nat ? ((n*(p+q) + m*(p+q)))).
46 apply times_plus_l.
47 rewrite > distr_times_plus.
48 rewrite > distr_times_plus.
49 rewrite < assoc_plus.reflexivity.
50 qed.