]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/ground/arith/nat_le_pred.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / arith / nat_le_pred.ma
index f1824e22eb0dcfd5ad2f73702a23f0e098a6bf53..1666a554894cf8986dd8d3519dca338c176b06c4 100644 (file)
 include "ground/arith/nat_pred_succ.ma".
 include "ground/arith/nat_le.ma".
 
-(* NON-NEGATIVE INTEGERS ****************************************************)
+(* ORDER FOR NON-NEGATIVE INTEGERS ******************************************)
 
-(* Basic constructions with pred ********************************************)
+(* Inversions with npred ****************************************************)
+
+lemma nle_inv_pred_sn (m) (n): ↓m ≤ n → m ≤ ↑n.
+#m #n @(nat_ind_succ … m) -m
+/2 width=1 by nle_succ_bi/
+qed-.
+
+(*** le_inv_S1 *)
+lemma nle_inv_succ_sn (m) (n):
+      ↑m ≤ n → ∧∧ m ≤ ↓n & n = ↑↓n.
+#m #n * -n
+[ /2 width=3 by nle_refl, conj/
+| #n #Hn /3 width=1 by nle_des_succ_sn, conj/
+]
+qed-.
+
+lemma nle_inv_succ_dx (m) (n):
+      m ≤ ↑n → ∨∨ 𝟎 = m | ∧∧ ↓m ≤ n & m = ↑↓m.
+#m #n @(nat_ind_succ … m) -m
+[ /2 width=1 by or_introl/
+| #m #_ #H0
+  /4 width=1 by nle_inv_succ_bi, or_intror, conj/
+]
+qed-.
+
+(* Constructions with npred *************************************************)
+
+lemma nle_succ_pred_dx_refl (m): m ≤ ↑↓m.
+#m @nle_inv_pred_sn // qed.
 
 (*** le_pred_n *)
 lemma nle_pred_sn_refl (m): ↓m ≤ m.
-#m elim m -m //
+#m @(nat_ind_succ … m) -m //
 qed.
 
 (*** monotonic_pred *)
 lemma nle_pred_bi (m) (n): m ≤ n → ↓m ≤ ↓n.
-#m #n #H elim H -n
+#m #n #H elim H -n //
 /2 width=3 by nle_trans/
 qed.
+
+lemma nle_pred_sn (m) (n): m ≤ ↑n → ↓m ≤ n.
+#m #n @(nat_ind_succ … m) -m //
+/2 width=1 by nle_pred_bi/
+qed.