From: Claudio Sacerdoti Coen Date: Wed, 3 Feb 2010 22:58:49 +0000 (+0000) Subject: Curryfication of binary_morphisms. X-Git-Tag: make_still_working~3062 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=d3186f4cfe51f34b7aa828242c2fcc9b415568f2;p=helm.git Curryfication of binary_morphisms. --- diff --git a/helm/software/matita/nlibrary/overlap/o-algebra.ma b/helm/software/matita/nlibrary/overlap/o-algebra.ma index c55131315..54e920c2e 100644 --- a/helm/software/matita/nlibrary/overlap/o-algebra.ma +++ b/helm/software/matita/nlibrary/overlap/o-algebra.ma @@ -36,9 +36,9 @@ interpretation "unary morphism1 comprehension with proof" 'comprehension_by s \e (* USARE L'ESISTENZIALE DEBOLE *) nrecord OAlgebra : Type[2] := { oa_P :> setoid1; - oa_leq : binary_morphism1 oa_P oa_P CPROP; (*CSC: dovrebbe essere CProp bug refiner*) - oa_overlap: binary_morphism1 oa_P oa_P CPROP; - binary_meet: binary_morphism1 oa_P oa_P oa_P; + oa_leq : unary_morphism1 oa_P (unary_morphism1_setoid1 oa_P CPROP); (*CSC: dovrebbe essere CProp bug refiner*) + oa_overlap: unary_morphism1 oa_P (unary_morphism1_setoid1 oa_P CPROP); + binary_meet: unary_morphism1 oa_P (unary_morphism1_setoid1 oa_P oa_P); (*CSC: oa_join: ∀I:setoid.unary_morphism1 (setoid1_of_setoid … I ⇒ oa_P) oa_P;*) oa_one: oa_P; oa_zero: oa_P; @@ -63,11 +63,11 @@ nrecord OAlgebra : Type[2] := { ∀p,q.(∀r.oa_overlap p r → oa_overlap q r) → oa_leq p q }. -interpretation "o-algebra leq" 'leq a b = (fun21 ??? (oa_leq ?) a b). +interpretation "o-algebra leq" 'leq a b = (fun11 ?? (fun11 ?? (oa_leq ?) a) b). notation "hovbox(a mpadded width -150% (>)< b)" non associative with precedence 45 for @{ 'overlap $a $b}. -interpretation "o-algebra overlap" 'overlap a b = (fun21 ??? (oa_overlap ?) a b). +interpretation "o-algebra overlap" 'overlap a b = (fun11 ?? (fun11 ?? (oa_overlap ?) a) b). notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∧) \below (\emsp) \nbsp term 90 p)" non associative with precedence 50 for @{ 'oa_meet $p }. @@ -106,7 +106,7 @@ intros; split; qed.*) interpretation "o-algebra binary meet" 'and a b = - (fun21 ??? (binary_meet ?) a b). + (fun11 ?? (fun11 ?? (binary_meet ?) a) b). (* prefer coercion Type1_OF_OAlgebra. @@ -209,10 +209,7 @@ nlemma ORelation_eq_respects_leq_or_f_minus_: napply (. (or_prop3 … a' …)^-1); (*CSC: why a'? *) napply (. ?‡#) [##2: napply (a r) - | ngeneralize in match r in ⊢ %; - nchange with (or_f … a' = or_f … a); - napply (.= †e^-1); - napply #] + | napply (e^-1); //] napply (. (or_prop3 …)); napply oa_overlap_sym; nassumption. @@ -221,7 +218,7 @@ nqed. nlemma ORelation_eq2: ∀P,Q:OAlgebra.∀r,r':ORelation P Q. r=r' → r⎻ = r'⎻. - #P; #Q; #a; #a'; #e; #x; + #P; #Q; #a; #a'; #e; #x; #x'; #Hx; napply (.= †Hx); napply oa_leq_antisym; napply ORelation_eq_respects_leq_or_f_minus_ [ napply e | napply e^-1] nqed. @@ -260,7 +257,7 @@ nqed. nlemma ORelation_eq3: ∀P,Q:OAlgebra.∀r,r':ORelation P Q. r=r' → r* = r'*. - #P; #Q; #a; #a'; #e; #x; + #P; #Q; #a; #a'; #e; #x; #x'; #Hx; napply (.= †Hx); napply oa_leq_antisym; napply ORelation_eq_respects_leq_or_f_star_ [ napply e | napply e^-1] nqed. @@ -296,7 +293,7 @@ nqed. nlemma ORelation_eq4: ∀P,Q:OAlgebra.∀r,r':ORelation P Q. r=r' → r⎻* = r'⎻*. - #P; #Q; #a; #a'; #e; #x; + #P; #Q; #a; #a'; #e; #x; #x'; #Hx; napply (.= †Hx); napply oa_leq_antisym; napply ORelation_eq_respects_leq_or_f_minus_star_ [ napply e | napply e^-1] nqed. @@ -499,8 +496,9 @@ nqed. ncheck (λA,B,C,f,g.coerc_to_unary_morphism1 ??? (mk_uffa ??? (composition1 A B C f g))). *) ndefinition ORelation_composition : ∀P,Q,R. - binary_morphism1 (ORelation_setoid P Q) (ORelation_setoid Q R) (ORelation_setoid P R). -#P; #Q; #R; @ + unary_morphism1 (ORelation_setoid P Q) + (unary_morphism1_setoid1 (ORelation_setoid Q R) (ORelation_setoid P R)). +#P; #Q; #R; napply mk_binary_morphism1 [ #F; #G; @ [ napply (G ∘ F) (* napply (comp1_unary_morphisms … G F) (*CSC: was (G ∘ F);*) *) | napply (G⎻* ∘ F⎻* ) (* napply (comp1_unary_morphisms … G⎻* F⎻* ) (*CSC: was (G⎻* ∘ F⎻* );*)*) @@ -516,7 +514,7 @@ ndefinition ORelation_composition : ∀P,Q,R. napply (.= (or_prop3 … G …)); napply or_prop3 ] -##| #a;#a';#b;#b';#e;#e1;#x;nnormalize;napply (.= †(e x));napply e1] +##| nnormalize; /3/] nqed. (*