]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/dama/dama/uniform.ma
82278eb08823e394bcfcbb23024f0e8206306175
[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
18 (* Definition 2.13 *)
19 alias symbol "square" = "bishop set square".
20 alias symbol "pair" = "Pair construction".
21 alias symbol "exists" = "exists".
22 alias symbol "and" = "logical and".
23 definition compose_bs_relations ≝
24   λC:bishop_set.λU,V:C square → Prop.
25    λx:C square.∃y:C. U 〈\fst x,y〉 ∧ V 〈y,\snd x〉.
26    
27 definition compose_os_relations ≝
28   λC:ordered_set.λU,V:C square → Prop.
29    λx:C square.∃y:C. U 〈\fst x,y〉 ∧ V 〈y,\snd x〉.
30    
31 interpretation "bishop set relations composition" 'compose a b = (compose_bs_relations _ a b).
32 interpretation "ordered set relations composition" 'compose a b = (compose_os_relations _ a b).
33
34 definition invert_bs_relation ≝
35   λC:bishop_set.λU:C square → Prop.
36     λx:C square. U 〈\snd x,\fst x〉.
37     
38 notation < "s \sup (-1)"  with precedence 70 for @{ 'invert $s }.
39 notation < "s \sup (-1) x"  with precedence 70
40   for @{ 'invert_appl $s $x}. 
41 notation > "'inv'" with precedence 70 for @{ 'invert_symbol  }.
42 interpretation "relation invertion" 'invert a = (invert_bs_relation _ a).
43 interpretation "relation invertion" 'invert_symbol = (invert_bs_relation _).
44 interpretation "relation invertion" 'invert_appl a x = (invert_bs_relation _ a x).
45
46 alias symbol "exists" = "CProp exists".
47 alias symbol "compose" = "bishop set relations composition".
48 alias symbol "and" (instance 21) = "constructive and".
49 alias symbol "and" (instance 16) = "constructive and".
50 alias symbol "and" (instance 9) = "constructive and".
51 record uniform_space : Type ≝ {
52   us_carr:> bishop_set;
53   us_unifbase: (us_carr square → Prop) → CProp;
54   us_phi1: ∀U:us_carr square → Prop. us_unifbase U → 
55     (λx:us_carr square.\fst x ≈ \snd x) ⊆ U;
56   us_phi2: ∀U,V:us_carr square → Prop. us_unifbase U → us_unifbase V →
57     ∃W:us_carr square → Prop.us_unifbase W ∧ (W ⊆ (λx.U x ∧ V x));
58   us_phi3: ∀U:us_carr square → Prop. us_unifbase U → 
59     ∃W:us_carr square → Prop.us_unifbase W ∧ (W ∘ W) ⊆ U;
60   us_phi4: ∀U:us_carr square → Prop. us_unifbase U → ∀x.(U x → (inv U) x) ∧ ((inv U) x → U x)
61 }.
62
63 (* Definition 2.14 *)  
64 alias symbol "leq" = "natural 'less or equal to'".
65 definition cauchy ≝
66   λC:uniform_space.λa:sequence C.∀U.us_unifbase C U → 
67    ∃n. ∀i,j. n ≤ i → n ≤ j → U 〈a i,a j〉.
68    
69 notation < "a \nbsp 'is_cauchy'" non associative with precedence 50 
70   for @{'cauchy $a}.
71 notation > "a 'is_cauchy'" non associative with precedence 50 
72   for @{'cauchy $a}.
73 interpretation "Cauchy sequence" 'cauchy s = (cauchy _ s).  
74    
75 (* Definition 2.15 *)  
76 definition uniform_converge ≝
77   λC:uniform_space.λa:sequence C.λu:C.
78     ∀U.us_unifbase C U →  ∃n. ∀i. n ≤ i → U 〈u,a i〉.
79     
80 notation < "a \nbsp (\u \atop (\horbar\triangleright)) \nbsp x" non associative with precedence 50 
81   for @{'uniform_converge $a $x}.
82 notation > "a 'uniform_converges' x" non associative with precedence 50 
83   for @{'uniform_converge $a $x}.
84 interpretation "Uniform convergence" 'uniform_converge s u =
85  (uniform_converge _ s u).
86  
87 (* Lemma 2.16 *)
88 lemma uniform_converge_is_cauchy : 
89   ∀C:uniform_space.∀a:sequence C.∀x:C.
90    a uniform_converges x → a is_cauchy. 
91 intros (C a x Ha); intros 2 (u Hu);
92 cases (us_phi3 ?? Hu) (v Hv0); cases Hv0 (Hv H); clear Hv0;
93 cases (Ha ? Hv) (n Hn); exists [apply n]; intros;
94 apply H; unfold; exists [apply x]; split [2: apply (Hn ? H2)]
95 cases (us_phi4 ?? Hv 〈a i,x〉) (P1 P2); apply P2;
96 apply (Hn ? H1);
97 qed.