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 (* ********************************************************************** *)
16 (* Progetto FreeScale *)
18 (* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
19 (* Ultima modifica: 05/08/2009 *)
21 (* ********************************************************************** *)
23 (* coppia dipendente *)
25 inductive sigma (A:Type) (P:A → Type) : Type ≝
26 sigma_intro: ∀x:A.P x → sigma A P.
28 notation < "hvbox(\Sigma ident i opt (: tx) break . p)"
29 right associative with precedence 20
30 for @{ 'Sigma ${default
31 @{\lambda ${ident i} : $tx. $p}
32 @{\lambda ${ident i} . $p}}}.
34 notation > "\Sigma list1 ident x sep , opt (: T). term 19 Px"
37 @{ ${ fold right @{$Px} rec acc @{'Sigma (λ${ident x}:$T.$acc)} } }
38 @{ ${ fold right @{$Px} rec acc @{'Sigma (λ${ident x}.$acc)} } }
41 notation "\ll term 19 a, break term 19 b \gg"
42 with precedence 90 for @{'dependent_pair (λx:?.? x) $a $b}.
43 interpretation "dependent pair" 'dependent_pair \eta.c a b = (sigma_intro ? c a b).
45 interpretation "sigma" 'Sigma \eta.x = (sigma ? x).
48 λT:Type.λf:T → Type.λs:sigma T f.match s with [ sigma_intro x _ ⇒ x ].
50 λT:Type.λf:T → Type.λs:sigma T f.match s return λs.f (sigmaFst ?? s) with [ sigma_intro _ x ⇒ x ].