set "baseuri" "cic:/matita/classical_pointwise/ordered_sets/".
-include "excedence.ma".
+include "excess.ma".
-record is_dedekind_sigma_complete (O:excedence) : Type ≝
+record is_dedekind_sigma_complete (O:excess) : Type ≝
{ dsc_inf: ∀a:nat→O.∀m:O. is_lower_bound ? a m → ex ? (λs:O.is_inf O a s);
dsc_inf_proof_irrelevant:
∀a:nat→O.∀m,m':O.∀p:is_lower_bound ? a m.∀p':is_lower_bound ? a m'.
}.
record dedekind_sigma_complete_ordered_set : Type ≝
- { dscos_ordered_set:> excedence;
+ { dscos_ordered_set:> excess;
dscos_dedekind_sigma_complete_properties:>
is_dedekind_sigma_complete dscos_ordered_set
}.
qed.
definition is_sequentially_monotone ≝
- λO:excedence.λf:O→O.
+ λO:excess.λf:O→O.
∀a:nat→O.∀p:is_increasing ? a.
is_increasing ? (λi.f (a i)).
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-set "baseuri" "cic:/matita/excedence/".
-
-include "higher_order_defs/relations.ma".
-include "nat/plus.ma".
-include "constructive_connectives.ma".
-include "constructive_higher_order_relations.ma".
-
-record excedence : Type ≝ {
- exc_carr:> Type;
- exc_relation: exc_carr → exc_carr → Type;
- exc_coreflexive: coreflexive ? exc_relation;
- exc_cotransitive: cotransitive ? exc_relation
-}.
-
-interpretation "excedence" 'nleq a b =
- (cic:/matita/excedence/exc_relation.con _ a b).
-
-definition le ≝ λE:excedence.λa,b:E. ¬ (a ≰ b).
-
-interpretation "ordered sets less or equal than" 'leq a b =
- (cic:/matita/excedence/le.con _ a b).
-
-lemma le_reflexive: ∀E.reflexive ? (le E).
-intros (E); unfold; cases E; simplify; intros (x); apply (H x);
-qed.
-
-lemma le_transitive: ∀E.transitive ? (le E).
-intros (E); unfold; cases E; simplify; unfold Not; intros (x y z Rxy Ryz H2);
-cases (c x z y H2) (H4 H5); clear H2; [exact (Rxy H4)|exact (Ryz H5)]
-qed.
-
-record apartness : Type ≝ {
- ap_carr:> Type;
- ap_apart: ap_carr → ap_carr → Type;
- ap_coreflexive: coreflexive ? ap_apart;
- ap_symmetric: symmetric ? ap_apart;
- ap_cotransitive: cotransitive ? ap_apart
-}.
-
-notation "a break # b" non associative with precedence 50 for @{ 'apart $a $b}.
-interpretation "apartness" 'apart x y =
- (cic:/matita/excedence/ap_apart.con _ x y).
-
-definition strong_ext ≝ λA:apartness.λop:A→A.∀x,y. op x # op y → x # y.
-
-definition apart ≝ λE:excedence.λa,b:E. a ≰ b ∨ b ≰ a.
-
-definition apart_of_excedence: excedence → apartness.
-intros (E); apply (mk_apartness E (apart E));
-[1: unfold; cases E; simplify; clear E; intros (x); unfold;
- intros (H1); apply (H x); cases H1; assumption;
-|2: unfold; intros(x y H); cases H; clear H; [right|left] assumption;
-|3: intros (E); unfold; cases E (T f _ cTf); simplify; intros (x y z Axy);
- cases Axy (H H); lapply (cTf ? ? z H) as H1; cases H1; clear Axy H1;
- [left; left|right; left|right; right|left; right] assumption]
-qed.
-
-coercion cic:/matita/excedence/apart_of_excedence.con.
-
-definition eq ≝ λA:apartness.λa,b:A. ¬ (a # b).
-
-notation "a break ≈ b" non associative with precedence 50 for @{ 'napart $a $b}.
-interpretation "alikeness" 'napart a b =
- (cic:/matita/excedence/eq.con _ a b).
-
-lemma eq_reflexive:∀E. reflexive ? (eq E).
-intros (E); unfold; intros (x); apply ap_coreflexive;
-qed.
-
-lemma eq_sym_:∀E.symmetric ? (eq E).
-intros (E); unfold; intros (x y Exy); unfold; unfold; intros (Ayx); apply Exy;
-apply ap_symmetric; assumption;
-qed.
-
-lemma eq_sym:∀E:apartness.∀x,y:E.x ≈ y → y ≈ x ≝ eq_sym_.
-
-coercion cic:/matita/excedence/eq_sym.con.
-
-lemma eq_trans_: ∀E.transitive ? (eq E).
-(* bug. intros k deve fare whd quanto basta *)
-intros 6 (E x y z Exy Eyz); intro Axy; cases (ap_cotransitive ???y Axy);
-[apply Exy|apply Eyz] assumption.
-qed.
-
-lemma eq_trans:∀E:apartness.∀x,z,y:E.x ≈ y → y ≈ z → x ≈ z ≝
- λE,x,y,z.eq_trans_ E x z y.
-
-notation > "'Eq'≈" non associative with precedence 50 for
- @{'eqrewrite}.
-
-interpretation "eq_rew" 'eqrewrite =
- (cic:/matita/excedence/eq_trans.con _ _ _).
-
-(* BUG: vedere se ricapita *)
-alias id "antisymmetric" = "cic:/matita/constructive_higher_order_relations/antisymmetric.con".
-lemma le_antisymmetric: ∀E.antisymmetric ? (le E) (eq ?).
-intros 5 (E x y Lxy Lyx); intro H;
-cases H; [apply Lxy;|apply Lyx] assumption;
-qed.
-
-definition lt ≝ λE:excedence.λa,b:E. a ≤ b ∧ a # b.
-
-interpretation "ordered sets less than" 'lt a b =
- (cic:/matita/excedence/lt.con _ a b).
-
-lemma lt_coreflexive: ∀E.coreflexive ? (lt E).
-intros 2 (E x); intro H; cases H (_ ABS);
-apply (ap_coreflexive ? x ABS);
-qed.
-
-lemma lt_transitive: ∀E.transitive ? (lt E).
-intros (E); unfold; intros (x y z H1 H2); cases H1 (Lxy Axy); cases H2 (Lyz Ayz);
-split; [apply (le_transitive ???? Lxy Lyz)] clear H1 H2;
-cases Axy (H1 H1); cases Ayz (H2 H2); [1:cases (Lxy H1)|3:cases (Lyz H2)]
-clear Axy Ayz;lapply (exc_cotransitive E) as c; unfold cotransitive in c;
-lapply (exc_coreflexive E) as r; unfold coreflexive in r;
-[1: lapply (c ?? y H1) as H3; cases H3 (H4 H4); [cases (Lxy H4)|cases (r ? H4)]
-|2: lapply (c ?? x H2) as H3; cases H3 (H4 H4); [right; assumption|cases (Lxy H4)]]
-qed.
-
-theorem lt_to_excede: ∀E:excedence.∀a,b:E. (a < b) → (b ≰ a).
-intros (E a b Lab); cases Lab (LEab Aab);
-cases Aab (H H); [cases (LEab H)] fold normalize (b ≰ a); assumption; (* BUG *)
-qed.
-
-lemma unfold_apart: ∀E:excedence. ∀x,y:E. x ≰ y ∨ y ≰ x → x # y.
-intros; assumption;
-qed.
-
-lemma le_rewl: ∀E:excedence.∀z,y,x:E. x ≈ y → x ≤ z → y ≤ z.
-intros (E z y x Exy Lxz); apply (le_transitive ???? ? Lxz);
-intro Xyz; apply Exy; apply unfold_apart; right; assumption;
-qed.
-
-notation > "'Ex'≪" non associative with precedence 50 for
- @{'excedencerewritel}.
-
-interpretation "exc_rewl" 'excedencerewritel =
- (cic:/matita/excedence/exc_rewl.con _ _ _).
-
-lemma le_rewr: ∀E:excedence.∀z,y,x:E. x ≈ y → z ≤ x → z ≤ y.
-intros (E z y x Exy Lxz); apply (le_transitive ???? Lxz);
-intro Xyz; apply Exy; apply unfold_apart; left; assumption;
-qed.
-
-notation > "'Ex'≫" non associative with precedence 50 for
- @{'excedencerewriter}.
-
-interpretation "exc_rewr" 'excedencerewriter =
- (cic:/matita/excedence/exc_rewr.con _ _ _).
-
-lemma ap_rewl: ∀A:apartness.∀x,z,y:A. x ≈ y → y # z → x # z.
-intros (A x z y Exy Ayz); cases (ap_cotransitive ???x Ayz); [2:assumption]
-cases (Exy (ap_symmetric ??? a));
-qed.
-
-lemma ap_rewr: ∀A:apartness.∀x,z,y:A. x ≈ y → z # y → z # x.
-intros (A x z y Exy Azy); apply ap_symmetric; apply (ap_rewl ???? Exy);
-apply ap_symmetric; assumption;
-qed.
-
-lemma exc_rewl: ∀A:excedence.∀x,z,y:A. x ≈ y → y ≰ z → x ≰ z.
-intros (A x z y Exy Ayz); elim (exc_cotransitive ???x Ayz); [2:assumption]
-cases Exy; right; assumption;
-qed.
-
-lemma exc_rewr: ∀A:excedence.∀x,z,y:A. x ≈ y → z ≰ y → z ≰ x.
-intros (A x z y Exy Azy); elim (exc_cotransitive ???x Azy); [assumption]
-elim (Exy); left; assumption;
-qed.
-
-lemma lt_rewr: ∀A:excedence.∀x,z,y:A. x ≈ y → z < y → z < x.
-intros (A x y z E H); split; elim H;
-[apply (le_rewr ???? (eq_sym ??? E));|apply (ap_rewr ???? E)] assumption;
-qed.
-
-lemma lt_rewl: ∀A:excedence.∀x,z,y:A. x ≈ y → y < z → x < z.
-intros (A x y z E H); split; elim H;
-[apply (le_rewl ???? (eq_sym ??? E));| apply (ap_rewl ???? E);] assumption;
-qed.
-
-lemma lt_le_transitive: ∀A:excedence.∀x,y,z:A.x < y → y ≤ z → x < z.
-intros (A x y z LT LE); cases LT (LEx APx); split; [apply (le_transitive ???? LEx LE)]
-whd in LE LEx APx; cases APx (EXx EXx); [cases (LEx EXx)]
-cases (exc_cotransitive ??? z EXx) (EXz EXz); [cases (LE EXz)]
-right; assumption;
-qed.
-
-lemma le_lt_transitive: ∀A:excedence.∀x,y,z:A.x ≤ y → y < z → x < z.
-intros (A x y z LE LT); cases LT (LEx APx); split; [apply (le_transitive ???? LE LEx)]
-whd in LE LEx APx; cases APx (EXx EXx); [cases (LEx EXx)]
-cases (exc_cotransitive ??? x EXx) (EXz EXz); [right; assumption]
-cases LE; assumption;
-qed.
-
-lemma le_le_eq: ∀E:excedence.∀a,b:E. a ≤ b → b ≤ a → a ≈ b.
-intros (E x y L1 L2); intro H; cases H; [apply L1|apply L2] assumption;
-qed.
-
-lemma eq_le_le: ∀E:excedence.∀a,b:E. a ≈ b → a ≤ b ∧ b ≤ a.
-intros (E x y H); unfold apart_of_excedence in H; unfold apart in H;
-simplify in H; split; intro; apply H; [left|right] assumption.
-qed.
-
-lemma ap_le_to_lt: ∀E:excedence.∀a,c:E.c # a → c ≤ a → c < a.
-intros; split; assumption;
-qed.
-
-definition total_order_property : ∀E:excedence. Type ≝
- λE:excedence. ∀a,b:E. a ≰ b → b < a.
-
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+set "baseuri" "cic:/matita/excess/".
+
+include "higher_order_defs/relations.ma".
+include "nat/plus.ma".
+include "constructive_connectives.ma".
+include "constructive_higher_order_relations.ma".
+
+record excess : Type ≝ {
+ exc_carr:> Type;
+ exc_relation: exc_carr → exc_carr → Type;
+ exc_coreflexive: coreflexive ? exc_relation;
+ exc_cotransitive: cotransitive ? exc_relation
+}.
+
+interpretation "excess" 'nleq a b =
+ (cic:/matita/excess/exc_relation.con _ a b).
+
+definition le ≝ λE:excess.λa,b:E. ¬ (a ≰ b).
+
+interpretation "ordered sets less or equal than" 'leq a b =
+ (cic:/matita/excess/le.con _ a b).
+
+lemma le_reflexive: ∀E.reflexive ? (le E).
+intros (E); unfold; cases E; simplify; intros (x); apply (H x);
+qed.
+
+lemma le_transitive: ∀E.transitive ? (le E).
+intros (E); unfold; cases E; simplify; unfold Not; intros (x y z Rxy Ryz H2);
+cases (c x z y H2) (H4 H5); clear H2; [exact (Rxy H4)|exact (Ryz H5)]
+qed.
+
+record apartness : Type ≝ {
+ ap_carr:> Type;
+ ap_apart: ap_carr → ap_carr → Type;
+ ap_coreflexive: coreflexive ? ap_apart;
+ ap_symmetric: symmetric ? ap_apart;
+ ap_cotransitive: cotransitive ? ap_apart
+}.
+
+notation "a break # b" non associative with precedence 50 for @{ 'apart $a $b}.
+interpretation "apartness" 'apart x y =
+ (cic:/matita/excess/ap_apart.con _ x y).
+
+definition strong_ext ≝ λA:apartness.λop:A→A.∀x,y. op x # op y → x # y.
+
+definition apart ≝ λE:excess.λa,b:E. a ≰ b ∨ b ≰ a.
+
+definition apart_of_excess: excess → apartness.
+intros (E); apply (mk_apartness E (apart E));
+[1: unfold; cases E; simplify; clear E; intros (x); unfold;
+ intros (H1); apply (H x); cases H1; assumption;
+|2: unfold; intros(x y H); cases H; clear H; [right|left] assumption;
+|3: intros (E); unfold; cases E (T f _ cTf); simplify; intros (x y z Axy);
+ cases Axy (H H); lapply (cTf ? ? z H) as H1; cases H1; clear Axy H1;
+ [left; left|right; left|right; right|left; right] assumption]
+qed.
+
+coercion cic:/matita/excess/apart_of_excess.con.
+
+definition eq ≝ λA:apartness.λa,b:A. ¬ (a # b).
+
+notation "a break ≈ b" non associative with precedence 50 for @{ 'napart $a $b}.
+interpretation "alikeness" 'napart a b =
+ (cic:/matita/excess/eq.con _ a b).
+
+lemma eq_reflexive:∀E. reflexive ? (eq E).
+intros (E); unfold; intros (x); apply ap_coreflexive;
+qed.
+
+lemma eq_sym_:∀E.symmetric ? (eq E).
+intros (E); unfold; intros (x y Exy); unfold; unfold; intros (Ayx); apply Exy;
+apply ap_symmetric; assumption;
+qed.
+
+lemma eq_sym:∀E:apartness.∀x,y:E.x ≈ y → y ≈ x ≝ eq_sym_.
+
+coercion cic:/matita/excess/eq_sym.con.
+
+lemma eq_trans_: ∀E.transitive ? (eq E).
+(* bug. intros k deve fare whd quanto basta *)
+intros 6 (E x y z Exy Eyz); intro Axy; cases (ap_cotransitive ???y Axy);
+[apply Exy|apply Eyz] assumption.
+qed.
+
+lemma eq_trans:∀E:apartness.∀x,z,y:E.x ≈ y → y ≈ z → x ≈ z ≝
+ λE,x,y,z.eq_trans_ E x z y.
+
+notation > "'Eq'≈" non associative with precedence 50 for
+ @{'eqrewrite}.
+
+interpretation "eq_rew" 'eqrewrite =
+ (cic:/matita/excess/eq_trans.con _ _ _).
+
+(* BUG: vedere se ricapita *)
+alias id "antisymmetric" = "cic:/matita/constructive_higher_order_relations/antisymmetric.con".
+lemma le_antisymmetric: ∀E.antisymmetric ? (le E) (eq ?).
+intros 5 (E x y Lxy Lyx); intro H;
+cases H; [apply Lxy;|apply Lyx] assumption;
+qed.
+
+definition lt ≝ λE:excess.λa,b:E. a ≤ b ∧ a # b.
+
+interpretation "ordered sets less than" 'lt a b =
+ (cic:/matita/excess/lt.con _ a b).
+
+lemma lt_coreflexive: ∀E.coreflexive ? (lt E).
+intros 2 (E x); intro H; cases H (_ ABS);
+apply (ap_coreflexive ? x ABS);
+qed.
+
+lemma lt_transitive: ∀E.transitive ? (lt E).
+intros (E); unfold; intros (x y z H1 H2); cases H1 (Lxy Axy); cases H2 (Lyz Ayz);
+split; [apply (le_transitive ???? Lxy Lyz)] clear H1 H2;
+cases Axy (H1 H1); cases Ayz (H2 H2); [1:cases (Lxy H1)|3:cases (Lyz H2)]
+clear Axy Ayz;lapply (exc_cotransitive E) as c; unfold cotransitive in c;
+lapply (exc_coreflexive E) as r; unfold coreflexive in r;
+[1: lapply (c ?? y H1) as H3; cases H3 (H4 H4); [cases (Lxy H4)|cases (r ? H4)]
+|2: lapply (c ?? x H2) as H3; cases H3 (H4 H4); [right; assumption|cases (Lxy H4)]]
+qed.
+
+theorem lt_to_excede: ∀E:excess.∀a,b:E. (a < b) → (b ≰ a).
+intros (E a b Lab); cases Lab (LEab Aab);
+cases Aab (H H); [cases (LEab H)] fold normalize (b ≰ a); assumption; (* BUG *)
+qed.
+
+lemma unfold_apart: ∀E:excess. ∀x,y:E. x ≰ y ∨ y ≰ x → x # y.
+intros; assumption;
+qed.
+
+lemma le_rewl: ∀E:excess.∀z,y,x:E. x ≈ y → x ≤ z → y ≤ z.
+intros (E z y x Exy Lxz); apply (le_transitive ???? ? Lxz);
+intro Xyz; apply Exy; apply unfold_apart; right; assumption;
+qed.
+
+notation > "'Ex'≪" non associative with precedence 50 for
+ @{'excessrewritel}.
+
+interpretation "exc_rewl" 'excessrewritel =
+ (cic:/matita/excess/exc_rewl.con _ _ _).
+
+lemma le_rewr: ∀E:excess.∀z,y,x:E. x ≈ y → z ≤ x → z ≤ y.
+intros (E z y x Exy Lxz); apply (le_transitive ???? Lxz);
+intro Xyz; apply Exy; apply unfold_apart; left; assumption;
+qed.
+
+notation > "'Ex'≫" non associative with precedence 50 for
+ @{'excessrewriter}.
+
+interpretation "exc_rewr" 'excessrewriter =
+ (cic:/matita/excess/exc_rewr.con _ _ _).
+
+lemma ap_rewl: ∀A:apartness.∀x,z,y:A. x ≈ y → y # z → x # z.
+intros (A x z y Exy Ayz); cases (ap_cotransitive ???x Ayz); [2:assumption]
+cases (Exy (ap_symmetric ??? a));
+qed.
+
+lemma ap_rewr: ∀A:apartness.∀x,z,y:A. x ≈ y → z # y → z # x.
+intros (A x z y Exy Azy); apply ap_symmetric; apply (ap_rewl ???? Exy);
+apply ap_symmetric; assumption;
+qed.
+
+lemma exc_rewl: ∀A:excess.∀x,z,y:A. x ≈ y → y ≰ z → x ≰ z.
+intros (A x z y Exy Ayz); elim (exc_cotransitive ???x Ayz); [2:assumption]
+cases Exy; right; assumption;
+qed.
+
+lemma exc_rewr: ∀A:excess.∀x,z,y:A. x ≈ y → z ≰ y → z ≰ x.
+intros (A x z y Exy Azy); elim (exc_cotransitive ???x Azy); [assumption]
+elim (Exy); left; assumption;
+qed.
+
+lemma lt_rewr: ∀A:excess.∀x,z,y:A. x ≈ y → z < y → z < x.
+intros (A x y z E H); split; elim H;
+[apply (le_rewr ???? (eq_sym ??? E));|apply (ap_rewr ???? E)] assumption;
+qed.
+
+lemma lt_rewl: ∀A:excess.∀x,z,y:A. x ≈ y → y < z → x < z.
+intros (A x y z E H); split; elim H;
+[apply (le_rewl ???? (eq_sym ??? E));| apply (ap_rewl ???? E);] assumption;
+qed.
+
+lemma lt_le_transitive: ∀A:excess.∀x,y,z:A.x < y → y ≤ z → x < z.
+intros (A x y z LT LE); cases LT (LEx APx); split; [apply (le_transitive ???? LEx LE)]
+whd in LE LEx APx; cases APx (EXx EXx); [cases (LEx EXx)]
+cases (exc_cotransitive ??? z EXx) (EXz EXz); [cases (LE EXz)]
+right; assumption;
+qed.
+
+lemma le_lt_transitive: ∀A:excess.∀x,y,z:A.x ≤ y → y < z → x < z.
+intros (A x y z LE LT); cases LT (LEx APx); split; [apply (le_transitive ???? LE LEx)]
+whd in LE LEx APx; cases APx (EXx EXx); [cases (LEx EXx)]
+cases (exc_cotransitive ??? x EXx) (EXz EXz); [right; assumption]
+cases LE; assumption;
+qed.
+
+lemma le_le_eq: ∀E:excess.∀a,b:E. a ≤ b → b ≤ a → a ≈ b.
+intros (E x y L1 L2); intro H; cases H; [apply L1|apply L2] assumption;
+qed.
+
+lemma eq_le_le: ∀E:excess.∀a,b:E. a ≈ b → a ≤ b ∧ b ≤ a.
+intros (E x y H); unfold apart_of_excess in H; unfold apart in H;
+simplify in H; split; intro; apply H; [left|right] assumption.
+qed.
+
+lemma ap_le_to_lt: ∀E:excess.∀a,c:E.c # a → c ≤ a → c < a.
+intros; split; assumption;
+qed.
+
+definition total_order_property : ∀E:excess. Type ≝
+ λE:excess. ∀a,b:E. a ≰ b → b < a.
+
set "baseuri" "cic:/matita/group/".
-include "excedence.ma".
+include "excess.ma".
definition left_neutral ≝ λC:apartness.λop.λe:C. ∀x:C. op e x ≈ x.
definition right_neutral ≝ λC:apartness.λop. λe:C. ∀x:C. op x e ≈ x.
set "baseuri" "cic:/matita/lattice/".
-include "excedence.ma".
+include "excess.ma".
record lattice : Type ≝ {
l_carr:> apartness;
definition excl ≝ λl:lattice.λa,b:l.a # (a ∧ b).
-lemma excedence_of_lattice: lattice → excedence.
-intro l; apply (mk_excedence l (excl l));
+lemma excess_of_lattice: lattice → excess.
+intro l; apply (mk_excess l (excl l));
[ intro x; unfold; intro H; unfold in H; apply (ap_coreflexive l x);
apply (ap_rewr ??? (x∧x) (meet_refl l x)); assumption;
| intros 3 (x y z); unfold excl; intro H;
assumption]
qed.
-coercion cic:/matita/lattice/excedence_of_lattice.con.
+coercion cic:/matita/lattice/excess_of_lattice.con.
lemma feq_ml: ∀ml:lattice.∀a,b,c:ml. a ≈ b → (c ∧ a) ≈ (c ∧ b).
intros (l a b c H); unfold eq in H ⊢ %; unfold Not in H ⊢ %;
lemma le_to_eqm: ∀ml:lattice.∀a,b:ml. a ≤ b → a ≈ (a ∧ b).
intros (l a b H);
- unfold le in H; unfold excedence_of_lattice in H;
+ unfold le in H; unfold excess_of_lattice in H;
unfold excl in H; simplify in H;
unfold eq; assumption;
qed.
record pogroup_ : Type ≝ {
og_abelian_group_: abelian_group;
- og_excedence:> excedence;
- og_with: carr og_abelian_group_ = apart_of_excedence og_excedence
+ og_excess:> excess;
+ og_with: carr og_abelian_group_ = apart_of_excess og_excess
}.
lemma og_abelian_group: pogroup_ → abelian_group.
set "baseuri" "cic:/matita/sequence/".
-include "excedence.ma".
+include "excess.ma".
-definition sequence := λO:excedence.nat → O.
+definition sequence := λO:excess.nat → O.
-definition fun_of_sequence: ∀O:excedence.sequence O → nat → O.
+definition fun_of_sequence: ∀O:excess.sequence O → nat → O.
intros; apply s; assumption;
qed.
coercion cic:/matita/sequence/fun_of_sequence.con 1.
definition upper_bound ≝
- λO:excedence.λa:sequence O.λu:O.∀n:nat.a n ≤ u.
+ λO:excess.λa:sequence O.λu:O.∀n:nat.a n ≤ u.
definition lower_bound ≝
- λO:excedence.λa:sequence O.λu:O.∀n:nat.u ≤ a n.
+ λO:excess.λa:sequence O.λu:O.∀n:nat.u ≤ a n.
definition strong_sup ≝
- λO:excedence.λs:sequence O.λx.
+ λO:excess.λs:sequence O.λx.
upper_bound ? s x ∧ (∀y:O.x ≰ y → ∃n.s n ≰ y).
definition strong_inf ≝
- λO:excedence.λs:sequence O.λx.
+ λO:excess.λs:sequence O.λx.
lower_bound ? s x ∧ (∀y:O.y ≰ x → ∃n.y ≰ s n).
definition weak_sup ≝
- λO:excedence.λs:sequence O.λx.
+ λO:excess.λs:sequence O.λx.
upper_bound ? s x ∧ (∀y:O.upper_bound ? s y → x ≤ y).
definition weak_inf ≝
- λO:excedence.λs:sequence O.λx.
+ λO:excess.λs:sequence O.λx.
lower_bound ? s x ∧ (∀y:O.lower_bound ? s y → y ≤ x).
lemma strong_sup_is_weak:
- ∀O:excedence.∀s:sequence O.∀x:O.strong_sup ? s x → weak_sup ? s x.
+ ∀O:excess.∀s:sequence O.∀x:O.strong_sup ? s x → weak_sup ? s x.
intros (O s x Ssup); elim Ssup (Ubx M); clear Ssup; split; [assumption]
intros 3 (y Uby E); cases (M ? E) (n En); unfold in Uby; cases (Uby ? En);
qed.
lemma strong_inf_is_weak:
- ∀O:excedence.∀s:sequence O.∀x:O.strong_inf ? s x → weak_inf ? s x.
+ ∀O:excess.∀s:sequence O.∀x:O.strong_inf ? s x → weak_inf ? s x.
intros (O s x Ssup); elim Ssup (Ubx M); clear Ssup; split; [assumption]
intros 3 (y Uby E); cases (M ? E) (n En); unfold in Uby; cases (Uby ? En);
qed.
∀e:O.0 < e → ∃N.∀n.N < n → -e < s n ∧ s n < e.
definition increasing ≝
- λO:excedence.λa:sequence O.∀n:nat.a n ≤ a (S n).
+ λO:excess.λa:sequence O.∀n:nat.a n ≤ a (S n).
definition decreasing ≝
- λO:excedence.λa:sequence O.∀n:nat.a (S n) ≤ a n.
+ λO:excess.λa:sequence O.∀n:nat.a (S n) ≤ a n.
(*
-definition is_upper_bound ≝ λO:excedence.λa:sequence O.λu:O.∀n:nat.a n ≤ u.
-definition is_lower_bound ≝ λO:excedence.λa:sequence O.λu:O.∀n:nat.u ≤ a n.
+definition is_upper_bound ≝ λO:excess.λa:sequence O.λu:O.∀n:nat.a n ≤ u.
+definition is_lower_bound ≝ λO:excess.λa:sequence O.λu:O.∀n:nat.u ≤ a n.
-record is_sup (O:excedence) (a:sequence O) (u:O) : Prop ≝
+record is_sup (O:excess) (a:sequence O) (u:O) : Prop ≝
{ sup_upper_bound: is_upper_bound O a u;
sup_least_upper_bound: ∀v:O. is_upper_bound O a v → u≤v
}.
-record is_inf (O:excedence) (a:sequence O) (u:O) : Prop ≝
+record is_inf (O:excess) (a:sequence O) (u:O) : Prop ≝
{ inf_lower_bound: is_lower_bound O a u;
inf_greatest_lower_bound: ∀v:O. is_lower_bound O a v → v≤u
}.
-record is_bounded_below (O:excedence) (a:sequence O) : Type ≝
+record is_bounded_below (O:excess) (a:sequence O) : Type ≝
{ ib_lower_bound: O;
ib_lower_bound_is_lower_bound: is_lower_bound ? a ib_lower_bound
}.
-record is_bounded_above (O:excedence) (a:sequence O) : Type ≝
+record is_bounded_above (O:excess) (a:sequence O) : Type ≝
{ ib_upper_bound: O;
ib_upper_bound_is_upper_bound: is_upper_bound ? a ib_upper_bound
}.
-record is_bounded (O:excedence) (a:sequence O) : Type ≝
+record is_bounded (O:excess) (a:sequence O) : Type ≝
{ ib_bounded_below:> is_bounded_below ? a;
ib_bounded_above:> is_bounded_above ? a
}.
-record bounded_below_sequence (O:excedence) : Type ≝
+record bounded_below_sequence (O:excess) : Type ≝
{ bbs_seq:> sequence O;
bbs_is_bounded_below:> is_bounded_below ? bbs_seq
}.
-record bounded_above_sequence (O:excedence) : Type ≝
+record bounded_above_sequence (O:excess) : Type ≝
{ bas_seq:> sequence O;
bas_is_bounded_above:> is_bounded_above ? bas_seq
}.
-record bounded_sequence (O:excedence) : Type ≝
+record bounded_sequence (O:excess) : Type ≝
{ bs_seq:> sequence O;
bs_is_bounded_below: is_bounded_below ? bs_seq;
bs_is_bounded_above: is_bounded_above ? bs_seq
}.
definition bounded_below_sequence_of_bounded_sequence ≝
- λO:excedence.λb:bounded_sequence O.
+ λO:excess.λb:bounded_sequence O.
mk_bounded_below_sequence ? b (bs_is_bounded_below ? b).
coercion cic:/matita/sequence/bounded_below_sequence_of_bounded_sequence.con.
definition bounded_above_sequence_of_bounded_sequence ≝
- λO:excedence.λb:bounded_sequence O.
+ λO:excess.λb:bounded_sequence O.
mk_bounded_above_sequence ? b (bs_is_bounded_above ? b).
coercion cic:/matita/sequence/bounded_above_sequence_of_bounded_sequence.con.
definition lower_bound ≝
- λO:excedence.λb:bounded_below_sequence O.
+ λO:excess.λb:bounded_below_sequence O.
ib_lower_bound ? b (bbs_is_bounded_below ? b).
lemma lower_bound_is_lower_bound:
- ∀O:excedence.∀b:bounded_below_sequence O.
+ ∀O:excess.∀b:bounded_below_sequence O.
is_lower_bound ? b (lower_bound ? b).
intros; unfold lower_bound; apply ib_lower_bound_is_lower_bound.
qed.
definition upper_bound ≝
- λO:excedence.λb:bounded_above_sequence O.
+ λO:excess.λb:bounded_above_sequence O.
ib_upper_bound ? b (bas_is_bounded_above ? b).
lemma upper_bound_is_upper_bound:
- ∀O:excedence.∀b:bounded_above_sequence O.
+ ∀O:excess.∀b:bounded_above_sequence O.
is_upper_bound ? b (upper_bound ? b).
intros; unfold upper_bound; apply ib_upper_bound_is_upper_bound.
qed.
-definition reverse_excedence: excedence → excedence.
-intros (E); apply (mk_excedence E); [apply (λx,y.exc_relation E y x)]
+definition reverse_excess: excess → excess.
+intros (E); apply (mk_excess E); [apply (λx,y.exc_relation E y x)]
cases E (T f cRf cTf); simplify;
[1: unfold Not; intros (x H); apply (cRf x); assumption
|2: intros (x y z); apply Or_symmetric; apply cTf; assumption;]
qed.
-definition reverse_excedence: excedence → excedence.
-intros (p); apply (mk_excedence (reverse_excedence p));
-generalize in match (reverse_excedence p); intros (E);
+definition reverse_excess: excess → excess.
+intros (p); apply (mk_excess (reverse_excess p));
+generalize in match (reverse_excess p); intros (E);
apply mk_is_porder_relation;
[apply le_reflexive|apply le_transitive|apply le_antisymmetric]
qed.
lemma is_lower_bound_reverse_is_upper_bound:
- ∀O:excedence.∀a:sequence O.∀l:O.
- is_lower_bound O a l → is_upper_bound (reverse_excedence O) a l.
-intros (O a l H); unfold; intros (n); unfold reverse_excedence;
-unfold reverse_excedence; simplify; fold unfold le (le ? l (a n)); apply H;
+ ∀O:excess.∀a:sequence O.∀l:O.
+ is_lower_bound O a l → is_upper_bound (reverse_excess O) a l.
+intros (O a l H); unfold; intros (n); unfold reverse_excess;
+unfold reverse_excess; simplify; fold unfold le (le ? l (a n)); apply H;
qed.
lemma is_upper_bound_reverse_is_lower_bound:
- ∀O:excedence.∀a:sequence O.∀l:O.
- is_upper_bound O a l → is_lower_bound (reverse_excedence O) a l.
-intros (O a l H); unfold; intros (n); unfold reverse_excedence;
-unfold reverse_excedence; simplify; fold unfold le (le ? (a n) l); apply H;
+ ∀O:excess.∀a:sequence O.∀l:O.
+ is_upper_bound O a l → is_lower_bound (reverse_excess O) a l.
+intros (O a l H); unfold; intros (n); unfold reverse_excess;
+unfold reverse_excess; simplify; fold unfold le (le ? (a n) l); apply H;
qed.
lemma reverse_is_lower_bound_is_upper_bound:
- ∀O:excedence.∀a:sequence O.∀l:O.
- is_lower_bound (reverse_excedence O) a l → is_upper_bound O a l.
-intros (O a l H); unfold; intros (n); unfold reverse_excedence in H;
-unfold reverse_excedence in H; simplify in H; apply H;
+ ∀O:excess.∀a:sequence O.∀l:O.
+ is_lower_bound (reverse_excess O) a l → is_upper_bound O a l.
+intros (O a l H); unfold; intros (n); unfold reverse_excess in H;
+unfold reverse_excess in H; simplify in H; apply H;
qed.
lemma reverse_is_upper_bound_is_lower_bound:
- ∀O:excedence.∀a:sequence O.∀l:O.
- is_upper_bound (reverse_excedence O) a l → is_lower_bound O a l.
-intros (O a l H); unfold; intros (n); unfold reverse_excedence in H;
-unfold reverse_excedence in H; simplify in H; apply H;
+ ∀O:excess.∀a:sequence O.∀l:O.
+ is_upper_bound (reverse_excess O) a l → is_lower_bound O a l.
+intros (O a l H); unfold; intros (n); unfold reverse_excess in H;
+unfold reverse_excess in H; simplify in H; apply H;
qed.
lemma is_inf_to_reverse_is_sup:
- ∀O:excedence.∀a:bounded_below_sequence O.∀l:O.
- is_inf O a l → is_sup (reverse_excedence O) a l.
-intros (O a l H); apply (mk_is_sup (reverse_excedence O));
+ ∀O:excess.∀a:bounded_below_sequence O.∀l:O.
+ is_inf O a l → is_sup (reverse_excess O) a l.
+intros (O a l H); apply (mk_is_sup (reverse_excess O));
[1: apply is_lower_bound_reverse_is_upper_bound; apply inf_lower_bound; assumption
-|2: unfold reverse_excedence; simplify; unfold reverse_excedence; simplify;
+|2: unfold reverse_excess; simplify; unfold reverse_excess; simplify;
intros (m H1); apply (inf_greatest_lower_bound ? ? ? H); apply H1;]
qed.
lemma is_sup_to_reverse_is_inf:
- ∀O:excedence.∀a:bounded_above_sequence O.∀l:O.
- is_sup O a l → is_inf (reverse_excedence O) a l.
-intros (O a l H); apply (mk_is_inf (reverse_excedence O));
+ ∀O:excess.∀a:bounded_above_sequence O.∀l:O.
+ is_sup O a l → is_inf (reverse_excess O) a l.
+intros (O a l H); apply (mk_is_inf (reverse_excess O));
[1: apply is_upper_bound_reverse_is_lower_bound; apply sup_upper_bound; assumption
-|2: unfold reverse_excedence; simplify; unfold reverse_excedence; simplify;
+|2: unfold reverse_excess; simplify; unfold reverse_excess; simplify;
intros (m H1); apply (sup_least_upper_bound ? ? ? H); apply H1;]
qed.
lemma reverse_is_sup_to_is_inf:
- ∀O:excedence.∀a:bounded_above_sequence O.∀l:O.
- is_sup (reverse_excedence O) a l → is_inf O a l.
+ ∀O:excess.∀a:bounded_above_sequence O.∀l:O.
+ is_sup (reverse_excess O) a l → is_inf O a l.
intros (O a l H); apply mk_is_inf;
[1: apply reverse_is_upper_bound_is_lower_bound;
- apply (sup_upper_bound (reverse_excedence O)); assumption
-|2: intros (v H1); apply (sup_least_upper_bound (reverse_excedence O) a l H v);
+ apply (sup_upper_bound (reverse_excess O)); assumption
+|2: intros (v H1); apply (sup_least_upper_bound (reverse_excess O) a l H v);
apply is_lower_bound_reverse_is_upper_bound; assumption;]
qed.
lemma reverse_is_inf_to_is_sup:
- ∀O:excedence.∀a:bounded_above_sequence O.∀l:O.
- is_inf (reverse_excedence O) a l → is_sup O a l.
+ ∀O:excess.∀a:bounded_above_sequence O.∀l:O.
+ is_inf (reverse_excess O) a l → is_sup O a l.
intros (O a l H); apply mk_is_sup;
[1: apply reverse_is_lower_bound_is_upper_bound;
- apply (inf_lower_bound (reverse_excedence O)); assumption
-|2: intros (v H1); apply (inf_greatest_lower_bound (reverse_excedence O) a l H v);
+ apply (inf_lower_bound (reverse_excess O)); assumption
+|2: intros (v H1); apply (inf_greatest_lower_bound (reverse_excess O) a l H v);
apply is_upper_bound_reverse_is_lower_bound; assumption;]
qed.