]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/library/nat/compare.ma
Committing all the recent development of Andrea after the merge between his
[helm.git] / helm / matita / library / nat / compare.ma
index 60a9d4194c2dc5b3dbf47936260f9763d4bf577d..3a8e4a87ca50a7416e2df5f72920ea151977f41c 100644 (file)
@@ -78,6 +78,21 @@ nat_compare n m = nat_compare (S n) (S m).
 intros.simplify.reflexivity.
 qed.
 
+theorem S_pred: \forall n:nat.lt O n \to eq nat n (S (pred n)).
+intro.elim n.apply False_ind.exact not_le_Sn_O O H.
+apply eq_f.apply pred_Sn.
+qed.
+
+theorem nat_compare_pred_pred: 
+\forall n,m:nat.lt O n \to lt O m \to 
+eq compare (nat_compare n m) (nat_compare (pred n) (pred m)).
+intros.
+apply lt_O_n_elim n H.
+apply lt_O_n_elim m H1.
+intros.
+simplify.reflexivity.
+qed.
+
 theorem nat_compare_to_Prop: \forall n,m:nat. 
 match (nat_compare n m) with
   [ LT \Rightarrow n < m