]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/lib/basics/core_notation.ma
1) Notation for dependent pairs differentiated from that for sigma types.
[helm.git] / matita / matita / lib / basics / core_notation.ma
index cdb49737164e1264fc8f67bf74f683f107abda6d..4eae6c6c34467f679a90cafa4f8d6fe15e601798 100644 (file)
@@ -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}.