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 "datatypes/subsets.ma".
17 record axiom_set : Type ≝ {
20 C: ∀a:A. i a → Ω \sup A
23 inductive for_all (A: axiom_set) (U,V: Ω \sup A) (covers: A → CProp) : CProp ≝
24 iter: (∀a:A.a ∈ V → covers a) → for_all A U V covers.
26 inductive covers (A: axiom_set) (U: \Omega \sup A) : A → CProp ≝
27 refl: ∀a:A. a ∈ U → covers A U a
28 | infinity: ∀a:A. ∀j: i ? a. for_all A U (C ? a j) (covers A U) → covers A U a.
30 notation "hvbox(a break ◃ b)" non associative with precedence 45
31 for @{ 'covers $a $b }. (* a \ltri b *)
33 interpretation "coversl" 'covers A U = (for_all _ U A (covers _ U)).
34 interpretation "covers" 'covers a U = (covers _ U a).
36 definition covers_elim ≝
37 λA:axiom_set.λU: \Omega \sup A.λP:\Omega \sup A.
39 λH2:∀a:A.∀j:i ? a. C ? a j ◃ U → C ? a j ⊆ P → a ∈ P.
40 let rec aux (a:A) (p:a ◃ U) on p : a ∈ P ≝
41 match p return λaa.λ_:aa ◃ U.aa ∈ P with
45 match q return λ_:(C ? a j) ◃ U. C ? a j ⊆ P with
46 [ iter f ⇒ λb.λr. aux b (f b r) ]]
50 inductive ex_such (A : axiom_set) (U,V : \Omega \sup A) (fish: A → CProp) : CProp ≝
51 found : ∀a. a ∈ V → fish a → ex_such A U V fish.
53 coinductive fish (A:axiom_set) (U: \Omega \sup A) : A → CProp ≝
54 mk_fish: ∀a:A. a ∈ U → (∀j: i ? a. ex_such A U (C ? a j) (fish A U)) → fish A U a.
56 notation "hvbox(a break ⋉ b)" non associative with precedence 45
57 for @{ 'fish $a $b }. (* a \ltimes b *)
59 interpretation "fishl" 'fish A U = (ex_such _ U A (fish _ U)).
60 interpretation "fish" 'fish a U = (fish _ U a).
62 let corec fish_rec (A:axiom_set) (U: \Omega \sup A)
63 (P: Ω \sup A) (H1: P ⊆ U)
64 (H2: ∀a:A. a ∈ P → ∀j: i ? a. C ? a j ≬ P):
65 ∀a:A. ∀p: a ∈ P. a ⋉ U ≝
71 [ ex_introT2 (y: A) (HyC : y ∈ C ? a j) (HyP : y ∈ P) ⇒
72 found ???? y HyC (fish_rec A U P H1 H2 y HyP)
75 theorem reflexivity: ∀A:axiom_set.∀a:A.∀V. a ∈ V → a ◃ V.
81 theorem transitivity: ∀A:axiom_set.∀a:A.∀U,V. a ◃ U → U ◃ V → a ◃ V.
83 apply (covers_elim ?? {a | a ◃ V} ??? H); simplify; intros;
84 [ cases H1 in H2; apply H2;
91 theorem coreflexivity: ∀A:axiom_set.∀a:A.∀V. a ⋉ V → a ∈ V.
97 theorem cotransitivity:
98 ∀A:axiom_set.∀a:A.∀U,V. a ⋉ U → (∀b:A. b ⋉ U → b ∈ V) → a ⋉ V.
100 apply (fish_rec ?? {a|a ⋉ U} ??? H); simplify; intros;
101 [ apply H1; apply H2;
102 | cases H2 in j; clear H2; intro i;
103 cases (H4 i); clear H4; exists[apply a3] assumption]
106 theorem compatibility: ∀A:axiom_set.∀a:A.∀U,V. a ⋉ V → a ◃ U → U ⋉ V.
108 generalize in match H; clear H;
109 apply (covers_elim ?? {a|a ⋉ V → U ⋉ V} ??? H1);
110 clear H1; simplify; intros;
111 [ exists [apply a1] assumption
112 | cases H2 in j H H1; clear H2 a1; intros;
113 cases (H1 i); clear H1; apply (H3 a1); assumption]
116 definition leq ≝ λA:axiom_set.λa,b:A. a ◃ {b}.
118 interpretation "covered by one" 'leq a b = (leq _ a b).
120 theorem leq_refl: ∀A:axiom_set.∀a:A. a ≤ a.
127 theorem leq_trans: ∀A:axiom_set.∀a,b,c:A. a ≤ b → b ≤ c → a ≤ c.
130 apply (transitivity ???? H);
138 definition uparrow ≝ λA:axiom_set.λa:A.mk_powerset ? (λb:A. a ≤ b).
140 notation "↑a" with precedence 80 for @{ 'uparrow $a }.
142 interpretation "uparrow" 'uparrow a = (uparrow _ a).
144 definition downarrow ≝ λA:axiom_set.λU:Ω \sup A.mk_powerset ? (λa:A. ↑a ≬ U).
146 notation "↓a" with precedence 80 for @{ 'downarrow $a }.
148 interpretation "downarrow" 'downarrow a = (downarrow _ a).
150 definition fintersects ≝ λA:axiom_set.λU,V:Ω \sup A.↓U ∩ ↓V.
152 notation "hvbox(U break ↓ V)" non associative with precedence 80 for @{ 'fintersects $U $V }.
154 interpretation "fintersects" 'fintersects U V = (fintersects _ U V).
156 record convergent_generated_topology : Type ≝
158 convergence: ∀a:AA.∀U,V:Ω \sup AA. a ◃ U → a ◃ V → a ◃ U ↓ V