From: Enrico Tassi Date: Sun, 19 Oct 2008 15:43:48 +0000 (+0000) Subject: some work on duality, still not finisched X-Git-Tag: make_still_working~4659 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=f36588e673e67f0758fdbec52baa515a28fd9a7a;p=helm.git some work on duality, still not finisched --- diff --git a/helm/software/matita/contribs/dama/dama/bishop_set.ma b/helm/software/matita/contribs/dama/dama/bishop_set.ma index 68d213bd4..3522a3bb2 100644 --- a/helm/software/matita/contribs/dama/dama/bishop_set.ma +++ b/helm/software/matita/contribs/dama/dama/bishop_set.ma @@ -107,5 +107,7 @@ 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). +notation > "s 'squareB'" non associative with precedence 90 + for @{ 'squareB $s }. +interpretation "bishop set square" 'squareB x = (square_bishop_set x). interpretation "bishop set square" 'square_bs x = (square_bishop_set x). \ No newline at end of file diff --git a/helm/software/matita/contribs/dama/dama/ordered_set.ma b/helm/software/matita/contribs/dama/dama/ordered_set.ma index 8a1191442..7008b632b 100644 --- a/helm/software/matita/contribs/dama/dama/ordered_set.ma +++ b/helm/software/matita/contribs/dama/dama/ordered_set.ma @@ -154,9 +154,9 @@ qed. notation "s 2 \atop \nleq" non associative with precedence 90 for @{ 'square_os $s }. -notation > "s 'square'" non associative with precedence 90 - for @{ 'square $s }. -interpretation "ordered set square" 'square s = (square_ordered_set s). +notation > "s 'squareO'" non associative with precedence 90 + for @{ 'squareO $s }. +interpretation "ordered set square" 'squareO s = (square_ordered_set s). interpretation "ordered set square" 'square_os s = (square_ordered_set s). definition os_subset ≝ λO:ordered_set.λP,Q:O→Prop.∀x:O.P x → Q x. diff --git a/helm/software/matita/contribs/dama/dama/ordered_uniform.ma b/helm/software/matita/contribs/dama/dama/ordered_uniform.ma index 51ecff3f3..0bc8a3225 100644 --- a/helm/software/matita/contribs/dama/dama/ordered_uniform.ma +++ b/helm/software/matita/contribs/dama/dama/ordered_uniform.ma @@ -37,45 +37,62 @@ record ordered_uniform_space : Type ≝ { ous_convex: ∀U.us_unifbase ous_stuff U → convex ous_stuff U }. +definition Type_of_ordered_uniform_space : ordered_uniform_space → Type. +intro; compose ordered_set_OF_ordered_uniform_space with os_l. +apply (hos_carr (f o)); +qed. + +definition Type_of_ordered_uniform_space_dual : ordered_uniform_space → Type. +intro; compose ordered_set_OF_ordered_uniform_space with os_r. +apply (hos_carr (f o)); +qed. + +coercion Type_of_ordered_uniform_space. +coercion Type_of_ordered_uniform_space_dual. + +definition half_ordered_set_OF_ordered_uniform_space : ordered_uniform_space → half_ordered_set. +intro; compose ordered_set_OF_ordered_uniform_space with os_l. apply (f o); +qed. + definition invert_os_relation ≝ - λC:ordered_set.λU:C square → Prop. - λx:C square. U 〈\snd x,\fst x〉. + λC:ordered_set.λU:C squareO → Prop. + λx:C squareO. U 〈\snd x,\fst x〉. interpretation "relation invertion" 'invert a = (invert_os_relation _ a). interpretation "relation invertion" 'invert_symbol = (invert_os_relation _). interpretation "relation invertion" 'invert_appl a x = (invert_os_relation _ a x). lemma segment_square_of_ordered_set_square: - ∀O:ordered_set.∀u,v:O.∀x:O square. - \fst x ∈ [u,v] → \snd x ∈ [u,v] → {[u,v]} square. + ∀O:ordered_set.∀u,v:O.∀x:O squareO. + \fst x ∈ [u,v] → \snd x ∈ [u,v] → {[u,v]} squareO. intros; split; exists; [1: apply (\fst x) |3: apply (\snd x)] assumption; qed. -coercion segment_square_of_ordered_set_square with 0 2. +coercion segment_square_of_ordered_set_square with 0 2 nocomposites. alias symbol "pi1" (instance 4) = "exT \fst". alias symbol "pi1" (instance 2) = "exT \fst". lemma ordered_set_square_of_segment_square : - ∀O:ordered_set.∀u,v:O.{[u,v]} square → O square ≝ - λO:ordered_set.λu,v:O.λb:{[u,v]} square.〈\fst(\fst b),\fst(\snd b)〉. + ∀O:ordered_set.∀u,v:O.{[u,v]} squareO → O squareO ≝ + λO:ordered_set.λu,v:O.λb:{[u,v]} squareO.〈\fst(\fst b),\fst(\snd b)〉. -coercion ordered_set_square_of_segment_square. +coercion ordered_set_square_of_segment_square nocomposites. lemma restriction_agreement : - ∀O:ordered_uniform_space.∀l,r:O.∀P:{[l,r]} square → Prop.∀OP:O square → Prop.Prop. + ∀O:ordered_uniform_space.∀l,r:O.∀P:{[l,r]} squareO → Prop.∀OP:O squareO → Prop.Prop. apply(λO:ordered_uniform_space.λl,r:O. - λP:{[l,r]} square → Prop.λOP:O square → Prop. - ∀b:O square.∀H1,H2.(P b → OP b) ∧ (OP b → P b)); + λP:{[l,r]} squareO → Prop. λOP:O squareO → Prop. + ∀b:O squareO.∀H1,H2.(P b → OP b) ∧ (OP b → P b)); [5,7: apply H1|6,8:apply H2]skip; qed. -lemma unrestrict: ∀O:ordered_uniform_space.∀l,r:O.∀U,u.∀x:{[l,r]} square. +lemma unrestrict: ∀O:ordered_uniform_space.∀l,r:O.∀U,u.∀x:{[l,r]} squareO. restriction_agreement ? l r U u → U x → u x. intros 7; cases x (b b1); cases b (w1 H1); cases b1 (w2 H2); clear b b1 x; cases (H 〈w1,w2〉 H1 H2) (L _); intro Uw; apply L; apply Uw; qed. -lemma restrict: ∀O:ordered_uniform_space.∀l,r:O.∀U,u.∀x:{[l,r]} square. +lemma restrict: ∀O:ordered_uniform_space.∀l,r:O.∀U,u.∀x:{[l,r]} squareO. restriction_agreement ? l r U u → u x → U x. intros 6; cases x (b b1); cases b (w1 H1); cases b1 (w2 H2); clear b1 b x; intros (Ra uw); cases (Ra 〈w1,w2〉 H1 H2) (_ R); apply R; apply uw; @@ -83,29 +100,32 @@ qed. lemma invert_restriction_agreement: ∀O:ordered_uniform_space.∀l,r:O. - ∀U:{[l,r]} square → Prop.∀u:O square → Prop. + ∀U:{[l,r]} squareO → Prop.∀u:O squareO → Prop. restriction_agreement ? l r U u → restriction_agreement ? l r (\inv U) (\inv u). intros 9; split; intro; [1: apply (unrestrict ????? (segment_square_of_ordered_set_square ??? 〈\snd b,\fst b〉 H2 H1) H H3); |2: apply (restrict ????? (segment_square_of_ordered_set_square ??? 〈\snd b,\fst b〉 H2 H1) H H3);] qed. - -alias symbol "square" (instance 8) = "bishop set square". -lemma bs_of_ss: - ∀O:ordered_set.∀u,v:O.{[u,v]} square → (bishop_set_of_ordered_set O) square ≝ - λO:ordered_set.λu,v:O.λb:{[u,v]} square.〈\fst(\fst b),\fst(\snd b)〉. + +lemma bs2_of_bss2: + ∀O:ordered_set.∀u,v:O.(bishop_set_of_ordered_set {[u,v]}) squareB → (bishop_set_of_ordered_set O) squareB ≝ + λO:ordered_set.λu,v:O.λb:{[u,v]} squareO.〈\fst(\fst b),\fst(\snd b)〉. + +coercion bs2_of_bss2 nocomposites. (* notation < "x \sub \neq" with precedence 91 for @{'bsss $x}. interpretation "bs_of_ss" 'bsss x = (bs_of_ss _ _ _ x). *) +(* lemma ss_of_bs: ∀O:ordered_set.∀u,v:O. - ∀b:O square.\fst b ∈ [u,v] → \snd b ∈ [u,v] → {[u,v]} square ≝ + ∀b:O squareO.\fst b ∈ [u,v] → \snd b ∈ [u,v] → {[u,v]} squareO ≝ λO:ordered_set.λu,v:O. - λb:(O:bishop_set) square.λH1,H2.〈≪\fst b,H1≫,≪\snd b,H2≫〉. + λb:O squareB.λH1,H2.〈≪\fst b,H1≫,≪\snd b,H2≫〉. +*) (* notation < "x \sub \nleq" with precedence 91 for @{'ssbs $x}. @@ -117,13 +137,13 @@ lemma segment_ordered_uniform_space: intros (O l r); apply mk_ordered_uniform_space; [1: apply (mk_ordered_uniform_space_ {[l,r]}); [1: alias symbol "and" = "constructive and". - letin f ≝ (λP:{[l,r]} square → Prop. ∃OP:O square → Prop. + letin f ≝ (λP:{[l,r]} squareO → Prop. ∃OP:O squareO → Prop. (us_unifbase O OP) ∧ restriction_agreement ??? P OP); apply (mk_uniform_space (bishop_set_of_ordered_set {[l,r]}) f); [1: intros (U H); intro x; simplify; cases H (w Hw); cases Hw (Gw Hwp); clear H Hw; intro Hm; - lapply (us_phi1 ?? Gw x Hm) as IH; - apply (restrict ?????? Hwp IH); + lapply (us_phi1 O w Gw x Hm) as IH; + apply (restrict ? l r ??? Hwp IH); STOP |2: intros (U V HU HV); cases HU (u Hu); cases HV (v Hv); clear HU HV; cases Hu (Gu HuU); cases Hv (Gv HvV); clear Hu Hv; cases (us_phi2 ??? Gu Gv) (w HW); cases HW (Gw Hw); clear HW; diff --git a/helm/software/matita/contribs/dama/dama/supremum.ma b/helm/software/matita/contribs/dama/dama/supremum.ma index a3a341fea..0a6d26112 100644 --- a/helm/software/matita/contribs/dama/dama/supremum.ma +++ b/helm/software/matita/contribs/dama/dama/supremum.ma @@ -255,17 +255,24 @@ intros (O u v); letin hos ≝ (half_segment_ordered_set (os_l O) u v); constructor 1; [apply hos; | apply (dual_hos hos); | reflexivity] qed. -notation "hvbox({[a, break b]})" non associative with precedence 90 - for @{'segment_set $a $b}. -interpretation "Ordered set segment" 'segment_set a b = +notation < "hvbox({[a, break b]/})" non associative with precedence 90 + for @{'h_segment_set $a $b}. +notation > "hvbox({[a, break b]/})" non associative with precedence 90 + for @{'h_segment_set $a $b}. +interpretation "Half ordered set segment" 'h_segment_set a b = (half_segment_ordered_set _ a b). + +notation < "hvbox({[a, break b]})" non associative with precedence 90 + for @{'segment_set $a $b}. +notation > "hvbox({[a, break b]})" non associative with precedence 90 + for @{'segment_set $a $b}. interpretation "Ordered set segment" 'segment_set a b = (segment_ordered_set _ a b). (* Lemma 2.9 *) lemma h_segment_preserves_supremum: - ∀O:half_ordered_set.∀l,u:O.∀a:sequence {[l,u]}.∀x:{[l,u]}. + ∀O:half_ordered_set.∀l,u:O.∀a:sequence {[l,u]/}.∀x:{[l,u]/}. increasing ? ⌊n,\fst (a n)⌋ ∧ supremum ? ⌊n,\fst (a n)⌋ (\fst x) → uparrow ? a x. intros; split; cases H; clear H; @@ -282,16 +289,16 @@ interpretation "segment_preserves_supremum" 'segment_preserves_supremum = (h_seg interpretation "segment_preserves_infimum" 'segment_preserves_infimum = (h_segment_preserves_supremum (os_r _)). (* Definition 2.10 *) -alias symbol "square" = "ordered set square". alias symbol "pi2" = "pair pi2". alias symbol "pi1" = "pair pi1". definition square_segment ≝ - λO:ordered_set.λa,b:O.λx: O square. + λO:ordered_set.λa,b:O.λx: O squareO. And4 (\fst x ≤ b) (a ≤ \fst x) (\snd x ≤ b) (a ≤ \snd x). definition convex ≝ - λO:ordered_set.λU:O square → Prop. - ∀p.U p → \fst p ≤ \snd p → ∀y. square_segment ? (\fst p) (\snd p) y → U y. + λO:ordered_set.λU:O squareO → Prop. + ∀p.U p → \fst p ≤ \snd p → ∀y. + square_segment O (\fst p) (\snd p) y → U y. (* Definition 2.11 *) definition upper_located ≝ diff --git a/helm/software/matita/contribs/dama/dama/uniform.ma b/helm/software/matita/contribs/dama/dama/uniform.ma index a89a42ba8..759037124 100644 --- a/helm/software/matita/contribs/dama/dama/uniform.ma +++ b/helm/software/matita/contribs/dama/dama/uniform.ma @@ -15,24 +15,23 @@ include "supremum.ma". (* Definition 2.13 *) -alias symbol "square" = "bishop set square". alias symbol "pair" = "Pair construction". alias symbol "exists" = "exists". alias symbol "and" = "logical and". definition compose_bs_relations ≝ - λC:bishop_set.λU,V:C square → Prop. - λx:C square.∃y:C. U 〈\fst x,y〉 ∧ V 〈y,\snd x〉. + λC:bishop_set.λU,V:C squareB → Prop. + λx:C squareB.∃y:C. U 〈\fst x,y〉 ∧ V 〈y,\snd x〉. definition compose_os_relations ≝ - λC:ordered_set.λU,V:C square → Prop. - λx:C square.∃y:C. U 〈\fst x,y〉 ∧ V 〈y,\snd x〉. + λC:ordered_set.λU,V:C squareB → Prop. + λx:C squareB.∃y:C. U 〈\fst x,y〉 ∧ V 〈y,\snd x〉. interpretation "bishop set relations composition" 'compose a b = (compose_bs_relations _ a b). interpretation "ordered set relations composition" 'compose a b = (compose_os_relations _ a b). definition invert_bs_relation ≝ - λC:bishop_set.λU:C square → Prop. - λx:C square. U 〈\snd x,\fst x〉. + λC:bishop_set.λU:C squareB → Prop. + λx:C squareB. U 〈\snd x,\fst x〉. notation > "\inv" with precedence 60 for @{ 'invert_symbol }. interpretation "relation invertion" 'invert a = (invert_bs_relation _ a). @@ -46,14 +45,14 @@ alias symbol "and" (instance 16) = "constructive and". alias symbol "and" (instance 9) = "constructive and". record uniform_space : Type ≝ { us_carr:> bishop_set; - us_unifbase: (us_carr square → Prop) → CProp; - us_phi1: ∀U:us_carr square → Prop. us_unifbase U → - (λx:us_carr square.\fst x ≈ \snd x) ⊆ U; - us_phi2: ∀U,V:us_carr square → Prop. us_unifbase U → us_unifbase V → - ∃W:us_carr square → Prop.us_unifbase W ∧ (W ⊆ (λx.U x ∧ V x)); - us_phi3: ∀U:us_carr square → Prop. us_unifbase U → - ∃W:us_carr square → Prop.us_unifbase W ∧ (W ∘ W) ⊆ U; - us_phi4: ∀U:us_carr square → Prop. us_unifbase U → ∀x.(U x → (\inv U) x) ∧ ((\inv U) x → U x) + us_unifbase: (us_carr squareB → Prop) → CProp; + us_phi1: ∀U:us_carr squareB → Prop. us_unifbase U → + (λx:us_carr squareB.\fst x ≈ \snd x) ⊆ U; + us_phi2: ∀U,V:us_carr squareB → Prop. us_unifbase U → us_unifbase V → + ∃W:us_carr squareB → Prop.us_unifbase W ∧ (W ⊆ (λx.U x ∧ V x)); + us_phi3: ∀U:us_carr squareB → Prop. us_unifbase U → + ∃W:us_carr squareB → Prop.us_unifbase W ∧ (W ∘ W) ⊆ U; + us_phi4: ∀U:us_carr squareB → Prop. us_unifbase U → ∀x.(U x → (\inv U) x) ∧ ((\inv U) x → U x) }. (* Definition 2.14 *)