# HG changeset patch # User haftmann # Date 1241782467 -7200 # Node ID 845a6acd3bf363fb04b4572847e63e8a988b3ed3 # Parent ee1ebd405a37e880d5a862dbdbe61e08de16c7ca localized (complete) partial order classes diff -r ee1ebd405a37 -r 845a6acd3bf3 src/HOLCF/Pcpo.thy --- a/src/HOLCF/Pcpo.thy Fri May 08 10:59:11 2009 +0200 +++ b/src/HOLCF/Pcpo.thy Fri May 08 13:34:27 2009 +0200 @@ -13,28 +13,28 @@ text {* The class cpo of chain complete partial orders *} class cpo = po + - -- {* class axiom: *} - assumes cpo: "chain S \ \x :: 'a::po. range S <<| x" + assumes cpo: "chain S \ \x. range S <<| x" +begin text {* in cpo's everthing equal to THE lub has lub properties for every chain *} -lemma cpo_lubI: "chain (S::nat \ 'a::cpo) \ range S <<| (\i. S i)" -by (fast dest: cpo elim: lubI) +lemma cpo_lubI: "chain S \ range S <<| (\i. S i)" + by (fast dest: cpo elim: lubI) -lemma thelubE: "\chain S; (\i. S i) = (l::'a::cpo)\ \ range S <<| l" -by (blast dest: cpo intro: lubI) +lemma thelubE: "\chain S; (\i. S i) = l\ \ range S <<| l" + by (blast dest: cpo intro: lubI) text {* Properties of the lub *} -lemma is_ub_thelub: "chain (S::nat \ 'a::cpo) \ S x \ (\i. S i)" -by (blast dest: cpo intro: lubI [THEN is_ub_lub]) +lemma is_ub_thelub: "chain S \ S x \ (\i. S i)" + by (blast dest: cpo intro: lubI [THEN is_ub_lub]) lemma is_lub_thelub: - "\chain (S::nat \ 'a::cpo); range S <| x\ \ (\i. S i) \ x" -by (blast dest: cpo intro: lubI [THEN is_lub_lub]) + "\chain S; range S <| x\ \ (\i. S i) \ x" + by (blast dest: cpo intro: lubI [THEN is_lub_lub]) lemma lub_range_mono: - "\range X \ range Y; chain Y; chain (X::nat \ 'a::cpo)\ + "\range X \ range Y; chain Y; chain X\ \ (\i. X i) \ (\i. Y i)" apply (erule is_lub_thelub) apply (rule ub_rangeI) @@ -45,7 +45,7 @@ done lemma lub_range_shift: - "chain (Y::nat \ 'a::cpo) \ (\i. Y (i + j)) = (\i. Y i)" + "chain Y \ (\i. Y (i + j)) = (\i. Y i)" apply (rule antisym_less) apply (rule lub_range_mono) apply fast @@ -62,7 +62,7 @@ done lemma maxinch_is_thelub: - "chain Y \ max_in_chain i Y = ((\i. Y i) = ((Y i)::'a::cpo))" + "chain Y \ max_in_chain i Y = ((\i. Y i) = Y i)" apply (rule iffI) apply (fast intro!: thelubI lub_finch1) apply (unfold max_in_chain_def) @@ -75,7 +75,7 @@ text {* the @{text "\"} relation between two chains is preserved by their lubs *} lemma lub_mono: - "\chain (X::nat \ 'a::cpo); chain Y; \i. X i \ Y i\ + "\chain X; chain Y; \i. X i \ Y i\ \ (\i. X i) \ (\i. Y i)" apply (erule is_lub_thelub) apply (rule ub_rangeI) @@ -87,14 +87,14 @@ text {* the = relation between two chains is preserved by their lubs *} lemma lub_equal: - "\chain (X::nat \ 'a::cpo); chain Y; \k. X k = Y k\ + "\chain X; chain Y; \k. X k = Y k\ \ (\i. X i) = (\i. Y i)" -by (simp only: expand_fun_eq [symmetric]) + by (simp only: expand_fun_eq [symmetric]) text {* more results about mono and = of lubs of chains *} lemma lub_mono2: - "\\j. \i>j. X i = Y i; chain (X::nat \ 'a::cpo); chain Y\ + "\\j. \i>j. X i = Y i; chain X; chain Y\ \ (\i. X i) \ (\i. Y i)" apply (erule exE) apply (subgoal_tac "(\i. X (i + Suc j)) \ (\i. Y (i + Suc j))") @@ -104,12 +104,12 @@ done lemma lub_equal2: - "\\j. \i>j. X i = Y i; chain (X::nat \ 'a::cpo); chain Y\ + "\\j. \i>j. X i = Y i; chain X; chain Y\ \ (\i. X i) = (\i. Y i)" -by (blast intro: antisym_less lub_mono2 sym) + by (blast intro: antisym_less lub_mono2 sym) lemma lub_mono3: - "\chain (Y::nat \ 'a::cpo); chain X; \i. \j. Y i \ X j\ + "\chain Y; chain X; \i. \j. Y i \ X j\ \ (\i. Y i) \ (\i. X i)" apply (erule is_lub_thelub) apply (rule ub_rangeI) @@ -120,7 +120,6 @@ done lemma ch2ch_lub: - fixes Y :: "nat \ nat \ 'a::cpo" assumes 1: "\j. chain (\i. Y i j)" assumes 2: "\i. chain (\j. Y i j)" shows "chain (\i. \j. Y i j)" @@ -130,7 +129,6 @@ done lemma diag_lub: - fixes Y :: "nat \ nat \ 'a::cpo" assumes 1: "\j. chain (\i. Y i j)" assumes 2: "\i. chain (\j. Y i j)" shows "(\i. \j. Y i j) = (\i. Y i i)" @@ -159,12 +157,12 @@ qed lemma ex_lub: - fixes Y :: "nat \ nat \ 'a::cpo" assumes 1: "\j. chain (\i. Y i j)" assumes 2: "\i. chain (\j. Y i j)" shows "(\i. \j. Y i j) = (\j. \i. Y i j)" -by (simp add: diag_lub 1 2) + by (simp add: diag_lub 1 2) +end subsection {* Pointed cpos *} @@ -172,9 +170,9 @@ class pcpo = cpo + assumes least: "\x. \y. x \ y" +begin -definition - UU :: "'a::pcpo" where +definition UU :: 'a where "UU = (THE x. \y. x \ y)" notation (xsymbols) @@ -193,6 +191,8 @@ lemma minimal [iff]: "\ \ x" by (rule UU_least [THEN spec]) +end + text {* Simproc to rewrite @{term "\ = x"} to @{term "x = \"}. *} setup {* @@ -202,6 +202,9 @@ simproc_setup reorient_bottom ("\ = x") = ReorientProc.proc +context pcpo +begin + text {* useful lemmas about @{term \} *} lemma less_UU_iff [simp]: "(x \ \) = (x = \)" @@ -213,9 +216,6 @@ lemma UU_I: "x \ \ \ x = \" by (subst eq_UU_iff) -lemma not_less2not_eq: "\ (x::'a::po) \ y \ x \ y" -by auto - lemma chain_UU_I: "\chain Y; (\i. Y i) = \\ \ \i. Y i = \" apply (rule allI) apply (rule UU_I) @@ -230,49 +230,53 @@ done lemma chain_UU_I_inverse2: "(\i. Y i) \ \ \ \i::nat. Y i \ \" -by (blast intro: chain_UU_I_inverse) + by (blast intro: chain_UU_I_inverse) lemma notUU_I: "\x \ y; x \ \\ \ y \ \" -by (blast intro: UU_I) + by (blast intro: UU_I) lemma chain_mono2: "\\j. Y j \ \; chain Y\ \ \j. \i>j. Y i \ \" -by (blast dest: notUU_I chain_mono_less) + by (blast dest: notUU_I chain_mono_less) + +end subsection {* Chain-finite and flat cpos *} text {* further useful classes for HOLCF domains *} -class finite_po = finite + po +class chfin = po + + assumes chfin: "chain Y \ \n. max_in_chain n Y" +begin -class chfin = po + - assumes chfin: "chain Y \ \n. max_in_chain n (Y :: nat => 'a::po)" +subclass cpo +apply default +apply (frule chfin) +apply (blast intro: lub_finch1) +done -class flat = pcpo + - assumes ax_flat: "(x :: 'a::pcpo) \ y \ x = \ \ x = y" +lemma chfin2finch: "chain Y \ finite_chain Y" + by (simp add: chfin finite_chain_def) + +end -text {* finite partial orders are chain-finite *} +class finite_po = finite + po +begin -instance finite_po < chfin -apply intro_classes +subclass chfin +apply default apply (drule finite_range_imp_finch) apply (rule finite) apply (simp add: finite_chain_def) done -text {* some properties for chfin and flat *} - -text {* chfin types are cpo *} +end -instance chfin < cpo -apply intro_classes -apply (frule chfin) -apply (blast intro: lub_finch1) -done +class flat = pcpo + + assumes ax_flat: "x \ y \ x = \ \ x = y" +begin -text {* flat types are chfin *} - -instance flat < chfin -apply intro_classes +subclass chfin +apply default apply (unfold max_in_chain_def) apply (case_tac "\i. Y i = \") apply simp @@ -283,31 +287,28 @@ apply (blast dest: chain_mono ax_flat) done -text {* flat subclass of chfin; @{text adm_flat} not needed *} - lemma flat_less_iff: - fixes x y :: "'a::flat" shows "(x \ y) = (x = \ \ x = y)" -by (safe dest!: ax_flat) + by (safe dest!: ax_flat) -lemma flat_eq: "(a::'a::flat) \ \ \ a \ b = (a = b)" -by (safe dest!: ax_flat) +lemma flat_eq: "a \ \ \ a \ b = (a = b)" + by (safe dest!: ax_flat) -lemma chfin2finch: "chain (Y::nat \ 'a::chfin) \ finite_chain Y" -by (simp add: chfin finite_chain_def) +end text {* Discrete cpos *} class discrete_cpo = sq_ord + assumes discrete_cpo [simp]: "x \ y \ x = y" +begin -subclass (in discrete_cpo) po +subclass po proof qed simp_all text {* In a discrete cpo, every chain is constant *} lemma discrete_chain_const: - assumes S: "chain (S::nat \ 'a::discrete_cpo)" + assumes S: "chain S" shows "\x. S = (\i. x)" proof (intro exI ext) fix i :: nat @@ -316,7 +317,7 @@ thus "S i = S 0" by (rule sym) qed -instance discrete_cpo < cpo +subclass cpo proof fix S :: "nat \ 'a" assume S: "chain S" @@ -326,31 +327,6 @@ by (fast intro: lub_const) qed -text {* lemmata for improved admissibility introdution rule *} - -lemma infinite_chain_adm_lemma: - "\chain Y; \i. P (Y i); - \Y. \chain Y; \i. P (Y i); \ finite_chain Y\ \ P (\i. Y i)\ - \ P (\i. Y i)" -apply (case_tac "finite_chain Y") -prefer 2 apply fast -apply (unfold finite_chain_def) -apply safe -apply (erule lub_finch1 [THEN thelubI, THEN ssubst]) -apply assumption -apply (erule spec) -done - -lemma increasing_chain_adm_lemma: - "\chain Y; \i. P (Y i); \Y. \chain Y; \i. P (Y i); - \i. \j>i. Y i \ Y j \ Y i \ Y j\ \ P (\i. Y i)\ - \ P (\i. Y i)" -apply (erule infinite_chain_adm_lemma) -apply assumption -apply (erule thin_rl) -apply (unfold finite_chain_def) -apply (unfold max_in_chain_def) -apply (fast dest: le_imp_less_or_eq elim: chain_mono_less) -done +end end diff -r ee1ebd405a37 -r 845a6acd3bf3 src/HOLCF/Porder.thy --- a/src/HOLCF/Porder.thy Fri May 08 10:59:11 2009 +0200 +++ b/src/HOLCF/Porder.thy Fri May 08 13:34:27 2009 +0200 @@ -12,6 +12,7 @@ class sq_ord = fixes sq_le :: "'a \ 'a \ bool" +begin notation sq_le (infixl "<<" 55) @@ -19,35 +20,43 @@ notation (xsymbols) sq_le (infixl "\" 55) +lemma sq_ord_less_eq_trans: "\a \ b; b = c\ \ a \ c" + by (rule subst) + +lemma sq_ord_eq_less_trans: "\a = b; b \ c\ \ a \ c" + by (rule ssubst) + +end + class po = sq_ord + assumes refl_less [iff]: "x \ x" - assumes trans_less: "\x \ y; y \ z\ \ x \ z" - assumes antisym_less: "\x \ y; y \ x\ \ x = y" + assumes trans_less: "x \ y \ y \ z \ x \ z" + assumes antisym_less: "x \ y \ y \ x \ x = y" +begin text {* minimal fixes least element *} -lemma minimal2UU[OF allI] : "\x::'a::po. uu \ x \ uu = (THE u. \y. u \ y)" -by (blast intro: theI2 antisym_less) +lemma minimal2UU[OF allI] : "\x. uu \ x \ uu = (THE u. \y. u \ y)" + by (blast intro: theI2 antisym_less) text {* the reverse law of anti-symmetry of @{term "op <<"} *} -lemma antisym_less_inverse: "(x::'a::po) = y \ x \ y \ y \ x" -by simp +lemma antisym_less_inverse: "x = y \ x \ y \ y \ x" + by simp -lemma box_less: "\(a::'a::po) \ b; c \ a; b \ d\ \ c \ d" -by (rule trans_less [OF trans_less]) - -lemma po_eq_conv: "((x::'a::po) = y) = (x \ y \ y \ x)" -by (fast elim!: antisym_less_inverse intro!: antisym_less) +lemma box_less: "a \ b \ c \ a \ b \ d \ c \ d" + by (rule trans_less [OF trans_less]) -lemma rev_trans_less: "\(y::'a::po) \ z; x \ y\ \ x \ z" -by (rule trans_less) +lemma po_eq_conv: "x = y \ x \ y \ y \ x" + by (fast elim!: antisym_less_inverse intro!: antisym_less) -lemma sq_ord_less_eq_trans: "\a \ b; b = c\ \ a \ c" -by (rule subst) +lemma rev_trans_less: "y \ z \ x \ y \ x \ z" + by (rule trans_less) -lemma sq_ord_eq_less_trans: "\a = b; b \ c\ \ a \ c" -by (rule ssubst) +lemma not_less2not_eq: "\ x \ y \ x \ y" + by auto + +end lemmas HOLCF_trans_rules [trans] = trans_less @@ -55,49 +64,51 @@ sq_ord_less_eq_trans sq_ord_eq_less_trans +context po +begin + subsection {* Upper bounds *} -definition - is_ub :: "['a set, 'a::po] \ bool" (infixl "<|" 55) where - "(S <| x) = (\y. y \ S \ y \ x)" +definition is_ub :: "'a set \ 'a \ bool" (infixl "<|" 55) where + "S <| x \ (\y. y \ S \ y \ x)" lemma is_ubI: "(\x. x \ S \ x \ u) \ S <| u" -by (simp add: is_ub_def) + by (simp add: is_ub_def) lemma is_ubD: "\S <| u; x \ S\ \ x \ u" -by (simp add: is_ub_def) + by (simp add: is_ub_def) lemma ub_imageI: "(\x. x \ S \ f x \ u) \ (\x. f x) ` S <| u" -unfolding is_ub_def by fast + unfolding is_ub_def by fast lemma ub_imageD: "\f ` S <| u; x \ S\ \ f x \ u" -unfolding is_ub_def by fast + unfolding is_ub_def by fast lemma ub_rangeI: "(\i. S i \ x) \ range S <| x" -unfolding is_ub_def by fast + unfolding is_ub_def by fast lemma ub_rangeD: "range S <| x \ S i \ x" -unfolding is_ub_def by fast + unfolding is_ub_def by fast lemma is_ub_empty [simp]: "{} <| u" -unfolding is_ub_def by fast + unfolding is_ub_def by fast lemma is_ub_insert [simp]: "(insert x A) <| y = (x \ y \ A <| y)" -unfolding is_ub_def by fast + unfolding is_ub_def by fast lemma is_ub_upward: "\S <| x; x \ y\ \ S <| y" -unfolding is_ub_def by (fast intro: trans_less) + unfolding is_ub_def by (fast intro: trans_less) subsection {* Least upper bounds *} -definition - is_lub :: "['a set, 'a::po] \ bool" (infixl "<<|" 55) where - "(S <<| x) = (S <| x \ (\u. S <| u \ x \ u))" +definition is_lub :: "'a set \ 'a \ bool" (infixl "<<|" 55) where + "S <<| x \ S <| x \ (\u. S <| u \ x \ u)" -definition - lub :: "'a set \ 'a::po" where +definition lub :: "'a set \ 'a" where "lub S = (THE x. S <<| x)" +end + syntax "_BLub" :: "[pttrn, 'a set, 'b] \ 'b" ("(3LUB _:_./ _)" [0,0, 10] 10) @@ -107,6 +118,9 @@ translations "LUB x:A. t" == "CONST lub ((%x. t) ` A)" +context po +begin + abbreviation Lub (binder "LUB " 10) where "LUB n. t n == lub (range t)" @@ -117,13 +131,13 @@ text {* access to some definition as inference rule *} lemma is_lubD1: "S <<| x \ S <| x" -unfolding is_lub_def by fast + unfolding is_lub_def by fast lemma is_lub_lub: "\S <<| x; S <| u\ \ x \ u" -unfolding is_lub_def by fast + unfolding is_lub_def by fast lemma is_lubI: "\S <| x; \u. S <| u \ x \ u\ \ S <<| x" -unfolding is_lub_def by fast + unfolding is_lub_def by fast text {* lubs are unique *} @@ -142,54 +156,53 @@ done lemma thelubI: "M <<| l \ lub M = l" -by (rule unique_lub [OF lubI]) + by (rule unique_lub [OF lubI]) lemma is_lub_singleton: "{x} <<| x" -by (simp add: is_lub_def) + by (simp add: is_lub_def) lemma lub_singleton [simp]: "lub {x} = x" -by (rule thelubI [OF is_lub_singleton]) + by (rule thelubI [OF is_lub_singleton]) lemma is_lub_bin: "x \ y \ {x, y} <<| y" -by (simp add: is_lub_def) + by (simp add: is_lub_def) lemma lub_bin: "x \ y \ lub {x, y} = y" -by (rule is_lub_bin [THEN thelubI]) + by (rule is_lub_bin [THEN thelubI]) lemma is_lub_maximal: "\S <| x; x \ S\ \ S <<| x" -by (erule is_lubI, erule (1) is_ubD) + by (erule is_lubI, erule (1) is_ubD) lemma lub_maximal: "\S <| x; x \ S\ \ lub S = x" -by (rule is_lub_maximal [THEN thelubI]) + by (rule is_lub_maximal [THEN thelubI]) subsection {* Countable chains *} -definition +definition chain :: "(nat \ 'a) \ bool" where -- {* Here we use countable chains and I prefer to code them as functions! *} - chain :: "(nat \ 'a::po) \ bool" where "chain Y = (\i. Y i \ Y (Suc i))" lemma chainI: "(\i. Y i \ Y (Suc i)) \ chain Y" -unfolding chain_def by fast + unfolding chain_def by fast lemma chainE: "chain Y \ Y i \ Y (Suc i)" -unfolding chain_def by fast + unfolding chain_def by fast text {* chains are monotone functions *} lemma chain_mono_less: "\chain Y; i < j\ \ Y i \ Y j" -by (erule less_Suc_induct, erule chainE, erule trans_less) + by (erule less_Suc_induct, erule chainE, erule trans_less) lemma chain_mono: "\chain Y; i \ j\ \ Y i \ Y j" -by (cases "i = j", simp, simp add: chain_mono_less) + by (cases "i = j", simp, simp add: chain_mono_less) lemma chain_shift: "chain Y \ chain (\i. Y (i + j))" -by (rule chainI, simp, erule chainE) + by (rule chainI, simp, erule chainE) text {* technical lemmas about (least) upper bounds of chains *} lemma is_ub_lub: "range S <<| x \ S i \ x" -by (rule is_lubD1 [THEN ub_rangeD]) + by (rule is_lubD1 [THEN ub_rangeD]) lemma is_ub_range_shift: "chain S \ range (\i. S (i + j)) <| x = range S <| x" @@ -205,45 +218,43 @@ lemma is_lub_range_shift: "chain S \ range (\i. S (i + j)) <<| x = range S <<| x" -by (simp add: is_lub_def is_ub_range_shift) + by (simp add: is_lub_def is_ub_range_shift) text {* the lub of a constant chain is the constant *} lemma chain_const [simp]: "chain (\i. c)" -by (simp add: chainI) + by (simp add: chainI) lemma lub_const: "range (\x. c) <<| c" by (blast dest: ub_rangeD intro: is_lubI ub_rangeI) lemma thelub_const [simp]: "(\i. c) = c" -by (rule lub_const [THEN thelubI]) + by (rule lub_const [THEN thelubI]) subsection {* Finite chains *} -definition +definition max_in_chain :: "nat \ (nat \ 'a) \ bool" where -- {* finite chains, needed for monotony of continuous functions *} - max_in_chain :: "[nat, nat \ 'a::po] \ bool" where - "max_in_chain i C = (\j. i \ j \ C i = C j)" + "max_in_chain i C \ (\j. i \ j \ C i = C j)" -definition - finite_chain :: "(nat \ 'a::po) \ bool" where +definition finite_chain :: "(nat \ 'a) \ bool" where "finite_chain C = (chain C \ (\i. max_in_chain i C))" text {* results about finite chains *} lemma max_in_chainI: "(\j. i \ j \ Y i = Y j) \ max_in_chain i Y" -unfolding max_in_chain_def by fast + unfolding max_in_chain_def by fast lemma max_in_chainD: "\max_in_chain i Y; i \ j\ \ Y i = Y j" -unfolding max_in_chain_def by fast + unfolding max_in_chain_def by fast lemma finite_chainI: "\chain C; max_in_chain i C\ \ finite_chain C" -unfolding finite_chain_def by fast + unfolding finite_chain_def by fast lemma finite_chainE: "\finite_chain C; \i. \chain C; max_in_chain i C\ \ R\ \ R" -unfolding finite_chain_def by fast + unfolding finite_chain_def by fast lemma lub_finch1: "\chain C; max_in_chain i C\ \ range C <<| C i" apply (rule is_lubI) @@ -311,11 +322,11 @@ done lemma bin_chain: "x \ y \ chain (\i. if i=0 then x else y)" -by (rule chainI, simp) + by (rule chainI, simp) lemma bin_chainmax: "x \ y \ max_in_chain (Suc 0) (\i. if i=0 then x else y)" -unfolding max_in_chain_def by simp + unfolding max_in_chain_def by simp lemma lub_bin_chain: "x \ y \ range (\i::nat. if i=0 then x else y) <<| y" @@ -328,36 +339,35 @@ text {* the maximal element in a chain is its lub *} lemma lub_chain_maxelem: "\Y i = c; \i. Y i \ c\ \ lub (range Y) = c" -by (blast dest: ub_rangeD intro: thelubI is_lubI ub_rangeI) + by (blast dest: ub_rangeD intro: thelubI is_lubI ub_rangeI) subsection {* Directed sets *} -definition - directed :: "'a::po set \ bool" where - "directed S = ((\x. x \ S) \ (\x\S. \y\S. \z\S. x \ z \ y \ z))" +definition directed :: "'a set \ bool" where + "directed S \ (\x. x \ S) \ (\x\S. \y\S. \z\S. x \ z \ y \ z)" lemma directedI: assumes 1: "\z. z \ S" assumes 2: "\x y. \x \ S; y \ S\ \ \z\S. x \ z \ y \ z" shows "directed S" -unfolding directed_def using prems by fast + unfolding directed_def using prems by fast lemma directedD1: "directed S \ \z. z \ S" -unfolding directed_def by fast + unfolding directed_def by fast lemma directedD2: "\directed S; x \ S; y \ S\ \ \z\S. x \ z \ y \ z" -unfolding directed_def by fast + unfolding directed_def by fast lemma directedE1: assumes S: "directed S" obtains z where "z \ S" -by (insert directedD1 [OF S], fast) + by (insert directedD1 [OF S], fast) lemma directedE2: assumes S: "directed S" assumes x: "x \ S" and y: "y \ S" obtains z where "z \ S" "x \ z" "y \ z" -by (insert directedD2 [OF S x y], fast) + by (insert directedD2 [OF S x y], fast) lemma directed_finiteI: assumes U: "\U. \finite U; U \ S\ \ \z\S. U <| z" @@ -395,13 +405,13 @@ qed lemma not_directed_empty [simp]: "\ directed {}" -by (rule notI, drule directedD1, simp) + by (rule notI, drule directedD1, simp) lemma directed_singleton: "directed {x}" -by (rule directedI, auto) + by (rule directedI, auto) lemma directed_bin: "x \ y \ directed {x, y}" -by (rule directedI, auto) + by (rule directedI, auto) lemma directed_chain: "chain S \ directed (range S)" apply (rule directedI) @@ -412,4 +422,33 @@ apply simp done +text {* lemmata for improved admissibility introdution rule *} + +lemma infinite_chain_adm_lemma: + "\chain Y; \i. P (Y i); + \Y. \chain Y; \i. P (Y i); \ finite_chain Y\ \ P (\i. Y i)\ + \ P (\i. Y i)" +apply (case_tac "finite_chain Y") +prefer 2 apply fast +apply (unfold finite_chain_def) +apply safe +apply (erule lub_finch1 [THEN thelubI, THEN ssubst]) +apply assumption +apply (erule spec) +done + +lemma increasing_chain_adm_lemma: + "\chain Y; \i. P (Y i); \Y. \chain Y; \i. P (Y i); + \i. \j>i. Y i \ Y j \ Y i \ Y j\ \ P (\i. Y i)\ + \ P (\i. Y i)" +apply (erule infinite_chain_adm_lemma) +apply assumption +apply (erule thin_rl) +apply (unfold finite_chain_def) +apply (unfold max_in_chain_def) +apply (fast dest: le_imp_less_or_eq elim: chain_mono_less) +done + end + +end \ No newline at end of file