src/Doc/Main/Main_Doc.thy
author wenzelm
Mon, 07 Oct 2013 21:24:44 +0200
changeset 54313 da2e6282a4f5
parent 53328 9228c575d67d
child 54703 499f92dc6e45
permissions -rw-r--r--
native executable even for Linux, to avoid surprises with file managers opening executable script as text file;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
     1
(*<*)
30401
nipkow
parents: 30386
diff changeset
     2
theory Main_Doc
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
     3
imports Main
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
     4
begin
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
     5
43564
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
     6
setup {*
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
     7
  let
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
     8
    fun pretty_term_type_only ctxt (t, T) =
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
     9
      (if fastype_of t = Sign.certify_typ (Proof_Context.theory_of ctxt) T then ()
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    10
       else error "term_type_only: type mismatch";
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    11
       Syntax.pretty_typ ctxt T)
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    12
  in
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    13
    Thy_Output.antiquotation @{binding term_type_only}
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    14
      (Args.term -- Args.typ_abbrev)
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    15
      (fn {source, context = ctxt, ...} => fn arg =>
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    16
        Thy_Output.output ctxt
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    17
          (Thy_Output.maybe_pretty_source pretty_term_type_only ctxt source [arg]))
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 42361
diff changeset
    18
  end
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    19
*}
47189
e9a3dd1c4cf9 improved robustness with new antiquoation by Makarius
nipkow
parents: 47187
diff changeset
    20
setup {*
e9a3dd1c4cf9 improved robustness with new antiquoation by Makarius
nipkow
parents: 47187
diff changeset
    21
  Thy_Output.antiquotation @{binding expanded_typ} (Args.typ >> single)
e9a3dd1c4cf9 improved robustness with new antiquoation by Makarius
nipkow
parents: 47187
diff changeset
    22
    (fn {source, context, ...} => Thy_Output.output context o
e9a3dd1c4cf9 improved robustness with new antiquoation by Makarius
nipkow
parents: 47187
diff changeset
    23
      Thy_Output.maybe_pretty_source Syntax.pretty_typ context source)
e9a3dd1c4cf9 improved robustness with new antiquoation by Makarius
nipkow
parents: 47187
diff changeset
    24
*}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    25
(*>*)
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    26
text{*
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    27
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    28
\begin{abstract}
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
    29
This document lists the main types, functions and syntax provided by theory @{theory Main}. It is meant as a quick overview of what is available. For infix operators and their precedences see the final section. The sophisticated class structure is only hinted at. For details see \url{http://isabelle.in.tum.de/library/HOL/}.
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    30
\end{abstract}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    31
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
    32
\section*{HOL}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    33
30440
nipkow
parents: 30425
diff changeset
    34
The basic logic: @{prop "x = y"}, @{const True}, @{const False}, @{prop"Not P"}, @{prop"P & Q"}, @{prop "P | Q"}, @{prop "P --> Q"}, @{prop"ALL x. P"}, @{prop"EX x. P"}, @{prop"EX! x. P"}, @{term"THE x. P"}.
nipkow
parents: 30425
diff changeset
    35
\smallskip
nipkow
parents: 30425
diff changeset
    36
nipkow
parents: 30425
diff changeset
    37
\begin{tabular}{@ {} l @ {~::~} l @ {}}
nipkow
parents: 30425
diff changeset
    38
@{const HOL.undefined} & @{typeof HOL.undefined}\\
nipkow
parents: 30425
diff changeset
    39
@{const HOL.default} & @{typeof HOL.default}\\
nipkow
parents: 30425
diff changeset
    40
\end{tabular}
nipkow
parents: 30425
diff changeset
    41
nipkow
parents: 30425
diff changeset
    42
\subsubsection*{Syntax}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    43
30440
nipkow
parents: 30425
diff changeset
    44
\begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}}
nipkow
parents: 30425
diff changeset
    45
@{term"~(x = y)"} & @{term[source]"\<not> (x = y)"} & (\verb$~=$)\\
nipkow
parents: 30425
diff changeset
    46
@{term[source]"P \<longleftrightarrow> Q"} & @{term"P \<longleftrightarrow> Q"} \\
nipkow
parents: 30425
diff changeset
    47
@{term"If x y z"} & @{term[source]"If x y z"}\\
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 51489
diff changeset
    48
@{term"Let e\<^sub>1 (%x. e\<^sub>2)"} & @{term[source]"Let e\<^sub>1 (\<lambda>x. e\<^sub>2)"}\\
30440
nipkow
parents: 30425
diff changeset
    49
\end{supertabular}
nipkow
parents: 30425
diff changeset
    50
nipkow
parents: 30425
diff changeset
    51
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
    52
\section*{Orderings}
30440
nipkow
parents: 30425
diff changeset
    53
nipkow
parents: 30425
diff changeset
    54
A collection of classes defining basic orderings:
nipkow
parents: 30425
diff changeset
    55
preorder, partial order, linear order, dense linear order and wellorder.
nipkow
parents: 30425
diff changeset
    56
\smallskip
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    57
30425
nipkow
parents: 30403
diff changeset
    58
\begin{supertabular}{@ {} l @ {~::~} l l @ {}}
35277
f228929a6fab adjusted to cs. 8dfd816713c6
haftmann
parents: 35061
diff changeset
    59
@{const Orderings.less_eq} & @{typeof Orderings.less_eq} & (\verb$<=$)\\
f228929a6fab adjusted to cs. 8dfd816713c6
haftmann
parents: 35061
diff changeset
    60
@{const Orderings.less} & @{typeof Orderings.less}\\
30440
nipkow
parents: 30425
diff changeset
    61
@{const Orderings.Least} & @{typeof Orderings.Least}\\
nipkow
parents: 30425
diff changeset
    62
@{const Orderings.min} & @{typeof Orderings.min}\\
nipkow
parents: 30425
diff changeset
    63
@{const Orderings.max} & @{typeof Orderings.max}\\
nipkow
parents: 30425
diff changeset
    64
@{const[source] top} & @{typeof Orderings.top}\\
nipkow
parents: 30425
diff changeset
    65
@{const[source] bot} & @{typeof Orderings.bot}\\
nipkow
parents: 30425
diff changeset
    66
@{const Orderings.mono} & @{typeof Orderings.mono}\\
nipkow
parents: 30425
diff changeset
    67
@{const Orderings.strict_mono} & @{typeof Orderings.strict_mono}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    68
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    69
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    70
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    71
30440
nipkow
parents: 30425
diff changeset
    72
\begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}}
nipkow
parents: 30425
diff changeset
    73
@{term[source]"x \<ge> y"} & @{term"x \<ge> y"} & (\verb$>=$)\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    74
@{term[source]"x > y"} & @{term"x > y"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    75
@{term"ALL x<=y. P"} & @{term[source]"\<forall>x. x \<le> y \<longrightarrow> P"}\\
30440
nipkow
parents: 30425
diff changeset
    76
@{term"EX x<=y. P"} & @{term[source]"\<exists>x. x \<le> y \<and> P"}\\
nipkow
parents: 30425
diff changeset
    77
\multicolumn{2}{@ {}l@ {}}{Similarly for $<$, $\ge$ and $>$}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    78
@{term"LEAST x. P"} & @{term[source]"Least (\<lambda>x. P)"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    79
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
    80
30401
nipkow
parents: 30386
diff changeset
    81
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
    82
\section*{Lattices}
30401
nipkow
parents: 30386
diff changeset
    83
nipkow
parents: 30386
diff changeset
    84
Classes semilattice, lattice, distributive lattice and complete lattice (the
nipkow
parents: 30386
diff changeset
    85
latter in theory @{theory Set}).
nipkow
parents: 30386
diff changeset
    86
nipkow
parents: 30386
diff changeset
    87
\begin{tabular}{@ {} l @ {~::~} l @ {}}
nipkow
parents: 30386
diff changeset
    88
@{const Lattices.inf} & @{typeof Lattices.inf}\\
nipkow
parents: 30386
diff changeset
    89
@{const Lattices.sup} & @{typeof Lattices.sup}\\
44969
c56a40059258 updated Complete_Lattices;
wenzelm
parents: 43564
diff changeset
    90
@{const Complete_Lattices.Inf} & @{term_type_only Complete_Lattices.Inf "'a set \<Rightarrow> 'a::Inf"}\\
c56a40059258 updated Complete_Lattices;
wenzelm
parents: 43564
diff changeset
    91
@{const Complete_Lattices.Sup} & @{term_type_only Complete_Lattices.Sup "'a set \<Rightarrow> 'a::Sup"}\\
30401
nipkow
parents: 30386
diff changeset
    92
\end{tabular}
nipkow
parents: 30386
diff changeset
    93
nipkow
parents: 30386
diff changeset
    94
\subsubsection*{Syntax}
nipkow
parents: 30386
diff changeset
    95
30440
nipkow
parents: 30425
diff changeset
    96
Available by loading theory @{text Lattice_Syntax} in directory @{text
nipkow
parents: 30425
diff changeset
    97
Library}.
30401
nipkow
parents: 30386
diff changeset
    98
nipkow
parents: 30386
diff changeset
    99
\begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
nipkow
parents: 30386
diff changeset
   100
@{text[source]"x \<sqsubseteq> y"} & @{term"x \<le> y"}\\
nipkow
parents: 30386
diff changeset
   101
@{text[source]"x \<sqsubset> y"} & @{term"x < y"}\\
nipkow
parents: 30386
diff changeset
   102
@{text[source]"x \<sqinter> y"} & @{term"inf x y"}\\
nipkow
parents: 30386
diff changeset
   103
@{text[source]"x \<squnion> y"} & @{term"sup x y"}\\
nipkow
parents: 30386
diff changeset
   104
@{text[source]"\<Sqinter> A"} & @{term"Sup A"}\\
nipkow
parents: 30386
diff changeset
   105
@{text[source]"\<Squnion> A"} & @{term"Inf A"}\\
30440
nipkow
parents: 30425
diff changeset
   106
@{text[source]"\<top>"} & @{term[source] top}\\
nipkow
parents: 30425
diff changeset
   107
@{text[source]"\<bottom>"} & @{term[source] bot}\\
30401
nipkow
parents: 30386
diff changeset
   108
\end{supertabular}
nipkow
parents: 30386
diff changeset
   109
nipkow
parents: 30386
diff changeset
   110
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   111
\section*{Set}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   112
30425
nipkow
parents: 30403
diff changeset
   113
\begin{supertabular}{@ {} l @ {~::~} l l @ {}}
30370
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   114
@{const Set.empty} & @{term_type_only "Set.empty" "'a set"}\\
32142
0ddf61f96b2a fixed doc
haftmann
parents: 30988
diff changeset
   115
@{const Set.insert} & @{term_type_only insert "'a\<Rightarrow>'a set\<Rightarrow>'a set"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   116
@{const Collect} & @{term_type_only Collect "('a\<Rightarrow>bool)\<Rightarrow>'a set"}\\
38323
dc2a61b98bab avoid old unnamed infix
haftmann
parents: 37216
diff changeset
   117
@{const Set.member} & @{term_type_only Set.member "'a\<Rightarrow>'a set\<Rightarrow>bool"} & (\texttt{:})\\
32208
e6a42620e6c1 adapted to changed prefixes
haftmann
parents: 32142
diff changeset
   118
@{const Set.union} & @{term_type_only Set.union "'a set\<Rightarrow>'a set \<Rightarrow> 'a set"} & (\texttt{Un})\\
e6a42620e6c1 adapted to changed prefixes
haftmann
parents: 32142
diff changeset
   119
@{const Set.inter} & @{term_type_only Set.inter "'a set\<Rightarrow>'a set \<Rightarrow> 'a set"} & (\texttt{Int})\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   120
@{const UNION} & @{term_type_only UNION "'a set\<Rightarrow>('a \<Rightarrow> 'b set) \<Rightarrow> 'b set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   121
@{const INTER} & @{term_type_only INTER "'a set\<Rightarrow>('a \<Rightarrow> 'b set) \<Rightarrow> 'b set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   122
@{const Union} & @{term_type_only Union "'a set set\<Rightarrow>'a set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   123
@{const Inter} & @{term_type_only Inter "'a set set\<Rightarrow>'a set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   124
@{const Pow} & @{term_type_only Pow "'a set \<Rightarrow>'a set set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   125
@{const UNIV} & @{term_type_only UNIV "'a set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   126
@{const image} & @{term_type_only image "('a\<Rightarrow>'b)\<Rightarrow>'a set\<Rightarrow>'b set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   127
@{const Ball} & @{term_type_only Ball "'a set\<Rightarrow>('a\<Rightarrow>bool)\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   128
@{const Bex} & @{term_type_only Bex "'a set\<Rightarrow>('a\<Rightarrow>bool)\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   129
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   130
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   131
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   132
30425
nipkow
parents: 30403
diff changeset
   133
\begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}}
53328
9228c575d67d more set syntax
nipkow
parents: 53015
diff changeset
   134
@{text"{a\<^sub>1,\<dots>,a\<^sub>n}"} & @{text"insert a\<^sub>1 (\<dots> (insert a\<^sub>n {})\<dots>)"}\\
9228c575d67d more set syntax
nipkow
parents: 53015
diff changeset
   135
@{term"a ~: A"} & @{term[source]"\<not>(x \<in> A)"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   136
@{term"A \<subseteq> B"} & @{term[source]"A \<le> B"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   137
@{term"A \<subset> B"} & @{term[source]"A < B"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   138
@{term[source]"A \<supseteq> B"} & @{term[source]"B \<le> A"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   139
@{term[source]"A \<supset> B"} & @{term[source]"B < A"}\\
30440
nipkow
parents: 30425
diff changeset
   140
@{term"{x. P}"} & @{term[source]"Collect (\<lambda>x. P)"}\\
53328
9228c575d67d more set syntax
nipkow
parents: 53015
diff changeset
   141
@{text"{t | x\<^sub>1 \<dots> x\<^sub>n. P}"} & @{text"{v. \<exists>x\<^sub>1 \<dots> x\<^sub>n. v = t \<and> P}"}\\
30425
nipkow
parents: 30403
diff changeset
   142
@{term[mode=xsymbols]"UN x:I. A"} & @{term[source]"UNION I (\<lambda>x. A)"} & (\texttt{UN})\\
30370
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   143
@{term[mode=xsymbols]"UN x. A"} & @{term[source]"UNION UNIV (\<lambda>x. A)"}\\
30425
nipkow
parents: 30403
diff changeset
   144
@{term[mode=xsymbols]"INT x:I. A"} & @{term[source]"INTER I (\<lambda>x. A)"} & (\texttt{INT})\\
30370
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   145
@{term[mode=xsymbols]"INT x. A"} & @{term[source]"INTER UNIV (\<lambda>x. A)"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   146
@{term"ALL x:A. P"} & @{term[source]"Ball A (\<lambda>x. P)"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   147
@{term"EX x:A. P"} & @{term[source]"Bex A (\<lambda>x. P)"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   148
@{term"range f"} & @{term[source]"f ` UNIV"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   149
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   150
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   151
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   152
\section*{Fun}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   153
32933
ba14400f7f34 added List.nth
nipkow
parents: 32885
diff changeset
   154
\begin{supertabular}{@ {} l @ {~::~} l l @ {}}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   155
@{const "Fun.id"} & @{typeof Fun.id}\\
32933
ba14400f7f34 added List.nth
nipkow
parents: 32885
diff changeset
   156
@{const "Fun.comp"} & @{typeof Fun.comp} & (\texttt{o})\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   157
@{const "Fun.inj_on"} & @{term_type_only Fun.inj_on "('a\<Rightarrow>'b)\<Rightarrow>'a set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   158
@{const "Fun.inj"} & @{typeof Fun.inj}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   159
@{const "Fun.surj"} & @{typeof Fun.surj}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   160
@{const "Fun.bij"} & @{typeof Fun.bij}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   161
@{const "Fun.bij_betw"} & @{term_type_only Fun.bij_betw "('a\<Rightarrow>'b)\<Rightarrow>'a set\<Rightarrow>'b set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   162
@{const "Fun.fun_upd"} & @{typeof Fun.fun_upd}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   163
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   164
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   165
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   166
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   167
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   168
@{term"fun_upd f x y"} & @{term[source]"fun_upd f x y"}\\
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 51489
diff changeset
   169
@{text"f(x\<^sub>1:=y\<^sub>1,\<dots>,x\<^sub>n:=y\<^sub>n)"} & @{text"f(x\<^sub>1:=y\<^sub>1)\<dots>(x\<^sub>n:=y\<^sub>n)"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   170
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   171
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   172
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   173
\section*{Hilbert\_Choice}
33019
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   174
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   175
Hilbert's selection ($\varepsilon$) operator: @{term"SOME x. P"}.
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   176
\smallskip
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   177
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   178
\begin{tabular}{@ {} l @ {~::~} l @ {}}
33057
764547b68538 inv_onto -> inv_into
nipkow
parents: 33019
diff changeset
   179
@{const Hilbert_Choice.inv_into} & @{term_type_only Hilbert_Choice.inv_into "'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'a)"}
33019
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   180
\end{tabular}
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   181
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   182
\subsubsection*{Syntax}
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   183
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   184
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
33057
764547b68538 inv_onto -> inv_into
nipkow
parents: 33019
diff changeset
   185
@{term inv} & @{term[source]"inv_into UNIV"}
33019
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   186
\end{tabular}
bcf56a64ce1a added Hilbert_Choice section
nipkow
parents: 32933
diff changeset
   187
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   188
\section*{Fixed Points}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   189
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   190
Theory: @{theory Inductive}.
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   191
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   192
Least and greatest fixed points in a complete lattice @{typ 'a}:
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   193
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   194
\begin{tabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   195
@{const Inductive.lfp} & @{typeof Inductive.lfp}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   196
@{const Inductive.gfp} & @{typeof Inductive.gfp}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   197
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   198
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   199
Note that in particular sets (@{typ"'a \<Rightarrow> bool"}) are complete lattices.
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   200
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   201
\section*{Sum\_Type}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   202
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   203
Type constructor @{text"+"}.
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   204
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   205
\begin{tabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   206
@{const Sum_Type.Inl} & @{typeof Sum_Type.Inl}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   207
@{const Sum_Type.Inr} & @{typeof Sum_Type.Inr}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   208
@{const Sum_Type.Plus} & @{term_type_only Sum_Type.Plus "'a set\<Rightarrow>'b set\<Rightarrow>('a+'b)set"}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   209
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   210
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   211
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   212
\section*{Product\_Type}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   213
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   214
Types @{typ unit} and @{text"\<times>"}.
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   215
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   216
\begin{supertabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   217
@{const Product_Type.Unity} & @{typeof Product_Type.Unity}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   218
@{const Pair} & @{typeof Pair}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   219
@{const fst} & @{typeof fst}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   220
@{const snd} & @{typeof snd}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   221
@{const split} & @{typeof split}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   222
@{const curry} & @{typeof curry}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   223
@{const Product_Type.Sigma} & @{term_type_only Product_Type.Sigma "'a set\<Rightarrow>('a\<Rightarrow>'b set)\<Rightarrow>('a*'b)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   224
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   225
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   226
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   227
30440
nipkow
parents: 30425
diff changeset
   228
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} ll @ {}}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   229
@{term"Pair a b"} & @{term[source]"Pair a b"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   230
@{term"split (\<lambda>x y. t)"} & @{term[source]"split (\<lambda>x y. t)"}\\
30440
nipkow
parents: 30425
diff changeset
   231
@{term"A <*> B"} &  @{text"Sigma A (\<lambda>\<^raw:\_>. B)"} & (\verb$<*>$)
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   232
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   233
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   234
Pairs may be nested. Nesting to the right is printed as a tuple,
30440
nipkow
parents: 30425
diff changeset
   235
e.g.\ \mbox{@{term"(a,b,c)"}} is really \mbox{@{text"(a, (b, c))"}.}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   236
Pattern matching with pairs and tuples extends to all binders,
30440
nipkow
parents: 30425
diff changeset
   237
e.g.\ \mbox{@{prop"ALL (x,y):A. P"},} @{term"{(x,y). P}"}, etc.
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   238
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   239
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   240
\section*{Relation}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   241
47187
97db4b6b6a2c updates
nipkow
parents: 46488
diff changeset
   242
\begin{tabular}{@ {} l @ {~::~} l @ {}}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   243
@{const Relation.converse} & @{term_type_only Relation.converse "('a * 'b)set \<Rightarrow> ('b*'a)set"}\\
47682
8e2e87a0a594 updated const "relcomp";
wenzelm
parents: 47189
diff changeset
   244
@{const Relation.relcomp} & @{term_type_only Relation.relcomp "('a*'b)set\<Rightarrow>('b*'c)set\<Rightarrow>('a*'c)set"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   245
@{const Relation.Image} & @{term_type_only Relation.Image "('a*'b)set\<Rightarrow>'a set\<Rightarrow>'b set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   246
@{const Relation.inv_image} & @{term_type_only Relation.inv_image "('a*'a)set\<Rightarrow>('b\<Rightarrow>'a)\<Rightarrow>('b*'b)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   247
@{const Relation.Id_on} & @{term_type_only Relation.Id_on "'a set\<Rightarrow>('a*'a)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   248
@{const Relation.Id} & @{term_type_only Relation.Id "('a*'a)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   249
@{const Relation.Domain} & @{term_type_only Relation.Domain "('a*'b)set\<Rightarrow>'a set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   250
@{const Relation.Range} & @{term_type_only Relation.Range "('a*'b)set\<Rightarrow>'b set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   251
@{const Relation.Field} & @{term_type_only Relation.Field "('a*'a)set\<Rightarrow>'a set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   252
@{const Relation.refl_on} & @{term_type_only Relation.refl_on "'a set\<Rightarrow>('a*'a)set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   253
@{const Relation.refl} & @{term_type_only Relation.refl "('a*'a)set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   254
@{const Relation.sym} & @{term_type_only Relation.sym "('a*'a)set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   255
@{const Relation.antisym} & @{term_type_only Relation.antisym "('a*'a)set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   256
@{const Relation.trans} & @{term_type_only Relation.trans "('a*'a)set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   257
@{const Relation.irrefl} & @{term_type_only Relation.irrefl "('a*'a)set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   258
@{const Relation.total_on} & @{term_type_only Relation.total_on "'a set\<Rightarrow>('a*'a)set\<Rightarrow>bool"}\\
30440
nipkow
parents: 30425
diff changeset
   259
@{const Relation.total} & @{term_type_only Relation.total "('a*'a)set\<Rightarrow>bool"}\\
47187
97db4b6b6a2c updates
nipkow
parents: 46488
diff changeset
   260
\end{tabular}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   261
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   262
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   263
30440
nipkow
parents: 30425
diff changeset
   264
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}}
nipkow
parents: 30425
diff changeset
   265
@{term"converse r"} & @{term[source]"converse r"} & (\verb$^-1$)
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   266
\end{tabular}
47187
97db4b6b6a2c updates
nipkow
parents: 46488
diff changeset
   267
\medskip
97db4b6b6a2c updates
nipkow
parents: 46488
diff changeset
   268
97db4b6b6a2c updates
nipkow
parents: 46488
diff changeset
   269
\noindent
47189
e9a3dd1c4cf9 improved robustness with new antiquoation by Makarius
nipkow
parents: 47187
diff changeset
   270
Type synonym \ @{typ"'a rel"} @{text"="} @{expanded_typ "'a rel"}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   271
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   272
\section*{Equiv\_Relations}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   273
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   274
\begin{supertabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   275
@{const Equiv_Relations.equiv} & @{term_type_only Equiv_Relations.equiv "'a set \<Rightarrow> ('a*'a)set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   276
@{const Equiv_Relations.quotient} & @{term_type_only Equiv_Relations.quotient "'a set \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> 'a set set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   277
@{const Equiv_Relations.congruent} & @{term_type_only Equiv_Relations.congruent "('a*'a)set\<Rightarrow>('a\<Rightarrow>'b)\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   278
@{const Equiv_Relations.congruent2} & @{term_type_only Equiv_Relations.congruent2 "('a*'a)set\<Rightarrow>('b*'b)set\<Rightarrow>('a\<Rightarrow>'b\<Rightarrow>'c)\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   279
%@ {const Equiv_Relations.} & @ {term_type_only Equiv_Relations. ""}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   280
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   281
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   282
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   283
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   284
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   285
@{term"congruent r f"} & @{term[source]"congruent r f"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   286
@{term"congruent2 r r f"} & @{term[source]"congruent2 r r f"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   287
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   288
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   289
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   290
\section*{Transitive\_Closure}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   291
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   292
\begin{tabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   293
@{const Transitive_Closure.rtrancl} & @{term_type_only Transitive_Closure.rtrancl "('a*'a)set\<Rightarrow>('a*'a)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   294
@{const Transitive_Closure.trancl} & @{term_type_only Transitive_Closure.trancl "('a*'a)set\<Rightarrow>('a*'a)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   295
@{const Transitive_Closure.reflcl} & @{term_type_only Transitive_Closure.reflcl "('a*'a)set\<Rightarrow>('a*'a)set"}\\
45618
cdb15f190788 updated according to bdcaa3f3a2f4;
wenzelm
parents: 44969
diff changeset
   296
@{const Transitive_Closure.acyclic} & @{term_type_only Transitive_Closure.acyclic "('a*'a)set\<Rightarrow>bool"}\\
30988
b53800e3ee47 adjusted to changes in power syntax
haftmann
parents: 30457
diff changeset
   297
@{const compower} & @{term_type_only "op ^^ :: ('a*'a)set\<Rightarrow>nat\<Rightarrow>('a*'a)set" "('a*'a)set\<Rightarrow>nat\<Rightarrow>('a*'a)set"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   298
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   299
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   300
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   301
30440
nipkow
parents: 30425
diff changeset
   302
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}}
nipkow
parents: 30425
diff changeset
   303
@{term"rtrancl r"} & @{term[source]"rtrancl r"} & (\verb$^*$)\\
nipkow
parents: 30425
diff changeset
   304
@{term"trancl r"} & @{term[source]"trancl r"} & (\verb$^+$)\\
nipkow
parents: 30425
diff changeset
   305
@{term"reflcl r"} & @{term[source]"reflcl r"} & (\verb$^=$)
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   306
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   307
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   308
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   309
\section*{Algebra}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   310
35061
be1e25a62ec8 adjusted to cs. 9f841f20dca6
haftmann
parents: 35007
diff changeset
   311
Theories @{theory Groups}, @{theory Rings}, @{theory Fields} and @{theory
30440
nipkow
parents: 30425
diff changeset
   312
Divides} define a large collection of classes describing common algebraic
nipkow
parents: 30425
diff changeset
   313
structures from semigroups up to fields. Everything is done in terms of
nipkow
parents: 30425
diff changeset
   314
overloaded operators:
nipkow
parents: 30425
diff changeset
   315
nipkow
parents: 30425
diff changeset
   316
\begin{supertabular}{@ {} l @ {~::~} l l @ {}}
nipkow
parents: 30425
diff changeset
   317
@{text "0"} & @{typeof zero}\\
nipkow
parents: 30425
diff changeset
   318
@{text "1"} & @{typeof one}\\
nipkow
parents: 30425
diff changeset
   319
@{const plus} & @{typeof plus}\\
nipkow
parents: 30425
diff changeset
   320
@{const minus} & @{typeof minus}\\
nipkow
parents: 30425
diff changeset
   321
@{const uminus} & @{typeof uminus} & (\verb$-$)\\
nipkow
parents: 30425
diff changeset
   322
@{const times} & @{typeof times}\\
nipkow
parents: 30425
diff changeset
   323
@{const inverse} & @{typeof inverse}\\
nipkow
parents: 30425
diff changeset
   324
@{const divide} & @{typeof divide}\\
nipkow
parents: 30425
diff changeset
   325
@{const abs} & @{typeof abs}\\
nipkow
parents: 30425
diff changeset
   326
@{const sgn} & @{typeof sgn}\\
nipkow
parents: 30425
diff changeset
   327
@{const dvd_class.dvd} & @{typeof "dvd_class.dvd"}\\
nipkow
parents: 30425
diff changeset
   328
@{const div_class.div} & @{typeof "div_class.div"}\\
nipkow
parents: 30425
diff changeset
   329
@{const div_class.mod} & @{typeof "div_class.mod"}\\
nipkow
parents: 30425
diff changeset
   330
\end{supertabular}
nipkow
parents: 30425
diff changeset
   331
nipkow
parents: 30425
diff changeset
   332
\subsubsection*{Syntax}
nipkow
parents: 30425
diff changeset
   333
nipkow
parents: 30425
diff changeset
   334
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
nipkow
parents: 30425
diff changeset
   335
@{term"abs x"} & @{term[source]"abs x"}
nipkow
parents: 30425
diff changeset
   336
\end{tabular}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   337
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   338
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   339
\section*{Nat}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   340
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   341
@{datatype nat}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   342
\bigskip
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   343
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   344
\begin{tabular}{@ {} lllllll @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   345
@{term "op + :: nat \<Rightarrow> nat \<Rightarrow> nat"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   346
@{term "op - :: nat \<Rightarrow> nat \<Rightarrow> nat"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   347
@{term "op * :: nat \<Rightarrow> nat \<Rightarrow> nat"} &
47187
97db4b6b6a2c updates
nipkow
parents: 46488
diff changeset
   348
@{term "op ^ :: nat \<Rightarrow> nat \<Rightarrow> nat"} &
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   349
@{term "op div :: nat \<Rightarrow> nat \<Rightarrow> nat"}&
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   350
@{term "op mod :: nat \<Rightarrow> nat \<Rightarrow> nat"}&
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   351
@{term "op dvd :: nat \<Rightarrow> nat \<Rightarrow> bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   352
@{term "op \<le> :: nat \<Rightarrow> nat \<Rightarrow> bool"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   353
@{term "op < :: nat \<Rightarrow> nat \<Rightarrow> bool"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   354
@{term "min :: nat \<Rightarrow> nat \<Rightarrow> nat"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   355
@{term "max :: nat \<Rightarrow> nat \<Rightarrow> nat"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   356
@{term "Min :: nat set \<Rightarrow> nat"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   357
@{term "Max :: nat set \<Rightarrow> nat"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   358
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   359
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   360
\begin{tabular}{@ {} l @ {~::~} l @ {}}
30988
b53800e3ee47 adjusted to changes in power syntax
haftmann
parents: 30457
diff changeset
   361
@{const Nat.of_nat} & @{typeof Nat.of_nat}\\
b53800e3ee47 adjusted to changes in power syntax
haftmann
parents: 30457
diff changeset
   362
@{term "op ^^ :: ('a \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> 'a"} &
b53800e3ee47 adjusted to changes in power syntax
haftmann
parents: 30457
diff changeset
   363
  @{term_type_only "op ^^ :: ('a \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> 'a" "('a \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> 'a"}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   364
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   365
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   366
\section*{Int}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   367
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   368
Type @{typ int}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   369
\bigskip
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   370
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   371
\begin{tabular}{@ {} llllllll @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   372
@{term "op + :: int \<Rightarrow> int \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   373
@{term "op - :: int \<Rightarrow> int \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   374
@{term "uminus :: int \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   375
@{term "op * :: int \<Rightarrow> int \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   376
@{term "op ^ :: int \<Rightarrow> nat \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   377
@{term "op div :: int \<Rightarrow> int \<Rightarrow> int"}&
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   378
@{term "op mod :: int \<Rightarrow> int \<Rightarrow> int"}&
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   379
@{term "op dvd :: int \<Rightarrow> int \<Rightarrow> bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   380
@{term "op \<le> :: int \<Rightarrow> int \<Rightarrow> bool"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   381
@{term "op < :: int \<Rightarrow> int \<Rightarrow> bool"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   382
@{term "min :: int \<Rightarrow> int \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   383
@{term "max :: int \<Rightarrow> int \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   384
@{term "Min :: int set \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   385
@{term "Max :: int set \<Rightarrow> int"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   386
@{term "abs :: int \<Rightarrow> int"} &
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   387
@{term "sgn :: int \<Rightarrow> int"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   388
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   389
30440
nipkow
parents: 30425
diff changeset
   390
\begin{tabular}{@ {} l @ {~::~} l l @ {}}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   391
@{const Int.nat} & @{typeof Int.nat}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   392
@{const Int.of_int} & @{typeof Int.of_int}\\
30440
nipkow
parents: 30425
diff changeset
   393
@{const Int.Ints} & @{term_type_only Int.Ints "'a::ring_1 set"} & (\verb$Ints$)
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   394
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   395
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   396
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   397
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   398
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   399
@{term"of_nat::nat\<Rightarrow>int"} & @{term[source]"of_nat"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   400
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   401
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   402
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   403
\section*{Finite\_Set}
30401
nipkow
parents: 30386
diff changeset
   404
nipkow
parents: 30386
diff changeset
   405
nipkow
parents: 30386
diff changeset
   406
\begin{supertabular}{@ {} l @ {~::~} l @ {}}
nipkow
parents: 30386
diff changeset
   407
@{const Finite_Set.finite} & @{term_type_only Finite_Set.finite "'a set\<Rightarrow>bool"}\\
nipkow
parents: 30386
diff changeset
   408
@{const Finite_Set.card} & @{term_type_only Finite_Set.card "'a set => nat"}\\
nipkow
parents: 30386
diff changeset
   409
@{const Finite_Set.fold} & @{term_type_only Finite_Set.fold "('a \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> 'b \<Rightarrow> 'a set \<Rightarrow> 'b"}\\
35805
1c4a8d3b26d2 adjusted to changes in Finite_Set
haftmann
parents: 35277
diff changeset
   410
@{const Big_Operators.setsum} & @{term_type_only Big_Operators.setsum "('a => 'b) => 'a set => 'b::comm_monoid_add"}\\
1c4a8d3b26d2 adjusted to changes in Finite_Set
haftmann
parents: 35277
diff changeset
   411
@{const Big_Operators.setprod} & @{term_type_only Big_Operators.setprod "('a => 'b) => 'a set => 'b::comm_monoid_mult"}\\
30401
nipkow
parents: 30386
diff changeset
   412
\end{supertabular}
nipkow
parents: 30386
diff changeset
   413
nipkow
parents: 30386
diff changeset
   414
nipkow
parents: 30386
diff changeset
   415
\subsubsection*{Syntax}
nipkow
parents: 30386
diff changeset
   416
30440
nipkow
parents: 30425
diff changeset
   417
\begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}}
nipkow
parents: 30425
diff changeset
   418
@{term"setsum (%x. x) A"} & @{term[source]"setsum (\<lambda>x. x) A"} & (\verb$SUM$)\\
30401
nipkow
parents: 30386
diff changeset
   419
@{term"setsum (%x. t) A"} & @{term[source]"setsum (\<lambda>x. t) A"}\\
nipkow
parents: 30386
diff changeset
   420
@{term[source]"\<Sum>x|P. t"} & @{term"\<Sum>x|P. t"}\\
30440
nipkow
parents: 30425
diff changeset
   421
\multicolumn{2}{@ {}l@ {}}{Similarly for @{text"\<Prod>"} instead of @{text"\<Sum>"}} & (\verb$PROD$)\\
30401
nipkow
parents: 30386
diff changeset
   422
\end{supertabular}
nipkow
parents: 30386
diff changeset
   423
nipkow
parents: 30386
diff changeset
   424
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   425
\section*{Wellfounded}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   426
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   427
\begin{supertabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   428
@{const Wellfounded.wf} & @{term_type_only Wellfounded.wf "('a*'a)set\<Rightarrow>bool"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   429
@{const Wellfounded.acc} & @{term_type_only Wellfounded.acc "('a*'a)set\<Rightarrow>'a set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   430
@{const Wellfounded.measure} & @{term_type_only Wellfounded.measure "('a\<Rightarrow>nat)\<Rightarrow>('a*'a)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   431
@{const Wellfounded.lex_prod} & @{term_type_only Wellfounded.lex_prod "('a*'a)set\<Rightarrow>('b*'b)set\<Rightarrow>(('a*'b)*('a*'b))set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   432
@{const Wellfounded.mlex_prod} & @{term_type_only Wellfounded.mlex_prod "('a\<Rightarrow>nat)\<Rightarrow>('a*'a)set\<Rightarrow>('a*'a)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   433
@{const Wellfounded.less_than} & @{term_type_only Wellfounded.less_than "(nat*nat)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   434
@{const Wellfounded.pred_nat} & @{term_type_only Wellfounded.pred_nat "(nat*nat)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   435
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   436
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   437
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   438
\section*{Set\_Interval} % @{theory Set_Interval}
30321
nipkow
parents: 30293
diff changeset
   439
nipkow
parents: 30293
diff changeset
   440
\begin{supertabular}{@ {} l @ {~::~} l @ {}}
30370
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   441
@{const lessThan} & @{term_type_only lessThan "'a::ord \<Rightarrow> 'a set"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   442
@{const atMost} & @{term_type_only atMost "'a::ord \<Rightarrow> 'a set"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   443
@{const greaterThan} & @{term_type_only greaterThan "'a::ord \<Rightarrow> 'a set"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   444
@{const atLeast} & @{term_type_only atLeast "'a::ord \<Rightarrow> 'a set"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   445
@{const greaterThanLessThan} & @{term_type_only greaterThanLessThan "'a::ord \<Rightarrow> 'a \<Rightarrow> 'a set"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   446
@{const atLeastLessThan} & @{term_type_only atLeastLessThan "'a::ord \<Rightarrow> 'a \<Rightarrow> 'a set"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   447
@{const greaterThanAtMost} & @{term_type_only greaterThanAtMost "'a::ord \<Rightarrow> 'a \<Rightarrow> 'a set"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   448
@{const atLeastAtMost} & @{term_type_only atLeastAtMost "'a::ord \<Rightarrow> 'a \<Rightarrow> 'a set"}\\
30321
nipkow
parents: 30293
diff changeset
   449
\end{supertabular}
nipkow
parents: 30293
diff changeset
   450
nipkow
parents: 30293
diff changeset
   451
\subsubsection*{Syntax}
nipkow
parents: 30293
diff changeset
   452
nipkow
parents: 30293
diff changeset
   453
\begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
nipkow
parents: 30293
diff changeset
   454
@{term "lessThan y"} & @{term[source] "lessThan y"}\\
nipkow
parents: 30293
diff changeset
   455
@{term "atMost y"} & @{term[source] "atMost y"}\\
nipkow
parents: 30293
diff changeset
   456
@{term "greaterThan x"} & @{term[source] "greaterThan x"}\\
nipkow
parents: 30293
diff changeset
   457
@{term "atLeast x"} & @{term[source] "atLeast x"}\\
nipkow
parents: 30293
diff changeset
   458
@{term "greaterThanLessThan x y"} & @{term[source] "greaterThanLessThan x y"}\\
nipkow
parents: 30293
diff changeset
   459
@{term "atLeastLessThan x y"} & @{term[source] "atLeastLessThan x y"}\\
nipkow
parents: 30293
diff changeset
   460
@{term "greaterThanAtMost x y"} & @{term[source] "greaterThanAtMost x y"}\\
nipkow
parents: 30293
diff changeset
   461
@{term "atLeastAtMost x y"} & @{term[source] "atLeastAtMost x y"}\\
30370
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   462
@{term[mode=xsymbols] "UN i:{..n}. A"} & @{term[source] "\<Union> i \<in> {..n}. A"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   463
@{term[mode=xsymbols] "UN i:{..<n}. A"} & @{term[source] "\<Union> i \<in> {..<n}. A"}\\
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   464
\multicolumn{2}{@ {}l@ {}}{Similarly for @{text"\<Inter>"} instead of @{text"\<Union>"}}\\
30321
nipkow
parents: 30293
diff changeset
   465
@{term "setsum (%x. t) {a..b}"} & @{term[source] "setsum (\<lambda>x. t) {a..b}"}\\
30370
79a7491ac1fd Docs updates
nipkow
parents: 30321
diff changeset
   466
@{term "setsum (%x. t) {a..<b}"} & @{term[source] "setsum (\<lambda>x. t) {a..<b}"}\\
30386
nipkow
parents: 30384
diff changeset
   467
@{term "setsum (%x. t) {..b}"} & @{term[source] "setsum (\<lambda>x. t) {..b}"}\\
nipkow
parents: 30384
diff changeset
   468
@{term "setsum (%x. t) {..<b}"} & @{term[source] "setsum (\<lambda>x. t) {..<b}"}\\
30372
96d508968153 UN syntax fix
nipkow
parents: 30370
diff changeset
   469
\multicolumn{2}{@ {}l@ {}}{Similarly for @{text"\<Prod>"} instead of @{text"\<Sum>"}}\\
30321
nipkow
parents: 30293
diff changeset
   470
\end{supertabular}
nipkow
parents: 30293
diff changeset
   471
nipkow
parents: 30293
diff changeset
   472
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   473
\section*{Power}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   474
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   475
\begin{tabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   476
@{const Power.power} & @{typeof Power.power}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   477
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   478
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   479
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   480
\section*{Option}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   481
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   482
@{datatype option}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   483
\bigskip
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   484
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   485
\begin{tabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   486
@{const Option.the} & @{typeof Option.the}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   487
@{const Option.map} & @{typ[source]"('a \<Rightarrow> 'b) \<Rightarrow> 'a option \<Rightarrow> 'b option"}\\
41532
0d34deffb0e9 documented Option.bind
krauss
parents: 40272
diff changeset
   488
@{const Option.set} & @{term_type_only Option.set "'a option \<Rightarrow> 'a set"}\\
0d34deffb0e9 documented Option.bind
krauss
parents: 40272
diff changeset
   489
@{const Option.bind} & @{term_type_only Option.bind "'a option \<Rightarrow> ('a \<Rightarrow> 'b option) \<Rightarrow> 'b option"}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   490
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   491
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   492
\section*{List}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   493
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   494
@{datatype list}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   495
\bigskip
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   496
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   497
\begin{supertabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   498
@{const List.append} & @{typeof List.append}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   499
@{const List.butlast} & @{typeof List.butlast}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   500
@{const List.concat} & @{typeof List.concat}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   501
@{const List.distinct} & @{typeof List.distinct}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   502
@{const List.drop} & @{typeof List.drop}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   503
@{const List.dropWhile} & @{typeof List.dropWhile}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   504
@{const List.filter} & @{typeof List.filter}\\
47187
97db4b6b6a2c updates
nipkow
parents: 46488
diff changeset
   505
@{const List.find} & @{typeof List.find}\\
46133
d9fe85d3d2cd incorporated canonical fold combinator on lists into body of List theory; refactored passages on List.fold(l/r)
haftmann
parents: 45618
diff changeset
   506
@{const List.fold} & @{typeof List.fold}\\
d9fe85d3d2cd incorporated canonical fold combinator on lists into body of List theory; refactored passages on List.fold(l/r)
haftmann
parents: 45618
diff changeset
   507
@{const List.foldr} & @{typeof List.foldr}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   508
@{const List.foldl} & @{typeof List.foldl}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   509
@{const List.hd} & @{typeof List.hd}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   510
@{const List.last} & @{typeof List.last}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   511
@{const List.length} & @{typeof List.length}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   512
@{const List.lenlex} & @{term_type_only List.lenlex "('a*'a)set\<Rightarrow>('a list * 'a list)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   513
@{const List.lex} & @{term_type_only List.lex "('a*'a)set\<Rightarrow>('a list * 'a list)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   514
@{const List.lexn} & @{term_type_only List.lexn "('a*'a)set\<Rightarrow>nat\<Rightarrow>('a list * 'a list)set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   515
@{const List.lexord} & @{term_type_only List.lexord "('a*'a)set\<Rightarrow>('a list * 'a list)set"}\\
46488
994302b6f32e updated listrel (cf. 80dccedd6c14);
wenzelm
parents: 46133
diff changeset
   516
@{const List.listrel} & @{term_type_only List.listrel "('a*'b)set\<Rightarrow>('a list * 'b list)set"}\\
40272
b12ae2445985 added listrel1
nipkow
parents: 38767
diff changeset
   517
@{const List.listrel1} & @{term_type_only List.listrel1 "('a*'a)set\<Rightarrow>('a list * 'a list)set"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   518
@{const List.lists} & @{term_type_only List.lists "'a set\<Rightarrow>'a list set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   519
@{const List.listset} & @{term_type_only List.listset "'a set list \<Rightarrow> 'a list set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   520
@{const List.listsum} & @{typeof List.listsum}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   521
@{const List.list_all2} & @{typeof List.list_all2}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   522
@{const List.list_update} & @{typeof List.list_update}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   523
@{const List.map} & @{typeof List.map}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   524
@{const List.measures} & @{term_type_only List.measures "('a\<Rightarrow>nat)list\<Rightarrow>('a*'a)set"}\\
32933
ba14400f7f34 added List.nth
nipkow
parents: 32885
diff changeset
   525
@{const List.nth} & @{typeof List.nth}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   526
@{const List.remdups} & @{typeof List.remdups}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   527
@{const List.removeAll} & @{typeof List.removeAll}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   528
@{const List.remove1} & @{typeof List.remove1}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   529
@{const List.replicate} & @{typeof List.replicate}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   530
@{const List.rev} & @{typeof List.rev}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   531
@{const List.rotate} & @{typeof List.rotate}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   532
@{const List.rotate1} & @{typeof List.rotate1}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   533
@{const List.set} & @{term_type_only List.set "'a list \<Rightarrow> 'a set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   534
@{const List.sort} & @{typeof List.sort}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   535
@{const List.sorted} & @{typeof List.sorted}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   536
@{const List.splice} & @{typeof List.splice}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   537
@{const List.sublist} & @{typeof List.sublist}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   538
@{const List.take} & @{typeof List.take}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   539
@{const List.takeWhile} & @{typeof List.takeWhile}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   540
@{const List.tl} & @{typeof List.tl}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   541
@{const List.upt} & @{typeof List.upt}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   542
@{const List.upto} & @{typeof List.upto}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   543
@{const List.zip} & @{typeof List.zip}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   544
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   545
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   546
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   547
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   548
\begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 51489
diff changeset
   549
@{text"[x\<^sub>1,\<dots>,x\<^sub>n]"} & @{text"x\<^sub>1 # \<dots> # x\<^sub>n # []"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   550
@{term"[m..<n]"} & @{term[source]"upt m n"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   551
@{term"[i..j]"} & @{term[source]"upto i j"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   552
@{text"[e. x \<leftarrow> xs]"} & @{term"map (%x. e) xs"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   553
@{term"[x \<leftarrow> xs. b]"} & @{term[source]"filter (\<lambda>x. b) xs"} \\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   554
@{term"xs[n := x]"} & @{term[source]"list_update xs n x"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   555
@{term"\<Sum>x\<leftarrow>xs. e"} & @{term[source]"listsum (map (\<lambda>x. e) xs)"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   556
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   557
\medskip
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   558
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 51489
diff changeset
   559
List comprehension: @{text"[e. q\<^sub>1, \<dots>, q\<^sub>n]"} where each
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 51489
diff changeset
   560
qualifier @{text q\<^sub>i} is either a generator \mbox{@{text"pat \<leftarrow> e"}} or a
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   561
guard, i.e.\ boolean expression.
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   562
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   563
\section*{Map}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   564
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   565
Maps model partial functions and are often used as finite tables. However,
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   566
the domain of a map may be infinite.
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   567
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   568
\begin{supertabular}{@ {} l @ {~::~} l @ {}}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   569
@{const Map.empty} & @{typeof Map.empty}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   570
@{const Map.map_add} & @{typeof Map.map_add}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   571
@{const Map.map_comp} & @{typeof Map.map_comp}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   572
@{const Map.restrict_map} & @{term_type_only Map.restrict_map "('a\<Rightarrow>'b option)\<Rightarrow>'a set\<Rightarrow>('a\<Rightarrow>'b option)"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   573
@{const Map.dom} & @{term_type_only Map.dom "('a\<Rightarrow>'b option)\<Rightarrow>'a set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   574
@{const Map.ran} & @{term_type_only Map.ran "('a\<Rightarrow>'b option)\<Rightarrow>'b set"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   575
@{const Map.map_le} & @{typeof Map.map_le}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   576
@{const Map.map_of} & @{typeof Map.map_of}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   577
@{const Map.map_upds} & @{typeof Map.map_upds}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   578
\end{supertabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   579
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   580
\subsubsection*{Syntax}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   581
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   582
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}}
30403
nipkow
parents: 30402
diff changeset
   583
@{term"Map.empty"} & @{term"\<lambda>x. None"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   584
@{term"m(x:=Some y)"} & @{term[source]"m(x:=Some y)"}\\
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 51489
diff changeset
   585
@{text"m(x\<^sub>1\<mapsto>y\<^sub>1,\<dots>,x\<^sub>n\<mapsto>y\<^sub>n)"} & @{text[source]"m(x\<^sub>1\<mapsto>y\<^sub>1)\<dots>(x\<^sub>n\<mapsto>y\<^sub>n)"}\\
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 51489
diff changeset
   586
@{text"[x\<^sub>1\<mapsto>y\<^sub>1,\<dots>,x\<^sub>n\<mapsto>y\<^sub>n]"} & @{text[source]"Map.empty(x\<^sub>1\<mapsto>y\<^sub>1,\<dots>,x\<^sub>n\<mapsto>y\<^sub>n)"}\\
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   587
@{term"map_upds m xs ys"} & @{term[source]"map_upds m xs ys"}\\
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   588
\end{tabular}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   589
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   590
\section*{Infix operators in Main} % @{theory Main}
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   591
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   592
\begin{center}
50605
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   593
\begin{tabular}{llll}
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   594
 & Operator & precedence & associativity \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   595
\hline
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   596
Meta-logic & @{text"\<Longrightarrow>"} & 1 & right \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   597
& @{text"\<equiv>"} & 2 \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   598
\hline
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   599
Logic & @{text"\<and>"} & 35 & right \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   600
&@{text"\<or>"} & 30 & right \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   601
&@{text"\<longrightarrow>"}, @{text"\<longleftrightarrow>"} & 25 & right\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   602
&@{text"="}, @{text"\<noteq>"} & 50 & left\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   603
\hline
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   604
Orderings & @{text"\<le>"}, @{text"<"}, @{text"\<ge>"}, @{text">"} & 50 \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   605
\hline
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   606
Sets & @{text"\<subseteq>"}, @{text"\<subset>"}, @{text"\<supseteq>"}, @{text"\<supset>"} & 50 \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   607
&@{text"\<in>"}, @{text"\<notin>"} & 50 \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   608
&@{text"\<inter>"} & 70 & left \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   609
&@{text"\<union>"} & 65 & left \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   610
\hline
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   611
Functions and Relations & @{text"\<circ>"} & 55 & left\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   612
&@{text"`"} & 90 & right\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   613
&@{text"O"} & 75 & right\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   614
&@{text"``"} & 90 & right\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   615
\hline
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   616
Numbers & @{text"+"}, @{text"-"} & 65 & left \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   617
&@{text"*"}, @{text"/"} & 70 & left \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   618
&@{text"div"}, @{text"mod"} & 70 & left\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   619
&@{text"^"} & 80 & right\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   620
&@{text"^^"} & 80 & right\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   621
&@{text"dvd"} & 50 \\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   622
\hline
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   623
Lists & @{text"#"}, @{text"@"} & 65 & right\\
620515b73a77 tuned infix table
nipkow
parents: 50581
diff changeset
   624
&@{text"!"} & 100 & left
50581
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   625
\end{tabular}
0eaefd4306d7 added table of infix operators
nipkow
parents: 48985
diff changeset
   626
\end{center}
30293
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   627
*}
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   628
(*<*)
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   629
end
cf57f2acb94c Added Docs
nipkow
parents:
diff changeset
   630
(*>*)