equal
deleted
inserted
replaced
103 \end{supertabular} |
103 \end{supertabular} |
104 |
104 |
105 |
105 |
106 \section{Set} |
106 \section{Set} |
107 |
107 |
108 Sets are predicates: @{text[source]"'a set = 'a \<Rightarrow> bool"} |
108 %Sets are predicates: @{text[source]"'a set = 'a \<Rightarrow> bool"} |
109 \bigskip |
109 %\bigskip |
110 |
110 |
111 \begin{supertabular}{@ {} l @ {~::~} l l @ {}} |
111 \begin{supertabular}{@ {} l @ {~::~} l l @ {}} |
112 @{const Set.empty} & @{term_type_only "Set.empty" "'a set"}\\ |
112 @{const Set.empty} & @{term_type_only "Set.empty" "'a set"}\\ |
113 @{const Set.insert} & @{term_type_only insert "'a\<Rightarrow>'a set\<Rightarrow>'a set"}\\ |
113 @{const Set.insert} & @{term_type_only insert "'a\<Rightarrow>'a set\<Rightarrow>'a set"}\\ |
114 @{const Collect} & @{term_type_only Collect "('a\<Rightarrow>bool)\<Rightarrow>'a set"}\\ |
114 @{const Collect} & @{term_type_only Collect "('a\<Rightarrow>bool)\<Rightarrow>'a set"}\\ |
234 e.g.\ \mbox{@{prop"ALL (x,y):A. P"},} @{term"{(x,y). P}"}, etc. |
234 e.g.\ \mbox{@{prop"ALL (x,y):A. P"},} @{term"{(x,y). P}"}, etc. |
235 |
235 |
236 |
236 |
237 \section{Relation} |
237 \section{Relation} |
238 |
238 |
239 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
239 \begin{tabular}{@ {} l @ {~::~} l @ {}} |
240 @{const Relation.converse} & @{term_type_only Relation.converse "('a * 'b)set \<Rightarrow> ('b*'a)set"}\\ |
240 @{const Relation.converse} & @{term_type_only Relation.converse "('a * 'b)set \<Rightarrow> ('b*'a)set"}\\ |
241 @{const Relation.rel_comp} & @{term_type_only Relation.rel_comp "('a*'b)set\<Rightarrow>('b*'c)set\<Rightarrow>('a*'c)set"}\\ |
241 @{const Relation.rel_comp} & @{term_type_only Relation.rel_comp "('a*'b)set\<Rightarrow>('b*'c)set\<Rightarrow>('a*'c)set"}\\ |
242 @{const Relation.Image} & @{term_type_only Relation.Image "('a*'b)set\<Rightarrow>'a set\<Rightarrow>'b set"}\\ |
242 @{const Relation.Image} & @{term_type_only Relation.Image "('a*'b)set\<Rightarrow>'a set\<Rightarrow>'b set"}\\ |
243 @{const Relation.inv_image} & @{term_type_only Relation.inv_image "('a*'a)set\<Rightarrow>('b\<Rightarrow>'a)\<Rightarrow>('b*'b)set"}\\ |
243 @{const Relation.inv_image} & @{term_type_only Relation.inv_image "('a*'a)set\<Rightarrow>('b\<Rightarrow>'a)\<Rightarrow>('b*'b)set"}\\ |
244 @{const Relation.Id_on} & @{term_type_only Relation.Id_on "'a set\<Rightarrow>('a*'a)set"}\\ |
244 @{const Relation.Id_on} & @{term_type_only Relation.Id_on "'a set\<Rightarrow>('a*'a)set"}\\ |
252 @{const Relation.antisym} & @{term_type_only Relation.antisym "('a*'a)set\<Rightarrow>bool"}\\ |
252 @{const Relation.antisym} & @{term_type_only Relation.antisym "('a*'a)set\<Rightarrow>bool"}\\ |
253 @{const Relation.trans} & @{term_type_only Relation.trans "('a*'a)set\<Rightarrow>bool"}\\ |
253 @{const Relation.trans} & @{term_type_only Relation.trans "('a*'a)set\<Rightarrow>bool"}\\ |
254 @{const Relation.irrefl} & @{term_type_only Relation.irrefl "('a*'a)set\<Rightarrow>bool"}\\ |
254 @{const Relation.irrefl} & @{term_type_only Relation.irrefl "('a*'a)set\<Rightarrow>bool"}\\ |
255 @{const Relation.total_on} & @{term_type_only Relation.total_on "'a set\<Rightarrow>('a*'a)set\<Rightarrow>bool"}\\ |
255 @{const Relation.total_on} & @{term_type_only Relation.total_on "'a set\<Rightarrow>('a*'a)set\<Rightarrow>bool"}\\ |
256 @{const Relation.total} & @{term_type_only Relation.total "('a*'a)set\<Rightarrow>bool"}\\ |
256 @{const Relation.total} & @{term_type_only Relation.total "('a*'a)set\<Rightarrow>bool"}\\ |
257 \end{supertabular} |
257 \end{tabular} |
258 |
258 |
259 \subsubsection*{Syntax} |
259 \subsubsection*{Syntax} |
260 |
260 |
261 \begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} |
261 \begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} |
262 @{term"converse r"} & @{term[source]"converse r"} & (\verb$^-1$) |
262 @{term"converse r"} & @{term[source]"converse r"} & (\verb$^-1$) |
263 \end{tabular} |
263 \end{tabular} |
|
264 \medskip |
|
265 |
|
266 \noindent |
|
267 Type synonym @{typ"'a rel"} @{text"="} @{typ "('a * 'a)set"} |
264 |
268 |
265 \section{Equiv\_Relations} |
269 \section{Equiv\_Relations} |
266 |
270 |
267 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
271 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
268 @{const Equiv_Relations.equiv} & @{term_type_only Equiv_Relations.equiv "'a set \<Rightarrow> ('a*'a)set\<Rightarrow>bool"}\\ |
272 @{const Equiv_Relations.equiv} & @{term_type_only Equiv_Relations.equiv "'a set \<Rightarrow> ('a*'a)set\<Rightarrow>bool"}\\ |
336 |
340 |
337 \begin{tabular}{@ {} lllllll @ {}} |
341 \begin{tabular}{@ {} lllllll @ {}} |
338 @{term "op + :: nat \<Rightarrow> nat \<Rightarrow> nat"} & |
342 @{term "op + :: nat \<Rightarrow> nat \<Rightarrow> nat"} & |
339 @{term "op - :: nat \<Rightarrow> nat \<Rightarrow> nat"} & |
343 @{term "op - :: nat \<Rightarrow> nat \<Rightarrow> nat"} & |
340 @{term "op * :: nat \<Rightarrow> nat \<Rightarrow> nat"} & |
344 @{term "op * :: nat \<Rightarrow> nat \<Rightarrow> nat"} & |
|
345 @{term "op ^ :: nat \<Rightarrow> nat \<Rightarrow> nat"} & |
341 @{term "op div :: nat \<Rightarrow> nat \<Rightarrow> nat"}& |
346 @{term "op div :: nat \<Rightarrow> nat \<Rightarrow> nat"}& |
342 @{term "op mod :: nat \<Rightarrow> nat \<Rightarrow> nat"}& |
347 @{term "op mod :: nat \<Rightarrow> nat \<Rightarrow> nat"}& |
343 @{term "op dvd :: nat \<Rightarrow> nat \<Rightarrow> bool"}\\ |
348 @{term "op dvd :: nat \<Rightarrow> nat \<Rightarrow> bool"}\\ |
344 @{term "op \<le> :: nat \<Rightarrow> nat \<Rightarrow> bool"} & |
349 @{term "op \<le> :: nat \<Rightarrow> nat \<Rightarrow> bool"} & |
345 @{term "op < :: nat \<Rightarrow> nat \<Rightarrow> bool"} & |
350 @{term "op < :: nat \<Rightarrow> nat \<Rightarrow> bool"} & |
493 @{const List.concat} & @{typeof List.concat}\\ |
498 @{const List.concat} & @{typeof List.concat}\\ |
494 @{const List.distinct} & @{typeof List.distinct}\\ |
499 @{const List.distinct} & @{typeof List.distinct}\\ |
495 @{const List.drop} & @{typeof List.drop}\\ |
500 @{const List.drop} & @{typeof List.drop}\\ |
496 @{const List.dropWhile} & @{typeof List.dropWhile}\\ |
501 @{const List.dropWhile} & @{typeof List.dropWhile}\\ |
497 @{const List.filter} & @{typeof List.filter}\\ |
502 @{const List.filter} & @{typeof List.filter}\\ |
|
503 @{const List.find} & @{typeof List.find}\\ |
498 @{const List.fold} & @{typeof List.fold}\\ |
504 @{const List.fold} & @{typeof List.fold}\\ |
499 @{const List.foldr} & @{typeof List.foldr}\\ |
505 @{const List.foldr} & @{typeof List.foldr}\\ |
500 @{const List.foldl} & @{typeof List.foldl}\\ |
506 @{const List.foldl} & @{typeof List.foldl}\\ |
501 @{const List.hd} & @{typeof List.hd}\\ |
507 @{const List.hd} & @{typeof List.hd}\\ |
502 @{const List.last} & @{typeof List.last}\\ |
508 @{const List.last} & @{typeof List.last}\\ |
555 \section{Map} |
561 \section{Map} |
556 |
562 |
557 Maps model partial functions and are often used as finite tables. However, |
563 Maps model partial functions and are often used as finite tables. However, |
558 the domain of a map may be infinite. |
564 the domain of a map may be infinite. |
559 |
565 |
560 @{text"'a \<rightharpoonup> 'b = 'a \<Rightarrow> 'b option"} |
|
561 \bigskip |
|
562 |
|
563 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
566 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
564 @{const Map.empty} & @{typeof Map.empty}\\ |
567 @{const Map.empty} & @{typeof Map.empty}\\ |
565 @{const Map.map_add} & @{typeof Map.map_add}\\ |
568 @{const Map.map_add} & @{typeof Map.map_add}\\ |
566 @{const Map.map_comp} & @{typeof Map.map_comp}\\ |
569 @{const Map.map_comp} & @{typeof Map.map_comp}\\ |
567 @{const Map.restrict_map} & @{term_type_only Map.restrict_map "('a\<Rightarrow>'b option)\<Rightarrow>'a set\<Rightarrow>('a\<Rightarrow>'b option)"}\\ |
570 @{const Map.restrict_map} & @{term_type_only Map.restrict_map "('a\<Rightarrow>'b option)\<Rightarrow>'a set\<Rightarrow>('a\<Rightarrow>'b option)"}\\ |