equal
deleted
inserted
replaced
2253 by (simp add: butlast_conv_take min.absorb1) |
2253 by (simp add: butlast_conv_take min.absorb1) |
2254 |
2254 |
2255 lemma drop_butlast: "drop n (butlast xs) = butlast (drop n xs)" |
2255 lemma drop_butlast: "drop n (butlast xs) = butlast (drop n xs)" |
2256 by (simp add: butlast_conv_take drop_take ac_simps) |
2256 by (simp add: butlast_conv_take drop_take ac_simps) |
2257 |
2257 |
|
2258 lemma butlast_power: "(butlast ^^ n) xs = take (length xs - n) xs" |
|
2259 by (induct n) (auto simp: butlast_take) |
|
2260 |
2258 lemma hd_drop_conv_nth: "n < length xs \<Longrightarrow> hd(drop n xs) = xs!n" |
2261 lemma hd_drop_conv_nth: "n < length xs \<Longrightarrow> hd(drop n xs) = xs!n" |
2259 by(simp add: hd_conv_nth) |
2262 by(simp add: hd_conv_nth) |
2260 |
2263 |
2261 lemma set_take_subset_set_take: |
2264 lemma set_take_subset_set_take: |
2262 "m \<le> n \<Longrightarrow> set(take m xs) \<le> set(take n xs)" |
2265 "m \<le> n \<Longrightarrow> set(take m xs) \<le> set(take n xs)" |