Commit a3d445c3 by Lawrence Paulson

### Infix notation for the less_sets relation

parent ae4ec73674cd
 ... ... @@ -5,41 +5,41 @@ theory Nash_Extras begin definition less_sets :: "['a::order set, 'a::order set] \ bool" where "less_sets A B \ \x\A. \y\B. x < y" definition less_sets :: "['a::order set, 'a::order set] \ bool" (infixr "\" 50) where "A \ B \ \x\A. \y\B. x < y" lemma less_setsD: "\less_sets A B; a \ A; b \ B\ \ a < b" lemma less_setsD: "\A \ B; a \ A; b \ B\ \ a < b" by (auto simp: less_sets_def) lemma less_sets_irrefl [simp]: "less_sets A A \ A = {}" lemma less_sets_irrefl [simp]: "A \ A \ A = {}" by (auto simp: less_sets_def) lemma less_sets_trans: "\less_sets A B; less_sets B C; B \ {}\ \ less_sets A C" lemma less_sets_trans: "\A \ B; B \ C; B \ {}\ \ A \ C" unfolding less_sets_def using less_trans by blast lemma less_sets_weaken1: "\less_sets A' B; A \ A'\ \ less_sets A B" lemma less_sets_weaken1: "\A' \ B; A \ A'\ \ A \ B" by (auto simp: less_sets_def) lemma less_sets_weaken2: "\less_sets A B'; B \ B'\ \ less_sets A B" lemma less_sets_weaken2: "\A \ B'; B \ B'\ \ A \ B" by (auto simp: less_sets_def) lemma less_sets_imp_disjnt: "less_sets A B \ disjnt A B" lemma less_sets_imp_disjnt: "A \ B \ disjnt A B" by (auto simp: less_sets_def disjnt_def) lemma less_sets_UN1: "less_sets (\\) B \ (\A\\. less_sets A B)" lemma less_sets_UN1: "less_sets (\\) B \ (\A\\. A \ B)" by (auto simp: less_sets_def) lemma less_sets_UN2: "less_sets A (\ \) \ (\B\\. less_sets A B)" lemma less_sets_UN2: "less_sets A (\ \) \ (\B\\. A \ B)" by (auto simp: less_sets_def) lemma less_sets_Un1: "less_sets (A \ A') B \ less_sets A B \ less_sets A' B" lemma less_sets_Un1: "less_sets (A \ A') B \ A \ B \ A' \ B" by (auto simp: less_sets_def) lemma less_sets_Un2: "less_sets A (B \ B') \ less_sets A B \ less_sets A B'" lemma less_sets_Un2: "less_sets A (B \ B') \ A \ B \ A \ B'" by (auto simp: less_sets_def) lemma strict_sorted_imp_less_sets: "strict_sorted (as @ bs) \ less_sets (list.set as) (list.set bs)" "strict_sorted (as @ bs) \ (list.set as) \ (list.set bs)" by (simp add: less_sets_def sorted_wrt_append strict_sorted_sorted_wrt) lemma Sup_nat_less_sets_singleton: ... ...
 ... ... @@ -16,7 +16,7 @@ lemma finite_nat_Int_greaterThan_iff: subsection \Initial segments\ definition init_segment :: "nat set \ nat set \ bool" where "init_segment S T \ \S'. T = S \ S' \ less_sets S S'" where "init_segment S T \ \S'. T = S \ S' \ S \ S'" lemma init_segment_subset: "init_segment S T \ S \ T" by (auto simp: init_segment_def) ... ... @@ -34,14 +34,14 @@ lemma init_segment_trans: "\init_segment S T; init_segment T U\ lemma init_segment_empty2 [iff]: "init_segment S {} \ S={}" by (auto simp: init_segment_def less_sets_def) lemma init_segment_Un: "less_sets S S' \ init_segment S (S \ S')" lemma init_segment_Un: "S \ S' \ init_segment S (S \ S')" by (auto simp: init_segment_def less_sets_def) lemma init_segment_iff: shows "init_segment S T \ S=T \ (\m \ T. S = {n \ T. n < m})" (is "?lhs=?rhs") proof assume ?lhs then obtain S' where S': "T = S \ S'" "less_sets S S'" then obtain S' where S': "T = S \ S'" "S \ S'" by (meson init_segment_def) then have "S \ T" by auto ... ... @@ -74,7 +74,7 @@ next assume m: "m \ T" "S = {n \ T. n < m}" then have "T = S \ {n \ T. m \ n}" by auto moreover have "less_sets S {n \ T. m \ n}" moreover have "S \ {n \ T. m \ n}" using m by (auto simp: less_sets_def) ultimately show "init_segment S T" using init_segment_Un by force ... ... @@ -84,35 +84,33 @@ qed lemma init_segment_empty [iff]: "init_segment {} S" by (auto simp: init_segment_def less_sets_def) lemma init_segment_insert_iff: assumes Sn: "less_sets S {n}" and TS: "\x. x \ T-S \ n\x" 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" proof safe assume L: "init_segment (insert n S) T" then show "init_segment S T" by (metis Sn init_segment_Un init_segment_trans insert_is_Un sup_commute) show "n \ T" using L by (auto simp: init_segment_def) 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) next assume "init_segment S T" "n \ T" then obtain S' where S': "T = S \ S'" "less_sets S S'" assume rhs: "init_segment S T \ n \ T" then obtain R where R: "T = S \ R" "S \ R" by (auto simp: init_segment_def less_sets_def) then have "S \ S' = insert n (S \ (S' - {n})) \ less_sets (insert n S) (S' - {n})" unfolding less_sets_def using \n \ T\ TS nat_less_le by auto 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" using S'(1) init_segment_Un by force using R init_segment_Un by force qed lemma init_segment_insert: assumes "init_segment S T" and T: "less_sets T {n}" assumes "init_segment S T" and T: "T \ {n}" shows "init_segment S (insert n T)" proof (cases "T={}") case False obtain S' where S': "T = S \ S'" "less_sets S S'" obtain S' where S': "T = S \ S'" "S \ S'" by (meson assms init_segment_def) then have "insert n T = S \ (insert n S')" "less_sets S (insert n S')" then have "insert n T = S \ (insert n S')" "S \ (insert n S')" using T False by (auto simp: less_sets_def) then show ?thesis using init_segment_Un by presburger ... ... @@ -359,11 +357,11 @@ proof - by (metis image_mmap_subset_hd_F decides_Fn decides_subset hd_Suc_eq_Eps atLeast_0) next case False have notin_map_Inf: "x \ List.set (map Inf (F n))" if "less_sets S {x}" for x have notin_map_Inf: "x \ List.set (map Inf (F n))" if "S \ {x}" for x proof clarsimp fix T assume "x = Inf T" and "T \ list.set (F n)" with that have ls: "less_sets S {Inf T}" with that have ls: "S \ {Inf T}" by auto have "S \ List.set (map Inf (F j))" if T: "T \ list.set (F (Suc j))" for j ... ... @@ -388,9 +386,9 @@ proof - then show False using minS by blast qed have Inf_hd_F: "Inf (hd (F m)) \ Eps (\ (F n))" if "less_sets S {Inf (hd (F m))}" for m have Inf_hd_F: "Inf (hd (F m)) \ Eps (\ (F n))" if "S \ {Inf (hd (F m))}" for m by (metis Inf_hd_in_Eps hd_F_in_F notin_map_Inf imageI leI set_map that) have less_S: "less_sets S {Inf (hd (F m))}" have less_S: "S \ {Inf (hd (F m))}" if "init_segment S T" "Inf (hd (F m)) \ T" "Inf (hd (F m)) \ S" for T m using \finite S\ that by (auto simp: init_segment_iff less_sets_def) consider "rejects \ S (Eps (\ (F n)))" | "strongly_accepts \ S (Eps (\ (F n)))" ... ... @@ -484,7 +482,7 @@ proof (rule ccontr) then have T_nS: "T \ insert ?n S" proof (elim conjE disjE) assume "\ init_segment T (insert ?n S)" "\ init_segment (insert ?n S) T" moreover have "less_sets S {Min (T - S)}" moreover have "S \ {Min (T - S)}" using Sup_nat_less_sets_singleton N \Min (T - S) \ N\ assms(5) by blast moreover have "finite (T - S)" using T comparables_iff by blast ... ... @@ -518,13 +516,13 @@ proposition strongly_accepts_1_19_plus: assumes "thin_set \" "infinite M" and dsM: "decides_subsets \ M" obtains N where "N \ M" "infinite N" "\S n. \S \ N; finite S; strongly_accepts \ S N; n \ N; less_sets S {n}\ "\S n. \S \ N; finite S; strongly_accepts \ S N; n \ N; S \ {n}\ \ strongly_accepts \ (insert n S) N" proof - define insert_closed where "insert_closed \ \NL N. \T \ Inf ` set NL. \n \ N. strongly_accepts \ T ((Inf ` set NL) \ hd NL) \ less_sets T {n} \ strongly_accepts \ (insert n T) ((Inf ` set NL) \ hd NL)" T \ {n} \ strongly_accepts \ (insert n T) ((Inf ` set NL) \ hd NL)" define \ where "\ \ \NL N. N \ hd NL \ Inf N > Inf (hd NL) \ infinite N \ insert_closed NL N" have "\N. \ NL N" if NL: "infinite (hd NL)" "Inf ` set NL \ hd NL \ M" for NL proof - ... ... @@ -632,7 +630,7 @@ proof - next fix S a assume "S \ range mmap" "finite S" and acc: "strongly_accepts \ S (range mmap)" and a: "a \ range mmap" and Sn: "less_sets S {a}" and a: "a \ range mmap" and Sn: "S \ {a}" then obtain n where n: "a = mmap n" by auto define N where "N \ LEAST n. S \ mmap ` {..: "\P. \P\N; \S. \S \ P; finite S\ \ S \ (?\ 0)\ \ finite P" by (auto simp: Fpow_def disjoint_iff) obtain P where "P \ N" "infinite P" and P: "\S n. \S \ P; finite S; strongly_accepts (?\ 0) S P; n \ P; less_sets S {n}\ "\S n. \S \ P; finite S; strongly_accepts (?\ 0) S P; n \ P; S \ {n}\ \ strongly_accepts (?\ 0) (insert n S) P" using strongly_accepts_1_19_plus [OF thin \infinite N\ N] by blast have "?\ 1 \ Pow P = {}" ... ... @@ -735,7 +733,7 @@ proof clarify using Suc by blast have "S \ {}" using Suc.hyps(2) by auto have "less_sets (S - {Sup S}) {Sup S}" have "S - {Sup S} \ {Sup S}" by (simp add: Suc.prems(1) Sup_nat_def \S \ {}\ dual_order.strict_iff_order less_sets_def) then have "strongly_accepts (?\ 0) (insert (Sup S) (S - {Sup S})) P" by (metis P Seq Suc.prems finite_Diff insert_subset sacc) ... ...
This diff is collapsed.
 ... ... @@ -18,7 +18,7 @@ abbreviation tp :: "V set \ V" subsection \Ordinal Partitions: Definitions\ definition partn_lst :: "[('a \ 'a) set, 'a set, V list, nat] \ bool" where "partn_lst r B \ n \ \f \ nsets B n \ {..}. where "partn_lst r B \ n \ \f \ [B]\<^bsup>n\<^esup> \ {..}. \i < length \. \H. H \ B \ ordertype H r = (\!i) \ f ` (nsets H n) \ {i}" abbreviation partn_lst_VWF :: "V \ V list \ nat \ bool" ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!