]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/limits/Domain/defs.ma
2250e811c24615ec1c0786d5010ecd0244f02bde
[helm.git] / helm / software / matita / contribs / limits / Domain / 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 include "Class/defs.ma".
16
17 (* QUANTIFICATION DOMAINS
18    - These are the categories on which we allow quantification.
19    - We set up single quantifiers, parametric on the domain.
20 *)
21
22 record Domain: Type ≝ {
23    domain:> Class
24 }.
25
26 (* internal universal quantification *)
27 inductive dall (D:Domain) (P:D → Prop): Prop ≝
28    | dall_intro: (∀d. cin ? d → P d) → dall D P.
29
30 (* internal existential quantification *)
31 inductive dex (D:Domain) (P:D → Prop): Prop ≝
32    | dex_intro: ∀d. cin D d → P d → dex D P.
33
34 (* notations **************************************************************)
35
36 (*CSC: the URI must disappear: there is a bug now *)
37 interpretation "internal for all" 'iforall η.x =
38   (cic:/matita/limits/Domain/defs/dall.ind#xpointer(1/1) _ x).
39
40 notation < "hvbox(\iforall ident i opt (: ty) break . p)"
41   right associative with precedence 20
42 for @{ 'iforall ${default
43   @{\lambda ${ident i} : $ty. $p}
44   @{\lambda ${ident i} . $p}}}.
45
46 notation > "\iforall list1 ident x sep , opt (: T). term 19 Px"
47   with precedence 20
48 for ${ default
49   @{ ${ fold right @{$Px} rec acc @{'iforall (λ${ident x}:$T.$acc)} } }
50   @{ ${ fold right @{$Px} rec acc @{'iforall (λ${ident x}.$acc)} } }
51 }.
52
53 (*CSC: the URI must disappear: there is a bug now *)
54 interpretation "internal exists" 'iexists η.x =
55   (cic:/matita/limits/Domain/defs/dex.ind#xpointer(1/1) _ x).
56
57 notation < "hvbox(\iexists ident i opt (: ty) break . p)"
58   right associative with precedence 20
59 for @{ 'iexists ${default
60   @{\lambda ${ident i} : $ty. $p}
61   @{\lambda ${ident i} . $p}}}.
62
63 notation > "\iexists list1 ident x sep , opt (: T). term 19 Px"
64   with precedence 20
65 for ${ default
66   @{ ${ fold right @{$Px} rec acc @{'iexists (λ${ident x}:$T.$acc)} } }
67   @{ ${ fold right @{$Px} rec acc @{'iexists (λ${ident x}.$acc)} } }
68 }.