diff -r fae6233c5f37 -r 8ffc4d0e652d src/HOL/HOLCF/Fix.thy --- a/src/HOL/HOLCF/Fix.thy Wed Jan 13 23:02:28 2016 +0100 +++ b/src/HOL/HOLCF/Fix.thy Wed Jan 13 23:07:06 2016 +0100 @@ -3,7 +3,7 @@ Author: Brian Huffman *) -section {* Fixed point operator and admissibility *} +section \Fixed point operator and admissibility\ theory Fix imports Cfun @@ -11,13 +11,13 @@ default_sort pcpo -subsection {* Iteration *} +subsection \Iteration\ primrec iterate :: "nat \ ('a::cpo \ 'a) \ ('a \ 'a)" where "iterate 0 = (\ F x. x)" | "iterate (Suc n) = (\ F x. F\(iterate n\F\x))" -text {* Derive inductive properties of iterate from primitive recursion *} +text \Derive inductive properties of iterate from primitive recursion\ lemma iterate_0 [simp]: "iterate 0\F\x = x" by simp @@ -34,19 +34,19 @@ "iterate m\F\(iterate n\F\x) = iterate (m + n)\F\x" by (induct m) simp_all -text {* The sequence of function iterations is a chain. *} +text \The sequence of function iterations is a chain.\ lemma chain_iterate [simp]: "chain (\i. iterate i\F\\)" by (rule chainI, unfold iterate_Suc2, rule monofun_cfun_arg, rule minimal) -subsection {* Least fixed point operator *} +subsection \Least fixed point operator\ definition "fix" :: "('a \ 'a) \ 'a" where "fix = (\ F. \i. iterate i\F\\)" -text {* Binder syntax for @{term fix} *} +text \Binder syntax for @{term fix}\ abbreviation fix_syn :: "('a \ 'a) \ 'a" (binder "\ " 10) where @@ -55,9 +55,9 @@ notation (ASCII) fix_syn (binder "FIX " 10) -text {* Properties of @{term fix} *} +text \Properties of @{term fix}\ -text {* direct connection between @{term fix} and iteration *} +text \direct connection between @{term fix} and iteration\ lemma fix_def2: "fix\F = (\i. iterate i\F\\)" unfolding fix_def by simp @@ -66,10 +66,10 @@ unfolding fix_def2 using chain_iterate by (rule is_ub_thelub) -text {* +text \ Kleene's fixed point theorems for continuous functions in pointed omega cpo's -*} +\ lemma fix_eq: "fix\F = F\(fix\F)" apply (simp add: fix_def2) @@ -116,7 +116,7 @@ lemma fix_eq5: "f = fix\F \ f\x = F\f\x" by (erule fix_eq4 [THEN cfun_fun_cong]) -text {* strictness of @{term fix} *} +text \strictness of @{term fix}\ lemma fix_bottom_iff: "(fix\F = \) = (F\\ = \)" apply (rule iffI) @@ -131,7 +131,7 @@ lemma fix_defined: "F\\ \ \ \ fix\F \ \" by (simp add: fix_bottom_iff) -text {* @{term fix} applied to identity and constant functions *} +text \@{term fix} applied to identity and constant functions\ lemma fix_id: "(\ x. x) = \" by (simp add: fix_strict) @@ -139,7 +139,7 @@ lemma fix_const: "(\ x. c) = c" by (subst fix_eq, simp) -subsection {* Fixed point induction *} +subsection \Fixed point induction\ lemma fix_ind: "\adm P; P \; \x. P x \ P (F\x)\ \ P (fix\F)" unfolding fix_def2 @@ -202,12 +202,12 @@ shows "P (fix\(Abs_cfun F)) (fix\(Abs_cfun G))" by (rule parallel_fix_ind, simp_all add: assms) -subsection {* Fixed-points on product types *} +subsection \Fixed-points on product types\ -text {* +text \ Bekic's Theorem: Simultaneous fixed points over pairs can be written in terms of separate fixed points. -*} +\ lemma fix_cprod: "fix\(F::'a \ 'b \ 'a \ 'b) =