]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/formal_topology/overlap/o-algebra.ma
more composites to make all happy!
[helm.git] / helm / software / matita / contribs / formal_topology / overlap / o-algebra.ma
index 533bff3ddd2e191a8305fe229210261033d29fce..6f58f53b242e931e37555f3f2bf3ad6d56b31985 100644 (file)
@@ -13,7 +13,6 @@
 (**************************************************************************)
 
 include "categories.ma".
-include "logic/cprop_connectives.ma". 
 
 inductive bool : Type0 := true : bool | false : bool.
 
@@ -49,6 +48,9 @@ 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 carr' ≝ λx:Type_OF_category1 SET.Type_OF_Type0 (carr x).
+coercion carr'. (* we prefer the lower carrier projection *)
+
 (* per il set-indexing vedere capitolo BPTools (foundational tools), Sect. 0.3.4 complete
    lattices, Definizione 0.9 *)
 (* USARE L'ESISTENZIALE DEBOLE *)
@@ -57,8 +59,8 @@ record OAlgebra : Type2 := {
   oa_P :> SET1;
   oa_leq : binary_morphism1 oa_P oa_P CPROP; (* CPROP is setoid1, CPROP importante che sia small *)
   oa_overlap: binary_morphism1 oa_P oa_P CPROP;
-  oa_meet: ∀I:SET.unary_morphism2 (arrows2 SET1 I oa_P) oa_P;
-  oa_join: ∀I:SET.unary_morphism2 (arrows2 SET1 I oa_P) oa_P;
+  oa_meet: ∀I:SET.unary_morphism2 (I ⇒ oa_P) oa_P;
+  oa_join: ∀I:SET.unary_morphism2 (I ⇒ oa_P) oa_P;
   oa_one: oa_P;
   oa_zero: oa_P;
   oa_leq_refl: ∀a:oa_P. oa_leq a a; 
@@ -66,8 +68,8 @@ record OAlgebra : Type2 := {
   oa_leq_trans: ∀a,b,c:oa_P.oa_leq a b → oa_leq b c → oa_leq a c;
   oa_overlap_sym: ∀a,b:oa_P.oa_overlap a b → oa_overlap b a;
   (* Errore: = in oa_meet_inf e oa_join_sup *)
-  oa_meet_inf: ∀I.∀p_i.∀p:oa_P.oa_leq p (oa_meet I p_i) → ∀i:I.oa_leq p (p_i i);
-  oa_join_sup: ∀I.∀p_i.∀p:oa_P.oa_leq (oa_join I p_i) p → ∀i:I.oa_leq (p_i i) p;
+  oa_meet_inf: ∀I:SET.∀p_i:I ⇒ oa_P.∀p:oa_P.oa_leq p (oa_meet I p_i) = ∀i:I.oa_leq p (p_i i);
+  oa_join_sup: ∀I:SET.∀p_i:I ⇒ oa_P.∀p:oa_P.oa_leq (oa_join I p_i) p = ∀i:I.oa_leq (p_i i) p;
   oa_zero_bot: ∀p:oa_P.oa_leq oa_zero p;
   oa_one_top: ∀p:oa_P.oa_leq p oa_one;
   oa_overlap_preserves_meet_: 
@@ -75,8 +77,8 @@ record OAlgebra : Type2 := {
        (oa_meet ? { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p oa_P p q });
   (* ⇔ deve essere =, l'esiste debole *)
   oa_join_split:
-      ∀I:SET.∀p.∀q:arrows2 SET1 I oa_P.
-       oa_overlap p (oa_join I q)  ∃i:I.oa_overlap p (q i);
+      ∀I:SET.∀p.∀q:I ⇒ oa_P.
+       oa_overlap p (oa_join I q) = ∃i:I.oa_overlap p (q i);
   (*oa_base : setoid;
   1) enum non e' il nome giusto perche' non e' suriettiva
   2) manca (vedere altro capitolo) la "suriettivita'" come immagine di insiemi di oa_base
@@ -134,9 +136,7 @@ intros; split;
   intro x; simplify; cases x; simplify; assumption;]
 qed.
 
-notation "hovbox(a ∧ b)" left associative with precedence 35
-for @{ 'oa_meet_bin $a $b }.
-interpretation "o-algebra binary meet" 'oa_meet_bin a b = 
+interpretation "o-algebra binary meet" 'and a b = 
   (fun21 ___ (binary_meet _) a b).
 
 coercion Type1_OF_OAlgebra nocomposites.
@@ -171,7 +171,7 @@ definition hint5: OAlgebra → objs2 SET1.
 qed.
 coercion hint5.
 
-record ORelation (P,Q : OAlgebra) : Type ≝ {
+record ORelation (P,Q : OAlgebra) : Type2 ≝ {
   or_f_ : P ⇒ Q;
   or_f_minus_star_ : P ⇒ Q;
   or_f_star_ : Q ⇒ P;
@@ -188,14 +188,14 @@ constructor 1;
 | constructor 1;
    (* tenere solo una uguaglianza e usare la proposizione 9.9 per
       le altre (unicita' degli aggiunti e del simmetrico) *)
-   [ apply (λp,q. And4 (eq2 ? (or_f_minus_star_ ?? p) (or_f_minus_star_ ?? q)) 
+   [ apply (λp,q. And42 (eq2 ? (or_f_minus_star_ ?? p) (or_f_minus_star_ ?? q)) 
              (eq2 ? (or_f_minus_ ?? p) (or_f_minus_ ?? q)) 
              (eq2 ? (or_f_ ?? p) (or_f_ ?? q)) 
              (eq2 ? (or_f_star_ ?? p) (or_f_star_ ?? q))); 
    | whd; simplify; intros; repeat split; intros; apply refl2;
-   | whd; simplify; intros; cases H; clear H; split; 
+   | whd; simplify; intros; cases a; clear a; split; 
      intro a; apply sym1; generalize in match a;assumption;
-   | whd; simplify; intros; cases H; cases H1; clear H H1; split; intro a;
+   | whd; simplify; intros; cases a; cases a1; clear a a1; split; intro a;
      [ apply (.= (e a)); apply e4;
      | apply (.= (e1 a)); apply e5;
      | apply (.= (e2 a)); apply e6;
@@ -345,3 +345,8 @@ 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.