1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "supremum.ma".
18 alias symbol "square" = "bishop set square".
19 alias symbol "pair" = "Pair construction".
20 alias symbol "exists" = "exists".
21 alias symbol "and" = "logical and".
22 definition compose_bs_relations ≝
23 λC:bishop_set.λU,V:C square → Prop.
24 λx:C square.∃y:C. U 〈\fst x,y〉 ∧ V 〈y,\snd x〉.
26 definition compose_os_relations ≝
27 λC:ordered_set.λU,V:C square → Prop.
28 λx:C square.∃y:C. U 〈\fst x,y〉 ∧ V 〈y,\snd x〉.
30 interpretation "bishop set relations composition" 'compose a b = (compose_bs_relations _ a b).
31 interpretation "ordered set relations composition" 'compose a b = (compose_os_relations _ a b).
33 definition invert_bs_relation ≝
34 λC:bishop_set.λU:C square → Prop.
35 λx:C square. U 〈\snd x,\fst x〉.
37 notation > "\inv" with precedence 60 for @{ 'invert_symbol }.
38 interpretation "relation invertion" 'invert a = (invert_bs_relation _ a).
39 interpretation "relation invertion" 'invert_symbol = (invert_bs_relation _).
40 interpretation "relation invertion" 'invert_appl a x = (invert_bs_relation _ a x).
42 alias symbol "exists" = "CProp exists".
43 alias symbol "compose" = "bishop set relations composition".
44 alias symbol "and" (instance 21) = "constructive and".
45 alias symbol "and" (instance 16) = "constructive and".
46 alias symbol "and" (instance 9) = "constructive and".
47 record uniform_space : Type ≝ {
49 us_unifbase: (us_carr square → Prop) → CProp;
50 us_phi1: ∀U:us_carr square → Prop. us_unifbase U →
51 (λx:us_carr square.\fst x ≈ \snd x) ⊆ U;
52 us_phi2: ∀U,V:us_carr square → Prop. us_unifbase U → us_unifbase V →
53 ∃W:us_carr square → Prop.us_unifbase W ∧ (W ⊆ (λx.U x ∧ V x));
54 us_phi3: ∀U:us_carr square → Prop. us_unifbase U →
55 ∃W:us_carr square → Prop.us_unifbase W ∧ (W ∘ W) ⊆ U;
56 us_phi4: ∀U:us_carr square → Prop. us_unifbase U → ∀x.(U x → (\inv U) x) ∧ ((\inv U) x → U x)
60 alias symbol "leq" = "natural 'less or equal to'".
62 λC:uniform_space.λa:sequence C.∀U.us_unifbase C U →
63 ∃n. ∀i,j. n ≤ i → n ≤ j → U 〈a i,a j〉.
65 notation < "a \nbsp 'is_cauchy'" non associative with precedence 45
67 notation > "a 'is_cauchy'" non associative with precedence 45
69 interpretation "Cauchy sequence" 'cauchy s = (cauchy _ s).
72 definition uniform_converge ≝
73 λC:uniform_space.λa:sequence C.λu:C.
74 ∀U.us_unifbase C U → ∃n. ∀i. n ≤ i → U 〈u,a i〉.
76 notation < "a \nbsp (\u \atop (\horbar\triangleright)) \nbsp x" non associative with precedence 45
77 for @{'uniform_converge $a $x}.
78 notation > "a 'uniform_converges' x" non associative with precedence 45
79 for @{'uniform_converge $a $x}.
80 interpretation "Uniform convergence" 'uniform_converge s u =
81 (uniform_converge _ s u).
84 lemma uniform_converge_is_cauchy :
85 ∀C:uniform_space.∀a:sequence C.∀x:C.
86 a uniform_converges x → a is_cauchy.
87 intros (C a x Ha); intros 2 (u Hu);
88 cases (us_phi3 ?? Hu) (v Hv0); cases Hv0 (Hv H); clear Hv0;
89 cases (Ha ? Hv) (n Hn); exists [apply n]; intros;
90 apply H; unfold; exists [apply x]; split [2: apply (Hn ? H2)]
91 cases (us_phi4 ?? Hv 〈a i,x〉) (P1 P2); apply P2;