# HG changeset patch # User traytel # Date 1373896239 -7200 # Node ID 7f7311d04727c5ee8e343693c196c2763a63c275 # Parent 58b87aa4dc3bc47a050c879f7c49d91d0fd5642e killed unused theorems diff -r 58b87aa4dc3b -r 7f7311d04727 src/HOL/BNF/BNF_Comp.thy --- a/src/HOL/BNF/BNF_Comp.thy Mon Jul 15 14:23:51 2013 +0200 +++ b/src/HOL/BNF/BNF_Comp.thy Mon Jul 15 15:50:39 2013 +0200 @@ -64,15 +64,6 @@ "\A' = A; B1' = B1; B2' = B2; wpull A B1 B2 f1 f2 p1 p2\ \ wpull A' B1' B2' f1 f2 p1 p2" by simp -lemma Id_def': "Id = {(a,b). a = b}" -by auto - -lemma Gr_fst_snd: "(Gr R fst)^-1 O Gr R snd = R" -unfolding Gr_def by auto - -lemma O_Gr_cong: "A = B \ (Gr A f)^-1 O Gr A g = (Gr B f)^-1 O Gr B g" -by simp - lemma Grp_fst_snd: "(Grp (Collect (split R)) fst)^--1 OO Grp (Collect (split R)) snd = R" unfolding Grp_def fun_eq_iff relcompp.simps by auto diff -r 58b87aa4dc3b -r 7f7311d04727 src/HOL/BNF/BNF_Def.thy --- a/src/HOL/BNF/BNF_Def.thy Mon Jul 15 14:23:51 2013 +0200 +++ b/src/HOL/BNF/BNF_Def.thy Mon Jul 15 15:50:39 2013 +0200 @@ -17,10 +17,6 @@ lemma collect_o: "collect F o g = collect ((\f. f o g) ` F)" by (rule ext) (auto simp only: o_apply collect_def) -lemma converse_mono: -"R1 ^-1 \ R2 ^-1 \ R1 \ R2" -unfolding converse_def by auto - lemma conversep_mono: "R1 ^--1 \ R2 ^--1 \ R1 \ R2" unfolding conversep.simps by auto diff -r 58b87aa4dc3b -r 7f7311d04727 src/HOL/BNF/BNF_FP_Basic.thy --- a/src/HOL/BNF/BNF_FP_Basic.thy Mon Jul 15 14:23:51 2013 +0200 +++ b/src/HOL/BNF/BNF_FP_Basic.thy Mon Jul 15 15:50:39 2013 +0200 @@ -65,25 +65,13 @@ lemma obj_one_pointE: "\x. s = x \ P \ P" by blast -lemma obj_sumE_f': -"\\x. s = f (Inl x) \ P; \x. s = f (Inr x) \ P\ \ s = f x \ P" -by (cases x) blast+ - lemma obj_sumE_f: "\\x. s = f (Inl x) \ P; \x. s = f (Inr x) \ P\ \ \x. s = f x \ P" -by (rule allI) (rule obj_sumE_f') +by (rule allI) (metis sumE) lemma obj_sumE: "\\x. s = Inl x \ P; \x. s = Inr x \ P\ \ P" by (cases s) auto -lemma obj_sum_step': -"\\x. s = f (Inr (Inl x)) \ P; \x. s = f (Inr (Inr x)) \ P\ \ s = f (Inr x) \ P" -by (cases x) blast+ - -lemma obj_sum_step: -"\\x. s = f (Inr (Inl x)) \ P; \x. s = f (Inr (Inr x)) \ P\ \ \x. s = f (Inr x) \ P" -by (rule allI) (rule obj_sum_step') - lemma sum_case_if: "sum_case f g (if p then Inl x else Inr y) = (if p then f x else g y)" by simp diff -r 58b87aa4dc3b -r 7f7311d04727 src/HOL/BNF/BNF_GFP.thy --- a/src/HOL/BNF/BNF_GFP.thy Mon Jul 15 14:23:51 2013 +0200 +++ b/src/HOL/BNF/BNF_GFP.thy Mon Jul 15 15:50:39 2013 +0200 @@ -174,9 +174,6 @@ lemma snd_diag_id: "(snd \ (%x. (x, x))) z = id z" by simp -lemma Collect_restrict': "{(x, y) | x y. phi x y \ P x y} \ {(x, y) | x y. phi x y}" -by auto - lemma image_convolD: "\(a, b) \ ` X\ \ \x. x \ X \ a = f x \ b = g x" unfolding convol_def by auto @@ -213,14 +210,6 @@ lemma not_in_Shift: "kl \ Shift Kl x \ x # kl \ Kl" unfolding Shift_def by simp -lemma prefCl_Succ: "\prefCl Kl; k # kl \ Kl\ \ k \ Succ Kl []" -unfolding Succ_def proof - assume "prefCl Kl" "k # kl \ Kl" - moreover have "prefixeq (k # []) (k # kl)" by auto - ultimately have "k # [] \ Kl" unfolding prefCl_def by blast - thus "[] @ [k] \ Kl" by simp -qed - lemma SuccD: "k \ Succ Kl kl \ kl @ [k] \ Kl" unfolding Succ_def by simp @@ -235,18 +224,6 @@ lemma Succ_Shift: "Succ (Shift Kl k) kl = Succ Kl (k # kl)" unfolding Succ_def Shift_def by auto -lemma ShiftI: "k # kl \ Kl \ kl \ Shift Kl k" -unfolding Shift_def by simp - -lemma Func_cexp: "|Func A B| =o |B| ^c |A|" -unfolding cexp_def Field_card_of by (simp only: card_of_refl) - -lemma clists_bound: "A \ Field (cpow (clists r)) - {{}} \ |A| \o clists r" -unfolding cpow_def clists_def Field_card_of by (auto simp: card_of_mono1) - -lemma cpow_clists_czero: "\A \ Field (cpow (clists r)) - {{}}; |A| =o czero\ \ False" -unfolding cpow_def clists_def card_of_ordIso_czero_iff_empty by auto - lemma Nil_clists: "{[]} \ Field (clists r)" unfolding clists_def Field_card_of by auto diff -r 58b87aa4dc3b -r 7f7311d04727 src/HOL/BNF/Basic_BNFs.thy --- a/src/HOL/BNF/Basic_BNFs.thy Mon Jul 15 14:23:51 2013 +0200 +++ b/src/HOL/BNF/Basic_BNFs.thy Mon Jul 15 15:50:39 2013 +0200 @@ -24,9 +24,6 @@ lemma natLeq_cinfinite: "cinfinite natLeq" unfolding cinfinite_def Field_natLeq by (rule nat_infinite) -lemma wpull_Gr_def: "wpull A B1 B2 f1 f2 p1 p2 \ Gr B1 f1 O (Gr B2 f2)\ \ (Gr A p1)\ O Gr A p2" - unfolding wpull_def Gr_def relcomp_unfold converse_unfold by auto - lemma wpull_Grp_def: "wpull A B1 B2 f1 f2 p1 p2 \ Grp B1 f1 OO (Grp B2 f2)\\ \ (Grp A p1)\\ OO Grp A p2" unfolding wpull_def Grp_def by auto diff -r 58b87aa4dc3b -r 7f7311d04727 src/HOL/BNF/Countable_Type.thy --- a/src/HOL/BNF/Countable_Type.thy Mon Jul 15 14:23:51 2013 +0200 +++ b/src/HOL/BNF/Countable_Type.thy Mon Jul 15 15:50:39 2013 +0200 @@ -53,16 +53,6 @@ shows "countable A" using countable_ordLeq[OF ordLess_imp_ordLeq[OF AB] B] . -lemma ordLeq_countable: -assumes "|A| \o |B|" and "countable B" -shows "countable A" -using assms unfolding countable_card_of_nat by(rule ordLeq_transitive) - -lemma ordLess_countable: -assumes A: "|A| A}| \o |Pfunc (UNIV :: nat set) A|" (is "|?LHS| \o |?RHS|") -proof - - let ?f = "%xs. %i. if i < length xs \ set xs \ A then Some (nth xs i) else None" - have "inj_on ?f ?LHS" unfolding inj_on_def fun_eq_iff - proof safe - fix xs :: "'a list" and ys :: "'a list" - assume su: "set xs \ A" "set ys \ A" and eq: "\i. ?f xs i = ?f ys i" - hence *: "length xs = length ys" - by (metis linorder_cases option.simps(2) order_less_irrefl) - thus "xs = ys" by (rule nth_equalityI) (metis * eq su option.inject) - qed - moreover have "?f ` ?LHS \ ?RHS" unfolding Pfunc_def by fastforce - ultimately show ?thesis using card_of_ordLeq by blast -qed - -lemma list_in_empty: "A = {} \ {x. set x \ A} = {[]}" -by simp - -lemma card_of_Func: "|Func A B| =o |B| ^c |A|" -unfolding cexp_def Field_card_of by (rule card_of_refl) - -lemma not_emp_czero_notIn_ordIso_Card_order: -"A \ {} \ ( |A|, czero) \ ordIso \ Card_order |A|" - apply (rule conjI) - apply (metis Field_card_of czeroE) - by (rule card_of_Card_order) - lemma wpull_map: assumes "wpull A B1 B2 f1 f2 p1 p2" shows "wpull {x. set x \ A} {x. set x \ B1} {x. set x \ B2} (map f1) (map f2) (map p1) (map p2)" @@ -143,9 +115,7 @@ next fix x show "|set x| \o natLeq" - apply (rule ordLess_imp_ordLeq) - apply (rule finite_ordLess_infinite[OF _ natLeq_Well_order]) - unfolding Field_natLeq Field_card_of by (auto simp: card_of_well_order_on) + by (metis List.finite_set finite_iff_ordLess_natLeq ordLess_imp_ordLeq) qed (simp add: wpull_map)+ (* Finite sets *) @@ -186,9 +156,6 @@ by (transfer, clarsimp, metis fst_conv) qed -lemma abs_fset_rep_fset[simp]: "abs_fset (rep_fset x) = x" - by (rule Quotient_fset[unfolded Quotient_def, THEN conjunct1, rule_format]) - lemma wpull_image: assumes "wpull A B1 B2 f1 f2 p1 p2" shows "wpull (Pow A) (Pow B1) (Pow B2) (image f1) (image f2) (image p1) (image p2)" diff -r 58b87aa4dc3b -r 7f7311d04727 src/HOL/BNF/Tools/bnf_comp.ML --- a/src/HOL/BNF/Tools/bnf_comp.ML Mon Jul 15 14:23:51 2013 +0200 +++ b/src/HOL/BNF/Tools/bnf_comp.ML Mon Jul 15 15:50:39 2013 +0200 @@ -331,8 +331,7 @@ rel_conversep_of_bnf bnf RS sym], rel_Grp], trans OF [rel_OO_of_bnf bnf RS sym, rel_cong_of_bnf bnf OF (replicate n @{thm trans[OF Grp_UNIV_id[OF refl] eq_alt[symmetric]]} @ - replicate (live - n) @{thm Grp_fst_snd})]]] RS sym) - (*|> unfold_thms lthy (rel_def_of_bnf bnf :: @{thms Id_def' mem_Collect_eq split_conv})*); + replicate (live - n) @{thm Grp_fst_snd})]]] RS sym); in rtac thm 1 end; diff -r 58b87aa4dc3b -r 7f7311d04727 src/HOL/BNF/Tools/bnf_fp_util.ML --- a/src/HOL/BNF/Tools/bnf_fp_util.ML Mon Jul 15 14:23:51 2013 +0200 +++ b/src/HOL/BNF/Tools/bnf_fp_util.ML Mon Jul 15 15:50:39 2013 +0200 @@ -426,7 +426,7 @@ fun mk_sumEN 1 = @{thm one_pointE} | mk_sumEN 2 = @{thm sumE} | mk_sumEN n = - (fold (fn i => fn thm => @{thm obj_sum_step} RSN (i, thm)) (2 upto n - 1) @{thm obj_sumE}) OF + (fold (fn i => fn thm => @{thm obj_sumE_f} RSN (i, thm)) (2 upto n - 1) @{thm obj_sumE}) OF replicate n (impI RS allI); fun mk_obj_sumEN_balanced n =