X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Fdatatypes%2Fcategories.ma;h=b9e365c7e53d0e98ed01ac6f12ddea099d577081;hb=fc1e871dde0f9f4cfde6f4a4fda8d18022584e65;hp=ca49cbdd327f2909da9a3fca5b7e9ce8bbf39730;hpb=87ff605d8efbc7d5ca7b89cdb6bf04f0a2ddf489;p=helm.git diff --git a/helm/software/matita/library/datatypes/categories.ma b/helm/software/matita/library/datatypes/categories.ma index ca49cbdd3..b9e365c7e 100644 --- a/helm/software/matita/library/datatypes/categories.ma +++ b/helm/software/matita/library/datatypes/categories.ma @@ -80,13 +80,13 @@ qed. coercion Leibniz. *) -interpretation "setoid1 eq" 'eq x y = (eq_rel1 _ (eq1 _) x y). -interpretation "setoid eq" 'eq x y = (eq_rel _ (eq _) x y). -interpretation "setoid1 symmetry" 'invert r = (sym1 ____ r). -interpretation "setoid symmetry" 'invert r = (sym ____ r). +interpretation "setoid1 eq" 'eq t x y = (eq_rel1 ? (eq1 t) x y). +interpretation "setoid eq" 'eq t x y = (eq_rel ? (eq t) x y). +interpretation "setoid1 symmetry" 'invert r = (sym1 ???? r). +interpretation "setoid symmetry" 'invert r = (sym ???? r). notation ".= r" with precedence 50 for @{'trans $r}. -interpretation "trans1" 'trans r = (trans1 _____ r). -interpretation "trans" 'trans r = (trans _____ r). +interpretation "trans1" 'trans r = (trans1 ????? r). +interpretation "trans" 'trans r = (trans ????? r). record unary_morphism (A,B: setoid1) : Type0 ≝ { fun_1:1> A → B; @@ -106,11 +106,11 @@ record binary_morphism1 (A,B,C:setoid1) : Type0 ≝ notation "† c" with precedence 90 for @{'prop1 $c }. notation "l ‡ r" with precedence 90 for @{'prop $l $r }. notation "#" with precedence 90 for @{'refl}. -interpretation "prop_1" 'prop1 c = (prop_1 _____ c). -interpretation "prop1" 'prop l r = (prop1 ________ l r). -interpretation "prop" 'prop l r = (prop ________ l r). -interpretation "refl1" 'refl = (refl1 ___). -interpretation "refl" 'refl = (refl ___). +interpretation "prop_1" 'prop1 c = (prop_1 ????? c). +interpretation "prop1" 'prop l r = (prop1 ???????? l r). +interpretation "prop" 'prop l r = (prop ???????? l r). +interpretation "refl1" 'refl = (refl1 ???). +interpretation "refl" 'refl = (refl ???). definition CPROP: setoid1. constructor 1; @@ -128,7 +128,7 @@ definition if': ∀A,B:CPROP. A = B → A → B. qed. notation ". r" with precedence 50 for @{'if $r}. -interpretation "if" 'if r = (if' __ r). +interpretation "if" 'if r = (if' ?? r). definition and_morphism: binary_morphism1 CPROP CPROP CPROP. constructor 1; @@ -140,7 +140,7 @@ definition and_morphism: binary_morphism1 CPROP CPROP CPROP. | apply (fi ?? H1 b1)]] qed. -interpretation "and_morphism" 'and a b = (fun1 ___ and_morphism a b). +interpretation "and_morphism" 'and a b = (fun1 ??? and_morphism a b). definition or_morphism: binary_morphism1 CPROP CPROP CPROP. constructor 1; @@ -152,7 +152,7 @@ definition or_morphism: binary_morphism1 CPROP CPROP CPROP. | apply (fi ?? H1 b1)]] qed. -interpretation "or_morphism" 'or a b = (fun1 ___ or_morphism a b). +interpretation "or_morphism" 'or a b = (fun1 ??? or_morphism a b). definition if_morphism: binary_morphism1 CPROP CPROP CPROP. constructor 1; @@ -202,10 +202,10 @@ record category1 : Type2 ≝ notation "'ASSOC'" with precedence 90 for @{'assoc}. notation "'ASSOC1'" with precedence 90 for @{'assoc1}. -interpretation "category1 composition" 'compose x y = (fun1 ___ (comp1 ____) y x). -interpretation "category1 assoc" 'assoc1 = (comp_assoc1 ________). -interpretation "category composition" 'compose x y = (fun ___ (comp ____) y x). -interpretation "category assoc" 'assoc = (comp_assoc ________). +interpretation "category1 composition" 'compose x y = (fun1 ??? (comp1 ????) y x). +interpretation "category1 assoc" 'assoc1 = (comp_assoc1 ????????). +interpretation "category composition" 'compose x y = (fun ??? (comp ????) y x). +interpretation "category assoc" 'assoc = (comp_assoc ????????). definition unary_morphism_setoid: setoid → setoid → setoid. intros; @@ -236,4 +236,17 @@ definition SET: category1. | intros; simplify; whd; intros; simplify; apply refl; | intros; simplify; whd; intros; simplify; apply refl; ] -qed. \ No newline at end of file +qed. + +definition setoid_OF_SET: objs1 SET → setoid. + intros; apply o; qed. + +coercion setoid_OF_SET. + + +definition prop_1_SET : + ∀A,B:SET.∀w:arrows1 SET A B.∀a,b:A.eq1 ? a b→eq1 ? (w a) (w b). +intros; apply (prop_1 A B w a b H); +qed. + +interpretation "SET dagger" 'prop1 h = (prop_1_SET ? ? ? ? ? h).