]> matita.cs.unibo.it Git - helm.git/blob - weblib/basics/core_notation.ma
12c1a6d7e224ebff92142356b998d81b8e36e8ce
[helm.git] / weblib / basics / core_notation.ma
1 (* exists *******************************************************************)
2
3 notation "hvbox(∃ _ break . p)"
4  with precedence 20
5 for @{'exists $p }. 
6
7 notation < "hvbox(\exists ident i : ty break . p)"
8  right associative with precedence 20
9 for @{'exists (\lambda ${ident i} : $ty. $p) }.
10
11 notation < "hvbox(\exists ident i break . p)"
12   with precedence 20
13 for @{'exists (\lambda ${ident i}. $p) }.
14
15 (*
16 notation < "hvbox(\exists ident i opt (: ty) break . p)"
17   right associative with precedence 20
18 for @{ 'exists ${default
19   @{\lambda ${ident i} : $ty. $p}
20   @{\lambda ${ident i} . $p}}}.
21 *)
22
23 notation > "\exists list1 ident x sep , opt (: T). term 19 Px"
24   with precedence 20
25   for ${ default
26           @{ ${ fold right @{$Px} rec acc @{'exists (λ${ident x}:$T.$acc)} } }
27           @{ ${ fold right @{$Px} rec acc @{'exists (λ${ident x}.$acc)} } }
28        }.
29
30 (* sigma ********************************************************************)
31
32 notation < "hvbox(\Sigma ident i : ty break . p)"
33  left associative with precedence 20
34 for @{'sigma (\lambda ${ident i} : $ty. $p) }.
35
36 notation < "hvbox(\Sigma ident i break . p)"
37  with precedence 20
38 for @{'sigma (\lambda ${ident i}. $p) }.
39
40 (*
41 notation < "hvbox(\Sigma ident i opt (: ty) break . p)"
42   right associative with precedence 20
43 for @{ 'sigma ${default
44   @{\lambda ${ident i} : $ty. $p}
45   @{\lambda ${ident i} . $p}}}.
46 *)
47
48 notation > "\Sigma list1 ident x sep , opt (: T). term 19 Px"
49   with precedence 20
50   for ${ default
51           @{ ${ fold right @{$Px} rec acc @{'sigma (λ${ident x}:$T.$acc)} } }
52           @{ ${ fold right @{$Px} rec acc @{'sigma (λ${ident x}.$acc)} } }
53        }.
54
55 (* equality, conguence ******************************************************)
56
57 notation > "hvbox(a break = b)" 
58   non associative with precedence 45
59 for @{ 'eq ? $a $b }.
60
61 notation < "hvbox(term 46 a break maction (=) (=\sub t) term 46 b)" 
62   non associative with precedence 45
63 for @{ 'eq $t $a $b }.
64
65 notation > "hvbox(n break (≅ \sub term 90 p) m)"
66   non associative with precedence 45
67 for @{ 'congruent $n $m $p }.
68
69 notation < "hvbox(term 46 n break ≅ \sub p term 46 m)"
70   non associative with precedence 45
71 for @{ 'congruent $n $m $p }.
72
73 (* other notations **********************************************************)
74
75 notation "hvbox(\langle term 19 a, break term 19 b\rangle)" 
76 with precedence 90 for @{ 'pair $a $b}.
77 notation "hvbox(〈term 19 a, break term 19 b〉)"
78 with precedence 90 for @{ 'pair $a $b}.
79
80 notation "hvbox(x break \times y)" with precedence 70
81 for @{ 'product $x $y}.
82
83 notation < "\fst \nbsp term 90 x" with precedence 69 for @{'pi1a $x}.
84 notation < "\snd \nbsp term 90 x" with precedence 69 for @{'pi2a $x}.
85
86 notation < "\fst \nbsp term 90 x \nbsp term 90 y" with precedence 69 for @{'pi1b $x $y}.
87 notation < "\snd \nbsp term 90 x \nbsp term 90 y" with precedence 69 for @{'pi2b $x $y}.
88
89 notation > "\fst" with precedence 90 for @{'pi1}.
90 notation > "\snd" with precedence 90 for @{'pi2}.
91
92 notation "hvbox(a break \to b)" 
93   right associative with precedence 20
94 for @{ \forall $_:$a.$b }.
95
96 notation < "hvbox(a break \to b)" 
97   right associative with precedence 20
98 for @{ \Pi $_:$a.$b }.
99
100 notation "hvbox(a break \leq b)" 
101   non associative with precedence 45
102 for @{ 'leq $a $b }.
103
104 notation "hvbox(a break \geq b)" 
105   non associative with precedence 45
106 for @{ 'geq $a $b }.
107
108 notation "hvbox(a break \lt b)" 
109   non associative with precedence 45
110 for @{ 'lt $a $b }.
111
112 notation "hvbox(a break \gt b)" 
113   non associative with precedence 45
114 for @{ 'gt $a $b }.
115
116 notation > "hvbox(a break \neq b)" 
117   non associative with precedence 45
118 for @{ 'neq ? $a $b }.
119
120 notation < "hvbox(a break maction (\neq) (\neq\sub t) b)" 
121   non associative with precedence 45
122 for @{ 'neq $t $a $b }.
123
124 notation "hvbox(a break \nleq b)" 
125   non associative with precedence 45
126 for @{ 'nleq $a $b }.
127
128 notation "hvbox(a break \ngeq b)" 
129   non associative with precedence 45
130 for @{ 'ngeq $a $b }.
131
132 notation "hvbox(a break \nless b)" 
133   non associative with precedence 45
134 for @{ 'nless $a $b }.
135
136 notation "hvbox(a break \ngtr b)" 
137   non associative with precedence 45
138 for @{ 'ngtr $a $b }.
139
140 notation "hvbox(a break \divides b)"
141   non associative with precedence 45
142 for @{ 'divides $a $b }.
143
144 notation "hvbox(a break \ndivides b)"
145   non associative with precedence 45
146 for @{ 'ndivides $a $b }.
147
148 notation "hvbox(a break + b)" 
149   left associative with precedence 50
150 for @{ 'plus $a $b }.
151
152 notation "hvbox(a break - b)" 
153   left associative with precedence 50
154 for @{ 'minus $a $b }.
155
156 notation "hvbox(a break * b)" 
157   left associative with precedence 55
158 for @{ 'times $a $b }.
159
160 notation "hvbox(a break \middot b)" 
161   left associative with precedence 55
162   for @{ 'middot $a $b }.
163
164 notation "hvbox(a break \mod b)" 
165   left associative with precedence 55
166 for @{ 'module $a $b }.
167
168 notation < "a \frac b" 
169   non associative with precedence 90
170 for @{ 'divide $a $b }.
171
172 notation "a \over b" 
173   left associative with precedence 55
174 for @{ 'divide $a $b }.
175
176 notation "hvbox(a break / b)" 
177   left associative with precedence 55
178 for @{ 'divide $a $b }.
179
180 notation "- term 60 a" with precedence 60 
181 for @{ 'uminus $a }.
182
183 notation "a !"
184   non associative with precedence 80
185 for @{ 'fact $a }.
186
187 notation "\sqrt a" 
188   non associative with precedence 60
189 for @{ 'sqrt $a }.
190
191 notation "hvbox(a break \lor b)" 
192   left associative with precedence 30
193 for @{ 'or $a $b }.
194
195 notation "hvbox(a break \land b)" 
196   left associative with precedence 35
197 for @{ 'and $a $b }.
198
199 notation "hvbox(\lnot a)" 
200   non associative with precedence 40
201 for @{ 'not $a }.
202
203 notation > "hvbox(a break \liff b)" 
204   left associative with precedence 25
205 for @{ 'iff $a $b }.
206
207 notation "hvbox(a break \leftrightarrow b)" 
208   left associative with precedence 25
209 for @{ 'iff $a $b }.
210
211
212 notation "hvbox(\Omega \sup term 90 A)" non associative with precedence 90
213 for @{ 'powerset $A }.
214 notation > "hvbox(\Omega ^ term 90 A)" non associative with precedence 90
215 for @{ 'powerset $A }.
216
217 notation < "hvbox({ ident i | term 19 p })" with precedence 90
218 for @{ 'subset (\lambda ${ident i} : $nonexistent . $p)}.
219
220 notation > "hvbox({ ident i | term 19 p })" with precedence 90
221 for @{ 'subset (\lambda ${ident i}. $p)}.
222
223 notation < "hvbox({ ident i ∈ s | term 19 p })" with precedence 90
224 for @{ 'comprehension $s (\lambda ${ident i} : $nonexistent . $p)}.
225
226 notation > "hvbox({ ident i ∈ s | term 19 p })" with precedence 90
227 for @{ 'comprehension $s (\lambda ${ident i}. $p)}.
228
229 notation "hvbox(a break ∈ b)" non associative with precedence 45
230 for @{ 'mem $a $b }.
231
232 notation "hvbox(a break ≬ b)" non associative with precedence 45
233 for @{ 'overlaps $a $b }. (* \between *)
234
235 notation "hvbox(a break ⊆ b)" non associative with precedence 45
236 for @{ 'subseteq $a $b }. (* \subseteq *)
237
238 notation "hvbox(a break ∩ b)" left associative with precedence 55
239 for @{ 'intersects $a $b }. (* \cap *)
240
241 notation "hvbox(a break ∪ b)" left associative with precedence 50
242 for @{ 'union $a $b }. (* \cup *)
243
244 notation "hvbox({ term 19 a })" with precedence 90 for @{ 'singl $a}.
245
246 notation "hvbox(a break \approx b)" non associative with precedence 45 
247   for @{ 'napart $a $b}.
248         
249 notation "hvbox(a break # b)" non associative with precedence 45 
250   for @{ 'apart $a $b}.
251     
252 notation "hvbox(a break \circ b)" 
253   left associative with precedence 55
254 for @{ 'compose $a $b }.
255
256 notation < "↓ \ensp a" with precedence 55 for @{ 'downarrow $a }.
257 notation > "↓ a" with precedence 55 for @{ 'downarrow $a }.
258
259 notation "hvbox(U break ↓ V)" non associative with precedence 55 for @{ 'fintersects $U $V }.
260
261 notation "↑a" with precedence 55 for @{ 'uparrow $a }.
262
263 notation "hvbox(a break ↑ b)" with precedence 55 for @{ 'funion $a $b }.
264
265 notation < "term 76 a \sup term 90 b" non associative with precedence 75 for @{ 'exp $a $b}.
266 notation > "a \sup term 90 b" non associative with precedence 75 for @{ 'exp $a $b}.
267 notation > "a ^ term 90 b"  non associative with precedence 75 for @{ 'exp $a $b}.
268 notation "s \sup (-1)" non associative with precedence 75 for @{ 'invert $s }.
269 notation > "s ^ (-1)" non associative with precedence 75 for @{ 'invert $s }.
270 notation < "s \sup (-1) x" non associative with precedence 90 for @{ 'invert_appl $s $x}. 
271
272 notation "| term 19 C |" with precedence 70 for @{ 'card $C }.
273
274 notation "\naturals" non associative with precedence 90 for @{'N}.
275 notation "\rationals" non associative with precedence 90 for @{'Q}.
276 notation "\reals" non associative with precedence 90 for @{'R}.
277 notation "\integers" non associative with precedence 90 for @{'Z}.
278 notation "\complexes" non associative with precedence 90 for @{'C}.
279
280 notation "\ee" with precedence 90 for @{ 'neutral }. (* ⅇ *)
281
282 notation > "x ⊩ y" with precedence 45 for @{'Vdash2 $x $y ?}.
283 notation > "x ⊩⎽ term 90 c y" with precedence 45 for @{'Vdash2 $x $y $c}.
284 notation "x (⊩ \sub term 90 c) y" with precedence 45 for @{'Vdash2 $x $y $c}.
285 notation > "⊩ " with precedence 60 for @{'Vdash ?}.
286 notation "(⊩ \sub term 90 c) " with precedence 60 for @{'Vdash $c}.
287
288 notation < "maction (mstyle color #ff0000 (­…­)) (t)" 
289 non associative with precedence 90 for @{'hide $t}.