]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/dama/dama/uniform.ma
b8b77572b67a4f4646a73b44091521018c0287bb
[helm.git] / helm / software / matita / contribs / dama / dama / uniform.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "supremum.ma".
16
17 (* Definition 2.13 *)
18 definition square_bishop_set : bishop_set → bishop_set.
19 intro S; apply (mk_bishop_set (pair S S));
20 [1: intros (x y); apply ((fst x # fst y) ∨ (snd x # snd y));
21 |2: intro x; simplify; intro; cases H (X X); clear H; apply (bs_coreflexive ?? X);   
22 |3: intros 2 (x y); simplify; intro H; cases H (X X); clear H; [left|right] apply (bs_symmetric ??? X); 
23 |4: intros 3 (x y z); simplify; intro H; cases H (X X); clear H;
24     [1: cases (bs_cotransitive ??? (fst z) X); [left;left|right;left]assumption;
25     |2: cases (bs_cotransitive ??? (snd z) X); [left;right|right;right]assumption;]]
26 qed.
27
28 definition subset ≝ λO:bishop_set.λP,Q:O→Prop.∀x:O.P x → Q x.
29
30 notation "a \subseteq u" left associative with precedence 70 
31   for @{ 'subset $a $u }.
32 interpretation "Bishop subset" 'subset a b = (subset _ a b). 
33
34 notation < "s  2 \atop \neq" non associative with precedence 90
35   for @{ 'square2 $s }.
36 notation > "s 'square'" non associative with precedence 90
37   for @{ 'square $s }.
38 interpretation "bishop set square" 'square x = (square_bishop_set x).    
39 interpretation "bishop set square" 'square2 x = (square_bishop_set x).    
40
41 alias symbol "exists" = "exists".
42 alias symbol "and" = "logical and".
43 definition compose_relations ≝
44   λC:bishop_set.λU,V:C square → Prop.
45    λx:C square.∃y:C. U 〈fst x,y〉 ∧ V 〈y,snd x〉.
46    
47 notation "a \circ b"  left associative with precedence 70
48   for @{'compose $a $b}.
49 interpretation "relations composition" 'compose a b = (compose_relations _ a b).
50
51 definition invert_relation ≝
52   λC:bishop_set.λU:C square → Prop.
53     λx:C square. U 〈snd x,fst x〉.
54     
55 notation < "s \sup (-1)"  left associative with precedence 70
56   for @{ 'invert $s }.
57 notation < "s \sup (-1) x"  left associative with precedence 70
58   for @{ 'invert2 $s $x}. 
59 notation > "'inv'" right associative with precedence 70
60   for @{ 'invert0  }.
61 interpretation "relation invertion" 'invert a = (invert_relation _ a).
62 interpretation "relation invertion" 'invert0 = (invert_relation _).
63 interpretation "relation invertion" 'invert2 a x = (invert_relation _ a x).
64
65 alias symbol "exists" = "CProp exists".
66 alias symbol "and" (instance 21) = "constructive and".
67 alias symbol "and" (instance 16) = "constructive and".
68 alias symbol "and" (instance 9) = "constructive and".
69 record uniform_space : Type ≝ {
70   us_carr:> bishop_set;
71   us_unifbase: (us_carr square → Prop) → CProp;
72   us_phi1: ∀U:us_carr square → Prop. us_unifbase U → 
73     (λx:us_carr square.fst x ≈ snd x) ⊆ U;
74   us_phi2: ∀U,V:us_carr square → Prop. us_unifbase U → us_unifbase V →
75     ∃W:us_carr square → Prop.us_unifbase W ∧ (W ⊆ (λx.U x ∧ V x));
76   us_phi3: ∀U:us_carr square → Prop. us_unifbase U → 
77     ∃W:us_carr square → Prop.us_unifbase W ∧ (W ∘ W) ⊆ U;
78   us_phi4: ∀U:us_carr square → Prop. us_unifbase U → ∀x.(U x → (inv U) x) ∧ ((inv U) x → U x)
79 }.
80
81 (* Definition 2.14 *)  
82 alias symbol "leq" = "natural 'less or equal to'".
83 definition cauchy ≝
84   λC:uniform_space.λa:sequence C.∀U.us_unifbase C U → 
85    ∃n. ∀i,j. n ≤ i → n ≤ j → U 〈a i,a j〉.
86    
87 notation < "a \nbsp 'is_cauchy'" non associative with precedence 50 
88   for @{'cauchy $a}.
89 notation > "a 'is_cauchy'" non associative with precedence 50 
90   for @{'cauchy $a}.
91 interpretation "Cauchy sequence" 'cauchy s = (cauchy _ s).  
92    
93 (* Definition 2.15 *)  
94 definition uniform_converge ≝
95   λC:uniform_space.λa:sequence C.λu:C.
96     ∀U.us_unifbase C U →  ∃n. ∀i. n ≤ i → U 〈u,a i〉.
97     
98 notation < "a \nbsp (\u \atop (\horbar\triangleright)) \nbsp x" non associative with precedence 50 
99   for @{'uniform_converge $a $x}.
100 notation > "a 'uniform_converges' x" non associative with precedence 50 
101   for @{'uniform_converge $a $x}.
102 interpretation "Uniform convergence" 'uniform_converge s u =
103  (uniform_converge _ s u).
104  
105 (* Lemma 2.16 *)
106 lemma uniform_converge_is_cauchy : 
107   ∀C:uniform_space.∀a:sequence C.∀x:C.
108    a uniform_converges x → a is_cauchy. 
109 intros (C a x Ha); intros 2 (u Hu);
110 cases (us_phi3 ?? Hu) (v Hv0); cases Hv0 (Hv H); clear Hv0;
111 cases (Ha ? Hv) (n Hn); exists [apply n]; intros;
112 apply H; unfold; exists [apply x]; split [2: apply (Hn ? H2)]
113 cases (us_phi4 ?? Hv 〈a i,x〉) (P1 P2); apply P2;
114 apply (Hn ? H1);
115 qed.