]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/library/formal_topology/relations.ma
Major reordering of theorems in the appropriate files.
[helm.git] / helm / software / matita / library / formal_topology / relations.ma
index 5e2274047031ecc5cc02f2fc12c07f4b0d7d47de..f81e19eeccb87b438dc2215b5f2b3b8744322618 100644 (file)
@@ -166,3 +166,82 @@ lemma extS_com: ∀o1,o2,o3,c1,c2,S. extS o1 o3 (c2 ∘ c1) S = extS o1 o2 c1 (e
     assumption]
 qed.
 
+(* the same as ⋄ for a basic pair *)
+definition image: ∀U,V:REL. binary_morphism1 (arrows1 ? U V) (Ω \sup U) (Ω \sup V).
+ intros; constructor 1;
+  [ apply (λr: arrows1 ? U V.λS: Ω \sup U. {y | ∃x:U. x ♮r y ∧ x ∈ S});
+    intros; simplify; split; intro; cases H1; exists [1,3: apply w]
+     [ apply (. (#‡H)‡#); assumption
+     | apply (. (#‡H \sup -1)‡#); assumption]
+  | intros; split; simplify; intros; cases H2; exists [1,3: apply w]
+     [ apply (. #‡(#‡H1)); cases x; split; try assumption;
+       apply (if ?? (H ??)); assumption
+     | apply (. #‡(#‡H1 \sup -1)); cases x; split; try assumption;
+       apply (if ?? (H \sup -1 ??)); assumption]]
+qed.
+
+(* the same as □ for a basic pair *)
+definition minus_star_image: ∀U,V:REL. binary_morphism1 (arrows1 ? U V) (Ω \sup U) (Ω \sup V).
+ intros; constructor 1;
+  [ apply (λr: arrows1 ? U V.λS: Ω \sup U. {y | ∀x:U. x ♮r y → x ∈ S});
+    intros; simplify; split; intros; apply H1;
+     [ apply (. #‡H \sup -1); assumption
+     | apply (. #‡H); assumption]
+  | intros; split; simplify; intros; [ apply (. #‡H1); | apply (. #‡H1 \sup -1)]
+    apply H2; [ apply (if ?? (H \sup -1 ??)); | apply (if ?? (H ??)) ] assumption]
+qed.
+
+(* minus_image is the same as ext *)
+
+theorem image_id: ∀o,U. image o o (id1 REL o) U = U.
+ intros; unfold image; simplify; split; simplify; intros;
+  [ change with (a ∈ U);
+    cases H; cases x; change in f with (eq1 ? w a); apply (. f‡#); assumption
+  | change in f with (a ∈ U);
+    exists; [apply a] split; [ change with (a = a); apply refl | assumption]]
+qed.
+
+theorem minus_star_image_id: ∀o,U. minus_star_image o o (id1 REL o) U = U.
+ intros; unfold minus_star_image; simplify; split; simplify; intros;
+  [ change with (a ∈ U); apply H; change with (a=a); apply refl
+  | change in f1 with (eq1 ? x a); apply (. f1 \sup -1‡#); apply f]
+qed.
+
+theorem image_comp: ∀A,B,C,r,s,X. image A C (r ∘ s) X = image B C r (image A B s X).
+ intros; unfold image; simplify; split; simplify; intros; cases H; clear H; cases x;
+ clear x; [ cases f; clear f; | cases f1; clear f1 ]
+ exists; try assumption; cases x; clear x; split; try assumption;
+ exists; try assumption; split; assumption.
+qed.
+
+theorem minus_star_image_comp:
+ ∀A,B,C,r,s,X.
+  minus_star_image A C (r ∘ s) X = minus_star_image B C r (minus_star_image A B s X).
+ intros; unfold minus_star_image; simplify; split; simplify; intros; whd; intros;
+  [ apply H; exists; try assumption; split; assumption
+  | change with (x ∈ X); cases f; cases x1; apply H; assumption]
+qed.
+
+(*CSC: unused! *)
+theorem ext_comp:
+ ∀o1,o2,o3: REL.
+  ∀a: arrows1 ? o1 o2.
+   ∀b: arrows1 ? o2 o3.
+    ∀x. ext ?? (b∘a) x = extS ?? a (ext ?? b x).
+ intros;
+ unfold ext; unfold extS; simplify; split; intro; simplify; intros;
+ cases f; clear f; split; try assumption;
+  [ cases f2; clear f2; cases x1; clear x1; exists; [apply w] split;
+     [1: split] assumption;
+  | cases H; clear H; cases x1; clear x1; exists [apply w]; split;
+     [2: cases f] assumption]
+qed.
+
+theorem extS_singleton:
+ ∀o1,o2.∀a:arrows1 ? o1 o2.∀x.extS o1 o2 a (singleton o2 x) = ext o1 o2 a x.
+ intros; unfold extS; unfold ext; unfold singleton; simplify;
+ split; intros 2; simplify; cases f; split; try assumption;
+  [ cases H; cases x1; change in f2 with (eq1 ? x w); apply (. #‡f2 \sup -1);
+    assumption
+  | exists; try assumption; split; try assumption; change with (x = x); apply refl]
+qed.
\ No newline at end of file