]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/formal_topology/overlap/o-basic_pairs.ma
- new notation.ma file with local and common notation
[helm.git] / helm / software / matita / contribs / formal_topology / overlap / o-basic_pairs.ma
index 3ac2f62eec9831d6b9402213309f5743e5826030..6476c4aebf727ac77847eac2ea097fa045484c25 100644 (file)
 (**************************************************************************)
 
 include "o-algebra.ma".
+include "notation.ma".
 
-record basic_pair: Type2 ≝
- { concr: OA;
-   form: OA;
-   rel: arrows2 ? concr form
+record Obasic_pair: Type2 ≝
+ { Oconcr: OA;
+   Oform: OA;
+   Orel: arrows2 ? Oconcr Oform
  }.
 
-interpretation "basic pair relation indexed" 'Vdash2 x y c = (rel c x y).
-interpretation "basic pair relation (non applied)" 'Vdash c = (rel c).
+interpretation "basic pair relation indexed" 'Vdash2 x y c = (Orel c x y).
+interpretation "basic pair relation (non applied)" 'Vdash c = (Orel c).
 
 alias symbol "eq" = "setoid1 eq".
 alias symbol "compose" = "category1 composition".
@@ -29,20 +30,17 @@ alias symbol "compose" = "category1 composition".
 
 alias symbol "eq" = "setoid2 eq".
 alias symbol "compose" = "category2 composition".
-record relation_pair (BP1,BP2: basic_pair): Type2 ≝
- { concr_rel: arrows2 ? (concr BP1) (concr BP2);
-   form_rel: arrows2 ? (form BP1) (form BP2);
-   commute: ⊩ ∘ concr_rel = form_rel ∘ ⊩
+record Orelation_pair (BP1,BP2: Obasic_pair): Type2 ≝
+ { Oconcr_rel: arrows2 ? (Oconcr BP1) (Oconcr BP2);
+   Oform_rel: arrows2 ? (Oform BP1) (Oform BP2);
+   Ocommute: ⊩ ∘ Oconcr_rel = Oform_rel ∘ ⊩
  }.
 
-notation "hvbox (r \sub \c)"  with precedence 90 for @{'concr_rel $r}.
-notation "hvbox (r \sub \f)"  with precedence 90 for @{'form_rel $r}.
+interpretation "concrete relation" 'concr_rel r = (Oconcr_rel __ r). 
+interpretation "formal relation" 'form_rel r = (Oform_rel __ r). 
 
-interpretation "concrete relation" 'concr_rel r = (concr_rel __ r). 
-interpretation "formal relation" 'form_rel r = (form_rel __ r). 
-
-definition relation_pair_equality:
- ∀o1,o2. equivalence_relation2 (relation_pair o1 o2).
+definition Orelation_pair_equality:
+ ∀o1,o2. equivalence_relation2 (Orelation_pair o1 o2).
  intros;
  constructor 1;
   [ apply (λr,r'. ⊩ ∘ r \sub\c = ⊩ ∘ r' \sub\c);
@@ -59,47 +57,47 @@ definition relation_pair_equality:
 qed.
 
 (* qui setoid1 e' giusto: ma non lo e'!!! *)
-definition relation_pair_setoid: basic_pair → basic_pair → setoid2.
+definition Orelation_pair_setoid: Obasic_pair → Obasic_pair → setoid2.
  intros;
  constructor 1;
-  [ apply (relation_pair b b1)
-  | apply relation_pair_equality
+  [ apply (Orelation_pair o o1)
+  | apply Orelation_pair_equality
   ]
 qed.
 
-definition relation_pair_of_relation_pair_setoid: 
-  ∀P,Q. relation_pair_setoid P Q → relation_pair P Q ≝ λP,Q,x.x.
-coercion relation_pair_of_relation_pair_setoid.
+definition Orelation_pair_of_Orelation_pair_setoid: 
+  ∀P,Q. Orelation_pair_setoid P Q → Orelation_pair P Q ≝ λP,Q,x.x.
+coercion Orelation_pair_of_Orelation_pair_setoid.
 
-lemma eq_to_eq': ∀o1,o2.∀r,r': relation_pair_setoid o1 o2. r=r' → r \sub\f ∘ ⊩ = r'\sub\f ∘ ⊩.
+lemma eq_to_eq': ∀o1,o2.∀r,r': Orelation_pair_setoid o1 o2. r=r' → r \sub\f ∘ ⊩ = r'\sub\f ∘ ⊩.
  intros 5 (o1 o2 r r' H); change in H with (⊩ ∘ r\sub\c = ⊩ ∘ r'\sub\c);
- apply (.= ((commute ?? r) \sup -1));
+ apply (.= ((Ocommute ?? r) ^ -1));
  apply (.= H);
- apply (.= (commute ?? r'));
+ apply (.= (Ocommute ?? r'));
  apply refl2;
 qed.
 
 
-definition id_relation_pair: ∀o:basic_pair. relation_pair o o.
+definition Oid_relation_pair: ∀o:Obasic_pair. Orelation_pair o o.
  intro;
  constructor 1;
   [1,2: apply id2;
-  | lapply (id_neutral_right2 ? (concr o) ? (⊩)) as H;
-    lapply (id_neutral_left2 ?? (form o) (⊩)) as H1;
+  | lapply (id_neutral_right2 ? (Oconcr o) ? (⊩)) as H;
+    lapply (id_neutral_left2 ?? (Oform o) (⊩)) as H1;
     apply (.= H);
     apply (H1 \sup -1);]
 qed.
 
-definition relation_pair_composition:
- ∀o1,o2,o3. binary_morphism2 (relation_pair_setoid o1 o2) (relation_pair_setoid o2 o3) (relation_pair_setoid o1 o3).
+definition Orelation_pair_composition:
+ ∀o1,o2,o3. binary_morphism2 (Orelation_pair_setoid o1 o2) (Orelation_pair_setoid o2 o3) (Orelation_pair_setoid o1 o3).
  intros;
  constructor 1;
   [ intros (r r1);
     constructor 1;
      [ apply (r1 \sub\c ∘ r \sub\c) 
      | apply (r1 \sub\f ∘ r \sub\f)
-     | lapply (commute ?? r) as H;
-       lapply (commute ?? r1) as H1;
+     | lapply (Ocommute ?? r) as H;
+       lapply (Ocommute ?? r1) as H1;
        apply rule (.= ASSOC);
        apply (.= #‡H1);
        apply rule (.= ASSOC ^ -1);
@@ -111,38 +109,38 @@ definition relation_pair_composition:
     change in e1 with (⊩ ∘ b \sub\c = ⊩ ∘ b' \sub\c);
     apply rule (.= ASSOC);
     apply (.= #‡e1);
-    apply (.= #‡(commute ?? b'));
+    apply (.= #‡(Ocommute ?? b'));
     apply rule (.= ASSOC \sup -1);
     apply (.= e‡#);
     apply rule (.= ASSOC);
-    apply (.= #‡(commute ?? b')\sup -1);
+    apply (.= #‡(Ocommute ?? b')\sup -1);
     apply rule (ASSOC \sup -1)]
 qed.
     
-definition BP: category2.
+definition OBP: category2.
  constructor 1;
-  [ apply basic_pair
-  | apply relation_pair_setoid
-  | apply id_relation_pair
-  | apply relation_pair_composition
+  [ apply Obasic_pair
+  | apply Orelation_pair_setoid
+  | apply Oid_relation_pair
+  | apply Orelation_pair_composition
   | intros;
     change with (⊩ ∘ (a34\sub\c ∘ (a23\sub\c ∘ a12\sub\c)) =
                  ⊩ ∘ ((a34\sub\c ∘ a23\sub\c) ∘ a12\sub\c));
     apply rule (ASSOC‡#);
   | intros;
-    change with (⊩ ∘ (a\sub\c ∘ (id_relation_pair o1)\sub\c) = ⊩ ∘ a\sub\c);
+    change with (⊩ ∘ (a\sub\c ∘ (Oid_relation_pair o1)\sub\c) = ⊩ ∘ a\sub\c);
     apply ((id_neutral_right2 ????)‡#);
   | intros;
-    change with (⊩ ∘ ((id_relation_pair o2)\sub\c ∘ a\sub\c) = ⊩ ∘ a\sub\c);
+    change with (⊩ ∘ ((Oid_relation_pair o2)\sub\c ∘ a\sub\c) = ⊩ ∘ a\sub\c);
     apply ((id_neutral_left2 ????)‡#);]
 qed.
 
-definition basic_pair_of_objs2_BP: objs2 BP → basic_pair ≝ λx.x.
-coercion basic_pair_of_objs2_BP.
+definition Obasic_pair_of_objs2_OBP: objs2 OBP → Obasic_pair ≝ λx.x.
+coercion Obasic_pair_of_objs2_OBP.
 
-definition relation_pair_setoid_of_arrows2_BP: 
-  ∀P,Q.arrows2 BP P Q → relation_pair_setoid P Q ≝ λP,Q,c.c.
-coercion relation_pair_setoid_of_arrows2_BP.
+definition Orelation_pair_setoid_of_arrows2_OBP: 
+  ∀P,Q.arrows2 OBP P Q → Orelation_pair_setoid P Q ≝ λP,Q,c.c.
+coercion Orelation_pair_setoid_of_arrows2_OBP.
 
 (*
 definition BPext: ∀o: BP. form o ⇒ Ω \sup (concr o).
@@ -197,16 +195,16 @@ interpretation "basic pair relation for subsets (non applied)" 'Vdash = (fun1 __
 
 notation "□ \sub b" non associative with precedence 90 for @{'box $b}.
 notation > "□_term 90 b" non associative with precedence 90 for @{'box $b}.
-interpretation "Universal image ⊩⎻*" 'box x = (fun12 _ _ (or_f_minus_star _ _) (rel x)).
+interpretation "Universal image ⊩⎻*" 'box x = (fun12 _ _ (or_f_minus_star _ _) (Orel x)).
  
 notation "◊ \sub b" non associative with precedence 90 for @{'diamond $b}.
 notation > "◊_term 90 b" non associative with precedence 90 for @{'diamond $b}.
-interpretation "Existential image ⊩" 'diamond x = (fun12 _ _ (or_f _ _) (rel x)).
+interpretation "Existential image ⊩" 'diamond x = (fun12 _ _ (or_f _ _) (Orel x)).
 
 notation "'Rest' \sub b" non associative with precedence 90 for @{'rest $b}.
 notation > "'Rest'⎽term 90 b" non associative with precedence 90 for @{'rest $b}.
-interpretation "Universal pre-image ⊩*" 'rest x = (fun12 _ _ (or_f_star _ _) (rel x)).
+interpretation "Universal pre-image ⊩*" 'rest x = (fun12 _ _ (or_f_star _ _) (Orel x)).
 
 notation "'Ext' \sub b" non associative with precedence 90 for @{'ext $b}.
 notation > "'Ext'⎽term 90 b" non associative with precedence 90 for @{'ext $b}.
-interpretation "Existential pre-image ⊩⎻" 'ext x = (fun12 _ _ (or_f_minus _ _) (rel x)).
\ No newline at end of file
+interpretation "Existential pre-image ⊩⎻" 'ext x = (fun12 _ _ (or_f_minus _ _) (Orel x)).
\ No newline at end of file