X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2Fdama%2Fdama%2Fbishop_set.ma;h=9fee3d9fd3c0cdd3e640ee9054a84b89bf4d59ce;hb=ada8695ba51b2ecbd4a955f990e8d06f038aac6b;hp=b877e094cd63d26dfc68045622e576a6c31b0d52;hpb=648db01678fac09ddfb3cce900bc72e8a1c420da;p=helm.git diff --git a/helm/software/matita/contribs/dama/dama/bishop_set.ma b/helm/software/matita/contribs/dama/dama/bishop_set.ma index b877e094c..9fee3d9fd 100644 --- a/helm/software/matita/contribs/dama/dama/bishop_set.ma +++ b/helm/software/matita/contribs/dama/dama/bishop_set.ma @@ -23,11 +23,10 @@ record bishop_set: Type ≝ { bs_cotransitive: cotransitive ? bs_apart }. -notation "hvbox(a break # b)" non associative with precedence 50 +notation "hvbox(a break # b)" non associative with precedence 45 for @{ 'apart $a $b}. -interpretation "bishop_setapartness" 'apart x y = - (cic:/matita/dama/bishop_set/bs_apart.con _ x y). +interpretation "bishop set apartness" 'apart x y = (bs_apart _ x y). definition bishop_set_of_ordered_set: ordered_set → bishop_set. intros (E); apply (mk_bishop_set E (λa,b:E. a ≰ b ∨ b ≰ a)); @@ -42,11 +41,10 @@ qed. (* Definition 2.2 (2) *) definition eq ≝ λA:bishop_set.λa,b:A. ¬ (a # b). -notation "hvbox(a break ≈ b)" non associative with precedence 50 +notation "hvbox(a break \approx b)" non associative with precedence 45 for @{ 'napart $a $b}. -interpretation "Bishop set alikeness" 'napart a b = - (cic:/matita/dama/bishop_set/eq.con _ a b). +interpretation "Bishop set alikeness" 'napart a b = (eq _ a b). lemma eq_reflexive:∀E:bishop_set. reflexive ? (eq E). intros (E); unfold; intros (x); apply bs_coreflexive; @@ -59,7 +57,6 @@ qed. lemma eq_sym:∀E:bishop_set.∀x,y:E.x ≈ y → y ≈ x ≝ eq_sym_. lemma eq_trans_: ∀E:bishop_set.transitive ? (eq E). -(* bug. intros k deve fare whd quanto basta *) intros 6 (E x y z Exy Eyz); intro Axy; cases (bs_cotransitive ???y Axy); [apply Exy|apply Eyz] assumption. qed. @@ -72,3 +69,47 @@ intros 5 (E x y Lxy Lyx); intro H; cases H; [apply Lxy;|apply Lyx] assumption; qed. +lemma le_le_eq: ∀E:ordered_set.∀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. + +definition lt ≝ λE:ordered_set.λa,b:E. a ≤ b ∧ a # b. + +interpretation "ordered sets less than" 'lt a b = (lt _ a b). + +lemma lt_coreflexive: ∀E.coreflexive ? (lt E). +intros 2 (E x); intro H; cases H (_ ABS); +apply (bs_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; +[1: cases (os_cotransitive ??? y H1) (X X); [cases (Lxy X)|cases (os_coreflexive ?? X)] +|2: cases (os_cotransitive ??? x H2) (X X); [right;assumption|cases (Lxy X)]] +qed. + +theorem lt_to_excess: ∀E:ordered_set.∀a,b:E. (a < b) → (b ≰ a). +intros (E a b Lab); cases Lab (LEab Aab); cases Aab (H H);[cases (LEab H)] +assumption; +qed. + +definition bs_subset ≝ λO:bishop_set.λP,Q:O→Prop.∀x:O.P x → Q x. + +interpretation "bishop set subset" 'subset a b = (bs_subset _ a b). + +definition square_bishop_set : bishop_set → bishop_set. +intro S; apply (mk_bishop_set (S × S)); +[1: intros (x y); apply ((fst x # fst y) ∨ (snd x # snd y)); +|2: intro x; simplify; intro; cases H (X X); clear H; apply (bs_coreflexive ?? X); +|3: intros 2 (x y); simplify; intro H; cases H (X X); clear H; [left|right] apply (bs_symmetric ??? X); +|4: intros 3 (x y z); simplify; intro H; cases H (X X); clear H; + [1: cases (bs_cotransitive ??? (fst z) X); [left;left|right;left]assumption; + |2: cases (bs_cotransitive ??? (snd z) X); [left;right|right;right]assumption;]] +qed. + +notation "s 2 \atop \neq" non associative with precedence 90 + for @{ 'square_bs $s }. +interpretation "bishop set square" 'square x = (square_bishop_set x). +interpretation "bishop set square" 'square_bs x = (square_bishop_set x). \ No newline at end of file