author | Walther Neuper <neuper@ist.tugraz.at> |
Thu, 12 Aug 2010 15:03:34 +0200 | |
branch | isac-from-Isabelle2009-2 |
changeset 37913 | 20e3616b2d9c |
parent 36754 | 403585a89772 |
child 43508 | 381fdcab0f36 |
permissions | -rw-r--r-- |
paulson@10341 | 1 |
(* ID: $Id$ *) |
haftmann@16417 | 2 |
theory Recur imports Main begin |
paulson@10294 | 3 |
|
wenzelm@36754 | 4 |
ML "Pretty.margin_default := 64" |
paulson@10294 | 5 |
|
paulson@10294 | 6 |
|
paulson@10294 | 7 |
text{* |
paulson@10294 | 8 |
@{thm[display] mono_def[no_vars]} |
paulson@10294 | 9 |
\rulename{mono_def} |
paulson@10294 | 10 |
|
paulson@10294 | 11 |
@{thm[display] monoI[no_vars]} |
paulson@10294 | 12 |
\rulename{monoI} |
paulson@10294 | 13 |
|
paulson@10294 | 14 |
@{thm[display] monoD[no_vars]} |
paulson@10294 | 15 |
\rulename{monoD} |
paulson@10294 | 16 |
|
paulson@10294 | 17 |
@{thm[display] lfp_unfold[no_vars]} |
paulson@10294 | 18 |
\rulename{lfp_unfold} |
paulson@10294 | 19 |
|
paulson@10294 | 20 |
@{thm[display] lfp_induct[no_vars]} |
paulson@10294 | 21 |
\rulename{lfp_induct} |
paulson@10294 | 22 |
|
paulson@10294 | 23 |
@{thm[display] gfp_unfold[no_vars]} |
paulson@10294 | 24 |
\rulename{gfp_unfold} |
paulson@10294 | 25 |
|
paulson@10294 | 26 |
@{thm[display] coinduct[no_vars]} |
paulson@10294 | 27 |
\rulename{coinduct} |
paulson@10294 | 28 |
*} |
paulson@10294 | 29 |
|
paulson@10294 | 30 |
text{*\noindent |
paulson@10294 | 31 |
A relation $<$ is |
paulson@10294 | 32 |
\bfindex{wellfounded} if it has no infinite descending chain $\cdots < |
paulson@10294 | 33 |
a@2 < a@1 < a@0$. Clearly, a function definition is total iff the set |
paulson@10294 | 34 |
of all pairs $(r,l)$, where $l$ is the argument on the left-hand side |
paulson@10294 | 35 |
of an equation and $r$ the argument of some recursive call on the |
paulson@10294 | 36 |
corresponding right-hand side, induces a wellfounded relation. |
paulson@10294 | 37 |
|
paulson@10294 | 38 |
The HOL library formalizes |
paulson@10294 | 39 |
some of the theory of wellfounded relations. For example |
paulson@10294 | 40 |
@{prop"wf r"}\index{*wf|bold} means that relation @{term[show_types]"r::('a*'a)set"} is |
paulson@10294 | 41 |
wellfounded. |
paulson@10294 | 42 |
Finally we should mention that HOL already provides the mother of all |
paulson@10294 | 43 |
inductions, \textbf{wellfounded |
paulson@10294 | 44 |
induction}\indexbold{induction!wellfounded}\index{wellfounded |
paulson@10294 | 45 |
induction|see{induction, wellfounded}} (@{thm[source]wf_induct}): |
paulson@10294 | 46 |
@{thm[display]wf_induct[no_vars]} |
paulson@10294 | 47 |
where @{term"wf r"} means that the relation @{term r} is wellfounded |
paulson@10294 | 48 |
|
paulson@10294 | 49 |
*} |
paulson@10294 | 50 |
|
paulson@10294 | 51 |
text{* |
paulson@10294 | 52 |
|
paulson@10294 | 53 |
@{thm[display] wf_induct[no_vars]} |
paulson@10294 | 54 |
\rulename{wf_induct} |
paulson@10294 | 55 |
|
paulson@10294 | 56 |
@{thm[display] less_than_iff[no_vars]} |
paulson@10294 | 57 |
\rulename{less_than_iff} |
paulson@10294 | 58 |
|
paulson@10294 | 59 |
@{thm[display] inv_image_def[no_vars]} |
paulson@10294 | 60 |
\rulename{inv_image_def} |
paulson@10294 | 61 |
|
paulson@10294 | 62 |
@{thm[display] measure_def[no_vars]} |
paulson@10294 | 63 |
\rulename{measure_def} |
paulson@10294 | 64 |
|
paulson@10294 | 65 |
@{thm[display] wf_less_than[no_vars]} |
paulson@10294 | 66 |
\rulename{wf_less_than} |
paulson@10294 | 67 |
|
paulson@10294 | 68 |
@{thm[display] wf_inv_image[no_vars]} |
paulson@10294 | 69 |
\rulename{wf_inv_image} |
paulson@10294 | 70 |
|
paulson@10294 | 71 |
@{thm[display] wf_measure[no_vars]} |
paulson@10294 | 72 |
\rulename{wf_measure} |
paulson@10294 | 73 |
|
paulson@10294 | 74 |
@{thm[display] lex_prod_def[no_vars]} |
paulson@10294 | 75 |
\rulename{lex_prod_def} |
paulson@10294 | 76 |
|
paulson@10294 | 77 |
@{thm[display] wf_lex_prod[no_vars]} |
paulson@10294 | 78 |
\rulename{wf_lex_prod} |
paulson@10294 | 79 |
|
paulson@10294 | 80 |
*} |
paulson@10294 | 81 |
|
paulson@10294 | 82 |
end |
paulson@10294 | 83 |