X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambda_delta%2FGround_2%2Farith.ma;h=39d28c959182d17c31fa4a851751928c3fc12b8d;hb=b5db76fe31ab35bae0257cb6684c511bcc531e45;hp=a6ac73c1297297501730ee7525b892858ebbeeaf;hpb=eac748dd6d912e84b3c78e682f9e40d90fb10acb;p=helm.git diff --git a/matita/matita/contribs/lambda_delta/Ground_2/arith.ma b/matita/matita/contribs/lambda_delta/Ground_2/arith.ma index a6ac73c12..39d28c959 100644 --- a/matita/matita/contribs/lambda_delta/Ground_2/arith.ma +++ b/matita/matita/contribs/lambda_delta/Ground_2/arith.ma @@ -17,184 +17,60 @@ include "Ground_2/star.ma". (* ARITHMETICAL PROPERTIES **************************************************) -lemma false_lt_to_le: ∀x,y. (x < y → False) → y ≤ x. -#x #y #H elim (decidable_lt x y) /2 width=1/ -#Hxy elim (H Hxy) -qed-. - -axiom eq_nat_dec: ∀n1,n2:nat. Decidable (n1 = n2). - -axiom lt_dec: ∀n1,n2. Decidable (n1 < n2). - -lemma plus_S_eq_O_false: ∀n,m. n + S m = 0 → False. -#n #m (commutative_plus p) (le_O_to_eq_O … H) -H // -| #b #IHb #c elim c -c // - #c #_ #a #Hcb - lapply (le_S_S_to_le … Hcb) -Hcb #Hcb - minus_plus @eq_f2 /2 width=1/ +#a #b #c1 #H >minus_minus_comm >minus_le_minus_minus_comm // qed. lemma arith_b2: ∀a,b,c1,c2. c1 + c2 ≤ b → a - c1 - c2 - (b - c1 - c2) = a - b. #a #b #c1 #c2 #H >minus_plus >minus_plus >minus_plus /2 width=1/ qed. -lemma arith_c1: ∀a,b,c1. a + c1 - (b + c1) = a - b. -// qed. - lemma arith_c1x: ∀x,a,b,c1. x + c1 + a - (b + c1) = x + a - b. -#x #a #b #c1 >plus_plus_comm_23 // -qed. - -lemma arith_d1: ∀a,b,c1. c1 ≤ b → a + c1 + (b - c1) = a + b. -/2 width=1/ qed. - -lemma arith_e2: ∀a,c1,c2. a ≤ c1 → c1 + c2 - (c1 - a + c2) = a. -/3 width=1/ qed. - -lemma arith_f1: ∀a,b,c1. a + b ≤ c1 → c1 - (c1 - a - b) = a + b. -#a #b #c1 #H >minus_plus plus_minus // /2 width=1/ qed. -lemma arith_i2: ∀a,c1,c2. c1 + c2 ≤ a → c1 + c2 + (a - c1 - c2) = a. -/2 width=1/ qed. - -lemma arith_z1: ∀a,b,c1. a + c1 - b - c1 = a - b. -// qed. - -(* unstable *****************************************************************) +(* inversion & forward lemmas ***********************************************) -lemma arith1: ∀n,h,m,p. n + h + m ≤ p + h → n + m ≤ p. -/2 width=2/ qed. +axiom eq_nat_dec: ∀n1,n2:nat. Decidable (n1 = n2). -lemma arith2: ∀j,i,e,d. d + e ≤ i → d ≤ i - e + j. -#j #i #e #d #H lapply (plus_le_minus … H) -H /2 width=3/ -qed. +axiom lt_dec: ∀n1,n2. Decidable (n1 < n2). -lemma arith3: ∀a1,a2,b,c1. a1 + a2 ≤ b → a1 + c1 + a2 ≤ b + c1. -/2 width=1/ qed. +lemma lt_or_eq_or_gt: ∀m,n. ∨∨ m < n | n = m | n < m. +#m #n elim (lt_or_ge m n) /2 width=1/ +#H elim H -m /2 width=1/ +#m #Hm * #H /2 width=1/ /3 width=1/ +qed-. -lemma arith4: ∀h,d,e1,e2. d ≤ e1 + e2 → d + h ≤ e1 + h + e2. -/2 width=1/ qed. +lemma lt_refl_false: ∀n. n < n → False. +#n #H elim (lt_to_not_eq … H) -H /2 width=1/ +qed-. -lemma arith5: ∀a,b1,b2,c1. c1 ≤ b1 → c1 ≤ a → a < b1 + b2 → a - c1 < b1 - c1 + b2. -#a #b1 #b2 #c1 #H1 #H2 #H3 -minus_plus >minus_plus @monotonic_le_plus_r @monotonic_le_minus_l // -qed. +lemma le_or_ge: ∀m,n. m ≤ n ∨ n ≤ m. +#m #n elim (lt_or_ge m n) /2 width=1/ /3 width=2/ +qed-. +*)