]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/formal_topology/overlap/o-algebra.ma
More re-organization.
[helm.git] / helm / software / matita / contribs / formal_topology / overlap / o-algebra.ma
index ce9583da36098ffd0861c9b517aa3c84561be823..c6d91db945e94a04e325b2d33751e26022142a22 100644 (file)
@@ -49,14 +49,6 @@ interpretation "unary morphism comprehension with proof" 'comprehension_by s \et
 interpretation "unary morphism1 comprehension with proof" 'comprehension_by s \eta.f p = 
   (mk_unary_morphism1 s _ f p).
 
-definition hint: Type_OF_category2 SET1 → setoid2.
- intro; apply (setoid2_of_setoid1 t); qed.
-coercion hint.
-
-definition hint2: Type_OF_category1 SET → objs2 SET1.
- intro; apply (setoid1_of_setoid t); qed.
-coercion hint2.
-
 (* per il set-indexing vedere capitolo BPTools (foundational tools), Sect. 0.3.4 complete
    lattices, Definizione 0.9 *)
 (* USARE L'ESISTENZIALE DEBOLE *)
@@ -147,7 +139,11 @@ for @{ 'oa_meet_bin $a $b }.
 interpretation "o-algebra binary meet" 'oa_meet_bin a b = 
   (fun21 ___ (binary_meet _) a b).
 
+coercion Type1_OF_OAlgebra nocomposites.
+
 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;
@@ -239,28 +235,29 @@ qed.
 
 coercion arrows1_OF_ORelation_setoid.
 
-lemma umorphism_OF_ORelation_setoid : ∀P,Q. ORelation_setoid P Q → P ⇒ Q.
+lemma umorphism_OF_ORelation_setoid : ∀P,Q. ORelation_setoid P Q → unary_morphism1 P Q.
 intros; apply (or_f ?? t);
 qed.
 
 coercion umorphism_OF_ORelation_setoid.
 
+lemma umorphism_setoid_OF_ORelation_setoid : ∀P,Q. ORelation_setoid P Q → unary_morphism1_setoid1 P Q.
+intros; apply (or_f ?? t);
+qed.
+
+coercion umorphism_setoid_OF_ORelation_setoid.
 
-lemma uncurry_arrows : ∀B,C. arrows1 SET B C → B → C. 
-intros; apply ((fun1 ?? t) t1);
+lemma uncurry_arrows : ∀B,C. ORelation_setoid B C → B → C. 
+intros; apply ((fun11 ?? t) t1);
 qed.
 
 coercion uncurry_arrows 1.
 
-lemma hint6 : ∀P,Q. arrows1 SET P Q → P ⇒ Q. intros; apply t;qed.
+lemma hint6: ∀P,Q. Type_OF_setoid2 (hint5 P ⇒ hint5 Q) → unary_morphism1 P Q.
+ intros; apply t;
+qed.
 coercion hint6.
 
-(*
-lemma hint2: OAlgebra → setoid. intros; apply (oa_P o). qed.
-coercion hint2 nocomposites.
-*)
-
-
 notation "r \sup *" non associative with precedence 90 for @{'OR_f_star $r}.
 notation > "r *" non associative with precedence 90 for @{'OR_f_star $r}.
 
@@ -290,13 +287,13 @@ intros; apply (or_prop3_ ?? F p q);
 qed.
 
 definition ORelation_composition : ∀P,Q,R. 
-  binary_morphism1 (ORelation_setoid P Q) (ORelation_setoid Q R) (ORelation_setoid P R).
+  binary_morphism2 (ORelation_setoid P Q) (ORelation_setoid Q R) (ORelation_setoid P R).
 intros;
 constructor 1;
 [ intros (F G);
   constructor 1;
   [ apply (G ∘ F);
-  | apply (G⎻* ∘ F⎻* );
+  | apply rule (G⎻* ∘ F⎻* );
   | apply (F* ∘ G* );
   | apply (F⎻ ∘ G⎻);
   | intros; 
@@ -312,24 +309,44 @@ constructor 1;
     apply or_prop3;
   ]
 | intros; split; simplify; 
-   [1,3: unfold arrows1_OF_ORelation_setoid; apply ((†H)‡(†H1));
-   |2,4: apply ((†H1)‡(†H));]]
+   [1,3: unfold umorphism_setoid_OF_ORelation_setoid; unfold arrows1_OF_ORelation_setoid; apply ((†e)‡(†e1));
+   |2,4: apply ((†e1)‡(†e));]]
 qed.
 
-definition OA : category1.
+definition OA : category2.
 split;
 [ apply (OAlgebra);
 | intros; apply (ORelation_setoid o o1);
 | intro O; split;
-  [1,2,3,4: apply id1;
+  [1,2,3,4: apply id2;
   |5,6,7:intros; apply refl1;] 
 | apply ORelation_composition;
 | intros (P Q R S F G H); split;
    [ change with (H⎻* ∘ G⎻* ∘ F⎻* = H⎻* ∘ (G⎻* ∘ F⎻* ));
-     apply (comp_assoc1 ????? (F⎻* ) (G⎻* ) (H⎻* ));
-   | apply ((comp_assoc1 ????? (H⎻) (G⎻) (F⎻))^-1);
-   | apply ((comp_assoc1 ????? F G H)^-1);
-   | apply ((comp_assoc1 ????? H* G* F* ));]
-| intros; split; unfold ORelation_composition; simplify; apply id_neutral_left1;
-| intros; split; unfold ORelation_composition; simplify; apply id_neutral_right1;]
-qed.
\ No newline at end of file
+     apply (comp_assoc2 ????? (F⎻* ) (G⎻* ) (H⎻* ));
+   | apply ((comp_assoc2 ????? (H⎻) (G⎻) (F⎻))^-1);
+   | apply ((comp_assoc2 ????? F G H)^-1);
+   | apply ((comp_assoc2 ????? H* G* F* ));]
+| intros; split; unfold ORelation_composition; simplify; apply id_neutral_left2;
+| intros; split; unfold ORelation_composition; simplify; apply id_neutral_right2;]
+qed.
+
+lemma setoid1_of_OA: OA → setoid1.
+ intro; apply (oa_P t);
+qed.
+coercion setoid1_of_OA.
+
+lemma SET1_of_OA: OA → SET1.
+ intro; whd; apply (setoid1_of_OA t);
+qed.
+coercion SET1_of_OA.
+
+lemma objs2_SET1_OF_OA: OA → objs2 SET1.
+ intro; whd; apply (setoid1_of_OA t);
+qed.
+coercion objs2_SET1_OF_OA.
+
+lemma Type_OF_category2_OF_SET1_OF_OA: OA → Type_OF_category2 SET1.
+ intro; apply (oa_P t);
+qed.
+coercion Type_OF_category2_OF_SET1_OF_OA.
\ No newline at end of file