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 "topology/igft.ma".
17 alias symbol "covers" = "covers set".
18 alias symbol "coverage" = "coverage cover".
19 alias symbol "I" = "I".
22 (U ⊆ P) → (∀a:A.∀j:𝐈 a. 𝐂 a j ◃ U → 𝐂 a j ⊆ P → a ∈ P) →
24 #A; #U; #P; #refl; #infty; #a; #H; nelim H
25 [ nauto | #b; #j; #K1; #K2; napply (infty … j) [ nassumption | napply K2]##]
28 alias symbol "covers" = "covers".
29 alias symbol "covers" = "covers set".
30 alias symbol "covers" = "covers".
31 alias symbol "covers" = "covers set".
32 alias symbol "covers" = "covers".
34 ∀A:Ax.∀U:Ω^A.∀P:A → CProp[0].
35 (∀a. a ∈ U → P a) → (∀a:A.∀j:𝐈 a. 𝐂 a j ◃ U → (∀b. b ∈ 𝐂 a j → P b) → P a) →
38 #A; #U; #P; nletin V ≝ {x | P x}; napply (cover_ind' … V).
41 (*********** from Cantor **********)
42 ninductive eq1 (A : Type[0]) : Type[0] → CProp[0] ≝
45 notation "hvbox( a break ∼ b)" non associative with precedence 40
48 interpretation "eq between types" 'eqT a b = (eq1 a b).
50 ninductive unit : Type[0] ≝ one : unit.
52 ninductive option (A: Type[0]) : Type[0] ≝
56 nrecord uuAx : Type[1] ≝ {
58 uuC : uuS → option uuS
61 ndefinition uuax : uuAx → Ax.
63 [ #a; ncases (uuC … a) [ napply False | #_; napply unit]
64 ##| #a; ncases (uuC … a)
65 [ nnormalize; #H; napply (False_rect_Type1 … H)
66 | nnormalize; #b; #_; napply {x | x=b }]##]
69 ncoercion uuax : ∀u:uuAx. Ax ≝ uuax on _u : uuAx to Ax.
71 nlemma eq_rect_Type0_r':
72 ∀A.∀a,x.∀p:eq ? x a.∀P: ∀x:A. eq ? x a → Type[0]. P a (refl A a) → P x p.
73 #A; #a; #x; #p; ncases p; #P; #H; nassumption.
76 nlemma eq_rect_Type0_r:
77 ∀A.∀a.∀P: ∀x:A. eq ? x a → Type[0]. P a (refl A a) → ∀x.∀p:eq ? x a.P x p.
78 #A; #a; #P; #p; #x0; #p0; napply (eq_rect_Type0_r' ??? p0); nassumption.
81 ninductive bool: Type[0] ≝
85 nrecord memdec (A: Type[0]) (U:Ω^A) : Type[0] ≝
86 { decide_mem:> A → bool;
87 decide_mem_ok: ∀x. decide_mem x = true → x ∈ U;
88 decide_mem_ko: ∀x. decide_mem x = false → ¬ (x ∈ U)
91 (*********** end from Cantor ********)
93 alias symbol "covers" = "covers".
94 alias symbol "covers" = "covers".
96 (A:uuAx) (U:Ω^(uuax A)) (memdec: memdec … U) (P:uuax A → Type[0])
97 (refl: ∀a:uuax A. a ∈ U → P a)
98 (infty: ∀a:uuax A.∀i: 𝐈 a. 𝐂 a i ◃ U → (∀b. b ∈ 𝐂 a i → P b) → P a)
99 (b:uuax A) (p: b ◃ U) on p : P b
101 nlapply (decide_mem_ok … memdec b); nlapply (decide_mem_ko … memdec b);
102 ncases (decide_mem … memdec b)
103 [ #_; #H; napply refl; nauto
104 | #H; #_; ncut (uuC … b=uuC … b) [nauto] ncases (uuC … b) in ⊢ (???% → ?)
105 [ #E; napply False_rect_Type0; ncut (b=b) [nauto] ncases p in ⊢ (???% → ?)
106 [ #a; #K; #E2; napply H [ nauto | nrewrite > E2; nauto ]
107 ##| #a; #i; #K; #E2; nrewrite < E2 in i; nnormalize; nrewrite > E; nnormalize;
111 [ nlapply E; nlapply (H ?) [nauto] ncases p
112 [ #x; #Hx; #K1; #_; ncases (K1 Hx)
113 ##| #x; #i; #Hx; #K1; #E2; napply Hx; ngeneralize in match i; nnormalize;
114 nrewrite > E2; nnormalize; #_; nauto]##]
116 nlapply (infty b); nnormalize; nrewrite > E; nnormalize; #H2;
117 napply (H2 one); #y; #E2; nrewrite > E2
119 ##| napply (cover_rect A U memdec P refl infty a); napply Hcut]##]