diff -r b90ff5abb437 -r 256484ef4be4 thys/Positions.thy --- a/thys/Positions.thy Mon Jun 26 17:43:28 2017 +0100 +++ b/thys/Positions.thy Mon Jun 26 18:15:26 2017 +0100 @@ -13,20 +13,6 @@ | "at (Seq v1 v2) (Suc 0#ps)= at v2 ps" | "at (Stars vs) (n#ps)= at (nth vs n) ps" -(* -fun - ato :: "val \ nat list \ val option" -where - "ato v [] = Some v" -| "ato (Left v) (0#ps)= ato v ps" -| "ato (Right v) (Suc 0#ps)= ato v ps" -| "ato (Seq v1 v2) (0#ps)= ato v1 ps" -| "ato (Seq v1 v2) (Suc 0#ps)= ato v2 ps" -| "ato (Stars vs) (n#ps)= (if (n < length vs) then ato (nth vs n) ps else None)" -| "ato v p = None" -*) - - fun Pos :: "val \ (nat list) set" where "Pos (Void) = {[]}" @@ -43,46 +29,6 @@ apply(auto) done -lemma Pos_finite_aux: - assumes "\v \ set vs. finite (Pos v)" - shows "finite (Pos (Stars vs))" -using assms -apply(induct vs) -apply(simp) -apply(simp) -apply(subgoal_tac "finite (Pos (Stars vs) - {[]})") -apply(rule_tac f="\l. Suc (hd l) # tl l" in finite_surj) -apply(assumption) -back -apply(auto simp add: image_def) -apply(rule_tac x="n#ps" in bexI) -apply(simp) -apply(simp) -done - -lemma Pos_finite: - shows "finite (Pos v)" -apply(induct v rule: val.induct) -apply(auto) -apply(simp add: Pos_finite_aux) -done - -(* -lemma ato_test: - assumes "p \ Pos v" - shows "\v'. ato v p = Some v'" -using assms -apply(induct v arbitrary: p rule: Pos.induct) -apply(auto) -apply force -by (metis ato.simps(6) option.distinct(1)) -*) - - -definition pflat :: "val \ nat list => string option" -where - "pflat v p \ (if p \ Pos v then Some (flat (at v p)) else None)" - fun intlen :: "'a list \ int" where "intlen [] = 0" @@ -157,11 +103,6 @@ apply (smt inlen_bigger)+ done -lemma Two_to_Three: - assumes "\p \ Pos v1 \ Pos v2. pflat v1 p = pflat v2 p" - shows "Pos v1 = Pos v2" -using assms -by (metis Un_iff option.distinct(1) pflat_def subsetI subset_antisym) lemma Two_to_Three_orig: assumes "\p \ Pos v1 \ Pos v2. pflat_len v1 p = pflat_len v2 p" @@ -169,20 +110,6 @@ using assms by (metis Un_iff inlen_bigger neg_0_le_iff_le not_one_le_zero pflat_len_def subsetI subset_antisym) -lemma set_eq1: - assumes "insert [] A = insert [] B" "[] \ A" "[] \ B" - shows "A = B" -using assms -by (simp add: insert_ident) - -lemma set_eq2: - assumes "A \ B = A \ C" - and "A \ B = {}" "A \ C = {}" - shows "B = C" -using assms -using Un_Int_distrib sup_bot.left_neutral sup_commute by blast - - lemma Three_to_One: assumes "\ v1 : r" "\ v2 : r" @@ -1847,4 +1774,6 @@ apply(auto simp add: PT_def) done +unused_thms + end \ No newline at end of file