From: Ferruccio Guidi Date: Fri, 1 Jan 2021 14:42:16 +0000 (+0100) Subject: arithmetics for λδ X-Git-Tag: make_still_working~166 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=ccf5878f2a2ec7f952f140e162391708a740517b;p=helm.git arithmetics for λδ strict order for non-ngative integers completed --- diff --git a/matita/matita/contribs/lambdadelta/ground/arith/nat.txt b/matita/matita/contribs/lambdadelta/ground/arith/nat.txt index fc8e9e241..2bd0eabca 100644 --- a/matita/matita/contribs/lambdadelta/ground/arith/nat.txt +++ b/matita/matita/contribs/lambdadelta/ground/arith/nat.txt @@ -111,12 +111,12 @@ # "cic:/matita/arithmetics/nat/minus_pred_pred.con" "cic:/matita/arithmetics/nat/monotonic_lt_minus_l.con" - -"cic:/matita/arithmetics/nat/lt_minus_to_plus.con" -"cic:/matita/arithmetics/nat/lt_minus_to_plus_r.con" +# "cic:/matita/arithmetics/nat/lt_plus_to_minus.con" "cic:/matita/arithmetics/nat/lt_plus_to_minus_r.con" "cic:/matita/arithmetics/nat/lt_inv_plus_l.con" +"cic:/matita/arithmetics/nat/lt_minus_to_plus.con" +"cic:/matita/arithmetics/nat/lt_minus_to_plus_r.con" #################################### diff --git a/matita/matita/contribs/lambdadelta/ground/arith/nat_le_minus.ma b/matita/matita/contribs/lambdadelta/ground/arith/nat_le_minus.ma index e3da0c922..607a9135e 100644 --- a/matita/matita/contribs/lambdadelta/ground/arith/nat_le_minus.ma +++ b/matita/matita/contribs/lambdadelta/ground/arith/nat_le_minus.ma @@ -25,6 +25,9 @@ lemma nle_minus_sn_refl_sn (m) (n): m - n ≤ m. #n #IH /2 width=3 by nle_trans/ qed. +lemma nle_minus_succ_sn (m) (n): ↑n - m ≤ ↑(n - m). +// qed. + (*** inv_eq_minus_O *) lemma nle_eq_minus_O (m) (n): 𝟎 = m - n → m ≤ n. #m #n @(nat_ind_2 … m n) // diff --git a/matita/matita/contribs/lambdadelta/ground/arith/nat_le_pred.ma b/matita/matita/contribs/lambdadelta/ground/arith/nat_le_pred.ma index da1de97f5..75cd4bf7e 100644 --- a/matita/matita/contribs/lambdadelta/ground/arith/nat_le_pred.ma +++ b/matita/matita/contribs/lambdadelta/ground/arith/nat_le_pred.ma @@ -17,8 +17,18 @@ include "ground/arith/nat_le.ma". (* ORDER FOR NON-NEGATIVE INTEGERS ******************************************) +(* Destructions with npred **************************************************) + +lemma nle_inv_pred_sn (m) (n): ↓m ≤ n → m ≤ ↑n. +#m #n elim m -m +/2 width=1 by nle_succ_bi/ +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 // @@ -34,10 +44,3 @@ lemma nle_pred_sn (m) (n): m ≤ ↑n → ↓m ≤ n. #m #n elim m -m // /2 width=1 by nle_pred_bi/ qed-. - -(* Destructions with npred **************************************************) - -lemma nle_inv_pred_sn (m) (n): ↓m ≤ n → m ≤ ↑n. -#m #n elim m -m -/2 width=1 by nle_succ_bi/ -qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/arith/nat_lt.ma b/matita/matita/contribs/lambdadelta/ground/arith/nat_lt.ma index f7a868b53..388c8aace 100644 --- a/matita/matita/contribs/lambdadelta/ground/arith/nat_lt.ma +++ b/matita/matita/contribs/lambdadelta/ground/arith/nat_lt.ma @@ -36,6 +36,9 @@ lemma nlt_refl_succ (n): n < ↑n. lemma nlt_zero_succ (m): 𝟎 < ↑m. /2 width=1 by nle_succ_bi/ qed. +lemma nlt_succ_bi (m) (n): m < n → ↑m < ↑n. +/2 width=1 by nle_succ_bi/ qed. + (*** le_to_or_lt_eq *) lemma nle_lt_eq_e (m) (n): m ≤ n → ∨∨ m < n | m = n. #m #n * -n /3 width=1 by nle_succ_bi, or_introl/ diff --git a/matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma b/matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma index 34a16e01f..5ee4b80eb 100644 --- a/matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma +++ b/matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma @@ -35,3 +35,14 @@ lemma nlt_minus_sn_bi (o) (m) (n): o ≤ m → m < n → m - o < n - o. lapply (nle_minus_sn_bi … o Hmn) -Hmn <(nminus_succ_sn … Hom) // qed. + +(* Destructions with nminus *************************************************) + +lemma nlt_fwd_minus_dx (o) (m) (n): m < n - o → o < n. +#o elim o -o +[ #m #n (nlt_inv_zero_sn n) +[ /2 width=1 by nlt_succ_bi/ +| /3 width=3 by le_nlt_trans, nlt_le_trans/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground/arith/nat_minus_plus.ma b/matita/matita/contribs/lambdadelta/ground/arith/nat_minus_plus.ma index 47e88de49..bf5cf5fee 100644 --- a/matita/matita/contribs/lambdadelta/ground/arith/nat_minus_plus.ma +++ b/matita/matita/contribs/lambdadelta/ground/arith/nat_minus_plus.ma @@ -30,14 +30,14 @@ lemma nminus_plus_sn_refl_dx (m) (n): m = n + m - n. qed. (*** minus_plus *) -theorem nminus_assoc (o) (m) (n): o-m-n = o-(m+n). +theorem nminus_plus_assoc (o) (m) (n): o-m-n = o-(m+n). #o #m #n elim n -n // #n #IH