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