From 5ede839a0cf3339568202750b4aae85ccc63fcb0 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Wed, 30 Jun 2010 09:44:22 +0000 Subject: [PATCH] .... --- .../formal_topology/overlap/basic_pairs.ma | 40 ++++++------------- .../formal_topology/overlap/relations.ma | 32 +++++++++------ 2 files changed, 31 insertions(+), 41 deletions(-) diff --git a/helm/software/matita/contribs/formal_topology/overlap/basic_pairs.ma b/helm/software/matita/contribs/formal_topology/overlap/basic_pairs.ma index 9d4cbbed0..0734411f8 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/basic_pairs.ma +++ b/helm/software/matita/contribs/formal_topology/overlap/basic_pairs.ma @@ -15,42 +15,26 @@ include "relations.ma". include "notation.ma". -record basic_pair: Type1 ≝ - { concr: REL; - form: REL; - rel: arrows1 ? concr form - }. +record basic_pair: Type1 ≝ { + concr: REL; form: REL; rel: concr ⇒_\r1 form +}. interpretation "basic pair relation" 'Vdash2 x y c = (fun21 ??? (rel c) x y). interpretation "basic pair relation (non applied)" 'Vdash c = (rel c). -alias symbol "eq" = "setoid1 eq". -alias symbol "compose" = "category1 composition". -record relation_pair (BP1,BP2: basic_pair): Type1 ≝ - { concr_rel: arrows1 ? (concr BP1) (concr BP2); - form_rel: arrows1 ? (form BP1) (form BP2); - commute: ⊩ ∘ concr_rel = form_rel ∘ ⊩ +record relation_pair (BP1,BP2: basic_pair): Type1 ≝ { + concr_rel: (concr BP1) ⇒_\r1 (concr BP2); form_rel: (form BP1) ⇒_\r1 (form BP2); + commute: ⊩ ∘ concr_rel =_1 form_rel ∘ ⊩ }. - 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_relation1 (relation_pair o1 o2). - intros; - constructor 1; - [ apply (λr,r'. ⊩ ∘ r \sub\c = ⊩ ∘ r' \sub\c); - | simplify; - intros; - apply refl1; - | simplify; - intros 2; - apply sym1; - | simplify; - intros 3; - apply trans1; - ] +definition relation_pair_equality: ∀o1,o2. equivalence_relation1 (relation_pair o1 o2). + intros; constructor 1; [ apply (λr,r'. ⊩ ∘ r \sub\c = ⊩ ∘ r' \sub\c); + | simplify; intros; apply refl1; + | simplify; intros 2; apply sym1; + | simplify; intros 3; apply trans1; ] qed. definition relation_pair_setoid: basic_pair → basic_pair → setoid1. @@ -66,7 +50,7 @@ definition relation_pair_of_relation_pair_setoid : coercion relation_pair_of_relation_pair_setoid. lemma eq_to_eq': - ∀o1,o2.∀r,r':relation_pair_setoid o1 o2. r=r' → r \sub\f ∘ ⊩ = r'\sub\f ∘ ⊩. + ∀o1,o2.∀r,r':relation_pair_setoid o1 o2. r =_1 r' → r \sub\f ∘ ⊩ = r'\sub\f ∘ ⊩. intros 7 (o1 o2 r r' H c1 f2); split; intro H1; [ lapply (fi ?? (commute ?? r c1 f2) H1) as H2; diff --git a/helm/software/matita/contribs/formal_topology/overlap/relations.ma b/helm/software/matita/contribs/formal_topology/overlap/relations.ma index eda2cfc6d..f7827939d 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/relations.ma +++ b/helm/software/matita/contribs/formal_topology/overlap/relations.ma @@ -105,6 +105,12 @@ definition binary_relation_setoid_of_arrow1_REL : ∀P,Q. arrows1 REL P Q → binary_relation_setoid P Q ≝ λP,Q,x.x. coercion binary_relation_setoid_of_arrow1_REL. + +notation > "B ⇒_\r1 C" right associative with precedence 72 for @{'arrows1_REL $B $C}. +notation "B ⇒\sub (\r 1) C" right associative with precedence 72 for @{'arrows1_REL $B $C}. +interpretation "'arrows1_SET" 'arrows1_REL A B = (arrows1 REL A B). + + definition full_subset: ∀s:REL. Ω^s. apply (λs.{x | True}); intros; simplify; split; intro; assumption. @@ -112,8 +118,7 @@ qed. coercion full_subset. -alias symbol "arrows1_SET" (instance 2) = "'arrows1_SET low". -definition comprehension: ∀b:REL. (b ⇒_1 CPROP) → Ω^b. +definition comprehension: ∀b:REL. (b ⇒_1. CPROP) → Ω^b. apply (λb:REL. λP: b ⇒_1 CPROP. {x | P x}); intros; simplify; apply (.= †e); apply refl1. @@ -122,15 +127,16 @@ qed. interpretation "subset comprehension" 'comprehension s p = (comprehension s (mk_unary_morphism1 ?? p ?)). -definition ext: ∀X,S:REL. (arrows1 ? X S) × S ⇒_1 (Ω^X). - apply (λX,S.mk_binary_morphism1 ??? (λr:arrows1 REL X S.λf:S.{x ∈ X | x ♮r f}) ?); - [ intros; simplify; apply (.= (e‡#)); apply refl1 +definition ext: ∀X,S:REL. (X ⇒_\r1 S) × S ⇒_1 (Ω^X). + intros (X S); constructor 1; + [ apply (λr:X ⇒_\r1 S.λf:S.{x ∈ X | x ♮r f}); intros; simplify; apply (.= (e‡#)); apply refl1 | intros; simplify; split; intros; simplify; [ change with (∀x. x ♮a b → x ♮a' b'); intros; apply (. (#‡e1^-1)); whd in e; apply (if ?? (e ??)); assumption | change with (∀x. x ♮a' b' → x ♮a b); intros; apply (. (#‡e1)); whd in e; apply (fi ?? (e ??));assumption]] qed. + (* definition extS: ∀X,S:REL. ∀r: arrows1 ? X S. Ω \sup S ⇒ Ω \sup X. (* ∃ is not yet a morphism apply (λX,S,r,F.{x ∈ X | ∃a. a ∈ F ∧ x ♮r a});*) @@ -184,9 +190,9 @@ qed. *) (* the same as ⋄ for a basic pair *) -definition image: ∀U,V:REL. (arrows1 ? U V) × Ω^U ⇒_1 Ω^V. +definition image: ∀U,V:REL. (U ⇒_\r1 V) × Ω^U ⇒_1 Ω^V. intros; constructor 1; - [ apply (λr: arrows1 ? U V.λS: Ω \sup U. {y | ∃x:U. x ♮r y ∧ x ∈ S }); + [ apply (λr:U ⇒_\r1 V.λS: Ω \sup U. {y | ∃x:U. x ♮r y ∧ x ∈ S }); intros; simplify; split; intro; cases e1; exists [1,3: apply w] [ apply (. (#‡e^-1)‡#); assumption | apply (. (#‡e)‡#); assumption] @@ -198,9 +204,9 @@ definition image: ∀U,V:REL. (arrows1 ? U V) × Ω^U ⇒_1 Ω^V. qed. (* the same as □ for a basic pair *) -definition minus_star_image: ∀U,V:REL. (arrows1 ? U V) × Ω^U ⇒_1 Ω^V. +definition minus_star_image: ∀U,V:REL. (U ⇒_\r1 V) × Ω^U ⇒_1 Ω^V. intros; constructor 1; - [ apply (λr: arrows1 ? U V.λS: Ω \sup U. {y | ∀x:U. x ♮r y → x ∈ S}); + [ apply (λr:U ⇒_\r1 V.λS: Ω \sup U. {y | ∀x:U. x ♮r y → x ∈ S}); intros; simplify; split; intros; apply f; [ apply (. #‡e); assumption | apply (. #‡e ^ -1); assumption] @@ -209,9 +215,9 @@ definition minus_star_image: ∀U,V:REL. (arrows1 ? U V) × Ω^U ⇒_1 Ω^V. qed. (* the same as Rest for a basic pair *) -definition star_image: ∀U,V:REL. (arrows1 ? U V) × Ω^V ⇒_1 Ω^U. +definition star_image: ∀U,V:REL. (U ⇒_\r1 V) × Ω^V ⇒_1 Ω^U. intros; constructor 1; - [ apply (λr: arrows1 ? U V.λS: Ω \sup V. {x | ∀y:V. x ♮r y → y ∈ S}); + [ apply (λr:U ⇒_\r1 V.λS: Ω \sup V. {x | ∀y:V. x ♮r y → y ∈ S}); intros; simplify; split; intros; apply f; [ apply (. e ‡#); assumption | apply (. e^ -1‡#); assumption] @@ -220,9 +226,9 @@ definition star_image: ∀U,V:REL. (arrows1 ? U V) × Ω^V ⇒_1 Ω^U. qed. (* the same as Ext for a basic pair *) -definition minus_image: ∀U,V:REL. (arrows1 ? U V) × Ω^V ⇒_1 Ω^U. +definition minus_image: ∀U,V:REL. (U ⇒_\r1 V) × Ω^V ⇒_1 Ω^U. intros; constructor 1; - [ apply (λr: arrows1 ? U V.λS: Ω \sup V. {x | (*∃x:U. x ♮r y ∧ x ∈ S*) + [ apply (λr:U ⇒_\r1 V.λS: Ω \sup V. {x | (*∃x:U. x ♮r y ∧ x ∈ S*) exT ? (λy:V.x ♮r y ∧ y ∈ S) }); intros; simplify; split; intro; cases e1; exists [1,3: apply w] [ apply (. (e ^ -1‡#)‡#); assumption -- 2.39.2