X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Flibrary%2Fnat%2Forders.ma;h=807906bd21abd4572f75e96fa9bd39977a2309e5;hb=3a6264d216f7135764964a94823e513e6564ead9;hp=587134afcc9c0873eea6fa14a61677e34fbb6e63;hpb=57e4568829db52f1959006041d72036ae9663955;p=helm.git diff --git a/matita/library/nat/orders.ma b/matita/library/nat/orders.ma index 587134afc..807906bd2 100644 --- a/matita/library/nat/orders.ma +++ b/matita/library/nat/orders.ma @@ -191,6 +191,18 @@ apply H2.reflexivity. apply H3. apply le_S_S. assumption. qed. +(* le to eq *) +lemma le_to_le_to_eq: \forall n,m. n \le m \to m \le n \to n = m. +apply nat_elim2 + [intros.apply le_n_O_to_eq.assumption + |intros.apply sym_eq.apply le_n_O_to_eq.assumption + |intros.apply eq_f.apply H + [apply le_S_S_to_le.assumption + |apply le_S_S_to_le.assumption + ] + ] +qed. + (* lt and le trans *) theorem lt_O_S : \forall n:nat. O < S n. intro. unfold. apply le_S_S. apply le_O_n. @@ -207,6 +219,12 @@ assumption.apply H2.unfold lt. apply lt_to_le.assumption. qed. +theorem lt_S_to_lt: \forall n,m. S n < m \to n < m. +intros. +apply (trans_lt ? (S n)) + [apply le_n|assumption] +qed. + theorem ltn_to_ltO: \forall n,m:nat. lt n m \to lt O m. intros.apply (le_to_lt_to_lt O n). apply le_O_n.assumption.