3 \def\isabellecontext{Quick{\isacharunderscore}Reference}%
12 \isacommand{theory}\isamarkupfalse%
13 \ Quick{\isacharunderscore}Reference\isanewline
14 \isakeyword{imports}\ Main\isanewline
23 \isamarkupchapter{Isabelle/Isar quick reference \label{ap:refcard}%
27 \isamarkupsection{Proof commands%
31 \isamarkupsubsection{Primitives and basic syntax%
35 \begin{isamarkuptext}%
37 \mbox{\isa{\isacommand{fix}}}~\isa{x} & augment context by \isa{{\isachardoublequote}{\isasymAnd}x{\isachardot}\ {\isasymbox}{\isachardoublequote}} \\
38 \mbox{\isa{\isacommand{assume}}}~\isa{{\isachardoublequote}a{\isacharcolon}\ {\isasymphi}{\isachardoublequote}} & augment context by \isa{{\isachardoublequote}{\isasymphi}\ {\isasymLongrightarrow}\ {\isasymbox}{\isachardoublequote}} \\
39 \mbox{\isa{\isacommand{then}}} & indicate forward chaining of facts \\
40 \mbox{\isa{\isacommand{have}}}~\isa{{\isachardoublequote}a{\isacharcolon}\ {\isasymphi}{\isachardoublequote}} & prove local result \\
41 \mbox{\isa{\isacommand{show}}}~\isa{{\isachardoublequote}a{\isacharcolon}\ {\isasymphi}{\isachardoublequote}} & prove local result, refining some goal \\
42 \mbox{\isa{\isacommand{using}}}~\isa{a} & indicate use of additional facts \\
43 \mbox{\isa{\isacommand{unfolding}}}~\isa{a} & unfold definitional equations \\
44 \mbox{\isa{\isacommand{proof}}}~\isa{{\isachardoublequote}m\isactrlsub {\isadigit{1}}{\isachardoublequote}}~\dots~\mbox{\isa{\isacommand{qed}}}~\isa{{\isachardoublequote}m\isactrlsub {\isadigit{2}}{\isachardoublequote}} & indicate proof structure and refinements \\
45 \mbox{\isa{\isacommand{{\isacharbraceleft}}}}~\dots~\mbox{\isa{\isacommand{{\isacharbraceright}}}} & indicate explicit blocks \\
46 \mbox{\isa{\isacommand{next}}} & switch blocks \\
47 \mbox{\isa{\isacommand{note}}}~\isa{{\isachardoublequote}a\ {\isacharequal}\ b{\isachardoublequote}} & reconsider facts \\
48 \mbox{\isa{\isacommand{let}}}~\isa{{\isachardoublequote}p\ {\isacharequal}\ t{\isachardoublequote}} & abbreviate terms by higher-order matching \\
51 \begin{matharray}{rcl}
52 \isa{{\isachardoublequote}theory{\isasymdash}stmt{\isachardoublequote}} & = & \mbox{\isa{\isacommand{theorem}}}~\isa{{\isachardoublequote}name{\isacharcolon}\ props\ proof{\isachardoublequote}} \Or \mbox{\isa{\isacommand{definition}}}~\dots \Or \dots \\[1ex]
53 \isa{{\isachardoublequote}proof{\isachardoublequote}} & = & \isa{{\isachardoublequote}prfx\isactrlsup {\isacharasterisk}{\isachardoublequote}}~\mbox{\isa{\isacommand{proof}}}~\isa{{\isachardoublequote}method\ stmt\isactrlsup {\isacharasterisk}{\isachardoublequote}}~\mbox{\isa{\isacommand{qed}}}~\isa{method} \\
54 & \Or & \isa{{\isachardoublequote}prfx\isactrlsup {\isacharasterisk}{\isachardoublequote}}~\mbox{\isa{\isacommand{done}}} \\[1ex]
55 \isa{prfx} & = & \mbox{\isa{\isacommand{apply}}}~\isa{method} \\
56 & \Or & \mbox{\isa{\isacommand{using}}}~\isa{{\isachardoublequote}facts{\isachardoublequote}} \\
57 & \Or & \mbox{\isa{\isacommand{unfolding}}}~\isa{{\isachardoublequote}facts{\isachardoublequote}} \\
58 \isa{stmt} & = & \mbox{\isa{\isacommand{{\isacharbraceleft}}}}~\isa{{\isachardoublequote}stmt\isactrlsup {\isacharasterisk}{\isachardoublequote}}~\mbox{\isa{\isacommand{{\isacharbraceright}}}} \\
59 & \Or & \mbox{\isa{\isacommand{next}}} \\
60 & \Or & \mbox{\isa{\isacommand{note}}}~\isa{{\isachardoublequote}name\ {\isacharequal}\ facts{\isachardoublequote}} \\
61 & \Or & \mbox{\isa{\isacommand{let}}}~\isa{{\isachardoublequote}term\ {\isacharequal}\ term{\isachardoublequote}} \\
62 & \Or & \mbox{\isa{\isacommand{fix}}}~\isa{{\isachardoublequote}var\isactrlsup {\isacharplus}{\isachardoublequote}} \\
63 & \Or & \mbox{\isa{\isacommand{assume}}}~\isa{{\isachardoublequote}name{\isacharcolon}\ props{\isachardoublequote}} \\
64 & \Or & \mbox{\isa{\isacommand{then}}}\isa{{\isachardoublequote}\isactrlsup {\isacharquery}{\isachardoublequote}}~\isa{goal} \\
65 \isa{goal} & = & \mbox{\isa{\isacommand{have}}}~\isa{{\isachardoublequote}name{\isacharcolon}\ props\ proof{\isachardoublequote}} \\
66 & \Or & \mbox{\isa{\isacommand{show}}}~\isa{{\isachardoublequote}name{\isacharcolon}\ props\ proof{\isachardoublequote}} \\
71 \isamarkupsubsection{Abbreviations and synonyms%
75 \begin{isamarkuptext}%
76 \begin{matharray}{rcl}
77 \mbox{\isa{\isacommand{by}}}~\isa{{\isachardoublequote}m\isactrlsub {\isadigit{1}}\ m\isactrlsub {\isadigit{2}}{\isachardoublequote}} & \equiv & \mbox{\isa{\isacommand{proof}}}~\isa{{\isachardoublequote}m\isactrlsub {\isadigit{1}}{\isachardoublequote}}~\mbox{\isa{\isacommand{qed}}}~\isa{{\isachardoublequote}m\isactrlsub {\isadigit{2}}{\isachardoublequote}} \\
78 \mbox{\isa{\isacommand{{\isachardot}{\isachardot}}}} & \equiv & \mbox{\isa{\isacommand{by}}}~\isa{rule} \\
79 \mbox{\isa{\isacommand{{\isachardot}}}} & \equiv & \mbox{\isa{\isacommand{by}}}~\isa{this} \\
80 \mbox{\isa{\isacommand{hence}}} & \equiv & \mbox{\isa{\isacommand{then}}}~\mbox{\isa{\isacommand{have}}} \\
81 \mbox{\isa{\isacommand{thus}}} & \equiv & \mbox{\isa{\isacommand{then}}}~\mbox{\isa{\isacommand{show}}} \\
82 \mbox{\isa{\isacommand{from}}}~\isa{a} & \equiv & \mbox{\isa{\isacommand{note}}}~\isa{a}~\mbox{\isa{\isacommand{then}}} \\
83 \mbox{\isa{\isacommand{with}}}~\isa{a} & \equiv & \mbox{\isa{\isacommand{from}}}~\isa{{\isachardoublequote}a\ {\isasymAND}\ this{\isachardoublequote}} \\[1ex]
84 \mbox{\isa{\isacommand{from}}}~\isa{this} & \equiv & \mbox{\isa{\isacommand{then}}} \\
85 \mbox{\isa{\isacommand{from}}}~\isa{this}~\mbox{\isa{\isacommand{have}}} & \equiv & \mbox{\isa{\isacommand{hence}}} \\
86 \mbox{\isa{\isacommand{from}}}~\isa{this}~\mbox{\isa{\isacommand{show}}} & \equiv & \mbox{\isa{\isacommand{thus}}} \\
91 \isamarkupsubsection{Derived elements%
95 \begin{isamarkuptext}%
96 \begin{matharray}{rcl}
97 \mbox{\isa{\isacommand{also}}}\isa{{\isachardoublequote}\isactrlsub {\isadigit{0}}{\isachardoublequote}} & \approx & \mbox{\isa{\isacommand{note}}}~\isa{{\isachardoublequote}calculation\ {\isacharequal}\ this{\isachardoublequote}} \\
98 \mbox{\isa{\isacommand{also}}}\isa{{\isachardoublequote}\isactrlsub n\isactrlsub {\isacharplus}\isactrlsub {\isadigit{1}}{\isachardoublequote}} & \approx & \mbox{\isa{\isacommand{note}}}~\isa{{\isachardoublequote}calculation\ {\isacharequal}\ trans\ {\isacharbrackleft}OF\ calculation\ this{\isacharbrackright}{\isachardoublequote}} \\
99 \mbox{\isa{\isacommand{finally}}} & \approx & \mbox{\isa{\isacommand{also}}}~\mbox{\isa{\isacommand{from}}}~\isa{calculation} \\[0.5ex]
100 \mbox{\isa{\isacommand{moreover}}} & \approx & \mbox{\isa{\isacommand{note}}}~\isa{{\isachardoublequote}calculation\ {\isacharequal}\ calculation\ this{\isachardoublequote}} \\
101 \mbox{\isa{\isacommand{ultimately}}} & \approx & \mbox{\isa{\isacommand{moreover}}}~\mbox{\isa{\isacommand{from}}}~\isa{calculation} \\[0.5ex]
102 \mbox{\isa{\isacommand{presume}}}~\isa{{\isachardoublequote}a{\isacharcolon}\ {\isasymphi}{\isachardoublequote}} & \approx & \mbox{\isa{\isacommand{assume}}}~\isa{{\isachardoublequote}a{\isacharcolon}\ {\isasymphi}{\isachardoublequote}} \\
103 \mbox{\isa{\isacommand{def}}}~\isa{{\isachardoublequote}a{\isacharcolon}\ x\ {\isasymequiv}\ t{\isachardoublequote}} & \approx & \mbox{\isa{\isacommand{fix}}}~\isa{x}~\mbox{\isa{\isacommand{assume}}}~\isa{{\isachardoublequote}a{\isacharcolon}\ x\ {\isasymequiv}\ t{\isachardoublequote}} \\
104 \mbox{\isa{\isacommand{obtain}}}~\isa{{\isachardoublequote}x\ {\isasymWHERE}\ a{\isacharcolon}\ {\isasymphi}{\isachardoublequote}} & \approx & \dots~\mbox{\isa{\isacommand{fix}}}~\isa{x}~\mbox{\isa{\isacommand{assume}}}~\isa{{\isachardoublequote}a{\isacharcolon}\ {\isasymphi}{\isachardoublequote}} \\
105 \mbox{\isa{\isacommand{case}}}~\isa{c} & \approx & \mbox{\isa{\isacommand{fix}}}~\isa{x}~\mbox{\isa{\isacommand{assume}}}~\isa{{\isachardoublequote}c{\isacharcolon}\ {\isasymphi}{\isachardoublequote}} \\
106 \mbox{\isa{\isacommand{sorry}}} & \approx & \mbox{\isa{\isacommand{by}}}~\isa{cheating} \\
111 \isamarkupsubsection{Diagnostic commands%
115 \begin{isamarkuptext}%
117 \mbox{\isa{\isacommand{pr}}} & print current state \\
118 \mbox{\isa{\isacommand{thm}}}~\isa{a} & print fact \\
119 \mbox{\isa{\isacommand{term}}}~\isa{t} & print term \\
120 \mbox{\isa{\isacommand{prop}}}~\isa{{\isasymphi}} & print meta-level proposition \\
121 \mbox{\isa{\isacommand{typ}}}~\isa{{\isasymtau}} & print meta-level type \\
126 \isamarkupsection{Proof methods%
130 \begin{isamarkuptext}%
132 \multicolumn{2}{l}{\textbf{Single steps (forward-chaining facts)}} \\[0.5ex]
133 \mbox{\isa{assumption}} & apply some assumption \\
134 \mbox{\isa{this}} & apply current facts \\
135 \mbox{\isa{rule}}~\isa{a} & apply some rule \\
136 \mbox{\isa{rule}} & apply standard rule (default for \mbox{\isa{\isacommand{proof}}}) \\
137 \mbox{\isa{contradiction}} & apply \isa{{\isachardoublequote}{\isasymnot}{\isachardoublequote}} elimination rule (any order) \\
138 \mbox{\isa{cases}}~\isa{t} & case analysis (provides cases) \\
139 \mbox{\isa{induct}}~\isa{x} & proof by induction (provides cases) \\[2ex]
141 \multicolumn{2}{l}{\textbf{Repeated steps (inserting facts)}} \\[0.5ex]
142 \mbox{\isa{{\isacharminus}}} & no rules \\
143 \mbox{\isa{intro}}~\isa{a} & introduction rules \\
144 \mbox{\isa{intro{\isacharunderscore}classes}} & class introduction rules \\
145 \mbox{\isa{elim}}~\isa{a} & elimination rules \\
146 \mbox{\isa{unfold}}~\isa{a} & definitional rewrite rules \\[2ex]
148 \multicolumn{2}{l}{\textbf{Automated proof tools (inserting facts)}} \\[0.5ex]
149 \mbox{\isa{iprover}} & intuitionistic proof search \\
150 \mbox{\isa{blast}}, \mbox{\isa{fast}} & Classical Reasoner \\
151 \mbox{\isa{simp}}, \mbox{\isa{simp{\isacharunderscore}all}} & Simplifier (+ Splitter) \\
152 \mbox{\isa{auto}}, \mbox{\isa{force}} & Simplifier + Classical Reasoner \\
153 \mbox{\isa{arith}} & Arithmetic procedures \\
158 \isamarkupsection{Attributes%
162 \begin{isamarkuptext}%
164 \multicolumn{2}{l}{\textbf{Operations}} \\[0.5ex]
165 \mbox{\isa{OF}}~\isa{a} & rule resolved with facts (skipping ``\isa{{\isacharunderscore}}'') \\
166 \mbox{\isa{of}}~\isa{t} & rule instantiated with terms (skipping ``\isa{{\isacharunderscore}}'') \\
167 \mbox{\isa{where}}~\isa{{\isachardoublequote}x\ {\isacharequal}\ t{\isachardoublequote}} & rule instantiated with terms, by variable name \\
168 \mbox{\isa{symmetric}} & resolution with symmetry rule \\
169 \mbox{\isa{THEN}}~\isa{b} & resolution with another rule \\
170 \mbox{\isa{rule{\isacharunderscore}format}} & result put into standard rule format \\
171 \mbox{\isa{elim{\isacharunderscore}format}} & destruct rule turned into elimination rule format \\[1ex]
173 \multicolumn{2}{l}{\textbf{Declarations}} \\[0.5ex]
174 \mbox{\isa{simp}} & Simplifier rule \\
175 \mbox{\isa{intro}}, \mbox{\isa{elim}}, \mbox{\isa{dest}} & Pure or Classical Reasoner rule \\
176 \mbox{\isa{iff}} & Simplifier + Classical Reasoner rule \\
177 \mbox{\isa{split}} & case split rule \\
178 \mbox{\isa{trans}} & transitivity rule \\
179 \mbox{\isa{sym}} & symmetry rule \\
184 \isamarkupsection{Rule declarations and methods%
188 \begin{isamarkuptext}%
189 \begin{tabular}{l|lllll}
190 & \mbox{\isa{rule}} & \mbox{\isa{iprover}} & \mbox{\isa{blast}} & \mbox{\isa{simp}} & \mbox{\isa{auto}} \\
191 & & & \mbox{\isa{fast}} & \mbox{\isa{simp{\isacharunderscore}all}} & \mbox{\isa{force}} \\
193 \mbox{\isa{Pure{\isachardot}elim}}\isa{{\isachardoublequote}{\isacharbang}{\isachardoublequote}} \mbox{\isa{Pure{\isachardot}intro}}\isa{{\isachardoublequote}{\isacharbang}{\isachardoublequote}}
194 & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
195 \mbox{\isa{Pure{\isachardot}elim}} \mbox{\isa{Pure{\isachardot}intro}}
196 & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
197 \mbox{\isa{elim}}\isa{{\isachardoublequote}{\isacharbang}{\isachardoublequote}} \mbox{\isa{intro}}\isa{{\isachardoublequote}{\isacharbang}{\isachardoublequote}}
198 & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
199 \mbox{\isa{elim}} \mbox{\isa{intro}}
200 & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
202 & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
203 \mbox{\isa{iff}}\isa{{\isachardoublequote}{\isacharquery}{\isachardoublequote}}
204 & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
205 \mbox{\isa{elim}}\isa{{\isachardoublequote}{\isacharquery}{\isachardoublequote}} \mbox{\isa{intro}}\isa{{\isachardoublequote}{\isacharquery}{\isachardoublequote}}
206 & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
208 & & & & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
210 & & & & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
212 & & & & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} & \isa{{\isachardoublequote}{\isasymtimes}{\isachardoublequote}} \\
217 \isamarkupsection{Emulating tactic scripts%
221 \isamarkupsubsection{Commands%
225 \begin{isamarkuptext}%
227 \mbox{\isa{\isacommand{apply}}}~\isa{m} & apply proof method at initial position \\
228 \mbox{\isa{\isacommand{apply{\isacharunderscore}end}}}~\isa{m} & apply proof method near terminal position \\
229 \mbox{\isa{\isacommand{done}}} & complete proof \\
230 \mbox{\isa{\isacommand{defer}}}~\isa{n} & move subgoal to end \\
231 \mbox{\isa{\isacommand{prefer}}}~\isa{n} & move subgoal to beginning \\
232 \mbox{\isa{\isacommand{back}}} & backtrack last command \\
237 \isamarkupsubsection{Methods%
241 \begin{isamarkuptext}%
243 \mbox{\isa{rule{\isacharunderscore}tac}}~\isa{insts} & resolution (with instantiation) \\
244 \mbox{\isa{erule{\isacharunderscore}tac}}~\isa{insts} & elim-resolution (with instantiation) \\
245 \mbox{\isa{drule{\isacharunderscore}tac}}~\isa{insts} & destruct-resolution (with instantiation) \\
246 \mbox{\isa{frule{\isacharunderscore}tac}}~\isa{insts} & forward-resolution (with instantiation) \\
247 \mbox{\isa{cut{\isacharunderscore}tac}}~\isa{insts} & insert facts (with instantiation) \\
248 \mbox{\isa{thin{\isacharunderscore}tac}}~\isa{{\isasymphi}} & delete assumptions \\
249 \mbox{\isa{subgoal{\isacharunderscore}tac}}~\isa{{\isasymphi}} & new claims \\
250 \mbox{\isa{rename{\isacharunderscore}tac}}~\isa{x} & rename innermost goal parameters \\
251 \mbox{\isa{rotate{\isacharunderscore}tac}}~\isa{n} & rotate assumptions of goal \\
252 \mbox{\isa{tactic}}~\isa{{\isachardoublequote}text{\isachardoublequote}} & arbitrary ML tactic \\
253 \mbox{\isa{case{\isacharunderscore}tac}}~\isa{t} & exhaustion (datatypes) \\
254 \mbox{\isa{induct{\isacharunderscore}tac}}~\isa{x} & induction (datatypes) \\
255 \mbox{\isa{ind{\isacharunderscore}cases}}~\isa{t} & exhaustion + simplification (inductive predicates) \\
265 \isacommand{end}\isamarkupfalse%
277 %%% TeX-master: "root"