setup\<open>
Document_Output.antiquotation_pretty_source \<^binding>\<open>term_type_only\<close> (Args.term -- Args.typ_abbrev)
(fn ctxt => fn (t, T) =>
(if fastype_of t = Sign.certify_typ (Proof_Context.theory_of ctxt) T then ()
else error "term_type_only: type mismatch"; Syntax.pretty_typ ctxt T)) \<close> setup\<open>
Document_Output.antiquotation_pretty_source \<^binding>\<open>expanded_typ\<close> Args.typ Syntax.pretty_typ \<close> (*>*) text\<open>
\begin{abstract}
This document lists the main types, functions andsyntax provided bytheory\<^theory>\<open>Main\<close>. 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>\<open>https://isabelle.in.tum.de/library/HOL/HOL\<close>. \end{abstract}
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} \<^term>\<open>fun_upd f x y\<close> & @{term[source]"fun_upd f x y"}\\ \<open>f(x\<^sub>1:=y\<^sub>1,\<dots>,x\<^sub>n:=y\<^sub>n)\<close> & \<open>f(x\<^sub>1:=y\<^sub>1)\<dots>(x\<^sub>n:=y\<^sub>n)\<close>\\ \end{tabular}
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} ll @ {}} \<^term>\<open>Pair a b\<close> & @{term[source]"Pair a b"}\\ \<^term>\<open>case_prod (\<lambda>x y. t)\<close> & @{term[source]"case_prod (\<lambda>x y. t)"}\\ \<^term>\<open>A \<times> B\<close> & \<open>Sigma A (\<lambda>\<^latex>\<open>\_\<close>. B)\<close> \end{tabular}
Pairs may be nested. Nesting to the right is printed as a tuple,
e.g.\ \mbox{\<^term>\<open>(a,b,c)\<close>} is really \mbox{\<open>(a, (b, c))\<close>.}
Pattern matching with pairs and tuples extends to all binders,
e.g.\ \mbox{\<^prop>\<open>\<forall>(x,y)\<in>A. P\<close>,} \<^term>\<open>{(x,y). P}\<close>, etc.
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} \<^term>\<open>converse r\<close> & @{term[source]"converse r"} & (\<^verbatim>\<open>^-1\<close>) \end{tabular} \<^medskip>
\noindent
Type synonym \ \<^typ>\<open>'a rel\<close> \<open>=\<close> @{expanded_typ "'a rel"}
\section*{Equiv\_Relations}
\begin{tabular}{@ {} l @ {~::~} l @ {}} \<^const>\<open>Equiv_Relations.equiv\<close> & @{term_type_only Equiv_Relations.equiv "'a set \<Rightarrow> ('a*'a)set\<Rightarrow>bool"}\\ \<^const>\<open>Equiv_Relations.quotient\<close> & @{term_type_only Equiv_Relations.quotient "'a set \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> 'a set set"}\\ \<^const>\<open>Equiv_Relations.congruent\<close> & @{term_type_only Equiv_Relations.congruent "('a*'a)set\<Rightarrow>('a\<Rightarrow>'b)\<Rightarrow>bool"}\\ \<^const>\<open>Equiv_Relations.congruent2\<close> & @{term_type_only Equiv_Relations.congruent2 "('a*'a)set\<Rightarrow>('b*'b)set\<Rightarrow>('a\<Rightarrow>'b\<Rightarrow>'c)\<Rightarrow>bool"}\\
%@ {const Equiv_Relations.} & @ {term_type_only Equiv_Relations. ""}\\ \end{tabular}
\subsubsection*{Syntax}
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} \<^term>\<open>congruent r f\<close> & @{term[source]"congruent r f"}\\ \<^term>\<open>congruent2 r r f\<close> & @{term[source]"congruent2 r r f"}\\ \end{tabular}
Theories \<^theory>\<open>HOL.Groups\<close>, \<^theory>\<open>HOL.Rings\<close>, \<^theory>\<open>HOL.Euclidean_Rings\<close> and \<^theory>\<open>HOL.Fields\<close>
define a large collection of classes describing common algebraic
structures from semigroups up to fields. Everything isdonein terms of overloaded operators:
\begin{tabular}{@ {} l @ {~::~} l @ {}} \<^const>\<open>Nat.of_nat\<close> & \<^typeof>\<open>Nat.of_nat\<close>\\ \<^term>\<open>(^^) :: ('a \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> &</span>
@{term_type_only "(^^) :: ('a \ 'a) \ nat \ 'a \ 'a" "('a \ 'a) \ nat \ 'a \ 'a"} \end{tabular}
\section*{Int}
Type \<^typ>\<open>int\<close> \<^bigskip>
\begin{tabular}{@ {} llllllll @ {}} \<^term>\<open>(+) :: int \<Rightarrow> int \<Rightarrow> int\<close> & \<^term>\<open>(-) :: int \<Rightarrow> int \<Rightarrow> int\<close> & \<^term>\<open>uminus :: int \<Rightarrow> int\<close> & \<^term>\<open>(*) :: int \<Rightarrow> int \<Rightarrow> int\<close> & \<^term>\<open>(^) :: int \<Rightarrow> nat \<Rightarrow> int\<close> & \<^term>\<open>(div) :: int \<Rightarrow> int \<Rightarrow> int\<close>& \<^term>\<open>(mod) :: int \<Rightarrow> int \<Rightarrow> int\<close>& \<^term>\<open>(dvd) :: int \<Rightarrow> int \<Rightarrow> bool\<close>\\ \<^term>\<open>(\<le>) :: int \<Rightarrow> int \<Rightarrow> bool\<close> & \<^term>\<open>(<) :: int \<Rightarrow> int \<Rightarrow> bool\<close> & \<^term>\<open>min :: int \<Rightarrow> int \<Rightarrow> int\<close> & \<^term>\<open>max :: int \<Rightarrow> int \<Rightarrow> int\<close> & \<^term>\<open>Min :: int set \<Rightarrow> int\<close> & \<^term>\<open>Max :: int set \<Rightarrow> int\<close>\\ \<^term>\<open>abs :: int \<Rightarrow> int\<close> & \<^term>\<open>sgn :: int \<Rightarrow> int\<close>\\ \end{tabular}
\begin{tabular}{@ {} l @ {~::~} l l @ {}} \<^const>\<open>Int.nat\<close> & \<^typeof>\<open>Int.nat\<close>\\ \<^const>\<open>Int.of_int\<close> & \<^typeof>\<open>Int.of_int\<close>\\ \<^const>\<open>Int.Ints\<close> & @{term_type_only Int.Ints "'a::ring_1 set"} & (\<^verbatim>\<open>Ints\<close>) \end{tabular}
\subsubsection*{Syntax}
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} \<^term>\<open>of_nat::nat\<Rightarrow>int\<close> & @{term[source]"of_nat"}\\ \end{tabular}
\section*{Finite\_Set}
\begin{tabular}{@ {} l @ {~::~} l @ {}} \<^const>\<open>Finite_Set.finite\<close> & @{term_type_only Finite_Set.finite "'a set\<Rightarrow>bool"}\\ \<^const>\<open>Finite_Set.card\<close> & @{term_type_only Finite_Set.card "'a set \<Rightarrow> nat"}\\ \<^const>\<open>Finite_Set.fold\<close> & @{term_type_only Finite_Set.fold "('a \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> 'b \<Rightarrow> 'a set \<Rightarrow> 'b"}\\ \end{tabular}
\section*{Lattices\_Big}
\begin{tabular}{@ {} l @ {~::~} l l @ {}} \<^const>\<open>Lattices_Big.Min\<close> & \<^typeof>\<open>Lattices_Big.Min\<close>\\ \<^const>\<open>Lattices_Big.Max\<close> & \<^typeof>\<open>Lattices_Big.Max\<close>\\ \<^const>\<open>Lattices_Big.arg_min\<close> & \<^typeof>\<open>Lattices_Big.arg_min\<close>\\ \<^const>\<open>Lattices_Big.is_arg_min\<close> & \<^typeof>\<open>Lattices_Big.is_arg_min\<close>\\ \<^const>\<open>Lattices_Big.arg_max\<close> & \<^typeof>\<open>Lattices_Big.arg_max\<close>\\ \<^const>\<open>Lattices_Big.is_arg_max\<close> & \<^typeof>\<open>Lattices_Big.is_arg_max\<close>\\ \end{tabular}
\subsubsection*{Syntax}
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} \<^term>\<open>ARG_MIN f x. P\<close> & @{term[source]"arg_min f (\<lambda>x. P)"}\\ \<^term>\<open>ARG_MAX f x. P\<close> & @{term[source]"arg_max f (\<lambda>x. P)"}\\ \end{tabular}
\section*{Groups\_Big}
\begin{tabular}{@ {} l @ {~::~} l @ {}} \<^const>\<open>Groups_Big.sum\<close> & @{term_type_only Groups_Big.sum "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b::comm_monoid_add"}\\ \<^const>\<open>Groups_Big.prod\<close> & @{term_type_only Groups_Big.prod "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b::comm_monoid_mult"}\\ \end{tabular}
\subsubsection*{Syntax}
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} \<^term>\<open>sum (\<lambda>x. x) A\<close> & @{term[source]"sum (\<lambda>x. x) A"} & (\<^verbatim>\<open>SUM\<close>)\\ \<^term>\<open>sum (\<lambda>x. t) A\<close> & @{term[source]"sum (\<lambda>x. t) A"}\\
@{term[source] "\x|P. t"} & \<^term>\\x|P. t\\\ \multicolumn{2}{@ {}l@ {}}{Similarly for \<open>\<Prod>\<close> instead of \<open>\<Sum>\<close>} & (\<^verbatim>\<open>PROD\<close>)\\ \end{tabular}
\begin{tabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} \<open>[x\<^sub>1,\<dots>,x\<^sub>n]\<close> & \<open>x\<^sub>1 # \<dots> # x\<^sub>n # []\<close>\\ \<^term>\<open>[m..<n]\<close> & @{term[source]"upt m n"}\\ \<^term>\<open>[i..j]\<close> & @{term[source]"upto i j"}\\ \<^term>\<open>xs[n := x]\<close> & @{term[source]"list_update xs n x"}\\ \<^term>\<open>\<Sum>x\<leftarrow>xs. e\<close> & @{term[source]"listsum (map (\<lambda>x. e) xs)"}\\ \end{tabular} \<^medskip>
Filter input syntax\<open>[pat \<leftarrow> e. b]\<close>, where \<open>pat\<close> is a tuple pattern, which stands for \<^term>\<open>filter (\<lambda>pat. b) e\<close>.
List comprehension input syntax: \<open>[e. q\<^sub>1, \<dots>, q\<^sub>n]\<close> where each
qualifier \<open>q\<^sub>i\<close> is either a generator \mbox{\<open>pat \<leftarrow> e\<close>} or a
guard, i.e.\ boolean expression.
\section*{Map}
Maps model partial functions and are often used as finite tables. However,
the domain of a map may be infinite.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.