summary |
shortlog |
changelog |
graph |
tags |
bookmarks |
branches |
files |
changeset |
raw | gz |
help

author | traytel |

Tue, 31 May 2016 14:56:51 +0200 | |

changeset 63192 | a742d309afa2 |

parent 63190 | 3e79279c10ca |

child 63195 | 53ca45d39130 |

moved lemma from afp

--- a/src/HOL/Library/Stream.thy Tue May 31 12:24:43 2016 +0200 +++ b/src/HOL/Library/Stream.thy Tue May 31 14:56:51 2016 +0200 @@ -341,6 +341,16 @@ lemma sdrop_cycle: "u \<noteq> [] \<Longrightarrow> sdrop n (cycle u) = cycle (rotate (n mod length u) u)" by (induct n arbitrary: u) (auto simp: rotate1_rotate_swap rotate1_hd_tl rotate_conv_mod[symmetric]) +lemma sset_cycle[simp]: + assumes "xs \<noteq> []" + shows "sset (cycle xs) = set xs" +proof (intro set_eqI iffI) + fix x + assume "x \<in> sset (cycle xs)" + then show "x \<in> set xs" using assms + by (induction "cycle xs" arbitrary: xs rule: sset_induct) (fastforce simp: neq_Nil_conv)+ +qed (metis assms UnI1 cycle_decomp sset_shift) + subsection \<open>iterated application of a function\<close>