]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/library/demo/formal_topology.ma
update in groud_2 and models
[helm.git] / helm / software / matita / library / demo / formal_topology.ma
index 190e00e5d0eb549e6822d06c0e72fc6d9efe18a4..63da5347726baff4f1ab833606f54cef6c89b3d8 100644 (file)
@@ -17,23 +17,23 @@ include "logic/cprop_connectives.ma".
 
 record powerset (A : Type) : Type ≝ { char : A → CProp }.
 
-interpretation "char" 'subset p = (mk_powerset _ p).  
+interpretation "char" 'subset p = (mk_powerset ? p).  
 
 interpretation "pwset" 'powerset a = (powerset a). 
 
-interpretation "in" 'mem a X = (char _ X a). 
+interpretation "in" 'mem a X = (char ? X a). 
 
 definition subseteq ≝ λA.λu,v:\Omega \sup A.∀x.x ∈ u → x ∈ v.
 
-interpretation "subseteq" 'subseteq u v = (subseteq _ u v).
+interpretation "subseteq" 'subseteq u v = (subseteq ? u v).
 
 definition overlaps ≝ λA.λU,V : Ω \sup A. exT2 ? (λx.x ∈ U) (λx.x ∈ V).
 
-interpretation "overlaps" 'overlaps u v = (overlaps _ u v).
+interpretation "overlaps" 'overlaps u v = (overlaps ? u v).
 
 definition intersect ≝ λA.λu,v:Ω\sup A.{ y | y ∈ u ∧ y ∈ v }.
 
-interpretation "intersect" 'intersects u v = (intersect _ u v). 
+interpretation "intersect" 'intersects u v = (intersect ? u v). 
 
 record axiom_set : Type ≝ { 
   A:> Type;
@@ -51,8 +51,8 @@ inductive covers (A: axiom_set) (U: \Omega \sup A) : A → CProp ≝
 notation "hvbox(a break ◃ b)" non associative with precedence 45
 for @{ 'covers $a $b }. (* a \ltri b *)
 
-interpretation "coversl" 'covers A U = (for_all _ U A (covers _ U)).
-interpretation "covers" 'covers a U = (covers _ U a).
+interpretation "coversl" 'covers A U = (for_all ? U A (covers ? U)).
+interpretation "covers" 'covers a U = (covers ? U a).
 
 definition covers_elim ≝
  λA:axiom_set.λU: \Omega \sup A.λP:\Omega \sup A.
@@ -77,8 +77,8 @@ coinductive fish (A:axiom_set) (U: \Omega \sup A) : A → CProp ≝
 notation "hvbox(a break ⋉ b)" non associative with precedence 45
 for @{ 'fish $a $b }. (* a \ltimes b *)
 
-interpretation "fishl" 'fish A U = (ex_such _ U A (fish _ U)).
-interpretation "fish" 'fish a U = (fish _ U a).
+interpretation "fishl" 'fish A U = (ex_such ? U A (fish ? U)).
+interpretation "fish" 'fish a U = (fish ? U a).
 
 let corec fish_rec (A:axiom_set) (U: \Omega \sup A)
  (P: Ω \sup A) (H1: P ⊆ U)
@@ -109,6 +109,24 @@ theorem transitivity: ∀A:axiom_set.∀a:A.∀U,V. a ◃ U → U ◃ V → a 
        assumption]]
 qed.
 
+theorem covers_elim2:
+ ∀A: axiom_set. ∀U:Ω \sup A.∀P: A → CProp.
+  (∀a:A. a ∈ U → P a) →
+   (∀a:A.∀V:Ω \sup A. a ◃ V → V ◃ U → (∀y. y ∈ V → P y) → P a) →
+     ∀a:A. a ◃ U → P a.
+ intros;
+ change with (a ∈ {a | P a});
+ apply (covers_elim ?????? H2);
+  [ intros 2; simplify; apply H; assumption
+  | intros;
+    simplify in H4 ⊢ %;
+    apply H1;
+     [ apply (C ? a1 j);
+     | autobatch; 
+     | assumption;
+     | assumption]]
+qed.
+
 theorem coreflexivity: ∀A:axiom_set.∀a:A.∀V. a ⋉ V → a ∈ V.
  intros;
  cases H;
@@ -136,7 +154,7 @@ qed.
 
 definition leq ≝ λA:axiom_set.λa,b:A. a ◃ {y|b=y}.
 
-interpretation "covered by one" 'leq a b = (leq _ a b).
+interpretation "covered by one" 'leq a b = (leq ? a b).
 
 theorem leq_refl: ∀A:axiom_set.∀a:A. a ≤ a.
  intros;
@@ -158,23 +176,17 @@ qed.
 
 definition uparrow ≝ λA:axiom_set.λa:A.mk_powerset ? (λb:A. a ≤ b).
 
-notation "↑a" with precedence 80 for @{ 'uparrow $a }.
-
-interpretation "uparrow" 'uparrow a = (uparrow _ a).
-
-definition downarrow ≝ λA:axiom_set.λU:Ω \sup A.mk_powerset ? (λa:A. ↑a ≬ U).
+interpretation "uparrow" 'uparrow a = (uparrow ? a).
 
-notation "↓a" with precedence 80 for @{ 'downarrow $a }.
+definition downarrow ≝ λA:axiom_set.λU:Ω \sup A.mk_powerset ? (λa:A. (↑a) ≬ U).
 
-interpretation "downarrow" 'downarrow a = (downarrow _ a).
+interpretation "downarrow" 'downarrow a = (downarrow ? a).
 
 definition fintersects ≝ λA:axiom_set.λU,V:Ω \sup A.↓U ∩ ↓V.
 
-interpretation "fintersects" 'fintersects U V = (fintersects _ U V).
+interpretation "fintersects" 'fintersects U V = (fintersects ? U V).
 
-(*
 record convergent_generated_topology : Type ≝
  { AA:> axiom_set;
    convergence: ∀a:AA.∀U,V:Ω \sup AA. a ◃ U → a ◃ V → a ◃ (U ↓ V)
  }.
-*)