21212
|
1 |
%
|
|
2 |
\begin{isabellebody}%
|
|
3 |
\def\isabellecontext{Functions}%
|
|
4 |
%
|
|
5 |
\isadelimtheory
|
|
6 |
\isanewline
|
|
7 |
\isanewline
|
|
8 |
%
|
|
9 |
\endisadelimtheory
|
|
10 |
%
|
|
11 |
\isatagtheory
|
|
12 |
\isacommand{theory}\isamarkupfalse%
|
|
13 |
\ Functions\isanewline
|
|
14 |
\isakeyword{imports}\ Main\isanewline
|
|
15 |
\isakeyword{begin}%
|
|
16 |
\endisatagtheory
|
|
17 |
{\isafoldtheory}%
|
|
18 |
%
|
|
19 |
\isadelimtheory
|
|
20 |
%
|
|
21 |
\endisadelimtheory
|
|
22 |
%
|
|
23 |
\isamarkupchapter{Defining Recursive Functions in Isabelle/HOL%
|
|
24 |
}
|
|
25 |
\isamarkuptrue%
|
|
26 |
%
|
|
27 |
\begin{isamarkuptext}%
|
|
28 |
\cite{isa-tutorial}%
|
|
29 |
\end{isamarkuptext}%
|
|
30 |
\isamarkuptrue%
|
|
31 |
%
|
|
32 |
\isamarkupsection{Function Definition for Dummies%
|
|
33 |
}
|
|
34 |
\isamarkuptrue%
|
|
35 |
%
|
|
36 |
\begin{isamarkuptext}%
|
|
37 |
In most cases, defining a recursive function is just as simple as other definitions:%
|
|
38 |
\end{isamarkuptext}%
|
|
39 |
\isamarkuptrue%
|
|
40 |
\isacommand{fun}\isamarkupfalse%
|
|
41 |
\ fib\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}nat\ {\isasymRightarrow}\ nat{\isachardoublequoteclose}\isanewline
|
|
42 |
\isakeyword{where}\isanewline
|
|
43 |
\ \ {\isachardoublequoteopen}fib\ {\isadigit{0}}\ {\isacharequal}\ {\isadigit{1}}{\isachardoublequoteclose}\isanewline
|
|
44 |
{\isacharbar}\ {\isachardoublequoteopen}fib\ {\isacharparenleft}Suc\ {\isadigit{0}}{\isacharparenright}\ {\isacharequal}\ {\isadigit{1}}{\isachardoublequoteclose}\isanewline
|
21346
|
45 |
{\isacharbar}\ {\isachardoublequoteopen}fib\ {\isacharparenleft}Suc\ {\isacharparenleft}Suc\ n{\isacharparenright}{\isacharparenright}\ {\isacharequal}\ fib\ n\ {\isacharplus}\ fib\ {\isacharparenleft}Suc\ n{\isacharparenright}{\isachardoublequoteclose}%
|
21212
|
46 |
\begin{isamarkuptext}%
|
|
47 |
The function always terminates, since the argument of gets smaller in every
|
|
48 |
recursive call. Termination is an
|
|
49 |
important requirement, since it prevents inconsistencies: From
|
|
50 |
the "definition" \isa{f{\isacharparenleft}n{\isacharparenright}\ {\isacharequal}\ f{\isacharparenleft}n{\isacharparenright}\ {\isacharplus}\ {\isadigit{1}}} we could prove
|
|
51 |
\isa{{\isadigit{0}}\ \ {\isacharequal}\ {\isadigit{1}}} by subtracting \isa{f{\isacharparenleft}n{\isacharparenright}} on both sides.
|
|
52 |
|
|
53 |
Isabelle tries to prove termination automatically when a function is
|
|
54 |
defined. We will later look at cases where this fails and see what to
|
|
55 |
do then.%
|
|
56 |
\end{isamarkuptext}%
|
|
57 |
\isamarkuptrue%
|
|
58 |
%
|
|
59 |
\isamarkupsubsection{Pattern matching%
|
|
60 |
}
|
|
61 |
\isamarkuptrue%
|
|
62 |
%
|
|
63 |
\begin{isamarkuptext}%
|
|
64 |
Like in functional programming, functions can be defined by pattern
|
|
65 |
matching. At the moment we will only consider \emph{datatype
|
|
66 |
patterns}, which only consist of datatype constructors and
|
|
67 |
variables.
|
|
68 |
|
|
69 |
If patterns overlap, the order of the equations is taken into
|
|
70 |
account. The following function inserts a fixed element between any
|
|
71 |
two elements of a list:%
|
|
72 |
\end{isamarkuptext}%
|
|
73 |
\isamarkuptrue%
|
|
74 |
\isacommand{fun}\isamarkupfalse%
|
|
75 |
\ sep\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a\ list\ {\isasymRightarrow}\ {\isacharprime}a\ list{\isachardoublequoteclose}\isanewline
|
|
76 |
\isakeyword{where}\isanewline
|
|
77 |
\ \ {\isachardoublequoteopen}sep\ a\ {\isacharparenleft}x{\isacharhash}y{\isacharhash}xs{\isacharparenright}\ {\isacharequal}\ x\ {\isacharhash}\ a\ {\isacharhash}\ sep\ a\ {\isacharparenleft}y\ {\isacharhash}\ xs{\isacharparenright}{\isachardoublequoteclose}\isanewline
|
|
78 |
{\isacharbar}\ {\isachardoublequoteopen}sep\ a\ xs\ \ \ \ \ \ \ {\isacharequal}\ xs{\isachardoublequoteclose}%
|
|
79 |
\begin{isamarkuptext}%
|
|
80 |
Overlapping patterns are interpreted as "increments" to what is
|
|
81 |
already there: The second equation is only meant for the cases where
|
|
82 |
the first one does not match. Consequently, Isabelle replaces it
|
|
83 |
internally by the remaining cases, making the patterns disjoint.
|
|
84 |
This results in the equations \begin{isabelle}%
|
|
85 |
sep\ a\ {\isacharparenleft}x\ {\isacharhash}\ y\ {\isacharhash}\ xs{\isacharparenright}\ {\isacharequal}\ x\ {\isacharhash}\ a\ {\isacharhash}\ sep\ a\ {\isacharparenleft}y\ {\isacharhash}\ xs{\isacharparenright}\isasep\isanewline%
|
|
86 |
sep\ a\ {\isacharbrackleft}{\isacharbrackright}\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\isasep\isanewline%
|
|
87 |
sep\ a\ {\isacharbrackleft}v{\isacharbrackright}\ {\isacharequal}\ {\isacharbrackleft}v{\isacharbrackright}%
|
|
88 |
\end{isabelle}%
|
|
89 |
\end{isamarkuptext}%
|
|
90 |
\isamarkuptrue%
|
|
91 |
%
|
|
92 |
\begin{isamarkuptext}%
|
|
93 |
The equations from function definitions are automatically used in
|
|
94 |
simplification:%
|
|
95 |
\end{isamarkuptext}%
|
|
96 |
\isamarkuptrue%
|
|
97 |
\isacommand{lemma}\isamarkupfalse%
|
|
98 |
\ {\isachardoublequoteopen}fib\ {\isacharparenleft}Suc\ {\isacharparenleft}Suc\ {\isadigit{0}}{\isacharparenright}{\isacharparenright}\ {\isacharequal}\ {\isacharparenleft}Suc\ {\isacharparenleft}Suc\ {\isadigit{0}}{\isacharparenright}{\isacharparenright}{\isachardoublequoteclose}\isanewline
|
|
99 |
%
|
|
100 |
\isadelimproof
|
|
101 |
%
|
|
102 |
\endisadelimproof
|
|
103 |
%
|
|
104 |
\isatagproof
|
|
105 |
\isacommand{by}\isamarkupfalse%
|
|
106 |
\ simp%
|
|
107 |
\endisatagproof
|
|
108 |
{\isafoldproof}%
|
|
109 |
%
|
|
110 |
\isadelimproof
|
|
111 |
%
|
|
112 |
\endisadelimproof
|
|
113 |
%
|
|
114 |
\isamarkupsubsection{Induction%
|
|
115 |
}
|
|
116 |
\isamarkuptrue%
|
|
117 |
%
|
|
118 |
\begin{isamarkuptext}%
|
|
119 |
FIXME%
|
|
120 |
\end{isamarkuptext}%
|
|
121 |
\isamarkuptrue%
|
|
122 |
%
|
|
123 |
\isamarkupsection{If it does not work%
|
|
124 |
}
|
|
125 |
\isamarkuptrue%
|
|
126 |
%
|
|
127 |
\begin{isamarkuptext}%
|
|
128 |
Up to now, we were using the \cmd{fun} command, which provides a
|
|
129 |
convenient shorthand notation for simple function definitions. In
|
|
130 |
this mode, Isabelle tries to solve all the necessary proof obligations
|
|
131 |
automatically. If a proof does not go through, the definition is
|
|
132 |
rejected. This can mean that the definition is indeed faulty, like,
|
|
133 |
or that the default proof procedures are not smart enough (or
|
|
134 |
rather: not designed) to handle the specific definition.
|
|
135 |
.
|
|
136 |
By expanding the abbreviation to the full \cmd{function} command, the
|
|
137 |
proof obligations become visible and can be analyzed and solved manually.%
|
|
138 |
\end{isamarkuptext}%
|
|
139 |
\isamarkuptrue%
|
|
140 |
\isacommand{fun}\isamarkupfalse%
|
|
141 |
\ f\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}{\isasymtau}{\isachardoublequoteclose}\isanewline
|
|
142 |
\isakeyword{where}\isanewline
|
|
143 |
\ \ %
|
|
144 |
\begin{isamarkuptext}%
|
|
145 |
\vspace{-0.8cm}\emph{equations}%
|
|
146 |
\end{isamarkuptext}%
|
|
147 |
\isamarkuptrue%
|
|
148 |
%
|
|
149 |
\begin{isamarkuptext}%
|
|
150 |
\noindent abbreviates%
|
|
151 |
\end{isamarkuptext}%
|
|
152 |
\isamarkuptrue%
|
|
153 |
\isacommand{function}\isamarkupfalse%
|
|
154 |
\ {\isacharparenleft}\isakeyword{sequential}{\isacharparenright}\ fo\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}{\isasymtau}{\isachardoublequoteclose}\isanewline
|
|
155 |
\isakeyword{where}\isanewline
|
|
156 |
\ \ %
|
|
157 |
\isadelimproof
|
|
158 |
%
|
|
159 |
\endisadelimproof
|
|
160 |
%
|
|
161 |
\isatagproof
|
|
162 |
%
|
|
163 |
\begin{isamarkuptxt}%
|
|
164 |
\vspace{-0.8cm}\emph{equations}%
|
|
165 |
\end{isamarkuptxt}%
|
|
166 |
\isamarkuptrue%
|
|
167 |
\isacommand{by}\isamarkupfalse%
|
|
168 |
\ pat{\isacharunderscore}completeness\ auto%
|
|
169 |
\endisatagproof
|
|
170 |
{\isafoldproof}%
|
|
171 |
%
|
|
172 |
\isadelimproof
|
|
173 |
%
|
|
174 |
\endisadelimproof
|
|
175 |
\ \isanewline
|
|
176 |
\isacommand{termination}\isamarkupfalse%
|
|
177 |
%
|
|
178 |
\isadelimproof
|
|
179 |
\ %
|
|
180 |
\endisadelimproof
|
|
181 |
%
|
|
182 |
\isatagproof
|
|
183 |
\isacommand{by}\isamarkupfalse%
|
|
184 |
\ lexicographic{\isacharunderscore}order%
|
|
185 |
\endisatagproof
|
|
186 |
{\isafoldproof}%
|
|
187 |
%
|
|
188 |
\isadelimproof
|
|
189 |
%
|
|
190 |
\endisadelimproof
|
|
191 |
%
|
|
192 |
\begin{isamarkuptext}%
|
|
193 |
Some declarations and proofs have now become explicit:
|
|
194 |
|
|
195 |
\begin{enumerate}
|
|
196 |
\item The "sequential" option enables the preprocessing of
|
|
197 |
pattern overlaps we already saw. Without this option, the equations
|
|
198 |
must already be disjoint and complete. The automatic completion only
|
|
199 |
works with datatype patterns.
|
|
200 |
|
|
201 |
\item A function definition now produces a proof obligation which
|
|
202 |
expresses completeness and compatibility of patterns (We talk about
|
|
203 |
this later). The combination of the methods {\tt pat\_completeness} and
|
|
204 |
{\tt auto} is used to solve this proof obligation.
|
|
205 |
|
|
206 |
\item A termination proof follows the definition, started by the
|
|
207 |
\cmd{termination} command. The {\tt lexicographic\_order} method can prove termination of a
|
|
208 |
certain class of functions by searching for a suitable lexicographic combination of size
|
|
209 |
measures.
|
|
210 |
\end{enumerate}%
|
|
211 |
\end{isamarkuptext}%
|
|
212 |
\isamarkuptrue%
|
|
213 |
%
|
|
214 |
\isamarkupsection{Proving termination%
|
|
215 |
}
|
|
216 |
\isamarkuptrue%
|
|
217 |
%
|
|
218 |
\begin{isamarkuptext}%
|
|
219 |
Consider the following function, which sums up natural numbers up to
|
|
220 |
\isa{N}, using a counter \isa{i}%
|
|
221 |
\end{isamarkuptext}%
|
|
222 |
\isamarkuptrue%
|
|
223 |
\isacommand{function}\isamarkupfalse%
|
|
224 |
\ sum\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ nat{\isachardoublequoteclose}\isanewline
|
|
225 |
\isakeyword{where}\isanewline
|
|
226 |
\ \ {\isachardoublequoteopen}sum\ i\ N\ {\isacharequal}\ {\isacharparenleft}if\ i\ {\isachargreater}\ N\ then\ {\isadigit{0}}\ else\ i\ {\isacharplus}\ sum\ {\isacharparenleft}Suc\ i{\isacharparenright}\ N{\isacharparenright}{\isachardoublequoteclose}\isanewline
|
|
227 |
%
|
|
228 |
\isadelimproof
|
|
229 |
\ \ %
|
|
230 |
\endisadelimproof
|
|
231 |
%
|
|
232 |
\isatagproof
|
|
233 |
\isacommand{by}\isamarkupfalse%
|
|
234 |
\ pat{\isacharunderscore}completeness\ auto%
|
|
235 |
\endisatagproof
|
|
236 |
{\isafoldproof}%
|
|
237 |
%
|
|
238 |
\isadelimproof
|
|
239 |
%
|
|
240 |
\endisadelimproof
|
|
241 |
%
|
|
242 |
\begin{isamarkuptext}%
|
|
243 |
The {\tt lexicographic\_order} method fails on this example, because none of the
|
|
244 |
arguments decreases in the recursive call.
|
|
245 |
|
|
246 |
A more general method for termination proofs is to supply a wellfounded
|
|
247 |
relation on the argument type, and to show that the argument
|
|
248 |
decreases in every recursive call.
|
|
249 |
|
|
250 |
The termination argument for \isa{sum} is based on the fact that
|
|
251 |
the \emph{difference} between \isa{i} and \isa{N} gets
|
|
252 |
smaller in every step, and that the recursion stops when \isa{i}
|
|
253 |
is greater then \isa{n}. Phrased differently, the expression
|
|
254 |
\isa{N\ {\isacharplus}\ {\isadigit{1}}\ {\isacharminus}\ i} decreases in every recursive call.
|
|
255 |
|
|
256 |
We can use this expression as a measure function to construct a
|
21346
|
257 |
wellfounded relation, which can prove termination.%
|
21212
|
258 |
\end{isamarkuptext}%
|
|
259 |
\isamarkuptrue%
|
|
260 |
\isacommand{termination}\isamarkupfalse%
|
|
261 |
\ \isanewline
|
|
262 |
%
|
|
263 |
\isadelimproof
|
|
264 |
\ \ %
|
|
265 |
\endisadelimproof
|
|
266 |
%
|
|
267 |
\isatagproof
|
|
268 |
\isacommand{by}\isamarkupfalse%
|
21346
|
269 |
\ {\isacharparenleft}relation\ {\isachardoublequoteopen}measure\ {\isacharparenleft}{\isasymlambda}{\isacharparenleft}i{\isacharcomma}N{\isacharparenright}{\isachardot}\ N\ {\isacharplus}\ {\isadigit{1}}\ {\isacharminus}\ i{\isacharparenright}{\isachardoublequoteclose}{\isacharparenright}\ auto%
|
21212
|
270 |
\endisatagproof
|
|
271 |
{\isafoldproof}%
|
|
272 |
%
|
|
273 |
\isadelimproof
|
|
274 |
%
|
|
275 |
\endisadelimproof
|
|
276 |
%
|
|
277 |
\begin{isamarkuptext}%
|
|
278 |
Note that the two (curried) function arguments appear as a pair in
|
|
279 |
the measure function. The \cmd{function} command packs together curried
|
|
280 |
arguments into a tuple to simplify its internal operation. Hence,
|
|
281 |
measure functions and termination relations always work on the
|
|
282 |
tupled type.
|
|
283 |
|
|
284 |
Let us complicate the function a little, by adding some more recursive calls:%
|
|
285 |
\end{isamarkuptext}%
|
|
286 |
\isamarkuptrue%
|
|
287 |
\isacommand{function}\isamarkupfalse%
|
|
288 |
\ foo\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ nat{\isachardoublequoteclose}\isanewline
|
|
289 |
\isakeyword{where}\isanewline
|
|
290 |
\ \ {\isachardoublequoteopen}foo\ i\ N\ {\isacharequal}\ {\isacharparenleft}if\ i\ {\isachargreater}\ N\ \isanewline
|
|
291 |
\ \ \ \ \ \ \ \ \ \ \ \ \ \ then\ {\isacharparenleft}if\ N\ {\isacharequal}\ {\isadigit{0}}\ then\ {\isadigit{0}}\ else\ foo\ {\isadigit{0}}\ {\isacharparenleft}N\ {\isacharminus}\ {\isadigit{1}}{\isacharparenright}{\isacharparenright}\isanewline
|
|
292 |
\ \ \ \ \ \ \ \ \ \ \ \ \ \ else\ i\ {\isacharplus}\ foo\ {\isacharparenleft}Suc\ i{\isacharparenright}\ N{\isacharparenright}{\isachardoublequoteclose}\isanewline
|
|
293 |
%
|
|
294 |
\isadelimproof
|
|
295 |
%
|
|
296 |
\endisadelimproof
|
|
297 |
%
|
|
298 |
\isatagproof
|
|
299 |
\isacommand{by}\isamarkupfalse%
|
|
300 |
\ pat{\isacharunderscore}completeness\ auto%
|
|
301 |
\endisatagproof
|
|
302 |
{\isafoldproof}%
|
|
303 |
%
|
|
304 |
\isadelimproof
|
|
305 |
%
|
|
306 |
\endisadelimproof
|
|
307 |
%
|
|
308 |
\begin{isamarkuptext}%
|
|
309 |
When \isa{i} has reached \isa{N}, it starts at zero again
|
|
310 |
and \isa{N} is decremented.
|
|
311 |
This corresponds to a nested
|
|
312 |
loop where one index counts up and the other down. Termination can
|
|
313 |
be proved using a lexicographic combination of two measures, namely
|
|
314 |
the value of \isa{N} and the above difference. The \isa{measures}
|
|
315 |
combinator generalizes \isa{measure} by taking a list of measure functions.%
|
|
316 |
\end{isamarkuptext}%
|
|
317 |
\isamarkuptrue%
|
|
318 |
\isacommand{termination}\isamarkupfalse%
|
|
319 |
\ \isanewline
|
|
320 |
%
|
|
321 |
\isadelimproof
|
|
322 |
\ \ %
|
|
323 |
\endisadelimproof
|
|
324 |
%
|
|
325 |
\isatagproof
|
|
326 |
\isacommand{by}\isamarkupfalse%
|
21346
|
327 |
\ {\isacharparenleft}relation\ {\isachardoublequoteopen}measures\ {\isacharbrackleft}{\isasymlambda}{\isacharparenleft}i{\isacharcomma}\ N{\isacharparenright}{\isachardot}\ N{\isacharcomma}\ {\isasymlambda}{\isacharparenleft}i{\isacharcomma}N{\isacharparenright}{\isachardot}\ N\ {\isacharplus}\ {\isadigit{1}}\ {\isacharminus}\ i{\isacharbrackright}{\isachardoublequoteclose}{\isacharparenright}\ auto%
|
21212
|
328 |
\endisatagproof
|
|
329 |
{\isafoldproof}%
|
|
330 |
%
|
|
331 |
\isadelimproof
|
|
332 |
%
|
|
333 |
\endisadelimproof
|
|
334 |
%
|
|
335 |
\isamarkupsection{Mutual Recursion%
|
|
336 |
}
|
|
337 |
\isamarkuptrue%
|
|
338 |
%
|
|
339 |
\begin{isamarkuptext}%
|
|
340 |
If two or more functions call one another mutually, they have to be defined
|
|
341 |
in one step. The simplest example are probably \isa{even} and \isa{odd}:%
|
|
342 |
\end{isamarkuptext}%
|
|
343 |
\isamarkuptrue%
|
|
344 |
\isacommand{function}\isamarkupfalse%
|
|
345 |
\ even\ odd\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequoteopen}nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
|
|
346 |
\isakeyword{where}\isanewline
|
|
347 |
\ \ {\isachardoublequoteopen}even\ {\isadigit{0}}\ {\isacharequal}\ True{\isachardoublequoteclose}\isanewline
|
|
348 |
{\isacharbar}\ {\isachardoublequoteopen}odd\ {\isadigit{0}}\ {\isacharequal}\ False{\isachardoublequoteclose}\isanewline
|
|
349 |
{\isacharbar}\ {\isachardoublequoteopen}even\ {\isacharparenleft}Suc\ n{\isacharparenright}\ {\isacharequal}\ odd\ n{\isachardoublequoteclose}\isanewline
|
|
350 |
{\isacharbar}\ {\isachardoublequoteopen}odd\ {\isacharparenleft}Suc\ n{\isacharparenright}\ {\isacharequal}\ even\ n{\isachardoublequoteclose}\isanewline
|
|
351 |
%
|
|
352 |
\isadelimproof
|
|
353 |
\ \ %
|
|
354 |
\endisadelimproof
|
|
355 |
%
|
|
356 |
\isatagproof
|
|
357 |
\isacommand{by}\isamarkupfalse%
|
|
358 |
\ pat{\isacharunderscore}completeness\ auto%
|
|
359 |
\endisatagproof
|
|
360 |
{\isafoldproof}%
|
|
361 |
%
|
|
362 |
\isadelimproof
|
|
363 |
%
|
|
364 |
\endisadelimproof
|
|
365 |
%
|
|
366 |
\begin{isamarkuptext}%
|
|
367 |
To solve the problem of mutual dependencies, Isabelle internally
|
|
368 |
creates a single function operating on the sum
|
|
369 |
type. Then the original functions are defined as
|
|
370 |
projections. Consequently, termination has to be proved
|
|
371 |
simultaneously for both functions, by specifying a measure on the
|
|
372 |
sum type:%
|
|
373 |
\end{isamarkuptext}%
|
|
374 |
\isamarkuptrue%
|
|
375 |
\isacommand{termination}\isamarkupfalse%
|
|
376 |
\ \isanewline
|
|
377 |
%
|
|
378 |
\isadelimproof
|
|
379 |
\ \ %
|
|
380 |
\endisadelimproof
|
|
381 |
%
|
|
382 |
\isatagproof
|
|
383 |
\isacommand{by}\isamarkupfalse%
|
21346
|
384 |
\ {\isacharparenleft}relation\ {\isachardoublequoteopen}measure\ {\isacharparenleft}sum{\isacharunderscore}case\ {\isacharparenleft}{\isacharpercent}n{\isachardot}\ n{\isacharparenright}\ {\isacharparenleft}{\isacharpercent}n{\isachardot}\ n{\isacharparenright}{\isacharparenright}{\isachardoublequoteclose}{\isacharparenright}\ auto%
|
21212
|
385 |
\endisatagproof
|
|
386 |
{\isafoldproof}%
|
|
387 |
%
|
|
388 |
\isadelimproof
|
|
389 |
%
|
|
390 |
\endisadelimproof
|
|
391 |
%
|
|
392 |
\isamarkupsection{Nested recursion%
|
|
393 |
}
|
|
394 |
\isamarkuptrue%
|
|
395 |
%
|
|
396 |
\begin{isamarkuptext}%
|
|
397 |
FIXME%
|
|
398 |
\end{isamarkuptext}%
|
|
399 |
\isamarkuptrue%
|
|
400 |
%
|
|
401 |
\isamarkupsection{More general patterns%
|
|
402 |
}
|
|
403 |
\isamarkuptrue%
|
|
404 |
%
|
|
405 |
\begin{isamarkuptext}%
|
|
406 |
FIXME%
|
|
407 |
\end{isamarkuptext}%
|
|
408 |
\isamarkuptrue%
|
|
409 |
%
|
|
410 |
\isadelimtheory
|
|
411 |
%
|
|
412 |
\endisadelimtheory
|
|
413 |
%
|
|
414 |
\isatagtheory
|
|
415 |
\isacommand{end}\isamarkupfalse%
|
|
416 |
%
|
|
417 |
\endisatagtheory
|
|
418 |
{\isafoldtheory}%
|
|
419 |
%
|
|
420 |
\isadelimtheory
|
|
421 |
%
|
|
422 |
\endisadelimtheory
|
|
423 |
\isanewline
|
|
424 |
\end{isabellebody}%
|
|
425 |
%%% Local Variables:
|
|
426 |
%%% mode: latex
|
|
427 |
%%% TeX-master: "root"
|
|
428 |
%%% End:
|