]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/contribs/PREDICATIVE-TOPOLOGY/subset_defs.ma
ocaml 3.09 transition
[helm.git] / helm / matita / contribs / PREDICATIVE-TOPOLOGY / subset_defs.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 set "baseuri" "cic:/matita/PREDICATIVE-TOPOLOGY/subset_defs".
16
17 include "domain_defs.ma".
18
19 (* SUBSETS
20    - We use predicative subsets coded as propositional functions
21      according to G.Sambin and S.Valentini "Toolbox" 
22 *)
23
24 definition Subset \def \lambda (D:Domain). D \to Prop.
25
26 (* subset membership (epsilon) *)
27 definition sin : \forall D. Subset D \to D \to Prop \def
28    \lambda (D:Domain). \lambda U,d. cin D d \and U d.
29
30 (* subset top (full subset) *)
31 definition stop \def \lambda (D:Domain). true_f D.
32
33 (* subset bottom (empty subset) *)
34 definition sbot \def \lambda (D:Domain). false_f D.
35
36 (* subset and (binary intersection) *)
37 definition sand: \forall D. Subset D \to Subset D \to Subset D \def 
38    \lambda D,U1,U2,d. U1 d \land U2 d. 
39
40 (* subset or (binary union) *)
41 definition sor: \forall D. Subset D \to Subset D \to Subset D \def 
42    \lambda D,U1,U2,d. U1 d \lor U2 d. 
43
44 (* subset less or equal (inclusion) *) 
45 definition sle: \forall D. Subset D \to Subset D \to Prop \def 
46    \lambda D,U1,U2. \iforall d. U1 d \to U2 d. 
47
48 (* subset overlap *) 
49 definition sover: \forall D. Subset D \to Subset D \to Prop \def 
50    \lambda D,U1,U2. \iexists d. U1 d \land U2 d. 
51
52 (* coercions **************************************************************)
53
54 (* the class of the subsets of a domain (not an implicit coercion) *)
55 definition class_of_subsets_of \def
56    \lambda D. mk_Class (Subset D) (true_f ?) (sle ?). 
57
58 (* the domain built upon a subset *)
59 definition domain_of_subset: \forall D. (Subset D) \to Domain \def
60    \lambda (D:Domain). \lambda U. 
61    mk_Domain (mk_Class D (sin D U) (cle1 D)).
62
63 coercion domain_of_subset.   
64
65 (* the full subset of a domain *)
66 coercion stop.