Skip to content

Commit 9607eda

Browse files
committed
Spell out metis proof
1 parent 7e7ccda commit 9607eda

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Scene_Spaces.thy

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,24 @@ using assms proof (induct xs arbitrary: ys)
101101
by simp
102102
next
103103
case (Cons a xs)
104-
hence ys: "set ys = insert a (set (removeAll a ys))"
105-
by (auto)
104+
consider (a_in) "a \<in> set xs" | (a_notin) "a \<notin> set xs"
105+
by blast
106106
then show ?case
107-
by (metis (no_types, lifting) Cons.hyps Cons.prems(1) Cons.prems(2) Diff_insert_absorb foldr_scene_union_removeAll insertCI insert_absorb list.simps(15) pairwise_insert set_removeAll)
107+
proof cases
108+
case a_in
109+
then show ?thesis
110+
by (metis Cons remdups.simps(2) set_remdups)
111+
next
112+
case a_notin
113+
then have *: "\<Squnion>\<^sub>S xs = \<Squnion>\<^sub>S (removeAll a ys)"
114+
using Cons(2,3) by (auto intro!: Cons(1) simp: pairwise_insert)
115+
then have "\<Squnion>\<^sub>S (a#xs) = (\<Squnion>\<^sub>S xs) \<squnion>\<^sub>S a"
116+
by (simp add: scene_union_commute)
117+
also have "... = \<Squnion>\<^sub>S (removeAll a ys) \<squnion>\<^sub>S a"
118+
using * by simp
119+
finally show ?thesis
120+
using foldr_scene_union_removeAll Cons(2,3) by auto
121+
qed
108122
qed
109123

110124
lemma foldr_scene_removeAll:

0 commit comments

Comments
 (0)