56 \end{supertabular} |
56 \end{supertabular} |
57 |
57 |
58 \section{Orderings} |
58 \section{Orderings} |
59 |
59 |
60 A collection of classes constraining @{text"\<le>"} and @{text"<"}: |
60 A collection of classes constraining @{text"\<le>"} and @{text"<"}: |
61 preorders, partial orders, linear orders, dense linear orders and wellorders. |
61 preorder, partial order, linear order, dense linear order and wellorder. |
62 |
62 |
63 \begin{tabular}{@ {} l @ {~::~} l @ {}} |
63 \begin{tabular}{@ {} l @ {~::~} l @ {}} |
64 @{const Orderings.Least} & @{typeof Orderings.Least}\\ |
64 @{const Orderings.Least} & @{typeof Orderings.Least}\\ |
65 @{const Orderings.min} & @{typeof Orderings.min}\\ |
65 @{const Orderings.min} & @{typeof Orderings.min}\\ |
66 @{const Orderings.max} & @{typeof Orderings.max}\\ |
66 @{const Orderings.max} & @{typeof Orderings.max}\\ |
74 @{term[source]"x > y"} & @{term"x > y"}\\ |
74 @{term[source]"x > y"} & @{term"x > y"}\\ |
75 @{term"ALL x<=y. P"} & @{term[source]"\<forall>x. x \<le> y \<longrightarrow> P"}\\ |
75 @{term"ALL x<=y. P"} & @{term[source]"\<forall>x. x \<le> y \<longrightarrow> P"}\\ |
76 \multicolumn{2}{@ {}l@ {}}{Similarly for $<$, $\ge$ and $>$, and for @{text"\<exists>"}}\\ |
76 \multicolumn{2}{@ {}l@ {}}{Similarly for $<$, $\ge$ and $>$, and for @{text"\<exists>"}}\\ |
77 @{term"LEAST x. P"} & @{term[source]"Least (\<lambda>x. P)"}\\ |
77 @{term"LEAST x. P"} & @{term[source]"Least (\<lambda>x. P)"}\\ |
78 \end{supertabular} |
78 \end{supertabular} |
|
79 |
|
80 |
|
81 \section{Lattices} |
|
82 |
|
83 Classes semilattice, lattice, distributive lattice and complete lattice (the |
|
84 latter in theory @{theory Set}). |
|
85 |
|
86 \begin{tabular}{@ {} l @ {~::~} l @ {}} |
|
87 @{const Lattices.inf} & @{typeof Lattices.inf}\\ |
|
88 @{const Lattices.sup} & @{typeof Lattices.sup}\\ |
|
89 @{const Set.Inf} & @{term_type_only Set.Inf "'a set \<Rightarrow> 'a::complete_lattice"}\\ |
|
90 @{const Set.Sup} & @{term_type_only Set.Sup "'a set \<Rightarrow> 'a::complete_lattice"}\\ |
|
91 \end{tabular} |
|
92 |
|
93 \subsubsection*{Syntax} |
|
94 |
|
95 Only available locally: |
|
96 |
|
97 \begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} |
|
98 @{text[source]"x \<sqsubseteq> y"} & @{term"x \<le> y"}\\ |
|
99 @{text[source]"x \<sqsubset> y"} & @{term"x < y"}\\ |
|
100 @{text[source]"x \<sqinter> y"} & @{term"inf x y"}\\ |
|
101 @{text[source]"x \<squnion> y"} & @{term"sup x y"}\\ |
|
102 @{text[source]"\<Sqinter> A"} & @{term"Sup A"}\\ |
|
103 @{text[source]"\<Squnion> A"} & @{term"Inf A"}\\ |
|
104 \end{supertabular} |
|
105 |
79 |
106 |
80 \section{Set} |
107 \section{Set} |
81 |
108 |
82 Sets are predicates: @{text[source]"'a set = 'a \<Rightarrow> bool"} |
109 Sets are predicates: @{text[source]"'a set = 'a \<Rightarrow> bool"} |
83 \bigskip |
110 \bigskip |
193 e.g.\ @{prop"ALL (x,y):A. P"}, @{term"{(x,y). P}"}, etc. |
220 e.g.\ @{prop"ALL (x,y):A. P"}, @{term"{(x,y). P}"}, etc. |
194 |
221 |
195 |
222 |
196 \section{Relation} |
223 \section{Relation} |
197 |
224 |
198 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
225 \begin{tabular}{@ {} l @ {~::~} l @ {}} |
199 @{const Relation.converse} & @{term_type_only Relation.converse "('a * 'b)set \<Rightarrow> ('b*'a)set"}\\ |
226 @{const Relation.converse} & @{term_type_only Relation.converse "('a * 'b)set \<Rightarrow> ('b*'a)set"}\\ |
200 @{const Relation.rel_comp} & @{term_type_only Relation.rel_comp "('a*'b)set\<Rightarrow>('c*'a)set\<Rightarrow>('c*'b)set"}\\ |
227 @{const Relation.rel_comp} & @{term_type_only Relation.rel_comp "('a*'b)set\<Rightarrow>('c*'a)set\<Rightarrow>('c*'b)set"}\\ |
201 @{const Relation.Image} & @{term_type_only Relation.Image "('a*'b)set\<Rightarrow>'a set\<Rightarrow>'b set"}\\ |
228 @{const Relation.Image} & @{term_type_only Relation.Image "('a*'b)set\<Rightarrow>'a set\<Rightarrow>'b set"}\\ |
202 @{const Relation.inv_image} & @{term_type_only Relation.inv_image "('a*'a)set\<Rightarrow>('b\<Rightarrow>'a)\<Rightarrow>('b*'b)set"}\\ |
229 @{const Relation.inv_image} & @{term_type_only Relation.inv_image "('a*'a)set\<Rightarrow>('b\<Rightarrow>'a)\<Rightarrow>('b*'b)set"}\\ |
203 @{const Relation.Id_on} & @{term_type_only Relation.Id_on "'a set\<Rightarrow>('a*'a)set"}\\ |
230 @{const Relation.Id_on} & @{term_type_only Relation.Id_on "'a set\<Rightarrow>('a*'a)set"}\\ |
210 @{const Relation.sym} & @{term_type_only Relation.sym "('a*'a)set\<Rightarrow>bool"}\\ |
237 @{const Relation.sym} & @{term_type_only Relation.sym "('a*'a)set\<Rightarrow>bool"}\\ |
211 @{const Relation.antisym} & @{term_type_only Relation.antisym "('a*'a)set\<Rightarrow>bool"}\\ |
238 @{const Relation.antisym} & @{term_type_only Relation.antisym "('a*'a)set\<Rightarrow>bool"}\\ |
212 @{const Relation.trans} & @{term_type_only Relation.trans "('a*'a)set\<Rightarrow>bool"}\\ |
239 @{const Relation.trans} & @{term_type_only Relation.trans "('a*'a)set\<Rightarrow>bool"}\\ |
213 @{const Relation.irrefl} & @{term_type_only Relation.irrefl "('a*'a)set\<Rightarrow>bool"}\\ |
240 @{const Relation.irrefl} & @{term_type_only Relation.irrefl "('a*'a)set\<Rightarrow>bool"}\\ |
214 @{const Relation.total_on} & @{term_type_only Relation.total_on "'a set\<Rightarrow>('a*'a)set\<Rightarrow>bool"}\\ |
241 @{const Relation.total_on} & @{term_type_only Relation.total_on "'a set\<Rightarrow>('a*'a)set\<Rightarrow>bool"}\\ |
215 @{const Relation.total} & @{term_type_only Relation.total "('a*'a)set\<Rightarrow>bool"}\\ |
242 @{const Relation.total} & @{term_type_only Relation.total "('a*'a)set\<Rightarrow>bool"} |
216 \end{supertabular} |
243 \end{tabular} |
217 |
244 |
218 \subsubsection*{Syntax} |
245 \subsubsection*{Syntax} |
219 |
246 |
220 \begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} |
247 \begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} |
221 @{term"converse r"} & @{term[source]"converse r"} |
248 @{term"converse r"} & @{term[source]"converse r"} |
322 \subsubsection*{Syntax} |
349 \subsubsection*{Syntax} |
323 |
350 |
324 \begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} |
351 \begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} |
325 @{term"of_nat::nat\<Rightarrow>int"} & @{term[source]"of_nat"}\\ |
352 @{term"of_nat::nat\<Rightarrow>int"} & @{term[source]"of_nat"}\\ |
326 \end{tabular} |
353 \end{tabular} |
|
354 |
|
355 |
|
356 \section{Finite\_Set} |
|
357 |
|
358 |
|
359 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
|
360 @{const Finite_Set.finite} & @{term_type_only Finite_Set.finite "'a set\<Rightarrow>bool"}\\ |
|
361 @{const Finite_Set.card} & @{term_type_only Finite_Set.card "'a set => nat"}\\ |
|
362 @{const Finite_Set.fold} & @{term_type_only Finite_Set.fold "('a \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> 'b \<Rightarrow> 'a set \<Rightarrow> 'b"}\\ |
|
363 @{const Finite_Set.fold_image} & @{typ "('b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b \<Rightarrow> 'a set \<Rightarrow> 'b"}\\ |
|
364 @{const Finite_Set.setsum} & @{term_type_only Finite_Set.setsum "('a => 'b) => 'a set => 'b::comm_monoid_add"}\\ |
|
365 @{const Finite_Set.setprod} & @{term_type_only Finite_Set.setprod "('a => 'b) => 'a set => 'b::comm_monoid_mult"}\\ |
|
366 \end{supertabular} |
|
367 |
|
368 |
|
369 \subsubsection*{Syntax} |
|
370 |
|
371 \begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} |
|
372 @{term"setsum (%x. x) A"} & @{term[source]"setsum (\<lambda>x. x) A"}\\ |
|
373 @{term"setsum (%x. t) A"} & @{term[source]"setsum (\<lambda>x. t) A"}\\ |
|
374 @{term[source]"\<Sum>x|P. t"} & @{term"\<Sum>x|P. t"}\\ |
|
375 \multicolumn{2}{@ {}l@ {}}{Similarly for @{text"\<Prod>"} instead of @{text"\<Sum>"}}\\ |
|
376 \end{supertabular} |
327 |
377 |
328 |
378 |
329 \section{Wellfounded} |
379 \section{Wellfounded} |
330 |
380 |
331 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
381 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |