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 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;]]
28 definition subset ≝ λO:bishop_set.λP,Q:O→Prop.∀x:O.P x → Q x.
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).
34 notation "hvbox({ ident x : t | break p })" non associative with precedence 80
35 for @{ 'explicitset (\lambda ${ident x} : $t . $p) }.
36 definition mk_set ≝ λT:bishop_set.λx:T→Prop.x.
37 interpretation "explicit set" 'explicitset t = (mk_set _ t).
39 notation < "s 2 \atop \neq" non associative with precedence 90
41 notation > "s 'square'" non associative with precedence 90
43 interpretation "bishop set square" 'square x = (square_bishop_set x).
44 interpretation "bishop set square" 'square2 x = (square_bishop_set x).
47 alias symbol "exists" = "exists".
48 alias symbol "and" = "logical and".
49 definition compose_relations ≝
50 λC:bishop_set.λU,V:C square → Prop.
51 λx:C square.∃y:C. U 〈fst x,y〉 ∧ V 〈y,snd x〉.
53 notation "a \circ b" left associative with precedence 60
54 for @{'compose $a $b}.
55 interpretation "relations composition" 'compose a b = (compose_relations _ a b).
56 notation "hvbox(x \in break a \circ break b)" non associative with precedence 50
57 for @{'compose2 $a $b $x}.
58 interpretation "relations composition" 'compose2 a b x =
59 (compose_relations _ a b x).
61 definition invert_relation ≝
62 λC:bishop_set.λU:C square → Prop.
63 λx:C square. U 〈snd x,fst x〉.
65 notation < "s \sup (-1)" non associative with precedence 90
67 notation < "s \sup (-1) x" non associative with precedence 90
68 for @{ 'invert2 $s $x}.
69 notation > "'inv' s" non associative with precedence 90
71 interpretation "relation invertion" 'invert a = (invert_relation _ a).
72 interpretation "relation invertion" 'invert2 a x = (invert_relation _ a x).
74 alias symbol "exists" = "CProp exists".
75 alias symbol "and" (instance 18) = "constructive and".
76 alias symbol "and" (instance 10) = "constructive and".
77 record uniform_space : Type ≝ {
79 us_unifbase: (us_carr square → Prop) → CProp;
80 us_phi1: ∀U:us_carr square → Prop. us_unifbase U →
81 {x:us_carr square|fst x ≈ snd x} ⊆ U;
82 us_phi2: ∀U,V:us_carr square → Prop. us_unifbase U → us_unifbase V →
83 ∃W:us_carr square → Prop.us_unifbase W ∧ (W ⊆ {x:?|U x ∧ V x});
84 us_phi3: ∀U:us_carr square → Prop. us_unifbase U →
85 ∃W:us_carr square → Prop.us_unifbase W ∧ (W ∘ W) ⊆ U;
86 us_phi4: ∀U:us_carr square → Prop. us_unifbase U → ∀x.(U x → (inv U) x) ∧ ((inv U) x → U x)
90 alias symbol "leq" = "natural 'less or equal to'".
92 λC:uniform_space.λa:sequence C.∀U.us_unifbase C U →
93 ∃n. ∀i,j. n ≤ i → n ≤ j → U 〈a i,a j〉.
95 notation < "a \nbsp 'is_cauchy'" non associative with precedence 50
97 notation > "a 'is_cauchy'" non associative with precedence 50
99 interpretation "Cauchy sequence" 'cauchy s = (cauchy _ s).
101 (* Definition 2.15 *)
102 definition uniform_converge ≝
103 λC:uniform_space.λa:sequence C.λu:C.
104 ∀U.us_unifbase C U → ∃n. ∀i. n ≤ i → U 〈u,a i〉.
106 notation < "a \nbsp (\u \atop (\horbar\triangleright)) \nbsp x" non associative with precedence 50
107 for @{'uniform_converge $a $x}.
108 notation > "a 'uniform_converges' x" non associative with precedence 50
109 for @{'uniform_converge $a $x}.
110 interpretation "Uniform convergence" 'uniform_converge s u =
111 (uniform_converge _ s u).
114 lemma uniform_converge_is_cauchy :
115 ∀C:uniform_space.∀a:sequence C.∀x:C.
116 a uniform_converges x → a is_cauchy.
117 intros (C a x Ha); intros 2 (u Hu);
118 cases (us_phi3 ?? Hu) (v Hv0); cases Hv0 (Hv H); clear Hv0;
119 cases (Ha ? Hv) (n Hn); exists [apply n]; intros;
120 apply H; unfold; exists [apply x]; split [2: apply (Hn ? H2)]
121 cases (us_phi4 ?? Hv 〈a i,x〉) (P1 P2); apply P2;
125 (* Definition 2.17 *)
126 definition mk_big_set ≝
127 λP:CProp.λF:P→CProp.F.
128 interpretation "explicit big set" 'explicitset t = (mk_big_set _ t).
130 definition restrict_uniformity ≝
131 λC:uniform_space.λX:C→Prop.
132 {U:C square → Prop| (U ⊆ {x:C square|X (fst x) ∧ X(snd x)}) ∧ us_unifbase C U}.