# HG changeset patch # User nipkow # Date 1325431973 -3600 # Node ID e81411bfa7efd6cccf497f432651655c15876a12 # Parent d7eb081cf220ebda3193dcf709932efe0432f033 tuned argument order diff -r d7eb081cf220 -r e81411bfa7ef src/HOL/IMP/Abs_Int0.thy --- a/src/HOL/IMP/Abs_Int0.thy Sun Jan 01 09:27:48 2012 +0100 +++ b/src/HOL/IMP/Abs_Int0.thy Sun Jan 01 16:32:53 2012 +0100 @@ -106,7 +106,7 @@ have 2: "step' \ c' \ c'" by(rule lpfpc_pfp[OF 1]) have 3: "strip (\\<^isub>c (step' \ c')) = c" by(simp add: strip_lpfpc[OF _ 1]) - have "lfp c (step UNIV) \ \\<^isub>c (step' \ c')" + have "lfp (step UNIV) c \ \\<^isub>c (step' \ c')" proof(rule lfp_lowerbound[simplified,OF 3]) show "step UNIV (\\<^isub>c (step' \ c')) \ \\<^isub>c (step' \ c')" proof(rule step_preserves_le[OF _ _ 3]) @@ -114,7 +114,7 @@ show "\\<^isub>c (step' \ c') \ \\<^isub>c c'" by(rule mono_gamma_c[OF 2]) qed qed - from this 2 show "lfp c (step UNIV) \ \\<^isub>c c'" + from this 2 show "lfp (step UNIV) c \ \\<^isub>c c'" by (blast intro: mono_gamma_c order_trans) qed diff -r d7eb081cf220 -r e81411bfa7ef src/HOL/IMP/Abs_Int0_fun.thy --- a/src/HOL/IMP/Abs_Int0_fun.thy Sun Jan 01 09:27:48 2012 +0100 +++ b/src/HOL/IMP/Abs_Int0_fun.thy Sun Jan 01 16:32:53 2012 +0100 @@ -357,7 +357,7 @@ have 2: "step' \ c' \ c'" by(rule lpfpc_pfp[OF 1]) have 3: "strip (\\<^isub>c (step' \ c')) = c" by(simp add: strip_lpfpc[OF _ 1]) - have "lfp c (step UNIV) \ \\<^isub>c (step' \ c')" + have "lfp (step UNIV) c \ \\<^isub>c (step' \ c')" proof(rule lfp_lowerbound[simplified,OF 3]) show "step UNIV (\\<^isub>c (step' \ c')) \ \\<^isub>c (step' \ c')" proof(rule step_preserves_le[OF _ _ 3]) @@ -365,7 +365,7 @@ show "\\<^isub>c (step' \ c') \ \\<^isub>c c'" by(rule mono_gamma_c[OF 2]) qed qed - from this 2 show "lfp c (step UNIV) \ \\<^isub>c c'" + from this 2 show "lfp (step UNIV) c \ \\<^isub>c c'" by (blast intro: mono_gamma_c order_trans) qed diff -r d7eb081cf220 -r e81411bfa7ef src/HOL/IMP/Abs_Int1.thy --- a/src/HOL/IMP/Abs_Int1.thy Sun Jan 01 09:27:48 2012 +0100 +++ b/src/HOL/IMP/Abs_Int1.thy Sun Jan 01 16:32:53 2012 +0100 @@ -219,7 +219,7 @@ have 2: "step' \ c' \ c'" by(rule lpfpc_pfp[OF 1]) have 3: "strip (\\<^isub>c (step' \ c')) = c" by(simp add: strip_lpfpc[OF _ 1]) - have "lfp c (step UNIV) \ \\<^isub>c (step' \ c')" + have "lfp (step UNIV) c \ \\<^isub>c (step' \ c')" proof(rule lfp_lowerbound[simplified,OF 3]) show "step UNIV (\\<^isub>c (step' \ c')) \ \\<^isub>c (step' \ c')" proof(rule step_preserves_le[OF _ _ 3]) @@ -227,7 +227,7 @@ show "\\<^isub>c (step' \ c') \ \\<^isub>c c'" by(rule mono_gamma_c[OF 2]) qed qed - from this 2 show "lfp c (step UNIV) \ \\<^isub>c c'" + from this 2 show "lfp (step UNIV) c \ \\<^isub>c c'" by (blast intro: mono_gamma_c order_trans) qed diff -r d7eb081cf220 -r e81411bfa7ef src/HOL/IMP/Abs_Int2.thy --- a/src/HOL/IMP/Abs_Int2.thy Sun Jan 01 09:27:48 2012 +0100 +++ b/src/HOL/IMP/Abs_Int2.thy Sun Jan 01 16:32:53 2012 +0100 @@ -193,7 +193,7 @@ from pfp_WN_pfp[OF allI[OF strip_step'] mono_step' 1] have 2: "step' \ c' \ c'" . have 3: "strip (\\<^isub>c (step' \ c')) = c" by(simp add: strip_pfp_WN[OF _ 1]) - have "lfp c (step UNIV) \ \\<^isub>c (step' \ c')" + have "lfp (step UNIV) c \ \\<^isub>c (step' \ c')" proof(rule lfp_lowerbound[simplified,OF 3]) show "step UNIV (\\<^isub>c (step' \ c')) \ \\<^isub>c (step' \ c')" proof(rule step_preserves_le[OF _ _ 3]) @@ -201,7 +201,7 @@ show "\\<^isub>c (step' \ c') \ \\<^isub>c c'" by(rule mono_gamma_c[OF 2]) qed qed - from this 2 show "lfp c (step UNIV) \ \\<^isub>c c'" + from this 2 show "lfp (step UNIV) c \ \\<^isub>c c'" by (blast intro: mono_gamma_c order_trans) qed diff -r d7eb081cf220 -r e81411bfa7ef src/HOL/IMP/Collecting.thy --- a/src/HOL/IMP/Collecting.thy Sun Jan 01 09:27:48 2012 +0100 +++ b/src/HOL/IMP/Collecting.thy Sun Jan 01 16:32:53 2012 +0100 @@ -171,7 +171,7 @@ {S \ post c} WHILE b DO (step {s:Inv. bval b s} c) {{s:Inv. \ bval b s}}" definition CS :: "state set \ com \ state set acom" where -"CS S c = lfp c (step S)" +"CS S c = lfp (step S) c" lemma mono_step_aux: "x \ y \ S \ T \ step S x \ step T y" proof(induction x y arbitrary: S T rule: less_eq_acom.induct) @@ -190,7 +190,7 @@ lemma strip_step: "strip(step S c) = strip c" by (induction c arbitrary: S) auto -lemma lfp_cs_unfold: "lfp c (step S) = step S (lfp c (step S))" +lemma lfp_cs_unfold: "lfp (step S) c = step S (lfp (step S) c)" apply(rule lfp_unfold[OF _ mono_step]) apply(simp add: strip_step) done diff -r d7eb081cf220 -r e81411bfa7ef src/HOL/IMP/Complete_Lattice_ix.thy --- a/src/HOL/IMP/Complete_Lattice_ix.thy Sun Jan 01 09:27:48 2012 +0100 +++ b/src/HOL/IMP/Complete_Lattice_ix.thy Sun Jan 01 16:32:53 2012 +0100 @@ -23,29 +23,29 @@ and Glb_in_L: "A \ L i \ Glb i A : L i" begin -definition lfp :: "'i \ ('a \ 'a) \ 'a" where -"lfp i f = Glb i {a : L i. f a \ a}" +definition lfp :: "('a \ 'a) \ 'i \ 'a" where +"lfp f i = Glb i {a : L i. f a \ a}" -lemma index_lfp: "lfp i f : L i" +lemma index_lfp: "lfp f i : L i" by(auto simp: lfp_def intro: Glb_in_L) lemma lfp_lowerbound: - "\ a : L i; f a \ a \ \ lfp i f \ a" + "\ a : L i; f a \ a \ \ lfp f i \ a" by (auto simp add: lfp_def intro: Glb_lower) lemma lfp_greatest: - "\ a : L i; \u. \ u : L i; f u \ u\ \ a \ u \ \ a \ lfp i f" + "\ a : L i; \u. \ u : L i; f u \ u\ \ a \ u \ \ a \ lfp f i" by (auto simp add: lfp_def intro: Glb_greatest) lemma lfp_unfold: assumes "\x i. f x : L i \ x : L i" -and mono: "mono f" shows "lfp i f = f (lfp i f)" +and mono: "mono f" shows "lfp f i = f (lfp f i)" proof- note assms(1)[simp] index_lfp[simp] - have 1: "f (lfp i f) \ lfp i f" + have 1: "f (lfp f i) \ lfp f i" apply(rule lfp_greatest) apply simp by (blast intro: lfp_lowerbound monoD[OF mono] order_trans) - have "lfp i f \ f (lfp i f)" + have "lfp f i \ f (lfp f i)" by (fastforce intro: 1 monoD[OF mono] lfp_lowerbound) with 1 show ?thesis by(blast intro: order_antisym) qed