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 "Class/defs.ma".
17 (* QUANTIFICATION DOMAINS
18 - These are the categories on which we allow quantification.
19 - We set up single quantifiers, parametric on the domain.
22 record Domain: Type ≝ {
26 (* internal universal quantification *)
27 inductive dall (D:Domain) (P:D → Prop): Prop ≝
28 | dall_intro: (∀d. cin ? d → P d) → dall D P.
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.
34 (* notations **************************************************************)
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).
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}}}.
46 notation > "\iforall list1 ident x sep , opt (: T). term 19 Px"
49 @{ ${ fold right @{$Px} rec acc @{'iforall (λ${ident x}:$T.$acc)} } }
50 @{ ${ fold right @{$Px} rec acc @{'iforall (λ${ident x}.$acc)} } }
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).
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}}}.
63 notation > "\iexists list1 ident x sep , opt (: T). term 19 Px"
66 @{ ${ fold right @{$Px} rec acc @{'iexists (λ${ident x}:$T.$acc)} } }
67 @{ ${ fold right @{$Px} rec acc @{'iexists (λ${ident x}.$acc)} } }