From: Claudio Sacerdoti Coen Date: Sun, 21 Dec 2008 17:56:31 +0000 (+0000) Subject: New category SET (whose objects are setoids). X-Git-Tag: make_still_working~4342 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=87ff605d8efbc7d5ca7b89cdb6bf04f0a2ddf489;p=helm.git New category SET (whose objects are setoids). --- diff --git a/helm/software/matita/library/datatypes/categories.ma b/helm/software/matita/library/datatypes/categories.ma index 3a8a6c759..ca49cbdd3 100644 --- a/helm/software/matita/library/datatypes/categories.ma +++ b/helm/software/matita/library/datatypes/categories.ma @@ -103,9 +103,6 @@ record binary_morphism1 (A,B,C:setoid1) : Type0 ≝ prop1: ∀a,a',b,b'. eq1 ? a a' → eq1 ? b b' → eq1 ? (fun1 a b) (fun1 a' b') }. -notation "hbox(a break ⇒ b)" right associative with precedence 20 for @{ 'Imply $a $b }. -interpretation "unary morphism" 'Imply a b = (unary_morphism a b). - notation "† c" with precedence 90 for @{'prop1 $c }. notation "l ‡ r" with precedence 90 for @{'prop $l $r }. notation "#" with precedence 90 for @{'refl}. @@ -209,3 +206,34 @@ 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; + constructor 1; + [ apply (unary_morphism s s1); + | constructor 1; + [ intros (f g); apply (∀a. f a = g a); + | intros 1; simplify; intros; apply refl; + | simplify; intros; apply sym; apply H; + | simplify; intros; apply trans; [2: apply H; | skip | apply H1]]] +qed. + +notation "hbox(a break ⇒ b)" right associative with precedence 20 for @{ 'Imply $a $b }. +interpretation "unary morphism" 'Imply a b = (unary_morphism_setoid a b). +interpretation "unary morphism" 'Imply a b = (unary_morphism a b). + +definition SET: category1. + constructor 1; + [ apply setoid; + | apply rule (λS,T.unary_morphism_setoid S T); + | intros; constructor 1; [ apply (λx.x); | intros; assumption ] + | intros; constructor 1; [ intros; constructor 1; [ apply (λx. c1 (c x)); | intros; + apply († (†H));] + | intros; whd; intros; simplify; whd in H1; whd in H; + apply trans; [ apply (b (a' a1)); | lapply (prop_1 ?? b (a a1) (a' a1)); + [ apply Hletin | apply (H a1); ] | apply H1; ]] + | intros; whd; intros; simplify; apply refl; + | intros; simplify; whd; intros; simplify; apply refl; + | intros; simplify; whd; intros; simplify; apply refl; + ] +qed. \ No newline at end of file