]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/library/nat/times.ma
A little bit more of notation here and there.
[helm.git] / helm / matita / library / nat / times.ma
index 035116d0f54d7312ce9fa676a9e31ea1af8226b6..24a756dc5c3b458b790eee6fa6d336ac991c54bd 100644 (file)
@@ -21,21 +21,23 @@ include "nat/plus.ma".
 let rec times n m \def 
  match n with 
  [ O \Rightarrow O
- | (S p) \Rightarrow (plus m (times p m)) ].
+ | (S p) \Rightarrow (m+(times p m)) ].
 
-theorem times_n_O: \forall n:nat. O = times n O.
+interpretation "natural times" 'times x y = (cic:/matita/nat/times/times.con x y).
+
+theorem times_n_O: \forall n:nat. O = n*O.
 intros.elim n.
 simplify.reflexivity.
 simplify.assumption.
 qed.
 
 theorem times_n_Sm : 
-\forall n,m:nat.plus n (times n  m) = times n (S m).
+\forall n,m:nat.n+n*m = n*(S m).
 intros.elim n.
 simplify.reflexivity.
 simplify.apply eq_f.rewrite < H.
-transitivity (plus (plus n1 m) (times n1 m)).symmetry.apply assoc_plus.
-transitivity (plus (plus m n1) (times n1 m)).
+transitivity ((n1+m)+n1*m).symmetry.apply assoc_plus.
+transitivity ((m+n1)+n1*m).
 apply eq_f2.
 apply sym_plus.
 reflexivity.
@@ -46,7 +48,7 @@ qed.
 theorem symmetric_times : symmetric nat times. *)
 
 theorem sym_times : 
-\forall n,m:nat.times n m = times m n.
+\forall n,m:nat.n*m = m*n.
 intros.elim n.
 simplify.apply times_n_O.
 simplify.rewrite > H.apply times_n_Sm.
@@ -61,7 +63,6 @@ apply eq_f.rewrite < assoc_plus. rewrite < sym_plus ? z.
 rewrite > assoc_plus.reflexivity.
 qed.
 
-variant times_plus_distr: \forall n,m,p:nat.
-times n (plus m p) = plus (times n m) (times n p)
+variant times_plus_distr: \forall n,m,p:nat. n*(m+p)=n*m+n*p
 \def distributive_times_plus.