From: Claudio Sacerdoti Coen Date: Wed, 14 Dec 2011 12:18:07 +0000 (+0000) Subject: 1) Notation for dependent pairs differentiated from that for sigma types. X-Git-Tag: make_still_working~2007 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=c9c6cae5121a25b05450ea42578f14f74569cfbf;p=helm.git 1) Notation for dependent pairs differentiated from that for sigma types. 2) Russell now works directly on mk_Sig/pi1 --- diff --git a/matita/matita/lib/basics/core_notation.ma b/matita/matita/lib/basics/core_notation.ma index cdb497371..4eae6c6c3 100644 --- a/matita/matita/lib/basics/core_notation.ma +++ b/matita/matita/lib/basics/core_notation.ma @@ -52,6 +52,37 @@ notation > "\Sigma list1 ident x sep , opt (: T). term 19 Px" @{ ${ fold right @{$Px} rec acc @{'sigma (λ${ident x}.$acc)} } } }. +notation "hvbox(« term 19 a, break term 19 b»)" +with precedence 90 for @{ 'dp $a $b }. + +(* dependent pairs (i.e. Sigma with predicate in Type[0]) ********************) + +notation < "hvbox(𝚺 ident i : ty break . p)" + left associative with precedence 20 +for @{'dpair (\lambda ${ident i} : $ty. $p) }. + +notation < "hvbox(𝚺 ident i break . p)" + with precedence 20 +for @{'dpair (\lambda ${ident i}. $p) }. + +(* +notation < "hvbox(𝚺 ident i opt (: ty) break . p)" + right associative with precedence 20 +for @{ 'dpair ${default + @{\lambda ${ident i} : $ty. $p} + @{\lambda ${ident i} . $p}}}. +*) + +notation > "𝚺 list1 ident x sep , opt (: T). term 19 Px" + with precedence 20 + for ${ default + @{ ${ fold right @{$Px} rec acc @{'dpair (λ${ident x}:$T.$acc)} } } + @{ ${ fold right @{$Px} rec acc @{'dpair (λ${ident x}.$acc)} } } + }. + +notation "hvbox(❬ term 19 a, break term 19 b❭)" +with precedence 90 for @{ 'mk_DPair $a $b }. + (* equality, conguence ******************************************************) notation > "hvbox(a break = b)" @@ -284,4 +315,4 @@ notation > "⊩ " with precedence 60 for @{'Vdash ?}. notation "(⊩ \sub term 90 c) " with precedence 60 for @{'Vdash $c}. notation < "maction (mstyle color #ff0000 (­…­)) (t)" -non associative with precedence 90 for @{'hide $t}. \ No newline at end of file +non associative with precedence 90 for @{'hide $t}. diff --git a/matita/matita/lib/basics/russell.ma b/matita/matita/lib/basics/russell.ma index 71cc59fcd..0769ca59f 100644 --- a/matita/matita/lib/basics/russell.ma +++ b/matita/matita/lib/basics/russell.ma @@ -12,5 +12,5 @@ include "basics/jmeq.ma". include "basics/types.ma". -coercion inject nocomposites: ∀A.∀P:A → Prop.∀a.∀p:P a.Σx:A.P x ≝ λA,P,a,p. mk_Sig … a p on a:? to Σx:?.?. -coercion eject nocomposites: ∀A.∀P:A → Prop.∀c:Σx:A.P x.A ≝ λA,P,c. pi1 … c on _c:Σx:?.? to ?. +coercion inject nocomposites: ∀A.∀P:A → Prop.∀a.∀p:P a.Sig A P ≝ mk_Sig on a:? to Sig ??. +coercion eject nocomposites: ∀A.∀P:A → Prop.∀c:Sig A P.A ≝ pi1 on _c:Sig ?? to ?. diff --git a/matita/matita/lib/basics/types.ma b/matita/matita/lib/basics/types.ma index 1d3883048..d093202b1 100644 --- a/matita/matita/lib/basics/types.ma +++ b/matita/matita/lib/basics/types.ma @@ -61,12 +61,9 @@ record DPair (A:Type[0]) (f:A→Type[0]) : Type[0] ≝ { ; dpi2: f dpi1 }. -interpretation "DPair" 'sigma x = (DPair ? x). +interpretation "DPair" 'dpair x = (DPair ? x). -notation "hvbox(« term 19 a, break term 19 b»)" -with precedence 90 for @{ 'dp $a $b }. - -interpretation "mk_DPair" 'dp x y = (mk_DPair ?? x y). +interpretation "mk_DPair" 'mk_DPair x y = (mk_DPair ?? x y). (* sigma *) record Sig (A:Type[0]) (f:A→Prop) : Type[0] ≝ {