Commit 978a9fe0 by paulson

### merged

 ... ... @@ -56,7 +56,7 @@ proof then have "Inf S' \ T" by (metis Diff_eq_empty_iff Diff_iff Inf_nat_def1 eq) moreover have "\x. x \ S \ x < Inf S'" using S' False by (auto simp: less_sets_def intro!: Inf_nat_def1) using S' False by (metis Diff_eq_empty_iff Inf_nat_def1 eq less_sets_def) moreover have "{n \ T. n < Inf S'} \ S" using Inf_nat_def eq not_less_Least by fastforce ultimately show ?rhs ... ... @@ -66,10 +66,6 @@ next assume ?rhs then show ?lhs proof (elim disjE bexE) assume "S = T" then show "init_segment S T" using init_segment_refl by blast next fix m assume m: "m \ T" "S = {n \ T. n < m}" then have "T = S \ {n \ T. m \ n}" ... ... @@ -78,7 +74,7 @@ next using m by (auto simp: less_sets_def) ultimately show "init_segment S T" using init_segment_Un by force qed qed (use init_segment_refl in blast) qed lemma init_segment_empty [iff]: "init_segment {} S" ... ... @@ -86,20 +82,17 @@ lemma init_segment_empty [iff]: "init_segment {} S" lemma init_segment_insert_iff: assumes Sn: "S \ {n}" and TS: "\x. x \ T-S \ n\x" shows "init_segment (insert n S) T \ init_segment S T \ n \ T" shows "init_segment (insert n S) T \ init_segment S T \ n \ T" (is "?lhs=?rhs") proof assume "init_segment (insert n S) T" then have "init_segment ({n} \ S) T" by auto then show "init_segment S T \ n \ T" by (metis Sn Un_iff init_segment_def init_segment_trans insertI1 sup_commute) assume ?lhs then show ?rhs by (metis Sn Un_commute init_segment_Un init_segment_subset init_segment_trans insertI1 insert_is_Un subsetD) next assume rhs: "init_segment S T \ n \ T" assume rhs: ?rhs then obtain R where R: "T = S \ R" "S \ R" by (auto simp: init_segment_def less_sets_def) then have "S\R = insert n (S \ (R-{n})) \ insert n S \ R-{n}" unfolding less_sets_def using rhs TS nat_less_le by auto then show "init_segment (insert n S) T" then show ?lhs using R init_segment_Un by force qed ... ... @@ -213,14 +206,9 @@ proof - by (auto simp: F_def \_def) have *: "infinite (F n) \ decides \ (f n) (F n) \ F n \ M" for n proof (induction n) case 0 with \infinite M\ show ?case by (auto simp: F_def M0) next case (Suc n) then show ?case case (Suc n) then show ?case by (metis P_Suc \_def ex_infinite_decides_1 someI_ex subset_trans) qed qed (auto simp: F_def M0) then have telescope: "F (Suc n) \ F n" for n by (metis P_Suc \_def ex_infinite_decides_1 someI_ex) let ?N = "\n list.set (map Inf (F (Suc (Max K))))" unfolding mmap_def image_subset_iff by (metis F Max_ge \finite K\ hd_in_set imageI map_Inf_subset not_less_eq_eq set_map subsetD) by (metis F Max_ge Suc_le_mono \finite K\ hd_in_set imageI map_Inf_subset set_map subsetD) with S show "S \ list.set (map Inf (F (Suc (Max K))))" using \S \ mmap ` K\ by auto qed ... ... @@ -328,10 +316,10 @@ proof - by (rule order_class.lift_Suc_antimono_le) have hd_Suc_eq_Eps: "hd (F (Suc n)) = Eps (\ (F n))" for n by simp have Inf_hd_in_hd: "Inf (hd (F n)) \ hd (F n)" for n have "Inf (hd (F n)) \ hd (F n)" for n by (metis Inf_nat_def1 \F \_def finite.emptyI rev_finite_subset) then have Inf_hd_in_Eps: "Inf (hd (F m)) \ Eps (\ (F n))" if "m>n" for m n by (metis Eps_\_decreasing Nat.lessE leD mmap_def not_less_eq_eq subsetD that hd_Suc_eq_Eps) by (metis Eps_\_decreasing Nat.lessE hd_Suc_eq_Eps less_imp_le_nat subsetD that) then have image_mmap_subset_hd_F: "mmap ` {n..} \ hd (F (Suc n))" for n by (metis hd_Suc_eq_Eps atLeast_iff image_subsetI le_imp_less_Suc mmap_def) have "list.set (F k) \ list.set (F n)" if "k \ n" for k n ... ... @@ -350,7 +338,7 @@ proof - fix S assume "S \ range mmap" "finite S" define n where "n \ LEAST n. S \ List.set (map Inf (F n))" have "\n. S \ List.set (map Inf (F n))" have "\m. S \ List.set (map Inf (F m))" using \S \ range mmap\ \finite S\ finite_F_bound by blast then have S: "S \ List.set (map Inf (F n))" and minS: "\m. m \ S \ List.set (map Inf (F m))" unfolding n_def by (meson LeastI_ex not_less_Least)+ ... ... @@ -401,17 +389,9 @@ proof - then show ?thesis proof cases case 1 have "rejects \ S (range mmap)" proof (clarsimp simp: rejects_def disjoint_iff) fix X assume "X \ comparables S (range mmap)" and "X \ \" moreover have "\x X. \X \ \; init_segment S X; x \ X; x \ S; x \ range mmap\ \ x \ Eps (\ (F n))" using less_S Inf_hd_F mmap_def by blast ultimately have "X \ comparables S (Eps (\ (F n)))" by (auto simp: comparables_def disjoint_iff subset_iff) with 1 \X \ \\ show False by (auto simp: rejects_def) qed then have "rejects \ S (range mmap)" apply (simp add: rejects_def disjoint_iff mmap_def comparables_def image_iff subset_iff) by (metis less_S Inf_hd_F hd_Suc_eq_Eps) then show ?thesis by (auto simp: decides_def) next ... ... @@ -430,10 +410,8 @@ proof - ultimately show ?thesis using 2 by (auto simp: strongly_accepts_def) qed with 2 have "strongly_accepts \ S (range mmap)" by (auto simp: strongly_accepts_def) then show ?thesis by (auto simp: decides_def) with 2 show ?thesis by (auto simp: decides_def strongly_accepts_def) qed qed qed ... ... @@ -455,16 +433,13 @@ proof (rule ccontr) moreover have "{n \ M. \ strongly_accepts \ (insert n S) M} = {n \ M. rejects \ (insert n S) M}" using dsM \finite S\ \infinite M\ \S \ M\ unfolding decides_subsets_def by (meson decides_def finite.insertI insert_subset strongly_accepts_imp_accepts) ultimately have "infinite {n \ M. rejects \ (insert n S) M}" by simp then have "infinite N" ultimately have "infinite N" by (simp add: N_def finite_nat_Int_greaterThan_iff) then have "accepts \ S N" using acc strongly_accepts_def \N \ M\ by blast then obtain T where T: "T \ comparables S N" "T \ \" and TSN: "T \ S \ N" unfolding rejects_def using comparables_iff init_segment_subset by fastforce then consider "init_segment T S" | "init_segment S T" "S\T" unfolding rejects_def using comparables_iff init_segment_subset by fastforce then consider "init_segment T S" | "init_segment S T" "S\T" "\ init_segment T S" by (auto simp: comparables_def) then show False proof cases ... ... @@ -476,26 +451,20 @@ proof (rule ccontr) next let ?n = "Min (T-S)" case 2 then obtain TS: "?n \ T-S" "finite (T-S)" using T unfolding comparables_iff by (meson Diff_eq_empty_iff Min_in finite_Diff init_segment_subset subset_antisym) then have "?n \ N" by (metis Diff_partition Diff_subset_conv Min_in T(1) TSN comparables_iff finite_Diff init_segment_subset subsetD sup_bot.right_neutral) by (meson Diff_subset_conv TSN in_mono) then have "rejects \ (insert ?n S) N" using rejects_subset \N \ M\ by (auto simp: N_def) then have \
: "\ init_segment T (insert ?n S) \ (init_segment (insert ?n S) T \ insert ?n S = T)" using T Diff_partition TSN \Min (T - S) \ N\ \finite S\ unfolding rejects_def comparables_iff disjoint_iff by auto then have "T \ insert ?n S" proof (elim conjE impCE) assume "\ init_segment T (insert ?n S)" "\ init_segment (insert ?n S) T" moreover have "S \ {Min (T - S)}" using Sup_nat_less_sets_singleton N \Min (T - S) \ N\ \finite S\ by blast moreover have "finite (T - S)" using T comparables_iff by blast ultimately show ?thesis using \init_segment S T\ Min_in init_segment_insert_iff by auto qed auto then show False using "2" "\
" init_segment_iff by auto using T Diff_partition TSN \?n \ N\ \finite S\ by (auto simp: rejects_def comparables_iff disjoint_iff) moreover have "S \ {?n}" using Sup_nat_less_sets_singleton N \?n \ N\ \finite S\ by blast ultimately show ?thesis using 2 TS Min_in init_segment_insert_iff by fastforce qed qed ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment