X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fnlibrary%2Fsets%2Fsetoids1.ma;h=69e0958744de4f83c3257f88ad3b8e4ac78ef8fa;hb=c57405141d26ac2215a07b05d27a16a691dda50e;hp=115d1f6438a94da500eb447aa3d715b3e74353d8;hpb=a580ff5c627c4148cdd3649ead20f4fac0f78be8;p=helm.git diff --git a/helm/software/matita/nlibrary/sets/setoids1.ma b/helm/software/matita/nlibrary/sets/setoids1.ma index 115d1f643..69e095874 100644 --- a/helm/software/matita/nlibrary/sets/setoids1.ma +++ b/helm/software/matita/nlibrary/sets/setoids1.ma @@ -56,21 +56,15 @@ nrecord unary_morphism1 (A,B: setoid1) : Type[1] ≝ prop11: ∀a,a'. eq1 ? a a' → eq1 ? (fun11 a) (fun11 a') }. -nrecord binary_morphism1 (A,B,C:setoid1) : Type[1] ≝ - { fun21:2> A → B → C; - prop21: ∀a,a',b,b'. eq1 ? a a' → eq1 ? b b' → eq1 ? (fun21 a b) (fun21 a' b') - }. - interpretation "prop11" 'prop1 c = (prop11 ????? c). -interpretation "prop21" 'prop2 l r = (prop21 ???????? l r). interpretation "refl1" 'refl = (refl1 ???). ndefinition unary_morphism1_setoid1: setoid1 → setoid1 → setoid1. #s; #s1; @ (unary_morphism1 s s1); @ - [ #f; #g; napply (∀a:s. f a = g a) - | #x; #a; napply refl1 - | #x; #y; #H; #a; napply sym1; nauto - | #x; #y; #z; #H1; #H2; #a; napply trans1; ##[##2: napply H1 | ##skip | napply H2]##] + [ #f; #g; napply (∀a,a':s. a=a' → f a = g a') + | #x; #a; #a'; #Ha; napply (.= †Ha); napply refl1 + | #x; #y; #H; #a; #a'; #Ha; napply (.= †Ha); napply sym1; /2/ + | #x; #y; #z; #H1; #H2; #a; #a'; #Ha; napply (.= †Ha); napply trans1; ##[##2: napply H1 | ##skip | napply H2]//;##] nqed. unification hint 0 ≔ S, T ; @@ -78,6 +72,18 @@ unification hint 0 ≔ S, T ; (* --------------------------------- *) ⊢ carr1 R ≡ unary_morphism1 S T. +interpretation "prop21" 'prop2 l r = (prop11 ? (unary_morphism1_setoid1 ??) ? ?? l ?? r). + +nlemma unary_morph1_eq1: ∀A,B.∀f,g: unary_morphism1 A B. (∀x. f x = g x) → f=g. +/3/. nqed. + +nlemma mk_binary_morphism1: + ∀A,B,C: setoid1. ∀f: A → B → C. (∀a,a',b,b'. a=a' → b=b' → f a b = f a' b') → + unary_morphism1 A (unary_morphism1_setoid1 B C). + #A; #B; #C; #f; #H; @ [ #x; @ (f x) ] #a; #a'; #Ha [##2: napply unary_morph1_eq1; #y] + /2/. +nqed. + ndefinition composition1 ≝ λo1,o2,o3:Type[1].λf:o2 → o3.λg: o1 → o2.λx.f (g x). @@ -98,12 +104,11 @@ unification hint 0 ≔ o1,o2,o3:setoid1,f:unary_morphism1 o2 o3,g:unary_morphism (* -------------------------------------------------------------------- *) ⊢ fun11 ?? R ≡ (composition1 … f g). -ndefinition comp_binary_morphisms: +ndefinition comp1_binary_morphisms: ∀o1,o2,o3. - binary_morphism1 (unary_morphism1_setoid1 o2 o3) (unary_morphism1_setoid1 o1 o2) - (unary_morphism1_setoid1 o1 o3). -#o1; #o2; #o3; @ + unary_morphism1 (unary_morphism1_setoid1 o2 o3) + (unary_morphism1_setoid1 (unary_morphism1_setoid1 o1 o2) (unary_morphism1_setoid1 o1 o3)). +#o1; #o2; #o3; napply mk_binary_morphism1 [ #f; #g; napply (comp1_unary_morphisms … f g) (*CSC: why not ∘?*) - | #a; #a'; #b; #b'; #ea; #eb; #x; nnormalize; - napply (.= †(eb x)); napply ea. -nqed. + | #a; #a'; #b; #b'; #ea; #eb; #x; #x'; #Hx; nnormalize; /3/ ] +nqed. \ No newline at end of file