16 *} |
16 *} |
17 (*>*) |
17 (*>*) |
18 text{* |
18 text{* |
19 |
19 |
20 \begin{abstract} |
20 \begin{abstract} |
21 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. The sophisicated class structure is only hinted at. |
21 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. The sophisticated class structure is only hinted at. |
22 \end{abstract} |
22 \end{abstract} |
23 |
23 |
24 \section{HOL} |
24 \section{HOL} |
25 |
25 |
26 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"}. |
26 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"}. (\textsc{ascii}: \verb$~$, \verb$&$, \verb$|$, \verb$-->$, \texttt{ALL}, \texttt{EX}) |
27 |
27 |
28 Overloaded operators: |
28 Overloaded operators: |
29 |
29 |
30 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
30 \begin{supertabular}{@ {} l @ {~::~} l l @ {}} |
31 @{text "0"} & @{typeof HOL.zero}\\ |
31 @{text "0"} & @{typeof HOL.zero}\\ |
32 @{text "1"} & @{typeof HOL.one}\\ |
32 @{text "1"} & @{typeof HOL.one}\\ |
33 @{const HOL.plus} & @{typeof HOL.plus}\\ |
33 @{const HOL.plus} & @{typeof HOL.plus}\\ |
34 @{const HOL.minus} & @{typeof HOL.minus}\\ |
34 @{const HOL.minus} & @{typeof HOL.minus}\\ |
35 @{const HOL.uminus} & @{typeof HOL.uminus}\\ |
35 @{const HOL.uminus} & @{typeof HOL.uminus}\\ |
36 @{const HOL.times} & @{typeof HOL.times}\\ |
36 @{const HOL.times} & @{typeof HOL.times}\\ |
37 @{const HOL.inverse} & @{typeof HOL.inverse}\\ |
37 @{const HOL.inverse} & @{typeof HOL.inverse}\\ |
38 @{const HOL.divide} & @{typeof HOL.divide}\\ |
38 @{const HOL.divide} & @{typeof HOL.divide}\\ |
39 @{const HOL.abs} & @{typeof HOL.abs}\\ |
39 @{const HOL.abs} & @{typeof HOL.abs}\\ |
40 @{const HOL.sgn} & @{typeof HOL.sgn}\\ |
40 @{const HOL.sgn} & @{typeof HOL.sgn}\\ |
41 @{const HOL.less_eq} & @{typeof HOL.less_eq}\\ |
41 @{const HOL.less_eq} & @{typeof HOL.less_eq} & (\verb$<=$)\\ |
42 @{const HOL.less} & @{typeof HOL.less}\\ |
42 @{const HOL.less} & @{typeof HOL.less}\\ |
43 @{const HOL.default} & @{typeof HOL.default}\\ |
43 @{const HOL.default} & @{typeof HOL.default}\\ |
44 @{const HOL.undefined} & @{typeof HOL.undefined}\\ |
44 @{const HOL.undefined} & @{typeof HOL.undefined}\\ |
45 \end{supertabular} |
45 \end{supertabular} |
46 |
46 |
107 \section{Set} |
107 \section{Set} |
108 |
108 |
109 Sets are predicates: @{text[source]"'a set = 'a \<Rightarrow> bool"} |
109 Sets are predicates: @{text[source]"'a set = 'a \<Rightarrow> bool"} |
110 \bigskip |
110 \bigskip |
111 |
111 |
112 \begin{supertabular}{@ {} l @ {~::~} l @ {}} |
112 \begin{supertabular}{@ {} l @ {~::~} l l @ {}} |
113 @{const Set.empty} & @{term_type_only "Set.empty" "'a set"}\\ |
113 @{const Set.empty} & @{term_type_only "Set.empty" "'a set"}\\ |
114 @{const insert} & @{term_type_only insert "'a\<Rightarrow>'a set\<Rightarrow>'a set"}\\ |
114 @{const insert} & @{term_type_only insert "'a\<Rightarrow>'a set\<Rightarrow>'a set"}\\ |
115 @{const Collect} & @{term_type_only Collect "('a\<Rightarrow>bool)\<Rightarrow>'a set"}\\ |
115 @{const Collect} & @{term_type_only Collect "('a\<Rightarrow>bool)\<Rightarrow>'a set"}\\ |
116 @{const "op :"} & @{term_type_only "op :" "'a\<Rightarrow>'a set\<Rightarrow>bool"} \qquad(\textsc{ascii} @{text":"})\\ |
116 @{const "op :"} & @{term_type_only "op :" "'a\<Rightarrow>'a set\<Rightarrow>bool"} & (\texttt{:})\\ |
117 @{const Set.Un} & @{term_type_only Set.Un "'a set\<Rightarrow>'a set \<Rightarrow> 'a set"} \qquad(\textsc{ascii} @{text"Un"})\\ |
117 @{const Set.Un} & @{term_type_only Set.Un "'a set\<Rightarrow>'a set \<Rightarrow> 'a set"} & (\texttt{Un})\\ |
118 @{const Set.Int} & @{term_type_only Set.Int "'a set\<Rightarrow>'a set \<Rightarrow> 'a set"} \qquad(\textsc{ascii} @{text"Int"})\\ |
118 @{const Set.Int} & @{term_type_only Set.Int "'a set\<Rightarrow>'a set \<Rightarrow> 'a set"} & (\texttt{Int})\\ |
119 @{const UNION} & @{term_type_only UNION "'a set\<Rightarrow>('a \<Rightarrow> 'b set) \<Rightarrow> 'b set"}\\ |
119 @{const UNION} & @{term_type_only UNION "'a set\<Rightarrow>('a \<Rightarrow> 'b set) \<Rightarrow> 'b set"}\\ |
120 @{const INTER} & @{term_type_only INTER "'a set\<Rightarrow>('a \<Rightarrow> 'b set) \<Rightarrow> 'b set"}\\ |
120 @{const INTER} & @{term_type_only INTER "'a set\<Rightarrow>('a \<Rightarrow> 'b set) \<Rightarrow> 'b set"}\\ |
121 @{const Union} & @{term_type_only Union "'a set set\<Rightarrow>'a set"}\\ |
121 @{const Union} & @{term_type_only Union "'a set set\<Rightarrow>'a set"}\\ |
122 @{const Inter} & @{term_type_only Inter "'a set set\<Rightarrow>'a set"}\\ |
122 @{const Inter} & @{term_type_only Inter "'a set set\<Rightarrow>'a set"}\\ |
123 @{const Pow} & @{term_type_only Pow "'a set \<Rightarrow>'a set set"}\\ |
123 @{const Pow} & @{term_type_only Pow "'a set \<Rightarrow>'a set set"}\\ |
127 @{const Bex} & @{term_type_only Bex "'a set\<Rightarrow>('a\<Rightarrow>bool)\<Rightarrow>bool"}\\ |
127 @{const Bex} & @{term_type_only Bex "'a set\<Rightarrow>('a\<Rightarrow>bool)\<Rightarrow>bool"}\\ |
128 \end{supertabular} |
128 \end{supertabular} |
129 |
129 |
130 \subsubsection*{Syntax} |
130 \subsubsection*{Syntax} |
131 |
131 |
132 \begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l @ {}} |
132 \begin{supertabular}{@ {} l @ {\quad$\equiv$\quad} l l @ {}} |
133 @{text"{x\<^isub>1,\<dots>,x\<^isub>n}"} & @{text"insert x\<^isub>1 (\<dots> (insert x\<^isub>n {})\<dots>)"}\\ |
133 @{text"{x\<^isub>1,\<dots>,x\<^isub>n}"} & @{text"insert x\<^isub>1 (\<dots> (insert x\<^isub>n {})\<dots>)"}\\ |
134 @{term"x ~: A"} & @{term[source]"\<not>(x \<in> A)"}\\ |
134 @{term"x ~: A"} & @{term[source]"\<not>(x \<in> A)"}\\ |
135 @{term"A \<subseteq> B"} & @{term[source]"A \<le> B"}\\ |
135 @{term"A \<subseteq> B"} & @{term[source]"A \<le> B"}\\ |
136 @{term"A \<subset> B"} & @{term[source]"A < B"}\\ |
136 @{term"A \<subset> B"} & @{term[source]"A < B"}\\ |
137 @{term[source]"A \<supseteq> B"} & @{term[source]"B \<le> A"}\\ |
137 @{term[source]"A \<supseteq> B"} & @{term[source]"B \<le> A"}\\ |
138 @{term[source]"A \<supset> B"} & @{term[source]"B < A"}\\ |
138 @{term[source]"A \<supset> B"} & @{term[source]"B < A"}\\ |
139 @{term"{x. P}"} & @{term[source]"Collect(\<lambda>x. P)"}\\ |
139 @{term"{x. P}"} & @{term[source]"Collect(\<lambda>x. P)"}\\ |
140 @{term[mode=xsymbols]"UN x:I. A"} & @{term[source]"UNION I (\<lambda>x. A)"}\\ |
140 @{term[mode=xsymbols]"UN x:I. A"} & @{term[source]"UNION I (\<lambda>x. A)"} & (\texttt{UN})\\ |
141 @{term[mode=xsymbols]"UN x. A"} & @{term[source]"UNION UNIV (\<lambda>x. A)"}\\ |
141 @{term[mode=xsymbols]"UN x. A"} & @{term[source]"UNION UNIV (\<lambda>x. A)"}\\ |
142 @{term[mode=xsymbols]"INT x:I. A"} & @{term[source]"INTER I (\<lambda>x. A)"}\\ |
142 @{term[mode=xsymbols]"INT x:I. A"} & @{term[source]"INTER I (\<lambda>x. A)"} & (\texttt{INT})\\ |
143 @{term[mode=xsymbols]"INT x. A"} & @{term[source]"INTER UNIV (\<lambda>x. A)"}\\ |
143 @{term[mode=xsymbols]"INT x. A"} & @{term[source]"INTER UNIV (\<lambda>x. A)"}\\ |
144 @{term"ALL x:A. P"} & @{term[source]"Ball A (\<lambda>x. P)"}\\ |
144 @{term"ALL x:A. P"} & @{term[source]"Ball A (\<lambda>x. P)"}\\ |
145 @{term"EX x:A. P"} & @{term[source]"Bex A (\<lambda>x. P)"}\\ |
145 @{term"EX x:A. P"} & @{term[source]"Bex A (\<lambda>x. P)"}\\ |
146 @{term"range f"} & @{term[source]"f ` UNIV"}\\ |
146 @{term"range f"} & @{term[source]"f ` UNIV"}\\ |
147 \end{supertabular} |
147 \end{supertabular} |