(*<*)
theory Main_Doc
imports Main
begin
setup โน
Document_Output.antiquotation_pretty_source
๐ โน term_type_only
โบ (Args.
term -- Args.ty
p_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))
โบ
setup โน
Document_Output.antiquotation_pretty_source ๐ โน expanded_typโบ Args.typ
Syntax .pretty_typ
โบ
(*>*)
text โน
\begin {abstract}
This document lists the main types , functions and syntax provided by 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 ๐ซ โน https://isabelle. in .tum.de/library/HOL/HOLโบ .
\end {abstract}
\section *{HOL}
The basic logic: ๐ โน x = yโบ , ๐ โน Trueโบ , ๐ โน Falseโบ , ๐ โน ยฌ Pโบ , ๐ โน P โง Qโบ ,
๐ โน P โจ Qโบ , ๐ โน P โถ Qโบ , ๐ โน โ x. Pโบ , ๐ โน โ x. Pโบ , ๐ โน โ ! x. Pโบ ,
๐ โน THE x. Pโบ .
๐ซ
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน HOL.undefinedโบ & ๐ซ โน HOL.undefinedโบ \\
๐ โน HOL.defaultโบ & ๐ซ โน HOL.defaultโบ \\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l l @ {}}
๐ โน ยฌ (x = y)โบ & @{term [source]"\ (x = y)" } & (๐ โน ~=โบ )\\
@{term [source]"P \ Q" } & ๐ โน P โท Qโบ \\
๐ โน If x y zโบ & @{term [source]"If x y z" }\\
๐ โน Let e๐ซ 1 (λx. e๐ซ 2)โบ & @{term [source]"Let e\<^sub>1 (\x. e\<^sub>2)" }\\
\end {tabular}
\section *{Orderings}
A collection of classes defining basic orderings:
preorder, partial order, linear order, dense linear order and wellorder.
๐ซ
\begin {tabular}{@ {} l @ {~::~} l l @ {}}
๐ โน Orderings.less_eqโบ & ๐ซ โน Orderings.less_eqโบ & (๐ โน <=โบ )\\
๐ โน Orderings.lessโบ & ๐ซ โน Orderings.lessโบ \\
๐ โน Orderings.Leastโบ & ๐ซ โน Orderings.Leastโบ \\
๐ โน Orderings.Greatestโบ & ๐ซ โน Orderings.Greatestโบ \\
๐ โน Orderings.minโบ & ๐ซ โน Orderings.minโบ \\
๐ โน Orderings.maxโบ & ๐ซ โน Orderings.maxโบ \\
@{const[source] top} & ๐ซ โน Orderings.topโบ \\
@{const[source] bot} & ๐ซ โน Orderings.botโบ \\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l l @ {}}
@{term [source]"x \ y" } & ๐ โน x โฅ yโบ & (๐ โน >=โบ )\\
@{term [source]"x > y" } & ๐ โน x > yโบ \\
๐ โน โ xโค y. Pโบ & @{term [source]"\x. x \ y \ P" }\\
๐ โน โ xโค y. Pโบ & @{term [source]"\x. x \ y \ P" }\\
\multicolumn {2}{@ {}l@ {}}{Similarly for $<$, $\ge $ and $>$}\\
๐ โน LEAST x. Pโบ & @{term [source]"Least (\x. P)" }\\
๐ โน GREATEST x. Pโบ & @{term [source]"Greatest (\x. P)" }\\
\end {tabular}
\section *{Lattices}
Classes semilattice, lattice, distributive lattice and complete lattice (the
latter in theory ๐ โน HOL.Setโบ ).
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Lattices.infโบ & ๐ซ โน Lattices.infโบ \\
๐ โน Lattices.supโบ & ๐ซ โน Lattices.supโบ \\
๐ โน Complete_Lattices.Infโบ & @{term_type_only Complete_Lattices.Inf "'a set \ 'a::Inf" }\\
๐ โน Complete_Lattices.Supโบ & @{term_type_only Complete_Lattices.Sup "'a set \ 'a::Sup" }\\
\end {tabular}
\subsubsection *{Syntax }
Available via ๐ซ โน unbundle lattice_syntaxโบ .
\begin {supertabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
@{text [source]"x \ y" } & ๐ โน x โค yโบ \\
@{text [source]"x \ y" } & ๐ โน x < yโบ \\
@{text [source]"x \ y" } & ๐ โน inf x yโบ \\
@{text [source]"x \ y" } & ๐ โน sup x yโบ \\
@{text [source]"\A" } & ๐ โน Inf Aโบ \\
@{text [source]"\A" } & ๐ โน Sup Aโบ \\
@{text [source]"\" } & @{term [source] top}\\
@{text [source]"\" } & @{term [source] bot}\\
\end {supertabular}
\section *{Set}
\begin {tabular}{@ {} l @ {~::~} l l @ {}}
๐ โน Set.emptyโบ & @{term_type_only "Set.empty" "'a set" }\\
๐ โน Set.insertโบ & @{term_type_only insert "'a\'a set\'a set" }\\
๐ โน Collectโบ & @{term_type_only Collect "('a\bool)\'a set" }\\
๐ โน Set.memberโบ & @{term_type_only Set.member "'a\'a set\bool" } & (๐ โน :โบ )\\
๐ โน Set.unionโบ & @{term_type_only Set.union "'a set\'a set \ 'a set" } & (๐ โน Unโบ )\\
๐ โน Set.interโบ & @{term_type_only Set.inter "'a set\'a set \ 'a set" } & (๐ โน Intโบ )\\
๐ โน Unionโบ & @{term_type_only Union "'a set set\'a set" }\\
๐ โน Interโบ & @{term_type_only Inter "'a set set\'a set" }\\
๐ โน Powโบ & @{term_type_only Pow "'a set \'a set set" }\\
๐ โน UNIVโบ & @{term_type_only UNIV "'a set" }\\
๐ โน imageโบ & @{term_type_only image "('a\'b)\'a set\'b set" }\\
๐ โน Ballโบ & @{term_type_only Ball "'a set\('a\bool)\bool" }\\
๐ โน Bexโบ & @{term_type_only Bex "'a set\('a\bool)\bool" }\\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l l @ {}}
โน {a๐ซ 1,โฆ ,a๐ซ n}โบ & โน insert a๐ซ 1 (โฆ (insert a๐ซ n {})โฆ )โบ \\
๐ โน a โ Aโบ & @{term [source]"\(x \ A)" }\\
๐ โน A โ Bโบ & @{term [source]"A \ B" }\\
๐ โน A โ Bโบ & @{term [source]"A < B" }\\
@{term [source]"A \ B" } & @{term [source]"B \ A" }\\
@{term [source]"A \ B" } & @{term [source]"B < A" }\\
๐ โน {x. P}โบ & @{term [source]"Collect (\x. P)" }\\
โน {t | x๐ซ 1 โฆ x๐ซ n. P}โบ & โน {v. โ x๐ซ 1 โฆ x๐ซ n. v = t โง P}โบ \\
@{term [source]"\x\I. A" } & @{term [source]"\((\x. A) ` I)" } & (\texttt {UN})\\
@{term [source]"\x. A" } & @{term [source]"\((\x. A) ` UNIV)" }\\
@{term [source]"\x\I. A" } & @{term [source]"\((\x. A) ` I)" } & (\texttt {INT})\\
@{term [source]"\x. A" } & @{term [source]"\((\x. A) ` UNIV)" }\\
๐ โน โ xโ A. Pโบ & @{term [source]"Ball A (\x. P)" }\\
๐ โน โ xโ A. Pโบ & @{term [source]"Bex A (\x. P)" }\\
๐ โน range fโบ & @{term [source]"f ` UNIV" }\\
\end {tabular}
\section *{Fun }
\begin {tabular}{@ {} l @ {~::~} l l @ {}}
๐ โน Fun .idโบ & ๐ซ โน Fun .idโบ \\
๐ โน Fun .compโบ & ๐ซ โน Fun .compโบ & (\texttt {o})\\
๐ โน Fun .inj_onโบ & @{term_type_only Fun .inj_on "('a\'b)\'a set\bool" }\\
๐ โน Fun .injโบ & ๐ซ โน Fun .injโบ \\
๐ โน Fun .surjโบ & ๐ซ โน Fun .surjโบ \\
๐ โน Fun .bijโบ & ๐ซ โน Fun .bijโบ \\
๐ โน Fun .bij_betwโบ & @{term_type_only Fun .bij_betw "('a\'b)\'a set\'b set\bool" }\\
๐ โน Fun .monotone_onโบ & ๐ซ โน Fun .monotone_onโบ \\
๐ โน Fun .monotoneโบ & ๐ซ โน Fun .monotoneโบ \\
๐ โน Fun .mono_onโบ & ๐ซ โน Fun .mono_onโบ \\
๐ โน Fun .monoโบ & ๐ซ โน Fun .monoโบ \\
๐ โน Fun .strict_mono_onโบ & ๐ซ โน Fun .strict_mono_onโบ \\
๐ โน Fun .strict_monoโบ & ๐ซ โน Fun .strict_monoโบ \\
๐ โน Fun .antimonoโบ & ๐ซ โน Fun .antimonoโบ \\
๐ โน Fun .fun_updโบ & ๐ซ โน Fun .fun_updโบ \\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
๐ โน fun_upd f x yโบ & @{term [source]"fun_upd f x y" }\\
โน f(x๐ซ 1:=y๐ซ 1,โฆ ,x๐ซ n:=y๐ซ n)โบ & โน f(x๐ซ 1:=y๐ซ 1)โฆ (x๐ซ n:=y๐ซ n)โบ \\
\end {tabular}
\section *{Hilbert\_ Choice}
Hilbert's selection ($\varepsilon$) operator: \<^term>\SOME x. P\.
๐ซ
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Hilbert_Choice.inv_intoโบ & @{term_type_only Hilbert_Choice.inv_into "'a set \ ('a \ 'b) \ ('b \ 'a)" }
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
๐ โน invโบ & @{term [source]"inv_into UNIV" }
\end {tabular}
\section *{Fixed Points}
Theory : ๐ โน HOL.Inductive โบ .
Least and greatest fixed points in a complete lattice ๐ โน 'a\:
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Inductive .lfpโบ & ๐ซ โน Inductive .lfpโบ \\
๐ โน Inductive .gfpโบ & ๐ซ โน Inductive .gfpโบ \\
\end {tabular}
Note that in particular sets (๐ โน 'a \ bool\) are complete lattices.
\section *{Sum\_ Type}
Type constructor โน +โบ .
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Sum_Type.Inlโบ & ๐ซ โน Sum_Type.Inlโบ \\
๐ โน Sum_Type.Inrโบ & ๐ซ โน Sum_Type.Inrโบ \\
๐ โน Sum_Type.Plusโบ & @{term_type_only Sum_Type.Plus "'a set\'b set\('a+'b)set" }
\end {tabular}
\section *{Product\_ Type}
Types ๐ โน unitโบ and โน ร โบ .
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Product_Type.Unityโบ & ๐ซ โน Product_Type.Unityโบ \\
๐ โน Pairโบ & ๐ซ โน Pairโบ \\
๐ โน fstโบ & ๐ซ โน fstโบ \\
๐ โน sndโบ & ๐ซ โน sndโบ \\
๐ โน case_prodโบ & ๐ซ โน case_prodโบ \\
๐ โน curryโบ & ๐ซ โน curryโบ \\
๐ โน Product_Type.Sigmaโบ & @{term_type_only Product_Type.Sigma "'a set\('a\'b set)\('a*'b)set" }\\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } ll @ {}}
๐ โน Pair a bโบ & @{term [source]"Pair a b" }\\
๐ โน case_prod (λx y. t)โบ & @{term [source]"case_prod (\x y. t)" }\\
๐ โน A ร Bโบ & โน Sigma A (λ๐ โน \_ โบ . B)โบ
\end {tabular}
Pairs may be nested. Nesting to the right is printed as a tuple,
e.g.\ \mbox {๐ โน (a,b,c)โบ } is really \mbox {โน (a, (b, c))โบ .}
Pattern matching with pairs and tuples extends to all binders,
e.g.\ \mbox {๐ โน โ (x,y)โ A. Pโบ ,} ๐ โน {(x,y). P}โบ , etc.
\section *{Relation}
\begin {supertabular}{@ {} l @ {~::~} l @ {}}
๐ โน Relation.converseโบ & @{term_type_only Relation.converse "('a * 'b)set \ ('b*'a)set" }\\
๐ โน Relation.relcompโบ & @{term_type_only Relation.relcomp "('a*'b)set\('b*'c)set\('a*'c)set" }\\
๐ โน Relation.Imageโบ & @{term_type_only Relation.Image "('a*'b)set\'a set\'b set" }\\
๐ โน Relation.inv_imageโบ & @{term_type_only Relation.inv_image "('a*'a)set\('b\'a)\('b*'b)set" }\\
๐ โน Relation.Id_onโบ & @{term_type_only Relation.Id_on "'a set\('a*'a)set" }\\
๐ โน Relation.Idโบ & @{term_type_only Relation.Id "('a*'a)set" }\\
๐ โน Relation.Domain โบ & @{term_type_only Relation.Domain "('a*'b)set\'a set" }\\
๐ โน Relation.Rangeโบ & @{term_type_only Relation.Range "('a*'b)set\'b set" }\\
๐ โน Relation.Fieldโบ & @{term_type_only Relation.Field "('a*'a)set\'a set" }\\
๐ โน Relation.refl_onโบ & @{term_type_only Relation.refl_on "'a set\('a*'a)set\bool" }\\
๐ โน Relation.reflโบ & @{term_type_only Relation.refl "('a*'a)set\bool" }\\
๐ โน Relation.symโบ & @{term_type_only Relation.sym "('a*'a)set\bool" }\\
๐ โน Relation.antisymโบ & @{term_type_only Relation.antisym "('a*'a)set\bool" }\\
๐ โน Relation.transโบ & @{term_type_only Relation.trans "('a*'a)set\bool" }\\
๐ โน Relation.irreflโบ & @{term_type_only Relation.irrefl "('a*'a)set\bool" }\\
๐ โน Relation.total_onโบ & @{term_type_only Relation.total_on "'a set\('a*'a)set\bool" }\\
๐ โน Relation.totalโบ & @{term_type_only Relation.total "('a*'a)set\bool" }\\
\end {supertabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l l @ {}}
๐ โน converse rโบ & @{term [source]"converse r" } & (๐ โน ^-1โบ )
\end {tabular}
๐ซ
\noindent
Type synonym \ ๐ โน 'a rel\ \=\ @{expanded_typ "' a rel"}
\section *{Equiv\_ Relations}
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Equiv_Relations.equivโบ & @{term_type_only Equiv_Relations.equiv "'a set \ ('a*'a)set\bool" }\\
๐ โน Equiv_Relations.quotientโบ & @{term_type_only Equiv_Relations.quotient "'a set \ ('a \ 'a) set \ 'a set set" }\\
๐ โน Equiv_Relations.congruentโบ & @{term_type_only Equiv_Relations.congruent "('a*'a)set\('a\'b)\bool" }\\
๐ โน Equiv_Relations.congruent2โบ & @{term_type_only Equiv_Relations.congruent2 "('a*'a)set\('b*'b)set\('a\'b\'c)\bool" }\\
%@ {const Equiv_Relations.} & @ {term_type_only Equiv_Relations. "" }\\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
๐ โน congruent r fโบ & @{term [source]"congruent r f" }\\
๐ โน congruent2 r r fโบ & @{term [source]"congruent2 r r f" }\\
\end {tabular}
\section *{Transitive\_ Closure}
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Transitive_Closure.rtranclโบ & @{term_type_only Transitive_Closure.rtrancl "('a*'a)set\('a*'a)set" }\\
๐ โน Transitive_Closure.tranclโบ & @{term_type_only Transitive_Closure.trancl "('a*'a)set\('a*'a)set" }\\
๐ โน Transitive_Closure.reflclโบ & @{term_type_only Transitive_Closure.reflcl "('a*'a)set\('a*'a)set" }\\
๐ โน Transitive_Closure.acyclicโบ & @{term_type_only Transitive_Closure.acyclic "('a*'a)set\bool" }\\
๐ โน compowerโบ & @{term_type_only "(^^) :: ('a*'a)set\nat\('a*'a)set" "('a*'a)set\nat\('a*'a)set" }\\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l l @ {}}
๐ โน rtrancl rโบ & @{term [source]"rtrancl r" } & (๐ โน ^*โบ )\\
๐ โน trancl rโบ & @{term [source]"trancl r" } & (๐ โน ^+โบ )\\
๐ โน reflcl rโบ & @{term [source]"reflcl r" } & (๐ โน ^=โบ )
\end {tabular}
\section *{Algebra}
Theories ๐ โน HOL.Groupsโบ , ๐ โน HOL.Ringsโบ ,
๐ โน HOL.Euclidean_Ringsโบ and ๐ โน HOL.Fieldsโบ
define a large collection of classes describing common algebraic
structures from semigroups up to fields. Everything is done in terms of
overloaded operators:
\begin {tabular}{@ {} l @ {~::~} l l @ {}}
โน 0โบ & ๐ซ โน zeroโบ \\
โน 1โบ & ๐ซ โน oneโบ \\
๐ โน plusโบ & ๐ซ โน plusโบ \\
๐ โน minusโบ & ๐ซ โน minusโบ \\
๐ โน uminusโบ & ๐ซ โน uminusโบ & (๐ โน -โบ )\\
๐ โน timesโบ & ๐ซ โน timesโบ \\
๐ โน inverseโบ & ๐ซ โน inverseโบ \\
๐ โน divideโบ & ๐ซ โน divideโบ \\
๐ โน absโบ & ๐ซ โน absโบ \\
๐ โน sgnโบ & ๐ซ โน sgnโบ \\
๐ โน Rings.dvdโบ & ๐ซ โน Rings.dvdโบ \\
๐ โน divideโบ & ๐ซ โน divideโบ \\
๐ โน moduloโบ & ๐ซ โน moduloโบ \\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
๐ โน โฃ xโฃ โบ & @{term [source] "abs x" }
\end {tabular}
\section *{Nat}
๐ซ โน natโบ
๐ซ
\begin {tabular}{@ {} lllllll @ {}}
๐ โน (+) :: nat ==> nat ==> natโบ &
๐ โน (-) :: nat ==> nat ==> natโบ &
๐ โน (*) :: nat \<Rightarrow> nat \<Rightarrow> nat\<close> &
๐ โน (^) :: nat ==> nat ==> natโบ &
๐ โน (div) :: nat ==> nat ==> natโบ &
๐ โน (mod) :: nat ==> nat ==> natโบ &
๐ โน (dvd) :: nat ==> nat ==> boolโบ \\
๐ โน (โค ) :: nat ==> nat ==> boolโบ &
๐ โน (<) :: nat ==> nat ==> boolโบ &
๐ โน min :: nat ==> nat ==> natโบ &
๐ โน max :: nat ==> nat ==> natโบ &
๐ โน Min :: nat set ==> natโบ &
๐ โน Max :: nat set ==> natโบ \\
\end {tabular}
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Nat.of_natโบ & ๐ซ โน Nat.of_natโบ \\
๐ โน (^^) :: ('a \ ' a) ==> nat ==> 'a \ ' aโบ &
@{term_type_only "(^^) :: ('a \ 'a) \ nat \ 'a \ 'a" "('a \ 'a) \ nat \ 'a \ 'a" }
\end {tabular}
\section *{Int}
Type ๐ โน intโบ
๐ซ
\begin {tabular}{@ {} llllllll @ {}}
๐ โน (+) :: int ==> int ==> intโบ &
๐ โน (-) :: int ==> int ==> intโบ &
๐ โน uminus :: int ==> intโบ &
๐ โน (*) :: int \<Rightarrow> int \<Rightarrow> int\<close> &
๐ โน (^) :: int ==> nat ==> intโบ &
๐ โน (div) :: int ==> int ==> intโบ &
๐ โน (mod) :: int ==> int ==> intโบ &
๐ โน (dvd) :: int ==> int ==> boolโบ \\
๐ โน (โค ) :: int ==> int ==> boolโบ &
๐ โน (<) :: int ==> int ==> boolโบ &
๐ โน min :: int ==> int ==> intโบ &
๐ โน max :: int ==> int ==> intโบ &
๐ โน Min :: int set ==> intโบ &
๐ โน Max :: int set ==> intโบ \\
๐ โน abs :: int ==> intโบ &
๐ โน sgn :: int ==> intโบ \\
\end {tabular}
\begin {tabular}{@ {} l @ {~::~} l l @ {}}
๐ โน Int.natโบ & ๐ซ โน Int.natโบ \\
๐ โน Int.of_intโบ & ๐ซ โน Int.of_intโบ \\
๐ โน Int.Intsโบ & @{term_type_only Int.Ints "'a::ring_1 set" } & (๐ โน Intsโบ )
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
๐ โน of_nat::nat==> intโบ & @{term [source]"of_nat" }\\
\end {tabular}
\section *{Finite\_ Set}
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Finite_Set.finiteโบ & @{term_type_only Finite_Set.finite "'a set\bool" }\\
๐ โน Finite_Set.cardโบ & @{term_type_only Finite_Set.card "'a set \ nat" }\\
๐ โน Finite_Set.foldโบ & @{term_type_only Finite_Set.fold "('a \ 'b \ 'b) \ 'b \ 'a set \ 'b" }\\
\end {tabular}
\section *{Lattices\_ Big}
\begin {tabular}{@ {} l @ {~::~} l l @ {}}
๐ โน Lattices_Big.Minโบ & ๐ซ โน Lattices_Big.Minโบ \\
๐ โน Lattices_Big.Maxโบ & ๐ซ โน Lattices_Big.Maxโบ \\
๐ โน Lattices_Big.arg_minโบ & ๐ซ โน Lattices_Big.arg_minโบ \\
๐ โน Lattices_Big.is_arg_minโบ & ๐ซ โน Lattices_Big.is_arg_minโบ \\
๐ โน Lattices_Big.arg_maxโบ & ๐ซ โน Lattices_Big.arg_maxโบ \\
๐ โน Lattices_Big.is_arg_maxโบ & ๐ซ โน Lattices_Big.is_arg_maxโบ \\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l l @ {}}
๐ โน ARG_MIN f x. Pโบ & @{term [source]"arg_min f (\x. P)" }\\
๐ โน ARG_MAX f x. Pโบ & @{term [source]"arg_max f (\x. P)" }\\
\end {tabular}
\section *{Groups\_ Big}
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Groups_Big.sumโบ & @{term_type_only Groups_Big.sum "('a \ 'b) \ 'a set \ 'b::comm_monoid_add" }\\
๐ โน Groups_Big.prodโบ & @{term_type_only Groups_Big.prod "('a \ 'b) \ 'a set \ 'b::comm_monoid_mult" }\\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l l @ {}}
๐ โน sum (λx. x) Aโบ & @{term [source]"sum (\x. x) A" } & (๐ โน SUMโบ )\\
๐ โน sum (λx. t) Aโบ & @{term [source]"sum (\x. t) A" }\\
@{term [source] "\x|P. t" } & ๐ โน โ x|P. tโบ \\
\multicolumn {2}{@ {}l@ {}}{Similarly for โน โ โบ instead of โน โ โบ } & (๐ โน PRODโบ )\\
\end {tabular}
\section *{Wellfounded}
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Wellfounded.wfโบ & @{term_type_only Wellfounded.wf "('a*'a)set\bool" }\\
๐ โน Wellfounded.accโบ & @{term_type_only Wellfounded.acc "('a*'a)set\'a set" }\\
๐ โน Wellfounded.measureโบ & @{term_type_only Wellfounded.measure "('a\nat)\('a*'a)set" }\\
๐ โน Wellfounded.lex_prodโบ & @{term_type_only Wellfounded.lex_prod "('a*'a)set\('b*'b)set\(('a*'b)*('a*'b))set" }\\
๐ โน Wellfounded.mlex_prodโบ & @{term_type_only Wellfounded.mlex_prod "('a\nat)\('a*'a)set\('a*'a)set" }\\
๐ โน Wellfounded.less_thanโบ & @{term_type_only Wellfounded.less_than "(nat*nat)set" }\\
๐ โน Wellfounded.pred_natโบ & @{term_type_only Wellfounded.pred_nat "(nat*nat)set" }\\
\end {tabular}
\section *{Set\_ Interval} % ๐ โน HOL.Set_Intervalโบ
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน lessThanโบ & @{term_type_only lessThan "'a::ord \ 'a set" }\\
๐ โน atMostโบ & @{term_type_only atMost "'a::ord \ 'a set" }\\
๐ โน greaterThanโบ & @{term_type_only greaterThan "'a::ord \ 'a set" }\\
๐ โน atLeastโบ & @{term_type_only atLeast "'a::ord \ 'a set" }\\
๐ โน greaterThanLessThanโบ & @{term_type_only greaterThanLessThan "'a::ord \ 'a \ 'a set" }\\
๐ โน atLeastLessThanโบ & @{term_type_only atLeastLessThan "'a::ord \ 'a \ 'a set" }\\
๐ โน greaterThanAtMostโบ & @{term_type_only greaterThanAtMost "'a::ord \ 'a \ 'a set" }\\
๐ โน atLeastAtMostโบ & @{term_type_only atLeastAtMost "'a::ord \ 'a \ 'a set" }\\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
๐ โน lessThan yโบ & @{term [source] "lessThan y" }\\
๐ โน atMost yโบ & @{term [source] "atMost y" }\\
๐ โน greaterThan xโบ & @{term [source] "greaterThan x" }\\
๐ โน atLeast xโบ & @{term [source] "atLeast x" }\\
๐ โน greaterThanLessThan x yโบ & @{term [source] "greaterThanLessThan x y" }\\
๐ โน atLeastLessThan x yโบ & @{term [source] "atLeastLessThan x y" }\\
๐ โน greaterThanAtMost x yโบ & @{term [source] "greaterThanAtMost x y" }\\
๐ โน atLeastAtMost x yโบ & @{term [source] "atLeastAtMost x y" }\\
@{term [source] "\i\n. A" } & @{term [source] "\i \ {..n}. A" }\\
@{term [source] "\i} & @{term [source] "\i \ {..}\\
\multicolumn {2}{@ {}l@ {}}{Similarly for โน โฉ โบ instead of โน โช โบ }\\
๐ โน sum (λx. t) {a..b}โบ & @{term [source] "sum (\x. t) {a..b}" }\\
๐ โน sum (λx. t) {a..<b}โบ & @{term [source] "sum (\x. t) {a..}\\
๐ โน sum (λx. t) {..b}โบ & @{term [source] "sum (\x. t) {..b}" }\\
๐ โน sum (λx. t) {..<b}โบ & @{term [source] "sum (\x. t) {..}\\
\multicolumn {2}{@ {}l@ {}}{Similarly for โน โ โบ instead of โน โ โบ }\\
\end {tabular}
\section *{Power}
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Power.powerโบ & ๐ซ โน Power.powerโบ
\end {tabular}
\section *{Option}
๐ซ โน optionโบ
๐ซ
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Option.theโบ & ๐ซ โน Option.theโบ \\
๐ โน map_optionโบ & @{typ [source]"('a \ 'b) \ 'a option \ 'b option" }\\
๐ โน set_optionโบ & @{term_type_only set_option "'a option \ 'a set" }\\
๐ โน Option.bindโบ & @{term_type_only Option.bind "'a option \ ('a \ 'b option) \ 'b option" }
\end {tabular}
\section *{List}
๐ซ โน listโบ
๐ซ
\begin {supertabular}{@ {} l @ {~::~} l @ {}}
๐ โน List.appendโบ & ๐ซ โน List.appendโบ \\
๐ โน List.butlastโบ & ๐ซ โน List.butlastโบ \\
๐ โน List.concatโบ & ๐ซ โน List.concatโบ \\
๐ โน List.distinctโบ & ๐ซ โน List.distinctโบ \\
๐ โน List.dropโบ & ๐ซ โน List.dropโบ \\
๐ โน List.dropWhileโบ & ๐ซ โน List.dropWhileโบ \\
๐ โน List.filterโบ & ๐ซ โน List.filterโบ \\
๐ โน List.findโบ & ๐ซ โน List.findโบ \\
๐ โน List.foldโบ & ๐ซ โน List.foldโบ \\
๐ โน List.foldrโบ & ๐ซ โน List.foldrโบ \\
๐ โน List.foldlโบ & ๐ซ โน List.foldlโบ \\
๐ โน List.hdโบ & ๐ซ โน List.hdโบ \\
๐ โน List.lastโบ & ๐ซ โน List.lastโบ \\
๐ โน List.lengthโบ & ๐ซ โน List.lengthโบ \\
๐ โน List.lenlexโบ & @{term_type_only List.lenlex "('a*'a)set\('a list * 'a list)set" }\\
๐ โน List.lexโบ & @{term_type_only List.lex "('a*'a)set\('a list * 'a list)set" }\\
๐ โน List.lexnโบ & @{term_type_only List.lexn "('a*'a)set\nat\('a list * 'a list)set" }\\
๐ โน List.lexordโบ & @{term_type_only List.lexord "('a*'a)set\('a list * 'a list)set" }\\
๐ โน List.listrelโบ & @{term_type_only List.listrel "('a*'b)set\('a list * 'b list)set" }\\
๐ โน List.listrel1โบ & @{term_type_only List.listrel1 "('a*'a)set\('a list * 'a list)set" }\\
๐ โน List.listsโบ & @{term_type_only List.lists "'a set\'a list set" }\\
๐ โน List.listsetโบ & @{term_type_only List.listset "'a set list \ 'a list set" }\\
๐ โน List.list_all2โบ & ๐ซ โน List.list_all2โบ \\
๐ โน List.list_updateโบ & ๐ซ โน List.list_updateโบ \\
๐ โน List.mapโบ & ๐ซ โน List.mapโบ \\
๐ โน List.measuresโบ & @{term_type_only List.measures "('a\nat)list\('a*'a)set" }\\
๐ โน List.nthโบ & ๐ซ โน List.nthโบ \\
๐ โน List.nthsโบ & ๐ซ โน List.nthsโบ \\
๐ โน Groups_List.prod_listโบ & ๐ซ โน Groups_List.prod_listโบ \\
๐ โน List.remdupsโบ & ๐ซ โน List.remdupsโบ \\
๐ โน List.removeAllโบ & ๐ซ โน List.removeAllโบ \\
๐ โน List.remove1โบ & ๐ซ โน List.remove1โบ \\
๐ โน List.replicateโบ & ๐ซ โน List.replicateโบ \\
๐ โน List.revโบ & ๐ซ โน List.revโบ \\
๐ โน List.rotateโบ & ๐ซ โน List.rotateโบ \\
๐ โน List.rotate1โบ & ๐ซ โน List.rotate1โบ \\
๐ โน List.setโบ & @{term_type_only List.set "'a list \ 'a set" }\\
๐ โน List.shufflesโบ & ๐ซ โน List.shufflesโบ \\
๐ โน List.sortโบ & ๐ซ โน List.sortโบ \\
๐ โน List.sortedโบ & ๐ซ โน List.sortedโบ \\
๐ โน List.sorted_wrtโบ & ๐ซ โน List.sorted_wrtโบ \\
๐ โน List.spliceโบ & ๐ซ โน List.spliceโบ \\
๐ โน Groups_List.sum_listโบ & ๐ซ โน Groups_List.sum_listโบ \\
๐ โน List.takeโบ & ๐ซ โน List.takeโบ \\
๐ โน List.takeWhileโบ & ๐ซ โน List.takeWhileโบ \\
๐ โน List.tlโบ & ๐ซ โน List.tlโบ \\
๐ โน List.uptโบ & ๐ซ โน List.uptโบ \\
๐ โน List.uptoโบ & ๐ซ โน List.uptoโบ \\
๐ โน List.zipโบ & ๐ซ โน List.zipโบ \\
\end {supertabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
โน [x๐ซ 1,โฆ ,x๐ซ n]โบ & โน x๐ซ 1 # โฆ # x๐ซ n # []โบ \\
๐ โน [m..<n]โบ & @{term [source]"upt m n" }\\
๐ โน [i..j]โบ & @{term [source]"upto i j" }\\
๐ โน xs[n := x]โบ & @{term [source]"list_update xs n x" }\\
๐ โน โ x← xs. eโบ & @{term [source]"listsum (map (\x. e) xs)" }\\
\end {tabular}
๐ซ
Filter input syntax โน [pat ← e. b]โบ , where
โน patโบ is a tuple pattern, which stands for ๐ โน filter (λpat. b) eโบ .
List comprehension input syntax : โน [e. q๐ซ 1, โฆ , q๐ซ n]โบ where each
qualifier โน q๐ซ iโบ is either a generator \mbox {โน pat ← eโบ } 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.
\begin {tabular}{@ {} l @ {~::~} l @ {}}
๐ โน Map.emptyโบ & ๐ซ โน Map.emptyโบ \\
๐ โน Map.map_addโบ & ๐ซ โน Map.map_addโบ \\
๐ โน Map.map_compโบ & ๐ซ โน Map.map_compโบ \\
๐ โน Map.restrict_mapโบ & @{term_type_only Map.restrict_map "('a\'b option)\'a set\('a\'b option)" }\\
๐ โน Map.domโบ & @{term_type_only Map.dom "('a\'b option)\'a set" }\\
๐ โน Map.ranโบ & @{term_type_only Map.ran "('a\'b option)\'b set" }\\
๐ โน Map.map_leโบ & ๐ซ โน Map.map_leโบ \\
๐ โน Map.map_ofโบ & ๐ซ โน Map.map_ofโบ \\
๐ โน Map.map_updsโบ & ๐ซ โน Map.map_updsโบ \\
\end {tabular}
\subsubsection *{Syntax }
\begin {tabular}{@ {} l @ {\quad $\equiv $\quad } l @ {}}
๐ โน Map.emptyโบ & @{term [source] "\_. None" }\\
๐ โน m(x:=Some y)โบ & @{term [source]"m(x:=Some y)" }\\
โน m(x๐ซ 1โฆ y๐ซ 1,โฆ ,x๐ซ nโฆ y๐ซ n)โบ & @{text [source]"m(x\<^sub>1\y\<^sub>1)\(x\<^sub>n\y\<^sub>n)" }\\
โน [x๐ซ 1โฆ y๐ซ 1,โฆ ,x๐ซ nโฆ y๐ซ n]โบ & @{text [source]"Map.empty(x\<^sub>1\y\<^sub>1,\,x\<^sub>n\y\<^sub>n)" }\\
๐ โน map_upds m xs ysโบ & @{term [source]"map_upds m xs ys" }\\
\end {tabular}
\section *{Infix operators in Main} % ๐ โน Mainโบ
\begin {center}
\begin {tabular}{llll}
& Operator & precedence & associativity \\
\hline
Meta-logic & โน ==> โบ & 1 & right \\
& โน โก โบ & 2 \\
\hline
Logic & โน โง โบ & 35 & right \\
&โน โจ โบ & 30 & right \\
&โน โถ โบ , โน โท โบ & 25 & right\\
&โน =โบ , โน โ โบ & 50 & left\\
\hline
Orderings & โน โค โบ , โน <โบ , โน โฅ โบ , โน >โบ & 50 \\
\hline
Sets & โน โ โบ , โน โ โบ , โน ๐ซ โบ , โน ๐ซ โบ & 50 \\
&โน โ โบ , โน โ โบ & 50 \\
&โน โฉ โบ & 70 & left \\
&โน โช โบ & 65 & left \\
\hline
Functions and Relations & โน โ โบ & 55 & left\\
&โน `โบ & 90 & right\\
&โน Oโบ & 75 & right\\
&โน ``โบ & 90 & right\\
&โน ^^โบ & 80 & right\\
\hline
Numbers & โน +โบ , โน -โบ & 65 & left \\
&โน *โบ , โน /โบ & 70 & left \\
&โน divโบ , โน modโบ & 70 & left\\
&โน ^โบ & 80 & right\\
&โน dvdโบ & 50 \\
\hline
Lists & โน #โบ , โน @โบ & 65 & right\\
&โน !โบ & 100 & left
\end {tabular}
\end {center}
โบ
(*<*)
end
(*>*)
Messung V0.5 C=95 H=98 G=96
ยค Dauer der Verarbeitung: 0.42 Sekunden
ยค
*© Formatika GbR, Deutschland