equal
deleted
inserted
replaced
455 by (metis flat_unfold not_less shd_sset shift_snth_ge shift_snth_less) |
455 by (metis flat_unfold not_less shd_sset shift_snth_ge shift_snth_less) |
456 |
456 |
457 lemma sset_flat[simp]: "\<forall>xs \<in> sset s. xs \<noteq> [] \<Longrightarrow> |
457 lemma sset_flat[simp]: "\<forall>xs \<in> sset s. xs \<noteq> [] \<Longrightarrow> |
458 sset (flat s) = (\<Union>xs \<in> sset s. set xs)" (is "?P \<Longrightarrow> ?L = ?R") |
458 sset (flat s) = (\<Union>xs \<in> sset s. set xs)" (is "?P \<Longrightarrow> ?L = ?R") |
459 proof safe |
459 proof safe |
460 fix x assume ?P "x : ?L" |
460 fix x assume ?P "x \<in> ?L" |
461 then obtain m where "x = flat s !! m" by (metis image_iff sset_range) |
461 then obtain m where "x = flat s !! m" by (metis image_iff sset_range) |
462 with \<open>?P\<close> obtain n m' where "x = s !! n ! m'" "m' < length (s !! n)" |
462 with \<open>?P\<close> obtain n m' where "x = s !! n ! m'" "m' < length (s !! n)" |
463 proof (atomize_elim, induct m arbitrary: s rule: less_induct) |
463 proof (atomize_elim, induct m arbitrary: s rule: less_induct) |
464 case (less y) |
464 case (less y) |
465 thus ?case |
465 thus ?case |