From: Enrico Tassi Date: Tue, 29 Jun 2010 14:03:40 +0000 (+0000) Subject: ... X-Git-Tag: make_still_working~2891 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=1470ff47df1349333c6b721a1c162cc7dfc6806f;p=helm.git ... --- diff --git a/helm/software/matita/contribs/formal_topology/overlap/o-algebra.ma b/helm/software/matita/contribs/formal_topology/overlap/o-algebra.ma index 9f1c0fada..c1d766f7e 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/o-algebra.ma +++ b/helm/software/matita/contribs/formal_topology/overlap/o-algebra.ma @@ -52,6 +52,10 @@ interpretation "unary morphism1 comprehension with proof" 'comprehension_by s \e lattices, Definizione 0.9 *) (* USARE L'ESISTENZIALE DEBOLE *) +definition if_then_else ≝ λT:Type.λe,t,f.match e return λ_.T with [ true ⇒ t | false ⇒ f]. +notation > "'if' term 19 e 'then' term 19 t 'else' term 90 f" non associative with precedence 19 for @{ 'if_then_else $e $t $f }. +notation < "'if' \nbsp term 19 e \nbsp 'then' \nbsp term 19 t \nbsp 'else' \nbsp term 90 f \nbsp" non associative with precedence 19 for @{ 'if_then_else $e $t $f }. +interpretation "Formula if_then_else" 'if_then_else e t f = (if_then_else ? e t f). notation > "hvbox(a break ≤ b)" non associative with precedence 45 for @{oa_leq $a $b}. notation > "a >< b" non associative with precedence 45 for @{oa_overlap $a $b}. @@ -76,7 +80,7 @@ record OAlgebra : Type2 := { oa_zero_bot: ∀p:oa_P.𝟘 ≤ p; oa_one_top: ∀p:oa_P.p ≤ 𝟙; oa_overlap_preserves_meet_: ∀p,q:oa_P.p >< q → - p >< (⋀ { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p oa_P p q }); + p >< (⋀ { x ∈ BOOL | if x then p else q(*match x with [ true ⇒ p | false ⇒ q ]*) | IF_THEN_ELSE_p oa_P p q }); oa_join_split: ∀I:SET.∀p.∀q:I ⇒_2 oa_P.p >< (⋁ q) = (∃i:I.p >< (q i)); (*oa_base : setoid; 1) enum non e' il nome giusto perche' non e' suriettiva @@ -105,7 +109,7 @@ for @{ 'oa_meet $f }. interpretation "o-algebra meet" 'oa_meet f = (fun12 ?? (oa_meet ??) f). interpretation "o-algebra meet with explicit function" 'oa_meet_mk f = - (fun12 ?? (oa_meet ??) (mk_unary_morphism ?? f ?)). + (fun12 ?? (oa_meet ??) (mk_unary_morphism1 ?? f ?)). notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (\emsp) \nbsp term 90 p)" non associative with precedence 50 for @{ 'oa_join $p }. @@ -150,11 +154,9 @@ interpretation "o-algebra binary join" 'or a b = (fun21 ??? (binary_join ?) a b). lemma oa_overlap_preservers_meet: ∀O:OAlgebra.∀p,q:O.p >< q → p >< (p ∧ q). -(* next change to avoid universe inconsistency *) -change in ⊢ (?→%→%→?) with (Type1_OF_OAlgebra O); -intros; lapply (oa_overlap_preserves_meet_ O p q f); -lapply (prop21 O O CPROP (oa_overlap O) p p ? (p ∧ q) # ?); -[3: apply (if ?? (Hletin1)); apply Hletin;|skip] apply refl1; +intros; lapply (oa_overlap_preserves_meet_ O p q f) as H; clear f; +(** screenshot "screenoa". *) +assumption; qed. notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (\emsp) \nbsp term 90 p)" @@ -175,10 +177,10 @@ interpretation "o-algebra join with explicit function" 'oa_join_mk f = (fun12 ?? (oa_join ??) (mk_unary_morphism ?? f ?)). record ORelation (P,Q : OAlgebra) : Type2 ≝ { - or_f_ : carr2 (P ⇒_2 Q); - or_f_minus_star_ : carr2(P ⇒_2 Q); - or_f_star_ : carr2(Q ⇒_2 P); - or_f_minus_ : carr2(Q ⇒_2 P); + or_f_ : P ⇒_2 Q; + or_f_minus_star_ : P ⇒_2 Q; + or_f_star_ : Q ⇒_2 P; + or_f_minus_ : Q ⇒_2 P; or_prop1_ : ∀p,q. (or_f_ p ≤ q) = (p ≤ or_f_star_ q); or_prop2_ : ∀p,q. (or_f_minus_ p ≤ q) = (p ≤ or_f_minus_star_ q); or_prop3_ : ∀p,q. (or_f_ p >< q) = (p >< or_f_minus_ q) @@ -210,8 +212,7 @@ definition ORelation_of_ORelation_setoid : ∀P,Q.ORelation_setoid P Q → ORelation P Q ≝ λP,Q,x.x. coercion ORelation_of_ORelation_setoid. -definition or_f_minus_star: - ∀P,Q:OAlgebra.(ORelation_setoid P Q) ⇒_2 (P ⇒_2 Q). +definition or_f_minus_star: ∀P,Q:OAlgebra.(ORelation_setoid P Q) ⇒_2 (P ⇒_2 Q). intros; constructor 1; [ apply or_f_minus_star_; | intros; cases e; assumption] @@ -269,7 +270,7 @@ intros; apply (or_prop3_ ?? F p q); qed. definition ORelation_composition : ∀P,Q,R. - binary_morphism2 (ORelation_setoid P Q) (ORelation_setoid Q R) (ORelation_setoid P R). + (ORelation_setoid P Q) × (ORelation_setoid Q R) ⇒_2 (ORelation_setoid P R). intros; constructor 1; [ intros (F G); @@ -323,8 +324,6 @@ coercion ORelation_setoid_of_arrows2_OA. prefer coercion Type_OF_objs2. -(* alias symbol "eq" = "setoid1 eq". *) - (* qui la notazione non va *) lemma leq_to_eq_join: ∀S:OA.∀p,q:S. p ≤ q → q = (binary_join ? p q). intros; diff --git a/helm/software/matita/contribs/formal_topology/overlap/relations_to_o-algebra.ma b/helm/software/matita/contribs/formal_topology/overlap/relations_to_o-algebra.ma index c0cf12090..9bcd51c7c 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/relations_to_o-algebra.ma +++ b/helm/software/matita/contribs/formal_topology/overlap/relations_to_o-algebra.ma @@ -40,7 +40,7 @@ definition POW': objs1 SET → OAlgebra. [ assumption | whd; intros; cases i; simplify; assumption] | intros; split; intro; - [ cases f; cases x1; exists [apply w1] exists [apply w] assumption; + [ (** screenshot "screen-pow". *) cases f; cases x1; exists [apply w1] exists [apply w] assumption; | cases e; cases x; exists; [apply w1] [ assumption | exists; [apply w] assumption]] | intros; intros 2; cases (f {(a)} ?); [ exists; [apply a] [assumption | change with (a = a); apply refl1;] diff --git a/helm/software/matita/contribs/formal_topology/overlap/subsets.ma b/helm/software/matita/contribs/formal_topology/overlap/subsets.ma index 8eedb5523..95d0284dc 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/subsets.ma +++ b/helm/software/matita/contribs/formal_topology/overlap/subsets.ma @@ -17,7 +17,7 @@ include "categories.ma". record powerset_carrier (A: objs1 SET) : Type1 ≝ { mem_operator: A ⇒_1 CPROP }. interpretation "powerset low" 'powerset A = (powerset_carrier A). notation "hvbox(a break ∈. b)" non associative with precedence 45 for @{ 'mem_low $a $b }. -interpretation "memlow" 'mem_low a S = (mem_operator ? S a). +interpretation "memlow" 'mem_low a S = (fun11 ?? (mem_operator ? S) a). definition subseteq_operator: ∀A: objs1 SET. Ω^A → Ω^A → CProp0 ≝ λA:objs1 SET.λU,V.∀a:A. a ∈. U → a ∈. V. @@ -162,3 +162,20 @@ definition big_union: ∀A:SET.∀I:SET.(I ⇒_2 Ω^A) ⇒_2 Ω^A. [ apply (. (#‡(e w)^-1)); apply x; | apply (. (#‡e w)); apply x]] qed. + +notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (⋃) \below (\emsp) term 90 p)" +non associative with precedence 50 for @{ 'bigcup $p }. +notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (⋃) \below (ident i ∈  I) break term 90 p)" +non associative with precedence 50 for @{ 'bigcup_mk (λ${ident i}:$I.$p) }. +notation > "hovbox(⋃ f)" non associative with precedence 60 for @{ 'bigcup $f }. + +notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (⋂) \below (\emsp) term 90 p)" +non associative with precedence 50 for @{ 'bigcap $p }. +notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (⋂) \below (ident i ∈  I) break term 90 p)" +non associative with precedence 50 for @{ 'bigcap_mk (λ${ident i}:$I.$p) }. +notation > "hovbox(⋂ f)" non associative with precedence 60 for @{ 'bigcap $f }. + +interpretation "bigcup" 'bigcup f = (fun12 ?? (big_union ??) f). +interpretation "bigcap" 'bigcap f = (fun12 ?? (big_intersects ??) f). +interpretation "bigcup mk" 'bigcup_mk f = (fun12 ?? (big_union ??) (mk_unary_morphism2 ?? f ?)). +interpretation "bigcap mk" 'bigcap_mk f = (fun12 ?? (big_intersects ??) (mk_unary_morphism2 ?? f ?)).