lapply (ap_rewl ???? E1 A) as A1; lapply (ap_rewr ???? E2 A1) as A2;
apply (plus_strong_ext ???? A2);
qed.
+
+lemma plus_cancl_ap: ∀G:abelian_group.∀x,y,z:G.z+x # z + y → x # y.
+intros; apply plus_strong_ext; assumption;
+qed.
+
+lemma plus_cancr_ap: ∀G:abelian_group.∀x,y,z:G.x+z # y+z → x # y.
+intros; apply plus_strong_extr; assumption;
+qed.
lemma feq_plusr: ∀G:abelian_group.∀x,y,z:G. y ≈ z → y+x ≈ z+x.
intros (G x y z Eyz); apply (strong_ext_to_ext ?? (plus_strong_extr ? x));
qed.
coercion cic:/matita/group/eq_opp_plusl.con nocomposites.
-
-lemma plus_cancr_ap: ∀G:abelian_group.∀x,y,z:G. x+z # y+z → x # y.
-intros (G x y z H); lapply (fap_plusr ? (-z) ?? H) as H1; clear H;
-lapply (ap_rewl ? (x + (z + -z)) ?? (plus_assoc ? x z (-z)) H1) as H2; clear H1;
-lapply (ap_rewl ? (x + (-z + z)) ?? (plus_comm ?z (-z)) H2) as H1; clear H2;
-lapply (ap_rewl ? (x + 0) ?? (opp_inverse ?z) H1) as H2; clear H1;
-lapply (ap_rewl ? (0+x) ?? (plus_comm ?x 0) H2) as H1; clear H2;
-lapply (ap_rewl ? x ?? (zero_neutral ?x) H1) as H2; clear H1;
-lapply (ap_rewr ? (y + (z + -z)) ?? (plus_assoc ? y z (-z)) H2) as H3;
-lapply (ap_rewr ? (y + (-z + z)) ?? (plus_comm ?z (-z)) H3) as H4;
-lapply (ap_rewr ? (y + 0) ?? (opp_inverse ?z) H4) as H5;
-lapply (ap_rewr ? (0+y) ?? (plus_comm ?y 0) H5) as H6;
-lapply (ap_rewr ? y ?? (zero_neutral ?y) H6);
-assumption;
-qed.
-
-lemma pluc_cancl_ap: ∀G:abelian_group.∀x,y,z:G. z+x # z+y → x # y.
-intros (G x y z H); apply (plus_cancr_ap ??? z);
-apply (ap_rewl ???? (plus_comm ???));
-apply (ap_rewr ???? (plus_comm ???));
-assumption;
-qed.
(cic:/matita/sequence/tends0.con _ s).
*)
+lemma lew_opp : ∀O:ogroup.∀a,b,c:O.0 ≤ b → a ≤ c → a + -b ≤ c.
+intros (O a b c L0 L);
+apply (le_transitive ????? L);
+apply (plus_cancl_le ??? (-a));
+apply (le_rewr ??? 0 (opp_inverse ??));
+apply (le_rewl ??? (-a+a+-b) (plus_assoc ????));
+apply (le_rewl ??? (0+-b) (opp_inverse ??));
+apply (le_rewl ??? (-b) (zero_neutral ?(-b)));
+apply le_zero_x_to_le_opp_x_zero;
+assumption;
+qed.
+
+
+lemma ltw_opp : ∀O:ogroup.∀a,b,c:O.0 < b → a < c → a + -b < c.
+intros (O a b c P L);
+apply (lt_transitive ????? L);
+apply (plus_cancl_lt ??? (-a));
+apply (lt_rewr ??? 0 (opp_inverse ??));
+apply (lt_rewl ??? (-a+a+-b) (plus_assoc ????));
+apply (lt_rewl ??? (0+-b) (opp_inverse ??));
+apply (lt_rewl ??? ? (zero_neutral ??));
+apply lt_zero_x_to_lt_opp_x_zero;
+assumption;
+qed.
+
+lemma ltwl: ∀a,b,c:nat. b + a < c → a < c.
+intros 3 (x y z); elim y (H z IH H); [apply H]
+apply IH; apply lt_S_to_lt; apply H;
+qed.
+
+lemma ltwr: ∀a,b,c:nat. a + b < c → a < c.
+intros 3 (x y z); rewrite > sym_plus; apply ltwl;
+qed.
+
alias symbol "leq" = "ordered sets less or equal than".
alias symbol "and" = "constructive and".
alias symbol "exists" = "constructive exists (Type)".
-lemma carabinieri: (* non trova la coercion .... *)
+theorem carabinieri: (* non trova la coercion .... *)
∀R.∀ml:mlattice R.∀an,bn,xn:sequence (pordered_set_of_excedence ml).
(∀n. (an n ≤ xn n) ∧ (xn n ≤ bn n)) →
∀x:ml. tends0 ? (d2s ? ml an x) → tends0 ? (d2s ? ml bn x) →
intros (e He);
elim (Ha ? He) (n1 H1); clear Ha; elim (Hb e He) (n2 H2); clear Hb;
constructor 1; [apply (n1 + n2);] intros (n3 Hn3);
-cut (n1<n3) [2:
- generalize in match Hn3; elim n2; [rewrite > sym_plus in H3; assumption]
- apply H3; rewrite > sym_plus in H4; simplify in H4; apply lt_S_to_lt;
- rewrite > sym_plus in H4; assumption;]
-elim (H1 ? Hcut) (H3 H4); clear Hcut;
-cut (n2<n3) [2:
- generalize in match Hn3; elim n1; [assumption]
- apply H5; simplify in H6; apply lt_S_to_lt; assumption]
-elim (H2 ? Hcut) (H5 H6); clear Hcut;
+lapply (ltwr ??? Hn3) as Hn1n3; lapply (ltwl ??? Hn3) as Hn2n3;
+elim (H1 ? Hn1n3) (H3 H4); elim (H2 ? Hn2n3) (H5 H6); clear Hn1n3 Hn2n3;
elim (H n3) (H7 H8); clear H H1 H2;
lapply (le_to_eqm ??? H7) as Dxm; lapply (le_to_eqj ??? H7) as Dym;
+(* the main step *)
cut (δ (xn n3) x ≤ δ (bn n3) x + δ (an n3) x + δ (an n3) x); [2:
apply (le_transitive ???? (mtineq ???? (an n3)));
lapply (le_mtri ????? H7 H8);
apply feq_plusr; apply msymmetric;]
apply (le_rewl ??? (δ(an n3) (bn n3)+- δ(xn n3) (bn n3)+ δ(an n3) x));[
apply feq_plusr; assumption;]
- ]
-[2: split; [
+ clear Hcut Hletin Dym Dxm H8 H7 H6 H5 H4 H3;
+ apply (le_rewl ??? (- δ(xn n3) (bn n3)+ δ(an n3) (bn n3)+δ(an n3) x));[
+ apply feq_plusr; apply plus_comm;]
+ apply (le_rewl ??? (- δ(xn n3) (bn n3)+ (δ(an n3) (bn n3)+δ(an n3) x)) (plus_assoc ????));
+ apply (le_rewl ??? ((δ(an n3) (bn n3)+δ(an n3) x)+- δ(xn n3) (bn n3)) (plus_comm ???));
+ apply lew_opp; [apply mpositive] apply fle_plusr;
+ apply (le_rewr ???? (plus_comm ???));
+ apply (le_rewr ??? ( δ(an n3) x+ δx (bn n3)) (msymmetric ????));
+ apply mtineq;]
+split; [
apply (lt_le_transitive ????? (mpositive ????));
- split; elim He; [apply le_zero_x_to_le_opp_x_zero|
- cases t1;
- [left; apply exc_zero_opp_x_to_exc_x_zero;
- apply (Ex≫ ? (eq_opp_opp_x_x ??));
- |right; apply exc_opp_x_zero_to_exc_zero_x;
- apply (Ex≪ ? (eq_opp_opp_x_x ??));]] assumption;]
+ split; elim He; [apply le_zero_x_to_le_opp_x_zero; assumption;]
+ cases t1; [
+ left; apply exc_zero_opp_x_to_exc_x_zero;
+ apply (Ex≫ ? (eq_opp_opp_x_x ??));assumption;]
+ right; apply exc_opp_x_zero_to_exc_zero_x;
+ apply (Ex≪ ? (eq_opp_opp_x_x ??)); assumption;]
clear Dxm Dym H7 H8 Hn3 H5 H3 n1 n2;
apply (fle_plusl ??? (-z) L);
qed.
+lemma plus_cancl_lt:
+ ∀G:ogroup.∀x,y,z:G.z+x < z+y → x < y.
+intros 5 (G x y z L); elim L (A LE); split; [apply plus_cancl_le; assumption]
+apply (plus_cancl_ap ???? LE);
+qed.
+
+lemma plus_cancr_lt:
+ ∀G:ogroup.∀x,y,z:G.x+z < y+z → x < y.
+intros 5 (G x y z L); elim L (A LE); split; [apply plus_cancr_le; assumption]
+apply (plus_cancr_ap ???? LE);
+qed.
+
+
lemma exc_opp_x_zero_to_exc_zero_x:
∀G:ogroup.∀x:G.-x ≰ 0 → 0 ≰ x.
intros (G x H); apply (exc_canc_plusr ??? (-x));
apply (le_rewr ??? x (zero_neutral ??) Px);
qed.
+lemma lt_zero_x_to_lt_opp_x_zero:
+ ∀G:ogroup.∀x:G.0 < x → -x < 0.
+intros (G x Px); apply (plus_cancr_lt ??? x);
+apply (lt_rewl ??? 0 (opp_inverse ??));
+apply (lt_rewr ??? x (zero_neutral ??) Px);
+qed.
+
lemma exc_zero_opp_x_to_exc_x_zero:
∀G:ogroup.∀x:G. 0 ≰ -x → x ≰ 0.
intros (G x H); apply (exc_canc_plusl ??? (-x));
assumption;
qed.
+lemma lt_x_zero_to_lt_zero_opp_x:
+ ∀G:ogroup.∀x:G. x < 0 → 0 < -x.
+intros (G x Lx0); apply (plus_cancr_lt ??? x);
+apply (lt_rewr ??? 0 (opp_inverse ??));
+apply (lt_rewl ??? x (zero_neutral ??));
+assumption;
+qed.
+
+
lemma lt0plus_orlt:
∀G:ogroup. ∀x,y:G. 0 ≤ x → 0 ≤ y → 0 < x + y → 0 < x ∨ 0 < y.
intros (G x y LEx LEy LT); cases LT (H1 H2); cases (ap_cotransitive ??? y H2);