]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/lib/basics/core_notation.ma
propagating the arithmetics library, partial commit
[helm.git] / matita / matita / lib / basics / core_notation.ma
index cdb49737164e1264fc8f67bf74f683f107abda6d..54bfd22d512e7917f7102f9c5f7ee165f2695e0c 100644 (file)
@@ -27,6 +27,14 @@ notation > "\exists list1 ident x sep , opt (: T). term 19 Px"
           @{ ${ fold right @{$Px} rec acc @{'exists (λ${ident x}.$acc)} } }
        }.
 
+notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'exists2 (λ${ident x0}.$P0) (λ${ident x0}.$P1) }.
+
+notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1)"
+ non associative with precedence 20
+ for @{ 'exists2 (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) }.
+
 (* sigma ********************************************************************)
 
 notation < "hvbox(\Sigma ident i : ty break . p)"
@@ -52,6 +60,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)" 
@@ -70,10 +109,7 @@ notation < "hvbox(term 46 n break ≅ \sub p term 46 m)"
   non associative with precedence 45
 for @{ 'congruent $n $m $p }.
 
-(* other notations **********************************************************)
-
-notation "hvbox(\langle term 19 a, break term 19 b\rangle)" 
-with precedence 90 for @{ 'pair $a $b}.
+(* pairs, projections *******************************************************)
 
 notation "hvbox(x break \times y)" with precedence 70
 for @{ 'product $x $y}.
@@ -87,6 +123,8 @@ notation < "\snd \nbsp term 90 x \nbsp term 90 y" with precedence 69 for @{'pi2b
 notation > "\fst" with precedence 90 for @{'pi1}.
 notation > "\snd" with precedence 90 for @{'pi2}.
 
+(* implication **************************************************************)
+
 notation "hvbox(a break \to b)" 
   right associative with precedence 20
 for @{ \forall $_:$a.$b }.
@@ -95,6 +133,8 @@ notation < "hvbox(a break \to b)"
   right associative with precedence 20
 for @{ \Pi $_:$a.$b }.
 
+(* orders *******************************************************************)
+
 notation "hvbox(a break \leq b)" 
   non associative with precedence 45
 for @{ 'leq $a $b }.
@@ -111,6 +151,8 @@ notation "hvbox(a break \gt b)"
   non associative with precedence 45
 for @{ 'gt $a $b }.
 
+(* negated equality *********************************************************)
+
 notation > "hvbox(a break \neq b)" 
   non associative with precedence 45
 for @{ 'neq ? $a $b }.
@@ -119,6 +161,8 @@ notation < "hvbox(a break maction (\neq) (\neq\sub t) b)"
   non associative with precedence 45
 for @{ 'neq $t $a $b }.
 
+(* negated orders ***********************************************************)
+
 notation "hvbox(a break \nleq b)" 
   non associative with precedence 45
 for @{ 'nleq $a $b }.
@@ -135,6 +179,8 @@ notation "hvbox(a break \ngtr b)"
   non associative with precedence 45
 for @{ 'ngtr $a $b }.
 
+(* divides, negated divides *************************************************)
+
 notation "hvbox(a break \divides b)"
   non associative with precedence 45
 for @{ 'divides $a $b }.
@@ -143,24 +189,26 @@ notation "hvbox(a break \ndivides b)"
   non associative with precedence 45
 for @{ 'ndivides $a $b }.
 
+(* arithmetics **************************************************************)
+
 notation "hvbox(a break + b)" 
-  left associative with precedence 50
+  left associative with precedence 55
 for @{ 'plus $a $b }.
 
 notation "hvbox(a break - b)" 
-  left associative with precedence 50
+  left associative with precedence 55
 for @{ 'minus $a $b }.
 
 notation "hvbox(a break * b)" 
-  left associative with precedence 55
+  left associative with precedence 60
 for @{ 'times $a $b }.
 
 notation "hvbox(a break \middot b)" 
-  left associative with precedence 55
+  left associative with precedence 60
   for @{ 'middot $a $b }.
 
 notation "hvbox(a break \mod b)" 
-  left associative with precedence 55
+  left associative with precedence 60
 for @{ 'module $a $b }.
 
 notation < "a \frac b" 
@@ -168,24 +216,22 @@ notation < "a \frac b"
 for @{ 'divide $a $b }.
 
 notation "a \over b" 
-  left associative with precedence 55
+  left associative with precedence 60
 for @{ 'divide $a $b }.
 
 notation "hvbox(a break / b)" 
-  left associative with precedence 55
+  left associative with precedence 60
 for @{ 'divide $a $b }.
 
-notation "- term 60 a" with precedence 60 
+notation "- term 65 a" with precedence 65 
 for @{ 'uminus $a }.
 
-notation "a !"
-  non associative with precedence 80
-for @{ 'fact $a }.
-
 notation "\sqrt a" 
-  non associative with precedence 60
+  non associative with precedence 65
 for @{ 'sqrt $a }.
 
+(* logical connectives ******************************************************)
+
 notation "hvbox(a break \lor b)" 
   left associative with precedence 30
 for @{ 'or $a $b }.
@@ -206,66 +252,30 @@ notation "hvbox(a break \leftrightarrow b)"
   left associative with precedence 25
 for @{ 'iff $a $b }.
 
+(* subsets ******************************************************************)
 
 notation "hvbox(\Omega \sup term 90 A)" non associative with precedence 90
 for @{ 'powerset $A }.
+
 notation > "hvbox(\Omega ^ term 90 A)" non associative with precedence 90
 for @{ 'powerset $A }.
 
-notation < "hvbox({ ident i | term 19 p })" with precedence 90
-for @{ 'subset (\lambda ${ident i} : $nonexistent . $p)}.
-
-notation > "hvbox({ ident i | term 19 p })" with precedence 90
-for @{ 'subset (\lambda ${ident i}. $p)}.
-
-notation < "hvbox({ ident i ∈ s | term 19 p })" with precedence 90
-for @{ 'comprehension $s (\lambda ${ident i} : $nonexistent . $p)}.
-
-notation > "hvbox({ ident i ∈ s | term 19 p })" with precedence 90
-for @{ 'comprehension $s (\lambda ${ident i}. $p)}.
-
 notation "hvbox(a break ∈ b)" non associative with precedence 45
 for @{ 'mem $a $b }.
 
+notation "hvbox(a break ∉ b)" non associative with precedence 45
+for @{ 'notmem $a $b }.
+
 notation "hvbox(a break ≬ b)" non associative with precedence 45
 for @{ 'overlaps $a $b }. (* \between *)
 
-notation "hvbox(a break ⊆ b)" non associative with precedence 45
-for @{ 'subseteq $a $b }. (* \subseteq *)
-
-notation "hvbox(a break ∩ b)" left associative with precedence 55
+notation "hvbox(a break ∩ b)" left associative with precedence 60
 for @{ 'intersects $a $b }. (* \cap *)
 
-notation "hvbox(a break ∪ b)" left associative with precedence 50
+notation "hvbox(a break ∪ b)" left associative with precedence 55
 for @{ 'union $a $b }. (* \cup *)
 
-notation "hvbox({ term 19 a })" with precedence 90 for @{ 'singl $a}.
-
-notation "hvbox(a break \approx b)" non associative with precedence 45 
-  for @{ 'napart $a $b}.
-        
-notation "hvbox(a break # b)" non associative with precedence 45 
-  for @{ 'apart $a $b}.
-    
-notation "hvbox(a break \circ b)" 
-  left associative with precedence 55
-for @{ 'compose $a $b }.
-
-notation < "↓ \ensp a" with precedence 55 for @{ 'downarrow $a }.
-notation > "↓ a" with precedence 55 for @{ 'downarrow $a }.
-
-notation "hvbox(U break ↓ V)" non associative with precedence 55 for @{ 'fintersects $U $V }.
-
-notation "↑a" with precedence 55 for @{ 'uparrow $a }.
-
-notation "hvbox(a break ↑ b)" with precedence 55 for @{ 'funion $a $b }.
-
-notation < "term 76 a \sup term 90 b" non associative with precedence 75 for @{ 'exp $a $b}.
-notation > "a \sup term 90 b" non associative with precedence 75 for @{ 'exp $a $b}.
-notation > "a ^ term 90 b"  non associative with precedence 75 for @{ 'exp $a $b}.
-notation "s \sup (-1)" non associative with precedence 75 for @{ 'invert $s }.
-notation > "s ^ (-1)" non associative with precedence 75 for @{ 'invert $s }.
-notation < "s \sup (-1) x" non associative with precedence 90 for @{ 'invert_appl $s $x}. 
+(* other notations **********************************************************)
 
 notation "| term 19 C |" with precedence 70 for @{ 'card $C }.
 
@@ -280,8 +290,8 @@ notation "\ee" with precedence 90 for @{ 'neutral }. (* ⅇ *)
 notation > "x ⊩ y" with precedence 45 for @{'Vdash2 $x $y ?}.
 notation > "x ⊩⎽ term 90 c y" with precedence 45 for @{'Vdash2 $x $y $c}.
 notation "x (⊩ \sub term 90 c) y" with precedence 45 for @{'Vdash2 $x $y $c}.
-notation > "⊩ " with precedence 60 for @{'Vdash ?}.
-notation "(⊩ \sub term 90 c) " with precedence 60 for @{'Vdash $c}.
+notation > "⊩ " with precedence 65 for @{'Vdash ?}.
+notation "(⊩ \sub term 90 c) " with precedence 65 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}.